-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #317 from zk-passport/tests/ecdsa
add tests for rest of the curves
- Loading branch information
Showing
4 changed files
with
60 additions
and
0 deletions.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
circuits/circuits/tests/utils/ecdsa/test_brainpoolP512r1.circom
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,13 @@ | ||
pragma circom 2.1.9; | ||
|
||
include "../../../utils/crypto/signature/ecdsa/ecdsaVerifier.circom"; | ||
|
||
template VerifyBrainpoolP384r1Sha384() { | ||
signal input signature[2 * 8]; | ||
signal input pubKey[2 * 8]; | ||
signal input hashParsed[512]; | ||
|
||
EcdsaVerifier(29, 64, 8)(signature, pubKey, hashParsed); | ||
} | ||
|
||
component main = VerifyBrainpoolP384r1Sha384(); |
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,13 @@ | ||
pragma circom 2.1.9; | ||
|
||
include "../../../utils/crypto/signature/ecdsa/ecdsaVerifier.circom"; | ||
|
||
template VerifyP256Sha256() { | ||
signal input signature[2 * 4]; | ||
signal input pubKey[2 * 4]; | ||
signal input hashParsed[256]; | ||
|
||
EcdsaVerifier(8, 64, 4)(signature, pubKey, hashParsed); | ||
} | ||
|
||
component main = VerifyP256Sha256(); |
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,13 @@ | ||
pragma circom 2.1.9; | ||
|
||
include "../../../utils/crypto/signature/ecdsa/ecdsaVerifier.circom"; | ||
|
||
template VerifyP384r1Sha384() { | ||
signal input signature[2 * 6]; | ||
signal input pubKey[2 * 6]; | ||
signal input hashParsed[384]; | ||
|
||
EcdsaVerifier(9, 64, 6)(signature, pubKey, hashParsed); | ||
} | ||
|
||
component main = VerifyP384r1Sha384(); |
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