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

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

Issue 838573003: Add another test for importing a bad EC key into WebCrypto. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 11 months 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 | « no previous file | 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 // This file contains incorrect key data in a variety of formats. 1 // This file contains incorrect key data in a variety of formats.
2 // "key" -- either a dictionary for JWK, or hex encoded bytes for PKCS8/SPKI. 2 // "key" -- either a dictionary for JWK, or hex encoded bytes for PKCS8/SPKI.
3 // "key_format" -- one of: "jwk", "pkcs8", "spki" 3 // "key_format" -- one of: "jwk", "pkcs8", "spki"
4 // "error" -- The expected rejection reason when importing the key. 4 // "error" -- The expected rejection reason when importing the key.
5 [ 5 [
6 // -------------------------------------------------------------------------- 6 // --------------------------------------------------------------------------
7 // Bad public keys 7 // Bad public keys
8 // -------------------------------------------------------------------------- 8 // --------------------------------------------------------------------------
9 // TODO(eroman): Group the bad public keys by format type. 9 // TODO(eroman): Group the bad public keys by format type.
10 10
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 "d": "pJLOj6kAhMIn4aMveXTTnp_2en6HBew0GbNftgdYK-vUYeCxUgrHbsLdTptj665x", 202 "d": "pJLOj6kAhMIn4aMveXTTnp_2en6HBew0GbNftgdYK-vUYeCxUgrHbsLdTptj665x",
203 "x": "5V_ubEnY1SP1znv5wEJc5P9lBwi33lz7CVkBUjl5p_BCYC2zCFRzU2mBO1w_Xvho", 203 "x": "5V_ubEnY1SP1znv5wEJc5P9lBwi33lz7CVkBUjl5p_BCYC2zCFRzU2mBO1w_Xvho",
204 "y": "KPWcxdxQlJKpiNOKjiUZ3j0MT9D72wmT448YUGwXYGxeJCSSRvHOlJg6U2HFvpg-" 204 "y": "KPWcxdxQlJKpiNOKjiUZ3j0MT9D72wmT448YUGwXYGxeJCSSRvHOlJg6U2HFvpg-"
205 }, 205 },
206 "error": "OperationError" 206 "error": "OperationError"
207 }, 207 },
208 208
209 // -------------------------------------------------------------------------- 209 // --------------------------------------------------------------------------
210 // Bad private keys (PKCS8) 210 // Bad private keys (PKCS8)
211 // -------------------------------------------------------------------------- 211 // --------------------------------------------------------------------------
212
213 // The private key is exactly equal to the order, and the public key is
214 // private key * order.
215 {
216 "crv": "P-256",
217 "key_format": "pkcs8",
218 "key": "3066020100301306072A8648CE3D020106082A8648CE3D030107044C304A02010104 20FFFFFFFF00000000FFFFFFFFFFFFFFFFBCE6FAADA7179E84F3B9CAC2FC632551A12303210000FF FFFF00000000FFFFFFFFFFFFFFFFBCE6FAADA7179E84F3B9CAC2FC632551",
219 "error": "DataError"
220 },
212 221
213 // The private key is exactly equal to the order, and the public key is 222 // The private key is exactly equal to the order, and the public key is
214 // omitted. 223 // omitted.
215 { 224 {
216 "crv": "P-256", 225 "crv": "P-256",
217 "key_format": "pkcs8", 226 "key_format": "pkcs8",
218 "key": "3041020100301306072A8648CE3D020106082A8648CE3D0301070427302502010104 20FFFFFFFF00000000FFFFFFFFFFFFFFFFBCE6FAADA7179E84F3B9CAC2FC632551", 227 "key": "3041020100301306072A8648CE3D020106082A8648CE3D0301070427302502010104 20FFFFFFFF00000000FFFFFFFFFFFFFFFFBCE6FAADA7179E84F3B9CAC2FC632551",
219 "error": "DataError: The imported EC key is invalid" 228 "error": "DataError: The imported EC key is invalid"
220 }, 229 },
221 230
222 // The private key is exactly equal to the order + 11, and the public key is 231 // The private key is exactly equal to the order + 11, and the public key is
223 // private key * order. 232 // private key * order.
224 { 233 {
225 "crv": "P-521", 234 "crv": "P-521",
226 "key_format": "pkcs8", 235 "key_format": "pkcs8",
227 "key": "3081EE020100301006072A8648CE3D020106052B810400230481D63081D302010104 4201FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA51868783BF 2F966B7FCC0148F709A5D03BB5C9B8899C47AEBB6FB71E91386414A181890381860004008A758412 59FDEDFF546F1A39573B4315CFED5DC7ED7C17849543EF2C54F2991652F3DBC5332663DA1BD19B1A EBE3191085015C024FA4C9A902ECC0E02DDA0CDB9A0096FB303FCBBA2129849D0CA877054FB2293A DD566210BD0493ED2E95D4E0B9B82B1BC8A90E8B42A4AB3892331914A95336DCAC80E3F4819B5D58 874F92CE48C808", 236 "key": "3081EE020100301006072A8648CE3D020106052B810400230481D63081D302010104 4201FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA51868783BF 2F966B7FCC0148F709A5D03BB5C9B8899C47AEBB6FB71E91386414A181890381860004008A758412 59FDEDFF546F1A39573B4315CFED5DC7ED7C17849543EF2C54F2991652F3DBC5332663DA1BD19B1A EBE3191085015C024FA4C9A902ECC0E02DDA0CDB9A0096FB303FCBBA2129849D0CA877054FB2293A DD566210BD0493ED2E95D4E0B9B82B1BC8A90E8B42A4AB3892331914A95336DCAC80E3F4819B5D58 874F92CE48C808",
228 "error": "DataError: The imported EC key is invalid" 237 "error": "DataError: The imported EC key is invalid"
229 }, 238 },
230 239
231 // The private key is exactly equal to the order + 11, and the public key is 240 // The private key is exactly equal to the order + 11, and the public key is
232 // omitted. 241 // omitted.
233 { 242 {
234 "crv": "P-521", 243 "crv": "P-521",
235 "key_format": "pkcs8", 244 "key_format": "pkcs8",
236 "key": "3060020100301006072A8648CE3D020106052B8104002304493047020101044201FF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA51868783BF2F966B 7FCC0148F709A5D03BB5C9B8899C47AEBB6FB71E91386414", 245 "key": "3060020100301006072A8648CE3D020106052B8104002304493047020101044201FF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA51868783BF2F966B 7FCC0148F709A5D03BB5C9B8899C47AEBB6FB71E91386414",
237 "error": "DataError: The imported EC key is invalid" 246 "error": "DataError: The imported EC key is invalid"
238 } 247 }
239 ] 248 ]
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698