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

Unified Diff: content/test/data/webcrypto/ecdsa.json

Issue 1077273002: html_viewer: Move webcrypto to a place where html_viewer can use it. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase to ToT Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/test/data/webcrypto/ecdh.json ('k') | content/test/data/webcrypto/hmac.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/data/webcrypto/ecdsa.json
diff --git a/content/test/data/webcrypto/ecdsa.json b/content/test/data/webcrypto/ecdsa.json
deleted file mode 100644
index 4c16136bd17398f0c17f552c905d589e668c0d57..0000000000000000000000000000000000000000
--- a/content/test/data/webcrypto/ecdsa.json
+++ /dev/null
@@ -1,163 +0,0 @@
-// This file contains known answers for ECDSA verify() testing.
-// The tests include successful and unsuccessful verifications.
-//
-// These are the possible fields for each test:
-// "key_format" -- The format of the key data. Can be one of: {"jwk", "spki", "nist".
-// "key" -- The public key data. Either a dictionary JWK, or hex encoded bytes (for SPKI)
-// "msg" -- The hex-encoded message to be verified
-// "sig" -- The hex-encoded ECDSA signature as a concatenation of "r" and "s".
-// "error" -- Optional. If provided, verify() is expected to fail with the indicated error.
-// "verify_result" -- Expected boolean result from verify().
-[
-
-// --------------------------------------------------------------------------
-// Successful verifications (P256, P384, P521)
-// --------------------------------------------------------------------------
-
- // From http://csrc.nist.gov/groups/STM/cavp/documents/dss/186-3ecdsatestvectors.zip (SigVer.rsp)
- {
- "crv": "P-256",
- "hash": "sha-512",
- "key_format": "jwk",
- "key": {
- "kty": "EC",
- "crv": "P-256",
- "x": "nLDPaTA9r8dh1ORoe07PA55tNKuWSvgIENjVWKSo1vc",
- "y": "LVEjOheIkgqG7gihlix576MX-3h54pfa0hRtuZX6HHg"
- },
- "msg": "6e2932153301a4eef680e6428929adae988c108d668a31ff55d0489947d75ff81a46bf89e84d6401f023be6e87688fbcd784d785ca846735524acb52d00452c84040a479e7cc330936441d93bbe722a9432a6e1db112b5c9403b10272cb1347fd619d463f7a9d223ad76fde06d8a6883500fb843235abff98e241bdfb5538c3e",
- "sig": "4b9f91e4285287261a1d1c923cf619cd52c175cfe7f1be60a5258c610348ba3d28c45f901d71c41b298638ec0d6a85d7fcb0c33bbfec5a9c810846b639289a84",
- "verify_result": true
- },
-
- // Same test as above, except the key format is SPKI.
- {
- "crv": "P-256",
- "hash": "sha-512",
- "key_format": "spki",
- "key": "3059301306072A8648CE3D020106082A8648CE3D030107034200049CB0CF69303DAFC761D4E4687B4ECF039E6D34AB964AF80810D8D558A4A8D6F72D51233A1788920A86EE08A1962C79EFA317FB7879E297DAD2146DB995FA1C78",
- "msg": "6e2932153301a4eef680e6428929adae988c108d668a31ff55d0489947d75ff81a46bf89e84d6401f023be6e87688fbcd784d785ca846735524acb52d00452c84040a479e7cc330936441d93bbe722a9432a6e1db112b5c9403b10272cb1347fd619d463f7a9d223ad76fde06d8a6883500fb843235abff98e241bdfb5538c3e",
- "sig": "4b9f91e4285287261a1d1c923cf619cd52c175cfe7f1be60a5258c610348ba3d28c45f901d71c41b298638ec0d6a85d7fcb0c33bbfec5a9c810846b639289a84",
- "verify_result": true
- },
-
- // From http://csrc.nist.gov/groups/STM/cavp/documents/dss/186-3ecdsatestvectors.zip (SigVer.rsp)
- {
- "crv": "P-384",
- "hash": "sha-1",
- "key_format": "jwk",
- "key": {
- "kty": "EC",
- "crv": "P-384",
- "x": "CHSi4Lj_RI8OVDIeJ_Tx5k0GTN630m9FjDLpMBIPTlfchcJpP5d-7UqOzI25gbTZ",
- "y": "H2lEbfT0xvXeGQA_RfiR0OvNL__bXIHAQOjWmUxDx_7tuYpKMe37NeiaMAE8O5Jn"
- },
- "msg": "3f0783a58e66f3d2c0ccfb5fac3f09db6f8609d0592bc77fdffed9cf0e137d26a867057665f3ad81beebbbdb723d5a47c580828f10f7347ab8a9c24d195f736dfae6eae37d88fe3b4735e7c669a80ac1913e5c24c8c1d5cdb15f994f3ec2f1c774752e14f596b38c2fbf037616d608244d3da7d4badf351330f947e04cc350e7",
- "sig": "8d9d3e3d0b2b2871ea2f03f27ba8699f214be8d875c0d770b0fff1c4ce341f0c834ac11f9ec12bfdb8320b1724c8c22062150dfba8e65c0c7be7ef81c87241d2c37a83c27eb31ccc2b3c3957670a744c81be6d741340b5189cc0c547df81b0d2",
- "verify_result": true
- },
-
- // From http://csrc.nist.gov/groups/STM/cavp/documents/dss/186-3ecdsatestvectors.zip (SigVer.rsp)
- {
- "crv": "P-384",
- "hash": "sha-256",
- "key_format": "jwk",
- "key": {
- "kty": "EC",
- "crv": "P-384",
- "x": "hqwS3Qp_5bgf2uhrEkNdMW75OSo_ULMHq2XZxged0NLYGdwJ4ihhRZwu2Z-6tm-u",
- "y": "rIREB3qu1tbMrL5npMqs7gtaCUo1dcoS6ktHdMAw_hyHDJJJAj9dxNmtbjM2aMw4"
- },
- "msg": "862cf14c65ff85f4fdd8a39302056355c89c6ea1789c056262b077dab33abbfda0070fce188c6330de84dfc512744e9fa0f7b03ce0c14858db1952750d7bbe6bd9c8726c0eae61e6cf2877c655b1f0e0ce825430a9796e7420e5c174eab7a50459e291510bc515141738900d390217c5a522e4bde547e57287d8139dc916504e",
- "sig": "798065f1d1cbd3a1897794f4a025ed47565df773843f4fa74c85fe4d30e3a394783ec5723b530fc5f57906f946ce15e8b57166044c57c7d9582066805b5885abc06e0bfc02433850c2b74973205ca357a2da94a65172086f5a1580baa697400b",
- "verify_result": true
- },
-
- // From http://csrc.nist.gov/groups/STM/cavp/documents/dss/186-3ecdsatestvectors.zip (SigVer.rsp)
- {
- "crv": "P-521",
- "hash": "sha-1",
- "key_format": "jwk",
- "key": {
- "kty": "EC",
- "crv": "P-521",
- "x": "APUKCHAyUMFfBDyMRumXg0NSRc-Y9PJpSw4vjQKaUU3W8LCG1O2JIADNVZAQeq5pxMCnqV98905XcKB9XbVbzkq0",
- "y": "APLHcLq4ub5M227NPcJsaY2g0lmc6_PZBPf5yjpV5kcxgQ1zzTFyZOULq6S8KGCFfhbWy7eVAbyeOjK9Fy6opx3u"
- },
- "msg": "9bbbbe8a72130e1f023fb77be4648c80e1722d98bd478882383026c5c4e8748873997c5a38e0a173ed461546422d7691393dc2aceb0c0775068bc7145e33bf6a9e34f7fc6acc8f079a265168e54d3cca8d40aa04c1afd0909aa3df50908d7324aa7861b50f471fbfa5d615b0d718132c81957b178ad936deb89fde37147f8ae6",
- "sig": "001e7cbb20c9a66abf149c79d11859051d35cfddd04f420dd23bd3206c82b29e782453cabfefe792e4e3e68c9bf6bf50d5a00ba5dd73b41378fb46e91ca797dbb25000f1e9252573c003cb77f22c8c6d56f2149f7e8d88d699983da9250c8edfd4b9f864a46c48819524651886e3fd56492f4b6c75fb50a1d59e8bfc25f9fd42dc4e1d37",
- "verify_result": true
- },
-
-// --------------------------------------------------------------------------
-// Bad signature
-// --------------------------------------------------------------------------
-
- // The signature was truncated by 1 byte. Verification should fail (with false, not an operation error).
- {
- "crv": "P-256",
- "hash": "sha-512",
- "key_format": "jwk",
- "key": {
- "kty": "EC",
- "crv": "P-256",
- "x": "nLDPaTA9r8dh1ORoe07PA55tNKuWSvgIENjVWKSo1vc",
- "y": "LVEjOheIkgqG7gihlix576MX-3h54pfa0hRtuZX6HHg"
- },
- "msg": "6e2932153301a4eef680e6428929adae988c108d668a31ff55d0489947d75ff81a46bf89e84d6401f023be6e87688fbcd784d785ca846735524acb52d00452c84040a479e7cc330936441d93bbe722a9432a6e1db112b5c9403b10272cb1347fd619d463f7a9d223ad76fde06d8a6883500fb843235abff98e241bdfb5538c3e",
- "sig": "4b9f91e4285287261a1d1c923cf619cd52c175cfe7f1be60a5258c610348ba3d28c45f901d71c41b298638ec0d6a85d7fcb0c33bbfec5a9c810846b639289a",
- "verify_result": false
- },
-
- // The signature was made using SHA-512, however verification is being done
- // using SHA-1. Verification using SHA-1 should therefore fail.
- {
- "crv": "P-256",
- "hash": "sha-1",
- "key_format": "jwk",
- "key": {
- "kty": "EC",
- "crv": "P-256",
- "x": "nLDPaTA9r8dh1ORoe07PA55tNKuWSvgIENjVWKSo1vc",
- "y": "LVEjOheIkgqG7gihlix576MX-3h54pfa0hRtuZX6HHg"
- },
- "msg": "6e2932153301a4eef680e6428929adae988c108d668a31ff55d0489947d75ff81a46bf89e84d6401f023be6e87688fbcd784d785ca846735524acb52d00452c84040a479e7cc330936441d93bbe722a9432a6e1db112b5c9403b10272cb1347fd619d463f7a9d223ad76fde06d8a6883500fb843235abff98e241bdfb5538c3e",
- "sig": "4b9f91e4285287261a1d1c923cf619cd52c175cfe7f1be60a5258c610348ba3d28c45f901d71c41b298638ec0d6a85d7fcb0c33bbfec5a9c810846b639289a84",
- "verify_result": false
- },
-
- // Signature is zero-padded.
- // The siganture is the concatenation of "r" and "s". In this test case both
- // "r" and "s" are zero-padded by 1. It would be possible to support such a
- // signature, however the expectation is that it fails.
- {
- "crv": "P-384",
- "hash": "sha-1",
- "key_format": "jwk",
- "key": {
- "kty": "EC",
- "crv": "P-384",
- "x": "CHSi4Lj_RI8OVDIeJ_Tx5k0GTN630m9FjDLpMBIPTlfchcJpP5d-7UqOzI25gbTZ",
- "y": "H2lEbfT0xvXeGQA_RfiR0OvNL__bXIHAQOjWmUxDx_7tuYpKMe37NeiaMAE8O5Jn"
- },
- "msg": "3f0783a58e66f3d2c0ccfb5fac3f09db6f8609d0592bc77fdffed9cf0e137d26a867057665f3ad81beebbbdb723d5a47c580828f10f7347ab8a9c24d195f736dfae6eae37d88fe3b4735e7c669a80ac1913e5c24c8c1d5cdb15f994f3ec2f1c774752e14f596b38c2fbf037616d608244d3da7d4badf351330f947e04cc350e7",
- "sig": "008d9d3e3d0b2b2871ea2f03f27ba8699f214be8d875c0d770b0fff1c4ce341f0c834ac11f9ec12bfdb8320b1724c8c2200062150dfba8e65c0c7be7ef81c87241d2c37a83c27eb31ccc2b3c3957670a744c81be6d741340b5189cc0c547df81b0d2",
- "verify_result": false
- },
-
- // Empty signature.
- {
- "crv": "P-384",
- "hash": "sha-1",
- "key_format": "jwk",
- "key": {
- "kty": "EC",
- "crv": "P-384",
- "x": "CHSi4Lj_RI8OVDIeJ_Tx5k0GTN630m9FjDLpMBIPTlfchcJpP5d-7UqOzI25gbTZ",
- "y": "H2lEbfT0xvXeGQA_RfiR0OvNL__bXIHAQOjWmUxDx_7tuYpKMe37NeiaMAE8O5Jn"
- },
- "msg": "3f0783a58e66f3d2c0ccfb5fac3f09db6f8609d0592bc77fdffed9cf0e137d26a867057665f3ad81beebbbdb723d5a47c580828f10f7347ab8a9c24d195f736dfae6eae37d88fe3b4735e7c669a80ac1913e5c24c8c1d5cdb15f994f3ec2f1c774752e14f596b38c2fbf037616d608244d3da7d4badf351330f947e04cc350e7",
- "sig": "",
- "verify_result": false
- }
-]
« no previous file with comments | « content/test/data/webcrypto/ecdh.json ('k') | content/test/data/webcrypto/hmac.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698