-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add tests for point compression support
- Loading branch information
Showing
5 changed files
with
93 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
third-party/chromium/data/verify_signed_data/ours/ecdsa-prime256v1-sha256-compressed.pem
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
Copy of the uncompressed version, but with the public key compressed manually | ||
using `openssl ec`. | ||
|
||
|
||
$ openssl asn1parse -i < [PUBLIC KEY] | ||
0:d=0 hl=2 l= 57 cons: SEQUENCE | ||
2:d=1 hl=2 l= 19 cons: SEQUENCE | ||
4:d=2 hl=2 l= 7 prim: OBJECT :id-ecPublicKey | ||
13:d=2 hl=2 l= 8 prim: OBJECT :prime256v1 | ||
23:d=1 hl=2 l= 34 prim: BIT STRING | ||
|
||
-----BEGIN PUBLIC KEY----- | ||
MDkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDIgADBKrsc2NXJvIT+4qeZNo7hjLkFJWpRNAEW1IuunJ | ||
A+tU= | ||
-----END PUBLIC KEY----- | ||
|
||
|
||
$ openssl asn1parse -i < [ALGORITHM] | ||
0:d=0 hl=2 l= 10 cons: SEQUENCE | ||
2:d=1 hl=2 l= 8 prim: OBJECT :ecdsa-with-SHA256 | ||
|
||
-----BEGIN ALGORITHM----- | ||
MAoGCCqGSM49BAMC | ||
-----END ALGORITHM----- | ||
|
||
-----BEGIN DATA----- | ||
MTIzNDAw | ||
-----END DATA----- | ||
|
||
|
||
$ openssl asn1parse -i < [SIGNATURE] | ||
0:d=0 hl=2 l= 73 prim: BIT STRING | ||
|
||
-----BEGIN SIGNATURE----- | ||
A0kAMEYCIQCo6hUMuAEl1zgcTB8dqOneJxH5kXBgQGpz15BFGeUTiAIhAPOrn6aL1HlzpzstQEg | ||
MK6UMIsnXbsIXJXKIKTKFRJuG | ||
-----END SIGNATURE----- |
38 changes: 38 additions & 0 deletions
38
third-party/chromium/data/verify_signed_data/ours/ecdsa-prime256v1-sha256.pem
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
The key, message, and signature come from wycheproof ecdsa_secp256r1_sha256_test.json | ||
|
||
The signature was wrapped in an additional BITSTRING. | ||
|
||
|
||
$ openssl asn1parse -i < [PUBLIC KEY] | ||
0:d=0 hl=2 l= 89 cons: SEQUENCE | ||
2:d=1 hl=2 l= 19 cons: SEQUENCE | ||
4:d=2 hl=2 l= 7 prim: OBJECT :id-ecPublicKey | ||
13:d=2 hl=2 l= 8 prim: OBJECT :prime256v1 | ||
23:d=1 hl=2 l= 66 prim: BIT STRING | ||
|
||
-----BEGIN PUBLIC KEY----- | ||
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEBKrsc2NXJvIT+4qeZNo7hjLkFJWpRNAEW1IuunJ | ||
A+tWH2TFXmKqjpboBd1eHztBeqve04J/IHW0apUboNl1SXQ== | ||
-----END PUBLIC KEY----- | ||
|
||
|
||
$ openssl asn1parse -i < [ALGORITHM] | ||
0:d=0 hl=2 l= 10 cons: SEQUENCE | ||
2:d=1 hl=2 l= 8 prim: OBJECT :ecdsa-with-SHA256 | ||
|
||
-----BEGIN ALGORITHM----- | ||
MAoGCCqGSM49BAMC | ||
-----END ALGORITHM----- | ||
|
||
-----BEGIN DATA----- | ||
MTIzNDAw | ||
-----END DATA----- | ||
|
||
|
||
$ openssl asn1parse -i < [SIGNATURE] | ||
0:d=0 hl=2 l= 73 prim: BIT STRING | ||
|
||
-----BEGIN SIGNATURE----- | ||
A0kAMEYCIQCo6hUMuAEl1zgcTB8dqOneJxH5kXBgQGpz15BFGeUTiAIhAPOrn6aL1HlzpzstQEg | ||
MK6UMIsnXbsIXJXKIKTKFRJuG | ||
-----END SIGNATURE----- |