From 4ab40389c9fa58dc1af0b06c6e80a5ff6006b984 Mon Sep 17 00:00:00 2001 From: turnoffthiscomputer Date: Thu, 9 Jan 2025 13:56:54 +0100 Subject: [PATCH] rename prove for register - refactor --- ...sha512_sha512_ecdsa_brainpoolP512r1.circom | 5 - ...sha512_sha512_ecdsa_brainpoolP512r1.circom | 5 + circuits/tests/register/test_cases.ts | 420 +++++++++--------- 3 files changed, 215 insertions(+), 215 deletions(-) delete mode 100644 circuits/circuits/prove/instances/prove_sha512_sha512_sha512_ecdsa_brainpoolP512r1.circom create mode 100644 circuits/circuits/register/instances/register_sha512_sha512_sha512_ecdsa_brainpoolP512r1.circom diff --git a/circuits/circuits/prove/instances/prove_sha512_sha512_sha512_ecdsa_brainpoolP512r1.circom b/circuits/circuits/prove/instances/prove_sha512_sha512_sha512_ecdsa_brainpoolP512r1.circom deleted file mode 100644 index d27ab981..00000000 --- a/circuits/circuits/prove/instances/prove_sha512_sha512_sha512_ecdsa_brainpoolP512r1.circom +++ /dev/null @@ -1,5 +0,0 @@ -pragma circom 2.1.9; - -include "../openpassport_prove.circom"; - -component main { public [ scope, user_identifier, current_date] } = OPENPASSPORT_PROVE(512, 512, 29, 64, 8, 768, 256, 20); \ No newline at end of file diff --git a/circuits/circuits/register/instances/register_sha512_sha512_sha512_ecdsa_brainpoolP512r1.circom b/circuits/circuits/register/instances/register_sha512_sha512_sha512_ecdsa_brainpoolP512r1.circom new file mode 100644 index 00000000..445d08d4 --- /dev/null +++ b/circuits/circuits/register/instances/register_sha512_sha512_sha512_ecdsa_brainpoolP512r1.circom @@ -0,0 +1,5 @@ +pragma circom 2.1.9; + +include "../openpassport_register.circom"; + +component main = OPENPASSPORT_REGISTER(512, 512, 29, 64, 8, 768, 256); \ No newline at end of file diff --git a/circuits/tests/register/test_cases.ts b/circuits/tests/register/test_cases.ts index eac19ef4..b2977a9a 100644 --- a/circuits/tests/register/test_cases.ts +++ b/circuits/tests/register/test_cases.ts @@ -1,215 +1,215 @@ export const sigAlgs = [ - { - dgHashAlgo: 'sha256', - eContentHashAlgo: 'sha256', - sigAlg: 'rsapss', - hashFunction: 'sha256', - domainParameter: '3', - keyLength: '3072', - checkNullifier: true, - }, - // { - // dgHashAlgo: 'sha256', - // eContentHashAlgo: 'sha256', - // sigAlg: 'rsa', - // hashFunction: 'sha256', - // domainParameter: '65537', - // keyLength: '2048', - // }, - // { - // dgHashAlgo: 'sha1', - // eContentHashAlgo: 'sha256', - // sigAlg: 'rsa', - // hashFunction: 'sha256', - // domainParameter: '65537', - // keyLength: '2048', - // }, - // { - // dgHashAlgo: 'sha1', - // eContentHashAlgo: 'sha1', - // sigAlg: 'ecdsa', - // hashFunction: 'sha1', - // domainParameter: 'secp256r1', - // keyLength: '256', - // }, - // { - // dgHashAlgo: 'sha256', - // eContentHashAlgo: 'sha224', - // sigAlg: 'ecdsa', - // hashFunction: 'sha224', - // domainParameter: 'brainpoolP224r1', - // keyLength: '224', - // }, + { + dgHashAlgo: 'sha256', + eContentHashAlgo: 'sha256', + sigAlg: 'rsapss', + hashFunction: 'sha256', + domainParameter: '3', + keyLength: '3072', + checkNullifier: true, + }, + { + dgHashAlgo: 'sha1', + eContentHashAlgo: 'sha256', + sigAlg: 'rsa', + hashFunction: 'sha256', + domainParameter: '65537', + keyLength: '2048', + }, + { + dgHashAlgo: 'sha1', + eContentHashAlgo: 'sha1', + sigAlg: 'ecdsa', + hashFunction: 'sha1', + domainParameter: 'secp256r1', + keyLength: '256', + }, + { + dgHashAlgo: 'sha256', + eContentHashAlgo: 'sha224', + sigAlg: 'ecdsa', + hashFunction: 'sha224', + domainParameter: 'brainpoolP224r1', + keyLength: '224', + }, ]; export const fullSigAlgs = [ - { - dgHashAlgo: 'sha1', - eContentHashAlgo: 'sha1', - sigAlg: 'rsa', - hashFunction: 'sha1', - domainParameter: '65537', - keyLength: '2048', - checkNullifier: true, - }, - { - dgHashAlgo: 'sha256', - eContentHashAlgo: 'sha256', - sigAlg: 'rsa', - hashFunction: 'sha256', - domainParameter: '65537', - keyLength: '2048', - }, - { - dgHashAlgo: 'sha256', - eContentHashAlgo: 'sha256', - sigAlg: 'rsapss', - hashFunction: 'sha256', - domainParameter: '65537', - keyLength: '2048', - }, - { - dgHashAlgo: 'sha256', - eContentHashAlgo: 'sha256', - sigAlg: 'rsapss', - hashFunction: 'sha256', - domainParameter: '65537', - keyLength: '3072', - }, - { - dgHashAlgo: 'sha256', - eContentHashAlgo: 'sha256', - sigAlg: 'rsapss', - hashFunction: 'sha256', - domainParameter: '65537', - keyLength: '4096', - }, - { - dgHashAlgo: 'sha256', - eContentHashAlgo: 'sha256', - sigAlg: 'rsapss', - hashFunction: 'sha256', - domainParameter: '3', - keyLength: '4096', - }, - { - dgHashAlgo: 'sha256', - eContentHashAlgo: 'sha256', - sigAlg: 'rsapss', - hashFunction: 'sha256', - domainParameter: '3', - keyLength: '3072', - }, - { - dgHashAlgo: 'sha256', - eContentHashAlgo: 'sha256', - sigAlg: 'rsa', - hashFunction: 'sha256', - domainParameter: '3', - keyLength: '2048', - }, - { - dgHashAlgo: 'sha256', - eContentHashAlgo: 'sha256', - sigAlg: 'rsa', - hashFunction: 'sha256', - domainParameter: '65537', - keyLength: '3072', - }, - { - dgHashAlgo: 'sha256', - eContentHashAlgo: 'sha256', - sigAlg: 'ecdsa', - hashFunction: 'sha256', - domainParameter: 'secp256r1', - keyLength: '256', - }, - { - dgHashAlgo: 'sha1', - eContentHashAlgo: 'sha1', - sigAlg: 'ecdsa', - hashFunction: 'sha1', - domainParameter: 'secp256r1', - keyLength: '256', - }, - { - dgHashAlgo: 'sha256', - eContentHashAlgo: 'sha256', - sigAlg: 'ecdsa', - hashFunction: 'sha256', - domainParameter: 'brainpoolP256r1', - keyLength: '256', - }, - { - dgHashAlgo: 'sha256', - eContentHashAlgo: 'sha256', - sigAlg: 'ecdsa', - hashFunction: 'sha256', - domainParameter: 'secp384r1', - keyLength: '384', - }, - { - dgHashAlgo: 'sha384', - eContentHashAlgo: 'sha384', - sigAlg: 'ecdsa', - hashFunction: 'sha384', - domainParameter: 'brainpoolP256r1', - keyLength: '256', - }, - { - dgHashAlgo: 'sha384', - eContentHashAlgo: 'sha384', - sigAlg: 'ecdsa', - hashFunction: 'sha384', - domainParameter: 'brainpoolP384r1', - keyLength: '384', - }, - { - dgHashAlgo: 'sha384', - eContentHashAlgo: 'sha384', - sigAlg: 'ecdsa', - hashFunction: 'sha384', - domainParameter: 'secp384r1', - keyLength: '384', - }, - { - dgHashAlgo: 'sha512', - eContentHashAlgo: 'sha512', - sigAlg: 'ecdsa', - hashFunction: 'sha512', - domainParameter: 'brainpoolP256r1', - keyLength: '256', - }, - { - dgHashAlgo: 'sha256', - eContentHashAlgo: 'sha224', - sigAlg: 'ecdsa', - hashFunction: 'sha224', - domainParameter: 'brainpoolP224r1', - keyLength: '224', - }, - { - dgHashAlgo: 'sha256', - eContentHashAlgo: 'sha256', - sigAlg: 'ecdsa', - hashFunction: 'sha256', - domainParameter: 'brainpoolP224r1', - keyLength: '224', - }, - { - dgHashAlgo: 'sha1', - eContentHashAlgo: 'sha1', - sigAlg: 'ecdsa', - hashFunction: 'sha1', - domainParameter: 'brainpoolP224r1', - keyLength: '224', - }, - { - dgHashAlgo: 'sha256', - eContentHashAlgo: 'sha256', - sigAlg: 'ecdsa', - hashFunction: 'sha256', - domainParameter: 'secp256r1', - keyLength: '256', - }, + { + dgHashAlgo: 'sha1', + eContentHashAlgo: 'sha1', + sigAlg: 'rsa', + hashFunction: 'sha1', + domainParameter: '65537', + keyLength: '2048', + checkNullifier: true, + }, + { + dgHashAlgo: 'sha256', + eContentHashAlgo: 'sha256', + sigAlg: 'rsa', + hashFunction: 'sha256', + domainParameter: '65537', + keyLength: '2048', + }, + { + dgHashAlgo: 'sha256', + eContentHashAlgo: 'sha256', + sigAlg: 'rsapss', + hashFunction: 'sha256', + domainParameter: '65537', + keyLength: '2048', + }, + { + dgHashAlgo: 'sha256', + eContentHashAlgo: 'sha256', + sigAlg: 'rsapss', + hashFunction: 'sha256', + domainParameter: '65537', + keyLength: '3072', + }, + { + dgHashAlgo: 'sha256', + eContentHashAlgo: 'sha256', + sigAlg: 'rsapss', + hashFunction: 'sha256', + domainParameter: '65537', + keyLength: '4096', + }, + { + dgHashAlgo: 'sha256', + eContentHashAlgo: 'sha256', + sigAlg: 'rsapss', + hashFunction: 'sha256', + domainParameter: '3', + keyLength: '4096', + }, + { + dgHashAlgo: 'sha256', + eContentHashAlgo: 'sha256', + sigAlg: 'rsapss', + hashFunction: 'sha256', + domainParameter: '3', + keyLength: '3072', + }, + { + dgHashAlgo: 'sha256', + eContentHashAlgo: 'sha256', + sigAlg: 'rsa', + hashFunction: 'sha256', + domainParameter: '3', + keyLength: '2048', + }, + { + dgHashAlgo: 'sha256', + eContentHashAlgo: 'sha256', + sigAlg: 'rsa', + hashFunction: 'sha256', + domainParameter: '65537', + keyLength: '3072', + }, + { + dgHashAlgo: 'sha256', + eContentHashAlgo: 'sha256', + sigAlg: 'ecdsa', + hashFunction: 'sha256', + domainParameter: 'secp256r1', + keyLength: '256', + }, + { + dgHashAlgo: 'sha1', + eContentHashAlgo: 'sha1', + sigAlg: 'ecdsa', + hashFunction: 'sha1', + domainParameter: 'secp256r1', + keyLength: '256', + }, + { + dgHashAlgo: 'sha256', + eContentHashAlgo: 'sha256', + sigAlg: 'ecdsa', + hashFunction: 'sha256', + domainParameter: 'brainpoolP256r1', + keyLength: '256', + }, + { + dgHashAlgo: 'sha256', + eContentHashAlgo: 'sha256', + sigAlg: 'ecdsa', + hashFunction: 'sha256', + domainParameter: 'secp384r1', + keyLength: '384', + }, + { + dgHashAlgo: 'sha384', + eContentHashAlgo: 'sha384', + sigAlg: 'ecdsa', + hashFunction: 'sha384', + domainParameter: 'brainpoolP256r1', + keyLength: '256', + }, + { + dgHashAlgo: 'sha384', + eContentHashAlgo: 'sha384', + sigAlg: 'ecdsa', + hashFunction: 'sha384', + domainParameter: 'brainpoolP384r1', + keyLength: '384', + }, + { + dgHashAlgo: 'sha384', + eContentHashAlgo: 'sha384', + sigAlg: 'ecdsa', + hashFunction: 'sha384', + domainParameter: 'secp384r1', + keyLength: '384', + }, + { + dgHashAlgo: 'sha512', + eContentHashAlgo: 'sha512', + sigAlg: 'ecdsa', + hashFunction: 'sha512', + domainParameter: 'brainpoolP256r1', + keyLength: '256', + }, + { + dgHashAlgo: 'sha256', + eContentHashAlgo: 'sha224', + sigAlg: 'ecdsa', + hashFunction: 'sha224', + domainParameter: 'brainpoolP224r1', + keyLength: '224', + }, + { + dgHashAlgo: 'sha256', + eContentHashAlgo: 'sha256', + sigAlg: 'ecdsa', + hashFunction: 'sha256', + domainParameter: 'brainpoolP224r1', + keyLength: '224', + }, + { + dgHashAlgo: 'sha1', + eContentHashAlgo: 'sha1', + sigAlg: 'ecdsa', + hashFunction: 'sha1', + domainParameter: 'brainpoolP224r1', + keyLength: '224', + }, + { + dgHashAlgo: 'sha256', + eContentHashAlgo: 'sha256', + sigAlg: 'ecdsa', + hashFunction: 'sha256', + domainParameter: 'secp256r1', + keyLength: '256', + }, + { + dgHashAlgo: 'sha512', + eContentHashAlgo: 'sha512', + sigAlg: 'ecdsa', + hashFunction: 'sha512', + domainParameter: 'brainpoolP512r1', + keyLength: '512', + }, ];