Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(262)

Side by Side Diff: content/test/data/webcrypto/ecdh.json

Issue 780923003: Fix a WebCrypto error type: InvalidAccessError --> OperationError. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@derive_key
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/child/webcrypto/status.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // TODO(eroman): Use known test vectors. The samples I used here I generated mys elf. 1 // TODO(eroman): Use known test vectors. The samples I used here I generated mys elf.
2 [ 2 [
3 // Test key derivation using ECDH (P-256), using a public and private key from 3 // Test key derivation using ECDH (P-256), using a public and private key from
4 // different key pairs. 4 // different key pairs.
5 { 5 {
6 "public_key": { 6 "public_key": {
7 "crv": "P-256", 7 "crv": "P-256",
8 "kty":"EC", 8 "kty":"EC",
9 "x":"u6dWhaRHrvFF0CiFVuUUFafU6ixveQf9trHDXJ8hgV8", 9 "x":"u6dWhaRHrvFF0CiFVuUUFafU6ixveQf9trHDXJ8hgV8",
10 "y":"thSm4LIY35vDD-5LE454eB7TShn919DVVGZ_7tWdjTE" 10 "y":"thSm4LIY35vDD-5LE454eB7TShn919DVVGZ_7tWdjTE"
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 "d":"CQ8uF_-zB1NftLO6ytwKM3Cnuol64PQw5qOuCzQJeFU" 268 "d":"CQ8uF_-zB1NftLO6ytwKM3Cnuol64PQw5qOuCzQJeFU"
269 }, 269 },
270 "public_key": { 270 "public_key": {
271 "kty":"EC", 271 "kty":"EC",
272 "crv":"P-256", 272 "crv":"P-256",
273 "x":"S2S3tjygMB0DkM-N9jYUgGLt_9_H6km5P9V6V_KS4_4", 273 "x":"S2S3tjygMB0DkM-N9jYUgGLt_9_H6km5P9V6V_KS4_4",
274 "y":"03j8Tyqgrc4R4FAUV2C7-im96yMmfmO_5Om6Kr8YP3o" 274 "y":"03j8Tyqgrc4R4FAUV2C7-im96yMmfmO_5Om6Kr8YP3o"
275 }, 275 },
276 276
277 "length_bits": 257, 277 "length_bits": 257,
278 "error": "InvalidAccess: Length specified for ECDH key derivation is too lar ge. Maximum allowed is 256 bits" 278 "error": "OperationError: Length specified for ECDH key derivation is too la rge. Maximum allowed is 256 bits"
279 }, 279 },
280 280
281 // The length is too long, by 1 byte 281 // The length is too long, by 1 byte
282 { 282 {
283 "private_key": { 283 "private_key": {
284 "kty":"EC", 284 "kty":"EC",
285 "crv":"P-256", 285 "crv":"P-256",
286 "x":"u6dWhaRHrvFF0CiFVuUUFafU6ixveQf9trHDXJ8hgV8", 286 "x":"u6dWhaRHrvFF0CiFVuUUFafU6ixveQf9trHDXJ8hgV8",
287 "y":"thSm4LIY35vDD-5LE454eB7TShn919DVVGZ_7tWdjTE", 287 "y":"thSm4LIY35vDD-5LE454eB7TShn919DVVGZ_7tWdjTE",
288 "d":"CQ8uF_-zB1NftLO6ytwKM3Cnuol64PQw5qOuCzQJeFU" 288 "d":"CQ8uF_-zB1NftLO6ytwKM3Cnuol64PQw5qOuCzQJeFU"
289 }, 289 },
290 "public_key": { 290 "public_key": {
291 "kty":"EC", 291 "kty":"EC",
292 "crv":"P-256", 292 "crv":"P-256",
293 "x":"S2S3tjygMB0DkM-N9jYUgGLt_9_H6km5P9V6V_KS4_4", 293 "x":"S2S3tjygMB0DkM-N9jYUgGLt_9_H6km5P9V6V_KS4_4",
294 "y":"03j8Tyqgrc4R4FAUV2C7-im96yMmfmO_5Om6Kr8YP3o" 294 "y":"03j8Tyqgrc4R4FAUV2C7-im96yMmfmO_5Om6Kr8YP3o"
295 }, 295 },
296 296
297 "length_bits": 264, 297 "length_bits": 264,
298 "error": "InvalidAccess: Length specified for ECDH key derivation is too lar ge. Maximum allowed is 256 bits" 298 "error": "OperationError: Length specified for ECDH key derivation is too la rge. Maximum allowed is 256 bits"
299 }, 299 },
300 300
301 // The public key parameter is in fact a private key 301 // The public key parameter is in fact a private key
302 // (not allowed by web crypto), even though it could in practice work. 302 // (not allowed by web crypto), even though it could in practice work.
303 { 303 {
304 "private_key": { 304 "private_key": {
305 "kty":"EC", 305 "kty":"EC",
306 "crv":"P-256", 306 "crv":"P-256",
307 "x":"u6dWhaRHrvFF0CiFVuUUFafU6ixveQf9trHDXJ8hgV8", 307 "x":"u6dWhaRHrvFF0CiFVuUUFafU6ixveQf9trHDXJ8hgV8",
308 "y":"thSm4LIY35vDD-5LE454eB7TShn919DVVGZ_7tWdjTE", 308 "y":"thSm4LIY35vDD-5LE454eB7TShn919DVVGZ_7tWdjTE",
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 352
353 "private_key": { 353 "private_key": {
354 "crv":"P-521", 354 "crv":"P-521",
355 "kty":"EC", 355 "kty":"EC",
356 "d":"AU3LVJK4dtlbOEFb018ry-D-kYF7J7oQxXLpXcnQXbTh42FORGGGtySTA83gT_GiHJ0tn vgVrDdUMK1muJBGPrRf", 356 "d":"AU3LVJK4dtlbOEFb018ry-D-kYF7J7oQxXLpXcnQXbTh42FORGGGtySTA83gT_GiHJ0tn vgVrDdUMK1muJBGPrRf",
357 "x":"ADRllQ0B7icrnJ7ib2r-CXvymGFiC_3f6_o0SzLMBIggM8ndQm9l768SToMy1hUo64Jso fGSQ37P4CRqT_QeivBD", 357 "x":"ADRllQ0B7icrnJ7ib2r-CXvymGFiC_3f6_o0SzLMBIggM8ndQm9l768SToMy1hUo64Jso fGSQ37P4CRqT_QeivBD",
358 "y":"ALKEzew1Xe4Sv86lZVqb2xxZ0l7WrE3DPJ93fUtSPih5iH8jg0GPDKMVoA5ffFmqPwbdg S2BK18PBFIT7QDGb2Zx" 358 "y":"ALKEzew1Xe4Sv86lZVqb2xxZ0l7WrE3DPJ93fUtSPih5iH8jg0GPDKMVoA5ffFmqPwbdg S2BK18PBFIT7QDGb2Zx"
359 }, 359 },
360 360
361 "length_bits": 529, 361 "length_bits": 529,
362 "error": "InvalidAccess: Length specified for ECDH key derivation is too lar ge. Maximum allowed is 528 bits" 362 "error": "OperationError: Length specified for ECDH key derivation is too la rge. Maximum allowed is 528 bits"
363 } 363 }
364 ] 364 ]
365 365
OLDNEW
« no previous file with comments | « content/child/webcrypto/status.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698