From d266cf2ced567fd610c170b0d64428c5c2099a09 Mon Sep 17 00:00:00 2001 From: nicoshark Date: Mon, 31 Mar 2025 02:22:15 +0900 Subject: [PATCH] Feat/add new verifiers (#488) * update verifiers * update and deploy new verifiers --- .../server/download_circuits_from_AWS.sh | 104 ++++++++++ common/src/constants/constants.ts | 5 + .../dsc/Verifier_dsc_sha1_ecdsa_secp256r1.sol | 175 +++++++++++++++++ .../Verifier_dsc_sha256_ecdsa_secp521r1.sol | 175 +++++++++++++++++ ...ifier_dsc_sha384_ecdsa_brainpoolP512r1.sol | 8 +- ...ifier_dsc_sha512_ecdsa_brainpoolP512r1.sol | 32 +-- .../Verifier_dsc_sha512_ecdsa_secp521r1.sol | 175 +++++++++++++++++ ...egister_sha1_sha1_sha1_ecdsa_secp256r1.sol | 182 ++++++++++++++++++ ...256_sha256_sha256_rsapss_65537_64_2048.sol | 182 ++++++++++++++++++ ...er_sha512_sha512_sha256_rsa_65537_4096.sol | 182 ++++++++++++++++++ ...r_sha512_sha512_sha512_ecdsa_secp521r1.sol | 182 ++++++++++++++++++ contracts/ignition/modules/deployVerifiers.ts | 37 +++- contracts/package.json | 3 +- contracts/scripts/setVerifiers.ts | 5 +- contracts/yarn.lock | 30 +-- 15 files changed, 1428 insertions(+), 49 deletions(-) create mode 100644 circuits/scripts/server/download_circuits_from_AWS.sh create mode 100644 contracts/contracts/verifiers/dsc/Verifier_dsc_sha1_ecdsa_secp256r1.sol create mode 100644 contracts/contracts/verifiers/dsc/Verifier_dsc_sha256_ecdsa_secp521r1.sol create mode 100644 contracts/contracts/verifiers/dsc/Verifier_dsc_sha512_ecdsa_secp521r1.sol create mode 100644 contracts/contracts/verifiers/register/Verifier_register_sha1_sha1_sha1_ecdsa_secp256r1.sol create mode 100644 contracts/contracts/verifiers/register/Verifier_register_sha256_sha256_sha256_rsapss_65537_64_2048.sol create mode 100644 contracts/contracts/verifiers/register/Verifier_register_sha512_sha512_sha256_rsa_65537_4096.sol create mode 100644 contracts/contracts/verifiers/register/Verifier_register_sha512_sha512_sha512_ecdsa_secp521r1.sol diff --git a/circuits/scripts/server/download_circuits_from_AWS.sh b/circuits/scripts/server/download_circuits_from_AWS.sh new file mode 100644 index 000000000..a3866edd3 --- /dev/null +++ b/circuits/scripts/server/download_circuits_from_AWS.sh @@ -0,0 +1,104 @@ +#!/bin/sh +# Define environment variables +DESTINATION_DIR="build/fromAWS" +CONTRACTS_BASE_DIR="../contracts/contracts/verifiers" +# Create the destination directories if they don't exist +echo "Creating destination directories..." +mkdir -p ${DESTINATION_DIR} +mkdir -p "${CONTRACTS_BASE_DIR}/register" +mkdir -p "${CONTRACTS_BASE_DIR}/dsc" +mkdir -p "${CONTRACTS_BASE_DIR}/disclose" +# List of circuit names +CIRCUIT_NAMES=( + # From RegisterVerifierId order + "register_sha256_sha256_sha256_rsa_65537_4096" + "register_sha256_sha256_sha256_ecdsa_brainpoolP384r1" + "register_sha256_sha256_sha256_ecdsa_secp256r1" + "register_sha256_sha256_sha256_ecdsa_secp384r1" + "register_sha256_sha256_sha256_rsa_3_4096" + "register_sha256_sha256_sha256_rsapss_3_32_2048" + "register_sha256_sha256_sha256_rsapss_65537_32_2048" + "register_sha256_sha256_sha256_rsapss_65537_32_3072" + "register_sha384_sha384_sha384_ecdsa_brainpoolP384r1" + "register_sha384_sha384_sha384_ecdsa_brainpoolP512r1" + "register_sha384_sha384_sha384_ecdsa_secp384r1" + "register_sha512_sha512_sha512_ecdsa_brainpoolP512r1" + "register_sha512_sha512_sha512_rsa_65537_4096" + "register_sha512_sha512_sha512_rsapss_65537_64_2048" + "register_sha1_sha1_sha1_rsa_65537_4096" + "register_sha1_sha256_sha256_rsa_65537_4096" + "register_sha224_sha224_sha224_ecdsa_brainpoolP224r1" + "register_sha256_sha224_sha224_ecdsa_secp224r1" + "register_sha256_sha256_sha256_ecdsa_brainpoolP256r1" + "register_sha1_sha1_sha1_ecdsa_brainpoolP224r1" + "register_sha384_sha384_sha384_rsapss_65537_48_2048" + "register_sha1_sha1_sha1_ecdsa_secp256r1" + "register_sha256_sha256_sha256_rsapss_65537_64_2048" + "register_sha512_sha512_sha256_rsa_65537_4096" + "register_sha512_sha512_sha512_ecdsa_secp521r1" + # From DscVerifierId order + "dsc_sha1_ecdsa_brainpoolP256r1" + "dsc_sha1_rsa_65537_4096" + "dsc_sha256_ecdsa_brainpoolP256r1" + "dsc_sha256_ecdsa_brainpoolP384r1" + "dsc_sha256_ecdsa_secp256r1" + "dsc_sha256_ecdsa_secp384r1" + "dsc_sha256_rsa_65537_4096" + "dsc_sha256_rsapss_3_32_3072" + "dsc_sha256_rsapss_65537_32_3072" + "dsc_sha256_rsapss_65537_32_4096" + "dsc_sha384_ecdsa_brainpoolP384r1" + "dsc_sha384_ecdsa_brainpoolP512r1" + "dsc_sha384_ecdsa_secp384r1" + "dsc_sha512_ecdsa_brainpoolP512r1" + "dsc_sha512_rsa_65537_4096" + "dsc_sha512_rsapss_65537_64_4096" + "dsc_sha1_ecdsa_secp256r1" + "dsc_sha256_ecdsa_secp521r1" + "dsc_sha512_ecdsa_secp521r1" + # Additional circuit not in the enums + "vc_and_disclose" +) +# Download function +download_files() { + local circuit_name=$1 + local circuit_dir="${DESTINATION_DIR}/${circuit_name}" + # Determine contracts directory based on prefix + local contracts_dir + if [[ ${circuit_name} == "register"* ]]; then + contracts_dir="${CONTRACTS_BASE_DIR}/register" + elif [[ ${circuit_name} == "dsc"* ]]; then + contracts_dir="${CONTRACTS_BASE_DIR}/dsc" + elif [[ ${circuit_name} == "vc_and_disclose"* ]]; then + contracts_dir="${CONTRACTS_BASE_DIR}/disclose" + else + echo "Unknown circuit type: ${circuit_name}" + exit 1 + fi + # Create circuit-specific directory in build/fromAWS + mkdir -p "${circuit_dir}" + # Download Verifier.sol and copy to both locations + echo "Downloading ${circuit_name} Verifier.sol..." + curl -s "https://self-protocol.s3.eu-west-1.amazonaws.com/verifiers/Verifier_${circuit_name}.sol" \ + --output "${circuit_dir}/Verifier_${circuit_name}.sol" + cp "${circuit_dir}/Verifier_${circuit_name}.sol" "${contracts_dir}/" + # Download zkey + # echo "Downloading ${circuit_name} zkey..." + # curl -s "https://self-protocol.s3.eu-west-1.amazonaws.com/all_zkeys/${circuit_name}_0000.zkey" \ + # --output "${circuit_dir}/${circuit_name}_0000.zkey" +} +# Process each circuit +for circuit_name in "${CIRCUIT_NAMES[@]}"; do + echo "Processing ${circuit_name}..." + download_files "${circuit_name}" + # Check if files were downloaded successfully + if [ -f "${DESTINATION_DIR}/${circuit_name}/Verifier_${circuit_name}.sol" ] + # s&& [ -f "${DESTINATION_DIR}/${circuit_name}/${circuit_name}_0000.zkey" ]; + then + echo "Successfully downloaded files for ${circuit_name}" + else + echo "Failed to download some files for ${circuit_name}" + exit 1 + fi +done +echo "All downloads completed successfully" \ No newline at end of file diff --git a/common/src/constants/constants.ts b/common/src/constants/constants.ts index 104ce8b4f..c2f523f47 100644 --- a/common/src/constants/constants.ts +++ b/common/src/constants/constants.ts @@ -140,6 +140,10 @@ export enum RegisterVerifierId { register_sha256_sha256_sha256_ecdsa_brainpoolP256r1 = 18, register_sha1_sha1_sha1_ecdsa_brainpoolP224r1 = 19, register_sha384_sha384_sha384_rsapss_65537_48_2048 = 20, + register_sha1_sha1_sha1_ecdsa_secp256r1 = 21, + register_sha256_sha256_sha256_rsapss_65537_64_2048 = 22, + register_sha512_sha512_sha256_rsa_65537_4096 = 23, + register_sha512_sha512_sha512_ecdsa_secp521r1 = 24, }; export enum DscVerifierId { @@ -162,6 +166,7 @@ export enum DscVerifierId { dsc_sha512_rsa_65537_4096 = 16, dsc_sha512_rsapss_65537_64_4096 = 17, dsc_sha256_rsapss_3_32_4096 = 18, + dsc_sha1_ecdsa_secp256r1 = 19, }; export enum SignatureAlgorithmIndex { diff --git a/contracts/contracts/verifiers/dsc/Verifier_dsc_sha1_ecdsa_secp256r1.sol b/contracts/contracts/verifiers/dsc/Verifier_dsc_sha1_ecdsa_secp256r1.sol new file mode 100644 index 000000000..0dd3f550e --- /dev/null +++ b/contracts/contracts/verifiers/dsc/Verifier_dsc_sha1_ecdsa_secp256r1.sol @@ -0,0 +1,175 @@ +// SPDX-License-Identifier: GPL-3.0 +/* + Copyright 2021 0KIMS association. + + This file is generated with [snarkJS](https://github.com/iden3/snarkjs). + + snarkJS is a free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + snarkJS is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public + License for more details. + + You should have received a copy of the GNU General Public License + along with snarkJS. If not, see . +*/ + +pragma solidity >=0.7.0 <0.9.0; + +contract Verifier_dsc_sha1_ecdsa_secp256r1 { + // Scalar field size + uint256 constant r = 21888242871839275222246405745257275088548364400416034343698204186575808495617; + // Base field size + uint256 constant q = 21888242871839275222246405745257275088696311157297823662689037894645226208583; + + // Verification Key data + uint256 constant alphax = 20491192805390485299153009773594534940189261866228447918068658471970481763042; + uint256 constant alphay = 9383485363053290200918347156157836566562967994039712273449902621266178545958; + uint256 constant betax1 = 4252822878758300859123897981450591353533073413197771768651442665752259397132; + uint256 constant betax2 = 6375614351688725206403948262868962793625744043794305715222011528459656738731; + uint256 constant betay1 = 21847035105528745403288232691147584728191162732299865338377159692350059136679; + uint256 constant betay2 = 10505242626370262277552901082094356697409835680220590971873171140371331206856; + uint256 constant gammax1 = 11559732032986387107991004021392285783925812861821192530917403151452391805634; + uint256 constant gammax2 = 10857046999023057135944570762232829481370756359578518086990519993285655852781; + uint256 constant gammay1 = 4082367875863433681332203403145435568316851327593401208105741076214120093531; + uint256 constant gammay2 = 8495653923123431417604973247489272438418190587263600148770280649306958101930; + uint256 constant deltax1 = 6033207433356690795257115456106498359891146512657307577670629307082518890867; + uint256 constant deltax2 = 12104455723024112904367454189763737759550471398672999740914322479882377369682; + uint256 constant deltay1 = 3390456600443455506302148812517000321496337766593349757273547140119846451145; + uint256 constant deltay2 = 2683709453415812541600943744993443543337313128850472580051355886800639784468; + + + uint256 constant IC0x = 12675676047730170209192964659628979792421583884835081061924340503292148118580; + uint256 constant IC0y = 8005429490912458496906425839158171340037163354900427604245368710533256420277; + + uint256 constant IC1x = 13193321346355881915958099639943008897517981868830729558074615648670520439544; + uint256 constant IC1y = 17870182800722312867297093464655968487190506046659071779290715428562669992693; + + uint256 constant IC2x = 3886285320844557718123920951668542008337481352970679360571120460620571049685; + uint256 constant IC2y = 17415151548883447323439745357012235200330074749013787777992538418692677126646; + + + // Memory data + uint16 constant pVk = 0; + uint16 constant pPairing = 128; + + uint16 constant pLastMem = 896; + + function verifyProof(uint[2] calldata _pA, uint[2][2] calldata _pB, uint[2] calldata _pC, uint[2] calldata _pubSignals) public view returns (bool) { + assembly { + function checkField(v) { + if iszero(lt(v, r)) { + mstore(0, 0) + return(0, 0x20) + } + } + + // G1 function to multiply a G1 value(x,y) to value in an address + function g1_mulAccC(pR, x, y, s) { + let success + let mIn := mload(0x40) + mstore(mIn, x) + mstore(add(mIn, 32), y) + mstore(add(mIn, 64), s) + + success := staticcall(sub(gas(), 2000), 7, mIn, 96, mIn, 64) + + if iszero(success) { + mstore(0, 0) + return(0, 0x20) + } + + mstore(add(mIn, 64), mload(pR)) + mstore(add(mIn, 96), mload(add(pR, 32))) + + success := staticcall(sub(gas(), 2000), 6, mIn, 128, pR, 64) + + if iszero(success) { + mstore(0, 0) + return(0, 0x20) + } + } + + function checkPairing(pA, pB, pC, pubSignals, pMem) -> isOk { + let _pPairing := add(pMem, pPairing) + let _pVk := add(pMem, pVk) + + mstore(_pVk, IC0x) + mstore(add(_pVk, 32), IC0y) + + // Compute the linear combination vk_x + + g1_mulAccC(_pVk, IC1x, IC1y, calldataload(add(pubSignals, 0))) + + g1_mulAccC(_pVk, IC2x, IC2y, calldataload(add(pubSignals, 32))) + + + // -A + mstore(_pPairing, calldataload(pA)) + mstore(add(_pPairing, 32), mod(sub(q, calldataload(add(pA, 32))), q)) + + // B + mstore(add(_pPairing, 64), calldataload(pB)) + mstore(add(_pPairing, 96), calldataload(add(pB, 32))) + mstore(add(_pPairing, 128), calldataload(add(pB, 64))) + mstore(add(_pPairing, 160), calldataload(add(pB, 96))) + + // alpha1 + mstore(add(_pPairing, 192), alphax) + mstore(add(_pPairing, 224), alphay) + + // beta2 + mstore(add(_pPairing, 256), betax1) + mstore(add(_pPairing, 288), betax2) + mstore(add(_pPairing, 320), betay1) + mstore(add(_pPairing, 352), betay2) + + // vk_x + mstore(add(_pPairing, 384), mload(add(pMem, pVk))) + mstore(add(_pPairing, 416), mload(add(pMem, add(pVk, 32)))) + + + // gamma2 + mstore(add(_pPairing, 448), gammax1) + mstore(add(_pPairing, 480), gammax2) + mstore(add(_pPairing, 512), gammay1) + mstore(add(_pPairing, 544), gammay2) + + // C + mstore(add(_pPairing, 576), calldataload(pC)) + mstore(add(_pPairing, 608), calldataload(add(pC, 32))) + + // delta2 + mstore(add(_pPairing, 640), deltax1) + mstore(add(_pPairing, 672), deltax2) + mstore(add(_pPairing, 704), deltay1) + mstore(add(_pPairing, 736), deltay2) + + + let success := staticcall(sub(gas(), 2000), 8, _pPairing, 768, _pPairing, 0x20) + + isOk := and(success, mload(_pPairing)) + } + + let pMem := mload(0x40) + mstore(0x40, add(pMem, pLastMem)) + + // Validate that all evaluations ∈ F + + checkField(calldataload(add(_pubSignals, 0))) + + checkField(calldataload(add(_pubSignals, 32))) + + + // Validate all evaluations + let isValid := checkPairing(_pA, _pB, _pC, _pubSignals, pMem) + + mstore(0, isValid) + return(0, 0x20) + } + } + } diff --git a/contracts/contracts/verifiers/dsc/Verifier_dsc_sha256_ecdsa_secp521r1.sol b/contracts/contracts/verifiers/dsc/Verifier_dsc_sha256_ecdsa_secp521r1.sol new file mode 100644 index 000000000..eb0f01cac --- /dev/null +++ b/contracts/contracts/verifiers/dsc/Verifier_dsc_sha256_ecdsa_secp521r1.sol @@ -0,0 +1,175 @@ +// SPDX-License-Identifier: GPL-3.0 +/* + Copyright 2021 0KIMS association. + + This file is generated with [snarkJS](https://github.com/iden3/snarkjs). + + snarkJS is a free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + snarkJS is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public + License for more details. + + You should have received a copy of the GNU General Public License + along with snarkJS. If not, see . +*/ + +pragma solidity >=0.7.0 <0.9.0; + +contract Verifier_dsc_sha256_ecdsa_secp521r1 { + // Scalar field size + uint256 constant r = 21888242871839275222246405745257275088548364400416034343698204186575808495617; + // Base field size + uint256 constant q = 21888242871839275222246405745257275088696311157297823662689037894645226208583; + + // Verification Key data + uint256 constant alphax = 20491192805390485299153009773594534940189261866228447918068658471970481763042; + uint256 constant alphay = 9383485363053290200918347156157836566562967994039712273449902621266178545958; + uint256 constant betax1 = 4252822878758300859123897981450591353533073413197771768651442665752259397132; + uint256 constant betax2 = 6375614351688725206403948262868962793625744043794305715222011528459656738731; + uint256 constant betay1 = 21847035105528745403288232691147584728191162732299865338377159692350059136679; + uint256 constant betay2 = 10505242626370262277552901082094356697409835680220590971873171140371331206856; + uint256 constant gammax1 = 11559732032986387107991004021392285783925812861821192530917403151452391805634; + uint256 constant gammax2 = 10857046999023057135944570762232829481370756359578518086990519993285655852781; + uint256 constant gammay1 = 4082367875863433681332203403145435568316851327593401208105741076214120093531; + uint256 constant gammay2 = 8495653923123431417604973247489272438418190587263600148770280649306958101930; + uint256 constant deltax1 = 16437128694805152220750362866993266443023348713953954544697263731318115694752; + uint256 constant deltax2 = 9295832904648945786740083067314998343838652859296797809537474244588984909814; + uint256 constant deltay1 = 968125866770846796808710939585846643817058108093372960570701629910784318864; + uint256 constant deltay2 = 12216864206212511235315976798082889872627544441390643890886155153587471762186; + + + uint256 constant IC0x = 11198407869990430604822080005647844132231169087019364625207841772083886082756; + uint256 constant IC0y = 13774799428851210074159336555321647634507660666641475242236156913076712041741; + + uint256 constant IC1x = 18127585251129548982798743775509646040146824771883849376184488771237227369472; + uint256 constant IC1y = 12012396820154965172043684747339519822260284246794442681353248417864489833145; + + uint256 constant IC2x = 7608609333225637846753797474786477234041135378858688651993341996547239218662; + uint256 constant IC2y = 13036970020621774119816858757427303597665775583602766779799942821487978394693; + + + // Memory data + uint16 constant pVk = 0; + uint16 constant pPairing = 128; + + uint16 constant pLastMem = 896; + + function verifyProof(uint[2] calldata _pA, uint[2][2] calldata _pB, uint[2] calldata _pC, uint[2] calldata _pubSignals) public view returns (bool) { + assembly { + function checkField(v) { + if iszero(lt(v, r)) { + mstore(0, 0) + return(0, 0x20) + } + } + + // G1 function to multiply a G1 value(x,y) to value in an address + function g1_mulAccC(pR, x, y, s) { + let success + let mIn := mload(0x40) + mstore(mIn, x) + mstore(add(mIn, 32), y) + mstore(add(mIn, 64), s) + + success := staticcall(sub(gas(), 2000), 7, mIn, 96, mIn, 64) + + if iszero(success) { + mstore(0, 0) + return(0, 0x20) + } + + mstore(add(mIn, 64), mload(pR)) + mstore(add(mIn, 96), mload(add(pR, 32))) + + success := staticcall(sub(gas(), 2000), 6, mIn, 128, pR, 64) + + if iszero(success) { + mstore(0, 0) + return(0, 0x20) + } + } + + function checkPairing(pA, pB, pC, pubSignals, pMem) -> isOk { + let _pPairing := add(pMem, pPairing) + let _pVk := add(pMem, pVk) + + mstore(_pVk, IC0x) + mstore(add(_pVk, 32), IC0y) + + // Compute the linear combination vk_x + + g1_mulAccC(_pVk, IC1x, IC1y, calldataload(add(pubSignals, 0))) + + g1_mulAccC(_pVk, IC2x, IC2y, calldataload(add(pubSignals, 32))) + + + // -A + mstore(_pPairing, calldataload(pA)) + mstore(add(_pPairing, 32), mod(sub(q, calldataload(add(pA, 32))), q)) + + // B + mstore(add(_pPairing, 64), calldataload(pB)) + mstore(add(_pPairing, 96), calldataload(add(pB, 32))) + mstore(add(_pPairing, 128), calldataload(add(pB, 64))) + mstore(add(_pPairing, 160), calldataload(add(pB, 96))) + + // alpha1 + mstore(add(_pPairing, 192), alphax) + mstore(add(_pPairing, 224), alphay) + + // beta2 + mstore(add(_pPairing, 256), betax1) + mstore(add(_pPairing, 288), betax2) + mstore(add(_pPairing, 320), betay1) + mstore(add(_pPairing, 352), betay2) + + // vk_x + mstore(add(_pPairing, 384), mload(add(pMem, pVk))) + mstore(add(_pPairing, 416), mload(add(pMem, add(pVk, 32)))) + + + // gamma2 + mstore(add(_pPairing, 448), gammax1) + mstore(add(_pPairing, 480), gammax2) + mstore(add(_pPairing, 512), gammay1) + mstore(add(_pPairing, 544), gammay2) + + // C + mstore(add(_pPairing, 576), calldataload(pC)) + mstore(add(_pPairing, 608), calldataload(add(pC, 32))) + + // delta2 + mstore(add(_pPairing, 640), deltax1) + mstore(add(_pPairing, 672), deltax2) + mstore(add(_pPairing, 704), deltay1) + mstore(add(_pPairing, 736), deltay2) + + + let success := staticcall(sub(gas(), 2000), 8, _pPairing, 768, _pPairing, 0x20) + + isOk := and(success, mload(_pPairing)) + } + + let pMem := mload(0x40) + mstore(0x40, add(pMem, pLastMem)) + + // Validate that all evaluations ∈ F + + checkField(calldataload(add(_pubSignals, 0))) + + checkField(calldataload(add(_pubSignals, 32))) + + + // Validate all evaluations + let isValid := checkPairing(_pA, _pB, _pC, _pubSignals, pMem) + + mstore(0, isValid) + return(0, 0x20) + } + } + } diff --git a/contracts/contracts/verifiers/dsc/Verifier_dsc_sha384_ecdsa_brainpoolP512r1.sol b/contracts/contracts/verifiers/dsc/Verifier_dsc_sha384_ecdsa_brainpoolP512r1.sol index 07720b994..6957d4086 100644 --- a/contracts/contracts/verifiers/dsc/Verifier_dsc_sha384_ecdsa_brainpoolP512r1.sol +++ b/contracts/contracts/verifiers/dsc/Verifier_dsc_sha384_ecdsa_brainpoolP512r1.sol @@ -37,10 +37,10 @@ contract Verifier_dsc_sha384_ecdsa_brainpoolP512r1 { uint256 constant gammax2 = 10857046999023057135944570762232829481370756359578518086990519993285655852781; uint256 constant gammay1 = 4082367875863433681332203403145435568316851327593401208105741076214120093531; uint256 constant gammay2 = 8495653923123431417604973247489272438418190587263600148770280649306958101930; - uint256 constant deltax1 = 4530066936154441847386294156578094399842131550980516874400905993800052131851; - uint256 constant deltax2 = 1335399363840606323513598206854614361608964545021499959158665510890398562234; - uint256 constant deltay1 = 10452224917351194123308059032281451103653454874683303402314888743840039443461; - uint256 constant deltay2 = 13972882024340202656863090949141567962592926995017196610940982386480842856715; + uint256 constant deltax1 = 1781248406192758998500908455181139231906614153230475330081931005826419685256; + uint256 constant deltax2 = 19815261049532425986022468363486370842697162909051545281728971175739069949909; + uint256 constant deltay1 = 16047974943909860300676356846359424106067013301701903269259394127906204387924; + uint256 constant deltay2 = 19121513428213240116044362882588137076351549644308466259528321350439646572263; uint256 constant IC0x = 7873767668004917131331802256306079363018497214917800406656003818258696939352; diff --git a/contracts/contracts/verifiers/dsc/Verifier_dsc_sha512_ecdsa_brainpoolP512r1.sol b/contracts/contracts/verifiers/dsc/Verifier_dsc_sha512_ecdsa_brainpoolP512r1.sol index daee5262a..d950eba0d 100644 --- a/contracts/contracts/verifiers/dsc/Verifier_dsc_sha512_ecdsa_brainpoolP512r1.sol +++ b/contracts/contracts/verifiers/dsc/Verifier_dsc_sha512_ecdsa_brainpoolP512r1.sol @@ -27,30 +27,30 @@ contract Verifier_dsc_sha512_ecdsa_brainpoolP512r1 { uint256 constant q = 21888242871839275222246405745257275088696311157297823662689037894645226208583; // Verification Key data - uint256 constant alphax = 16428432848801857252194528405604668803277877773566238944394625302971855135431; - uint256 constant alphay = 16846502678714586896801519656441059708016666274385668027902869494772365009666; - uint256 constant betax1 = 3182164110458002340215786955198810119980427837186618912744689678939861918171; - uint256 constant betax2 = 16348171800823588416173124589066524623406261996681292662100840445103873053252; - uint256 constant betay1 = 4920802715848186258981584729175884379674325733638798907835771393452862684714; - uint256 constant betay2 = 19687132236965066906216944365591810874384658708175106803089633851114028275753; + uint256 constant alphax = 20491192805390485299153009773594534940189261866228447918068658471970481763042; + uint256 constant alphay = 9383485363053290200918347156157836566562967994039712273449902621266178545958; + uint256 constant betax1 = 4252822878758300859123897981450591353533073413197771768651442665752259397132; + uint256 constant betax2 = 6375614351688725206403948262868962793625744043794305715222011528459656738731; + uint256 constant betay1 = 21847035105528745403288232691147584728191162732299865338377159692350059136679; + uint256 constant betay2 = 10505242626370262277552901082094356697409835680220590971873171140371331206856; uint256 constant gammax1 = 11559732032986387107991004021392285783925812861821192530917403151452391805634; uint256 constant gammax2 = 10857046999023057135944570762232829481370756359578518086990519993285655852781; uint256 constant gammay1 = 4082367875863433681332203403145435568316851327593401208105741076214120093531; uint256 constant gammay2 = 8495653923123431417604973247489272438418190587263600148770280649306958101930; - uint256 constant deltax1 = 12251427448627772330888437982481332885211120883213646323847047551684983810433; - uint256 constant deltax2 = 4499228752502959023023615045419258170224547094133191343676224662128847718489; - uint256 constant deltay1 = 1145910484125996562423466364321116685334339390367394077688418150019571935876; - uint256 constant deltay2 = 12743357927810336971509918465104159910509976902535911210911764265655920424296; + uint256 constant deltax1 = 6952645853368762842154994257083982040414928781501277082694703808917925292937; + uint256 constant deltax2 = 1807709620069280115889042966343753243599664695720233073497803574267557324819; + uint256 constant deltay1 = 12369278861826334826775785697613986489421427981532861159941565055302380388435; + uint256 constant deltay2 = 268218501938740843576755870688043856015430017503150289273886004818951340211; - uint256 constant IC0x = 7110132793288072767884827502282660170267797993274915717940191029955641310538; - uint256 constant IC0y = 10299852420887189493119478491329778285635466242816933287032586884932562952292; + uint256 constant IC0x = 2854580057122758363137747486193301686434303619633504875611831707366593193268; + uint256 constant IC0y = 161152799478229153815090373143900568223205432805517132728553706296506229632; - uint256 constant IC1x = 10462856252310642708967113711602078244597530575840127617899411065726432761715; - uint256 constant IC1y = 21455733862726938196001268421736903102080585668491271076545254402577567362511; + uint256 constant IC1x = 10581328066353360672004779124451298057967563611528666503152999442178364250207; + uint256 constant IC1y = 21070158555862491580937045217249443996037523854845662139952858528560360285345; - uint256 constant IC2x = 14639827374068177133096238896519227626933201045213709406539301182675722983984; - uint256 constant IC2y = 682185347318813323331775462199336704076786332751913888115496045164186659645; + uint256 constant IC2x = 6535621112246865230629050883801747388199012560026269297051551123854305849670; + uint256 constant IC2y = 12613639586408767324115549737218218464694013359987071410410390868145511841392; // Memory data diff --git a/contracts/contracts/verifiers/dsc/Verifier_dsc_sha512_ecdsa_secp521r1.sol b/contracts/contracts/verifiers/dsc/Verifier_dsc_sha512_ecdsa_secp521r1.sol new file mode 100644 index 000000000..dcdf521a9 --- /dev/null +++ b/contracts/contracts/verifiers/dsc/Verifier_dsc_sha512_ecdsa_secp521r1.sol @@ -0,0 +1,175 @@ +// SPDX-License-Identifier: GPL-3.0 +/* + Copyright 2021 0KIMS association. + + This file is generated with [snarkJS](https://github.com/iden3/snarkjs). + + snarkJS is a free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + snarkJS is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public + License for more details. + + You should have received a copy of the GNU General Public License + along with snarkJS. If not, see . +*/ + +pragma solidity >=0.7.0 <0.9.0; + +contract Verifier_dsc_sha512_ecdsa_secp521r1 { + // Scalar field size + uint256 constant r = 21888242871839275222246405745257275088548364400416034343698204186575808495617; + // Base field size + uint256 constant q = 21888242871839275222246405745257275088696311157297823662689037894645226208583; + + // Verification Key data + uint256 constant alphax = 20491192805390485299153009773594534940189261866228447918068658471970481763042; + uint256 constant alphay = 9383485363053290200918347156157836566562967994039712273449902621266178545958; + uint256 constant betax1 = 4252822878758300859123897981450591353533073413197771768651442665752259397132; + uint256 constant betax2 = 6375614351688725206403948262868962793625744043794305715222011528459656738731; + uint256 constant betay1 = 21847035105528745403288232691147584728191162732299865338377159692350059136679; + uint256 constant betay2 = 10505242626370262277552901082094356697409835680220590971873171140371331206856; + uint256 constant gammax1 = 11559732032986387107991004021392285783925812861821192530917403151452391805634; + uint256 constant gammax2 = 10857046999023057135944570762232829481370756359578518086990519993285655852781; + uint256 constant gammay1 = 4082367875863433681332203403145435568316851327593401208105741076214120093531; + uint256 constant gammay2 = 8495653923123431417604973247489272438418190587263600148770280649306958101930; + uint256 constant deltax1 = 3567233624924223551473081774283623386333214994398117996341949045921925426628; + uint256 constant deltax2 = 9706262963623856588491034574817954941116720519946003099084200202605107687323; + uint256 constant deltay1 = 12112251966035714986038310379728868813344813567575772425184620994375435183493; + uint256 constant deltay2 = 541069664758689108623530630690631010640418421812375414721343442872115937402; + + + uint256 constant IC0x = 136910311248568363820473562407939112717019551412068446334589064796761238234; + uint256 constant IC0y = 14761093221964254612087739097195844172438739963995752455378640347842923505631; + + uint256 constant IC1x = 14447863318056301271860386878687738607655490531247166798405604042500135631279; + uint256 constant IC1y = 11446576007344781410709246372588846223796059093966566576749323356136248268666; + + uint256 constant IC2x = 14358689694998711607953028013988003416714328323807188343803787983254880315583; + uint256 constant IC2y = 11617460142005906950398539783051988683143041496653951656062385487051296621592; + + + // Memory data + uint16 constant pVk = 0; + uint16 constant pPairing = 128; + + uint16 constant pLastMem = 896; + + function verifyProof(uint[2] calldata _pA, uint[2][2] calldata _pB, uint[2] calldata _pC, uint[2] calldata _pubSignals) public view returns (bool) { + assembly { + function checkField(v) { + if iszero(lt(v, r)) { + mstore(0, 0) + return(0, 0x20) + } + } + + // G1 function to multiply a G1 value(x,y) to value in an address + function g1_mulAccC(pR, x, y, s) { + let success + let mIn := mload(0x40) + mstore(mIn, x) + mstore(add(mIn, 32), y) + mstore(add(mIn, 64), s) + + success := staticcall(sub(gas(), 2000), 7, mIn, 96, mIn, 64) + + if iszero(success) { + mstore(0, 0) + return(0, 0x20) + } + + mstore(add(mIn, 64), mload(pR)) + mstore(add(mIn, 96), mload(add(pR, 32))) + + success := staticcall(sub(gas(), 2000), 6, mIn, 128, pR, 64) + + if iszero(success) { + mstore(0, 0) + return(0, 0x20) + } + } + + function checkPairing(pA, pB, pC, pubSignals, pMem) -> isOk { + let _pPairing := add(pMem, pPairing) + let _pVk := add(pMem, pVk) + + mstore(_pVk, IC0x) + mstore(add(_pVk, 32), IC0y) + + // Compute the linear combination vk_x + + g1_mulAccC(_pVk, IC1x, IC1y, calldataload(add(pubSignals, 0))) + + g1_mulAccC(_pVk, IC2x, IC2y, calldataload(add(pubSignals, 32))) + + + // -A + mstore(_pPairing, calldataload(pA)) + mstore(add(_pPairing, 32), mod(sub(q, calldataload(add(pA, 32))), q)) + + // B + mstore(add(_pPairing, 64), calldataload(pB)) + mstore(add(_pPairing, 96), calldataload(add(pB, 32))) + mstore(add(_pPairing, 128), calldataload(add(pB, 64))) + mstore(add(_pPairing, 160), calldataload(add(pB, 96))) + + // alpha1 + mstore(add(_pPairing, 192), alphax) + mstore(add(_pPairing, 224), alphay) + + // beta2 + mstore(add(_pPairing, 256), betax1) + mstore(add(_pPairing, 288), betax2) + mstore(add(_pPairing, 320), betay1) + mstore(add(_pPairing, 352), betay2) + + // vk_x + mstore(add(_pPairing, 384), mload(add(pMem, pVk))) + mstore(add(_pPairing, 416), mload(add(pMem, add(pVk, 32)))) + + + // gamma2 + mstore(add(_pPairing, 448), gammax1) + mstore(add(_pPairing, 480), gammax2) + mstore(add(_pPairing, 512), gammay1) + mstore(add(_pPairing, 544), gammay2) + + // C + mstore(add(_pPairing, 576), calldataload(pC)) + mstore(add(_pPairing, 608), calldataload(add(pC, 32))) + + // delta2 + mstore(add(_pPairing, 640), deltax1) + mstore(add(_pPairing, 672), deltax2) + mstore(add(_pPairing, 704), deltay1) + mstore(add(_pPairing, 736), deltay2) + + + let success := staticcall(sub(gas(), 2000), 8, _pPairing, 768, _pPairing, 0x20) + + isOk := and(success, mload(_pPairing)) + } + + let pMem := mload(0x40) + mstore(0x40, add(pMem, pLastMem)) + + // Validate that all evaluations ∈ F + + checkField(calldataload(add(_pubSignals, 0))) + + checkField(calldataload(add(_pubSignals, 32))) + + + // Validate all evaluations + let isValid := checkPairing(_pA, _pB, _pC, _pubSignals, pMem) + + mstore(0, isValid) + return(0, 0x20) + } + } + } diff --git a/contracts/contracts/verifiers/register/Verifier_register_sha1_sha1_sha1_ecdsa_secp256r1.sol b/contracts/contracts/verifiers/register/Verifier_register_sha1_sha1_sha1_ecdsa_secp256r1.sol new file mode 100644 index 000000000..d4601687b --- /dev/null +++ b/contracts/contracts/verifiers/register/Verifier_register_sha1_sha1_sha1_ecdsa_secp256r1.sol @@ -0,0 +1,182 @@ +// SPDX-License-Identifier: GPL-3.0 +/* + Copyright 2021 0KIMS association. + + This file is generated with [snarkJS](https://github.com/iden3/snarkjs). + + snarkJS is a free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + snarkJS is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public + License for more details. + + You should have received a copy of the GNU General Public License + along with snarkJS. If not, see . +*/ + +pragma solidity >=0.7.0 <0.9.0; + +contract Verifier_register_sha1_sha1_sha1_ecdsa_secp256r1 { + // Scalar field size + uint256 constant r = 21888242871839275222246405745257275088548364400416034343698204186575808495617; + // Base field size + uint256 constant q = 21888242871839275222246405745257275088696311157297823662689037894645226208583; + + // Verification Key data + uint256 constant alphax = 20491192805390485299153009773594534940189261866228447918068658471970481763042; + uint256 constant alphay = 9383485363053290200918347156157836566562967994039712273449902621266178545958; + uint256 constant betax1 = 4252822878758300859123897981450591353533073413197771768651442665752259397132; + uint256 constant betax2 = 6375614351688725206403948262868962793625744043794305715222011528459656738731; + uint256 constant betay1 = 21847035105528745403288232691147584728191162732299865338377159692350059136679; + uint256 constant betay2 = 10505242626370262277552901082094356697409835680220590971873171140371331206856; + uint256 constant gammax1 = 11559732032986387107991004021392285783925812861821192530917403151452391805634; + uint256 constant gammax2 = 10857046999023057135944570762232829481370756359578518086990519993285655852781; + uint256 constant gammay1 = 4082367875863433681332203403145435568316851327593401208105741076214120093531; + uint256 constant gammay2 = 8495653923123431417604973247489272438418190587263600148770280649306958101930; + uint256 constant deltax1 = 3315573982591531968186294557084644964894733232707401944220787908981181497253; + uint256 constant deltax2 = 1345463561793299137500493523533942818649869700995109569976756299964130305453; + uint256 constant deltay1 = 9448382163867444066295328702218988975263374023667830442650604436203430718782; + uint256 constant deltay2 = 3390587171884285909512991075541156150549390244719272045010214315075006407592; + + + uint256 constant IC0x = 16450632745264405183134879933548836357522771992781381371437352893044233134089; + uint256 constant IC0y = 7406049893990952623098067634432868719037604070795933670159207846811098380152; + + uint256 constant IC1x = 4075022984801759765447880624616192959710270854476152884516923249069298970582; + uint256 constant IC1y = 14465812661698088247096862482473992600825819637978412422678744038701325119175; + + uint256 constant IC2x = 19289177891812149972501122063055652003517902958032564042988169989187140669996; + uint256 constant IC2y = 10334018884410138890108998996556287264542627150879424783840832054620221289103; + + uint256 constant IC3x = 3590539162724376220252043367439687121476794060909776981340467603542696454783; + uint256 constant IC3y = 9817658469812892944717716328749390598728625285115805840044120011595137437624; + + + // Memory data + uint16 constant pVk = 0; + uint16 constant pPairing = 128; + + uint16 constant pLastMem = 896; + + function verifyProof(uint[2] calldata _pA, uint[2][2] calldata _pB, uint[2] calldata _pC, uint[3] calldata _pubSignals) public view returns (bool) { + assembly { + function checkField(v) { + if iszero(lt(v, r)) { + mstore(0, 0) + return(0, 0x20) + } + } + + // G1 function to multiply a G1 value(x,y) to value in an address + function g1_mulAccC(pR, x, y, s) { + let success + let mIn := mload(0x40) + mstore(mIn, x) + mstore(add(mIn, 32), y) + mstore(add(mIn, 64), s) + + success := staticcall(sub(gas(), 2000), 7, mIn, 96, mIn, 64) + + if iszero(success) { + mstore(0, 0) + return(0, 0x20) + } + + mstore(add(mIn, 64), mload(pR)) + mstore(add(mIn, 96), mload(add(pR, 32))) + + success := staticcall(sub(gas(), 2000), 6, mIn, 128, pR, 64) + + if iszero(success) { + mstore(0, 0) + return(0, 0x20) + } + } + + function checkPairing(pA, pB, pC, pubSignals, pMem) -> isOk { + let _pPairing := add(pMem, pPairing) + let _pVk := add(pMem, pVk) + + mstore(_pVk, IC0x) + mstore(add(_pVk, 32), IC0y) + + // Compute the linear combination vk_x + + g1_mulAccC(_pVk, IC1x, IC1y, calldataload(add(pubSignals, 0))) + + g1_mulAccC(_pVk, IC2x, IC2y, calldataload(add(pubSignals, 32))) + + g1_mulAccC(_pVk, IC3x, IC3y, calldataload(add(pubSignals, 64))) + + + // -A + mstore(_pPairing, calldataload(pA)) + mstore(add(_pPairing, 32), mod(sub(q, calldataload(add(pA, 32))), q)) + + // B + mstore(add(_pPairing, 64), calldataload(pB)) + mstore(add(_pPairing, 96), calldataload(add(pB, 32))) + mstore(add(_pPairing, 128), calldataload(add(pB, 64))) + mstore(add(_pPairing, 160), calldataload(add(pB, 96))) + + // alpha1 + mstore(add(_pPairing, 192), alphax) + mstore(add(_pPairing, 224), alphay) + + // beta2 + mstore(add(_pPairing, 256), betax1) + mstore(add(_pPairing, 288), betax2) + mstore(add(_pPairing, 320), betay1) + mstore(add(_pPairing, 352), betay2) + + // vk_x + mstore(add(_pPairing, 384), mload(add(pMem, pVk))) + mstore(add(_pPairing, 416), mload(add(pMem, add(pVk, 32)))) + + + // gamma2 + mstore(add(_pPairing, 448), gammax1) + mstore(add(_pPairing, 480), gammax2) + mstore(add(_pPairing, 512), gammay1) + mstore(add(_pPairing, 544), gammay2) + + // C + mstore(add(_pPairing, 576), calldataload(pC)) + mstore(add(_pPairing, 608), calldataload(add(pC, 32))) + + // delta2 + mstore(add(_pPairing, 640), deltax1) + mstore(add(_pPairing, 672), deltax2) + mstore(add(_pPairing, 704), deltay1) + mstore(add(_pPairing, 736), deltay2) + + + let success := staticcall(sub(gas(), 2000), 8, _pPairing, 768, _pPairing, 0x20) + + isOk := and(success, mload(_pPairing)) + } + + let pMem := mload(0x40) + mstore(0x40, add(pMem, pLastMem)) + + // Validate that all evaluations ∈ F + + checkField(calldataload(add(_pubSignals, 0))) + + checkField(calldataload(add(_pubSignals, 32))) + + checkField(calldataload(add(_pubSignals, 64))) + + + // Validate all evaluations + let isValid := checkPairing(_pA, _pB, _pC, _pubSignals, pMem) + + mstore(0, isValid) + return(0, 0x20) + } + } + } diff --git a/contracts/contracts/verifiers/register/Verifier_register_sha256_sha256_sha256_rsapss_65537_64_2048.sol b/contracts/contracts/verifiers/register/Verifier_register_sha256_sha256_sha256_rsapss_65537_64_2048.sol new file mode 100644 index 000000000..989c68d7c --- /dev/null +++ b/contracts/contracts/verifiers/register/Verifier_register_sha256_sha256_sha256_rsapss_65537_64_2048.sol @@ -0,0 +1,182 @@ +// SPDX-License-Identifier: GPL-3.0 +/* + Copyright 2021 0KIMS association. + + This file is generated with [snarkJS](https://github.com/iden3/snarkjs). + + snarkJS is a free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + snarkJS is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public + License for more details. + + You should have received a copy of the GNU General Public License + along with snarkJS. If not, see . +*/ + +pragma solidity >=0.7.0 <0.9.0; + +contract Verifier_register_sha256_sha256_sha256_rsapss_65537_64_2048 { + // Scalar field size + uint256 constant r = 21888242871839275222246405745257275088548364400416034343698204186575808495617; + // Base field size + uint256 constant q = 21888242871839275222246405745257275088696311157297823662689037894645226208583; + + // Verification Key data + uint256 constant alphax = 20491192805390485299153009773594534940189261866228447918068658471970481763042; + uint256 constant alphay = 9383485363053290200918347156157836566562967994039712273449902621266178545958; + uint256 constant betax1 = 4252822878758300859123897981450591353533073413197771768651442665752259397132; + uint256 constant betax2 = 6375614351688725206403948262868962793625744043794305715222011528459656738731; + uint256 constant betay1 = 21847035105528745403288232691147584728191162732299865338377159692350059136679; + uint256 constant betay2 = 10505242626370262277552901082094356697409835680220590971873171140371331206856; + uint256 constant gammax1 = 11559732032986387107991004021392285783925812861821192530917403151452391805634; + uint256 constant gammax2 = 10857046999023057135944570762232829481370756359578518086990519993285655852781; + uint256 constant gammay1 = 4082367875863433681332203403145435568316851327593401208105741076214120093531; + uint256 constant gammay2 = 8495653923123431417604973247489272438418190587263600148770280649306958101930; + uint256 constant deltax1 = 3761830637061930354682850533502108764661271734431108953664621072668563533245; + uint256 constant deltax2 = 16804181813018321174425494299224505611845464607856307889861003500252789857469; + uint256 constant deltay1 = 21417331860517620213853557801012932528265294825667483000398760394460342854150; + uint256 constant deltay2 = 3521621565182312756026882025146971753553266652119142711524309069960835034217; + + + uint256 constant IC0x = 2650232139950799889519964811076582312005955772764804225189429907947120413540; + uint256 constant IC0y = 657051112223451016707929555981496025456893729703484208440844641832356601238; + + uint256 constant IC1x = 8081229243468095616978100904972155801431572800975147543193820670895547157174; + uint256 constant IC1y = 6616464201431027550515942297910935246754200163796742864613342027126029777305; + + uint256 constant IC2x = 1424093314374585694236524334500673650332535238237396379331013965340772391298; + uint256 constant IC2y = 17279524849721986212308069874853781724901647454904174566414611247779877579068; + + uint256 constant IC3x = 20322713313159424926274301577889437312884792230033252132502625130351424539432; + uint256 constant IC3y = 1436142875889436717857447601847861561066309444586720002288236204838004201424; + + + // Memory data + uint16 constant pVk = 0; + uint16 constant pPairing = 128; + + uint16 constant pLastMem = 896; + + function verifyProof(uint[2] calldata _pA, uint[2][2] calldata _pB, uint[2] calldata _pC, uint[3] calldata _pubSignals) public view returns (bool) { + assembly { + function checkField(v) { + if iszero(lt(v, r)) { + mstore(0, 0) + return(0, 0x20) + } + } + + // G1 function to multiply a G1 value(x,y) to value in an address + function g1_mulAccC(pR, x, y, s) { + let success + let mIn := mload(0x40) + mstore(mIn, x) + mstore(add(mIn, 32), y) + mstore(add(mIn, 64), s) + + success := staticcall(sub(gas(), 2000), 7, mIn, 96, mIn, 64) + + if iszero(success) { + mstore(0, 0) + return(0, 0x20) + } + + mstore(add(mIn, 64), mload(pR)) + mstore(add(mIn, 96), mload(add(pR, 32))) + + success := staticcall(sub(gas(), 2000), 6, mIn, 128, pR, 64) + + if iszero(success) { + mstore(0, 0) + return(0, 0x20) + } + } + + function checkPairing(pA, pB, pC, pubSignals, pMem) -> isOk { + let _pPairing := add(pMem, pPairing) + let _pVk := add(pMem, pVk) + + mstore(_pVk, IC0x) + mstore(add(_pVk, 32), IC0y) + + // Compute the linear combination vk_x + + g1_mulAccC(_pVk, IC1x, IC1y, calldataload(add(pubSignals, 0))) + + g1_mulAccC(_pVk, IC2x, IC2y, calldataload(add(pubSignals, 32))) + + g1_mulAccC(_pVk, IC3x, IC3y, calldataload(add(pubSignals, 64))) + + + // -A + mstore(_pPairing, calldataload(pA)) + mstore(add(_pPairing, 32), mod(sub(q, calldataload(add(pA, 32))), q)) + + // B + mstore(add(_pPairing, 64), calldataload(pB)) + mstore(add(_pPairing, 96), calldataload(add(pB, 32))) + mstore(add(_pPairing, 128), calldataload(add(pB, 64))) + mstore(add(_pPairing, 160), calldataload(add(pB, 96))) + + // alpha1 + mstore(add(_pPairing, 192), alphax) + mstore(add(_pPairing, 224), alphay) + + // beta2 + mstore(add(_pPairing, 256), betax1) + mstore(add(_pPairing, 288), betax2) + mstore(add(_pPairing, 320), betay1) + mstore(add(_pPairing, 352), betay2) + + // vk_x + mstore(add(_pPairing, 384), mload(add(pMem, pVk))) + mstore(add(_pPairing, 416), mload(add(pMem, add(pVk, 32)))) + + + // gamma2 + mstore(add(_pPairing, 448), gammax1) + mstore(add(_pPairing, 480), gammax2) + mstore(add(_pPairing, 512), gammay1) + mstore(add(_pPairing, 544), gammay2) + + // C + mstore(add(_pPairing, 576), calldataload(pC)) + mstore(add(_pPairing, 608), calldataload(add(pC, 32))) + + // delta2 + mstore(add(_pPairing, 640), deltax1) + mstore(add(_pPairing, 672), deltax2) + mstore(add(_pPairing, 704), deltay1) + mstore(add(_pPairing, 736), deltay2) + + + let success := staticcall(sub(gas(), 2000), 8, _pPairing, 768, _pPairing, 0x20) + + isOk := and(success, mload(_pPairing)) + } + + let pMem := mload(0x40) + mstore(0x40, add(pMem, pLastMem)) + + // Validate that all evaluations ∈ F + + checkField(calldataload(add(_pubSignals, 0))) + + checkField(calldataload(add(_pubSignals, 32))) + + checkField(calldataload(add(_pubSignals, 64))) + + + // Validate all evaluations + let isValid := checkPairing(_pA, _pB, _pC, _pubSignals, pMem) + + mstore(0, isValid) + return(0, 0x20) + } + } + } diff --git a/contracts/contracts/verifiers/register/Verifier_register_sha512_sha512_sha256_rsa_65537_4096.sol b/contracts/contracts/verifiers/register/Verifier_register_sha512_sha512_sha256_rsa_65537_4096.sol new file mode 100644 index 000000000..bbb1e2092 --- /dev/null +++ b/contracts/contracts/verifiers/register/Verifier_register_sha512_sha512_sha256_rsa_65537_4096.sol @@ -0,0 +1,182 @@ +// SPDX-License-Identifier: GPL-3.0 +/* + Copyright 2021 0KIMS association. + + This file is generated with [snarkJS](https://github.com/iden3/snarkjs). + + snarkJS is a free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + snarkJS is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public + License for more details. + + You should have received a copy of the GNU General Public License + along with snarkJS. If not, see . +*/ + +pragma solidity >=0.7.0 <0.9.0; + +contract Verifier_register_sha512_sha512_sha256_rsa_65537_4096 { + // Scalar field size + uint256 constant r = 21888242871839275222246405745257275088548364400416034343698204186575808495617; + // Base field size + uint256 constant q = 21888242871839275222246405745257275088696311157297823662689037894645226208583; + + // Verification Key data + uint256 constant alphax = 20491192805390485299153009773594534940189261866228447918068658471970481763042; + uint256 constant alphay = 9383485363053290200918347156157836566562967994039712273449902621266178545958; + uint256 constant betax1 = 4252822878758300859123897981450591353533073413197771768651442665752259397132; + uint256 constant betax2 = 6375614351688725206403948262868962793625744043794305715222011528459656738731; + uint256 constant betay1 = 21847035105528745403288232691147584728191162732299865338377159692350059136679; + uint256 constant betay2 = 10505242626370262277552901082094356697409835680220590971873171140371331206856; + uint256 constant gammax1 = 11559732032986387107991004021392285783925812861821192530917403151452391805634; + uint256 constant gammax2 = 10857046999023057135944570762232829481370756359578518086990519993285655852781; + uint256 constant gammay1 = 4082367875863433681332203403145435568316851327593401208105741076214120093531; + uint256 constant gammay2 = 8495653923123431417604973247489272438418190587263600148770280649306958101930; + uint256 constant deltax1 = 11881634618919290328886787975374992286648686860716389939028774927023704300419; + uint256 constant deltax2 = 3343986965496175035535554082557516035925725220942167518806644623948403187615; + uint256 constant deltay1 = 11939697202187053508707510976290905199551499409672263761474391291658710514837; + uint256 constant deltay2 = 7404233723661255839394438230729423120454040735018080878441518168933906765047; + + + uint256 constant IC0x = 1522312918359803988788512091755329622787453581365817416344334969305501826763; + uint256 constant IC0y = 15103489129488920195567010010842048345426549759697537037237072176139672140741; + + uint256 constant IC1x = 3426092119649827904350580206849100879401424367721771401042697577618459121414; + uint256 constant IC1y = 16770031840381000483094812067973347788614663626630281022545549244984270312425; + + uint256 constant IC2x = 18280226729999019912132031662127608679245235959717434252183320707840972425160; + uint256 constant IC2y = 20341823113799900095011353295654597790475315229418008642852414296590357768541; + + uint256 constant IC3x = 9284316895527342666880616834392865785293585993469843715065175921767468731647; + uint256 constant IC3y = 12546994336269880385565077660652394363324080564977267049945074848375882704903; + + + // Memory data + uint16 constant pVk = 0; + uint16 constant pPairing = 128; + + uint16 constant pLastMem = 896; + + function verifyProof(uint[2] calldata _pA, uint[2][2] calldata _pB, uint[2] calldata _pC, uint[3] calldata _pubSignals) public view returns (bool) { + assembly { + function checkField(v) { + if iszero(lt(v, r)) { + mstore(0, 0) + return(0, 0x20) + } + } + + // G1 function to multiply a G1 value(x,y) to value in an address + function g1_mulAccC(pR, x, y, s) { + let success + let mIn := mload(0x40) + mstore(mIn, x) + mstore(add(mIn, 32), y) + mstore(add(mIn, 64), s) + + success := staticcall(sub(gas(), 2000), 7, mIn, 96, mIn, 64) + + if iszero(success) { + mstore(0, 0) + return(0, 0x20) + } + + mstore(add(mIn, 64), mload(pR)) + mstore(add(mIn, 96), mload(add(pR, 32))) + + success := staticcall(sub(gas(), 2000), 6, mIn, 128, pR, 64) + + if iszero(success) { + mstore(0, 0) + return(0, 0x20) + } + } + + function checkPairing(pA, pB, pC, pubSignals, pMem) -> isOk { + let _pPairing := add(pMem, pPairing) + let _pVk := add(pMem, pVk) + + mstore(_pVk, IC0x) + mstore(add(_pVk, 32), IC0y) + + // Compute the linear combination vk_x + + g1_mulAccC(_pVk, IC1x, IC1y, calldataload(add(pubSignals, 0))) + + g1_mulAccC(_pVk, IC2x, IC2y, calldataload(add(pubSignals, 32))) + + g1_mulAccC(_pVk, IC3x, IC3y, calldataload(add(pubSignals, 64))) + + + // -A + mstore(_pPairing, calldataload(pA)) + mstore(add(_pPairing, 32), mod(sub(q, calldataload(add(pA, 32))), q)) + + // B + mstore(add(_pPairing, 64), calldataload(pB)) + mstore(add(_pPairing, 96), calldataload(add(pB, 32))) + mstore(add(_pPairing, 128), calldataload(add(pB, 64))) + mstore(add(_pPairing, 160), calldataload(add(pB, 96))) + + // alpha1 + mstore(add(_pPairing, 192), alphax) + mstore(add(_pPairing, 224), alphay) + + // beta2 + mstore(add(_pPairing, 256), betax1) + mstore(add(_pPairing, 288), betax2) + mstore(add(_pPairing, 320), betay1) + mstore(add(_pPairing, 352), betay2) + + // vk_x + mstore(add(_pPairing, 384), mload(add(pMem, pVk))) + mstore(add(_pPairing, 416), mload(add(pMem, add(pVk, 32)))) + + + // gamma2 + mstore(add(_pPairing, 448), gammax1) + mstore(add(_pPairing, 480), gammax2) + mstore(add(_pPairing, 512), gammay1) + mstore(add(_pPairing, 544), gammay2) + + // C + mstore(add(_pPairing, 576), calldataload(pC)) + mstore(add(_pPairing, 608), calldataload(add(pC, 32))) + + // delta2 + mstore(add(_pPairing, 640), deltax1) + mstore(add(_pPairing, 672), deltax2) + mstore(add(_pPairing, 704), deltay1) + mstore(add(_pPairing, 736), deltay2) + + + let success := staticcall(sub(gas(), 2000), 8, _pPairing, 768, _pPairing, 0x20) + + isOk := and(success, mload(_pPairing)) + } + + let pMem := mload(0x40) + mstore(0x40, add(pMem, pLastMem)) + + // Validate that all evaluations ∈ F + + checkField(calldataload(add(_pubSignals, 0))) + + checkField(calldataload(add(_pubSignals, 32))) + + checkField(calldataload(add(_pubSignals, 64))) + + + // Validate all evaluations + let isValid := checkPairing(_pA, _pB, _pC, _pubSignals, pMem) + + mstore(0, isValid) + return(0, 0x20) + } + } + } diff --git a/contracts/contracts/verifiers/register/Verifier_register_sha512_sha512_sha512_ecdsa_secp521r1.sol b/contracts/contracts/verifiers/register/Verifier_register_sha512_sha512_sha512_ecdsa_secp521r1.sol new file mode 100644 index 000000000..a7cc2cb4b --- /dev/null +++ b/contracts/contracts/verifiers/register/Verifier_register_sha512_sha512_sha512_ecdsa_secp521r1.sol @@ -0,0 +1,182 @@ +// SPDX-License-Identifier: GPL-3.0 +/* + Copyright 2021 0KIMS association. + + This file is generated with [snarkJS](https://github.com/iden3/snarkjs). + + snarkJS is a free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + snarkJS is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public + License for more details. + + You should have received a copy of the GNU General Public License + along with snarkJS. If not, see . +*/ + +pragma solidity >=0.7.0 <0.9.0; + +contract Verifier_register_sha512_sha512_sha512_ecdsa_secp521r1 { + // Scalar field size + uint256 constant r = 21888242871839275222246405745257275088548364400416034343698204186575808495617; + // Base field size + uint256 constant q = 21888242871839275222246405745257275088696311157297823662689037894645226208583; + + // Verification Key data + uint256 constant alphax = 20491192805390485299153009773594534940189261866228447918068658471970481763042; + uint256 constant alphay = 9383485363053290200918347156157836566562967994039712273449902621266178545958; + uint256 constant betax1 = 4252822878758300859123897981450591353533073413197771768651442665752259397132; + uint256 constant betax2 = 6375614351688725206403948262868962793625744043794305715222011528459656738731; + uint256 constant betay1 = 21847035105528745403288232691147584728191162732299865338377159692350059136679; + uint256 constant betay2 = 10505242626370262277552901082094356697409835680220590971873171140371331206856; + uint256 constant gammax1 = 11559732032986387107991004021392285783925812861821192530917403151452391805634; + uint256 constant gammax2 = 10857046999023057135944570762232829481370756359578518086990519993285655852781; + uint256 constant gammay1 = 4082367875863433681332203403145435568316851327593401208105741076214120093531; + uint256 constant gammay2 = 8495653923123431417604973247489272438418190587263600148770280649306958101930; + uint256 constant deltax1 = 5693819676530339458041022266222187151695485180905801249222371191495137664687; + uint256 constant deltax2 = 1214739013317108896521808071002234701556080827765922144081186738861086093379; + uint256 constant deltay1 = 6418076645836420671059748997176292536327596475671797721341469567563945325034; + uint256 constant deltay2 = 20047489905314554657229962814302565457277706277614625796219965705986733016400; + + + uint256 constant IC0x = 8213850473044923644372922865138955448896302402477327581557948020399125562390; + uint256 constant IC0y = 7127144729850972239443830705584255154725231438062233874024536757991585918868; + + uint256 constant IC1x = 10748168300188027468131455001498882971501504192679851740673356495856022514072; + uint256 constant IC1y = 19801403303372828407610128930377585605726313318856894500339976951193111704908; + + uint256 constant IC2x = 6379168317026520771879080773176084752194625610970132261699911666872334176519; + uint256 constant IC2y = 14383832051031881193464421156619185396407821282167818109735802801005284536097; + + uint256 constant IC3x = 2412093987228821900950564577698223430910769162690133525007020355167634696396; + uint256 constant IC3y = 19260582347247453329893161917118325457388005792864770063050983236893723593026; + + + // Memory data + uint16 constant pVk = 0; + uint16 constant pPairing = 128; + + uint16 constant pLastMem = 896; + + function verifyProof(uint[2] calldata _pA, uint[2][2] calldata _pB, uint[2] calldata _pC, uint[3] calldata _pubSignals) public view returns (bool) { + assembly { + function checkField(v) { + if iszero(lt(v, r)) { + mstore(0, 0) + return(0, 0x20) + } + } + + // G1 function to multiply a G1 value(x,y) to value in an address + function g1_mulAccC(pR, x, y, s) { + let success + let mIn := mload(0x40) + mstore(mIn, x) + mstore(add(mIn, 32), y) + mstore(add(mIn, 64), s) + + success := staticcall(sub(gas(), 2000), 7, mIn, 96, mIn, 64) + + if iszero(success) { + mstore(0, 0) + return(0, 0x20) + } + + mstore(add(mIn, 64), mload(pR)) + mstore(add(mIn, 96), mload(add(pR, 32))) + + success := staticcall(sub(gas(), 2000), 6, mIn, 128, pR, 64) + + if iszero(success) { + mstore(0, 0) + return(0, 0x20) + } + } + + function checkPairing(pA, pB, pC, pubSignals, pMem) -> isOk { + let _pPairing := add(pMem, pPairing) + let _pVk := add(pMem, pVk) + + mstore(_pVk, IC0x) + mstore(add(_pVk, 32), IC0y) + + // Compute the linear combination vk_x + + g1_mulAccC(_pVk, IC1x, IC1y, calldataload(add(pubSignals, 0))) + + g1_mulAccC(_pVk, IC2x, IC2y, calldataload(add(pubSignals, 32))) + + g1_mulAccC(_pVk, IC3x, IC3y, calldataload(add(pubSignals, 64))) + + + // -A + mstore(_pPairing, calldataload(pA)) + mstore(add(_pPairing, 32), mod(sub(q, calldataload(add(pA, 32))), q)) + + // B + mstore(add(_pPairing, 64), calldataload(pB)) + mstore(add(_pPairing, 96), calldataload(add(pB, 32))) + mstore(add(_pPairing, 128), calldataload(add(pB, 64))) + mstore(add(_pPairing, 160), calldataload(add(pB, 96))) + + // alpha1 + mstore(add(_pPairing, 192), alphax) + mstore(add(_pPairing, 224), alphay) + + // beta2 + mstore(add(_pPairing, 256), betax1) + mstore(add(_pPairing, 288), betax2) + mstore(add(_pPairing, 320), betay1) + mstore(add(_pPairing, 352), betay2) + + // vk_x + mstore(add(_pPairing, 384), mload(add(pMem, pVk))) + mstore(add(_pPairing, 416), mload(add(pMem, add(pVk, 32)))) + + + // gamma2 + mstore(add(_pPairing, 448), gammax1) + mstore(add(_pPairing, 480), gammax2) + mstore(add(_pPairing, 512), gammay1) + mstore(add(_pPairing, 544), gammay2) + + // C + mstore(add(_pPairing, 576), calldataload(pC)) + mstore(add(_pPairing, 608), calldataload(add(pC, 32))) + + // delta2 + mstore(add(_pPairing, 640), deltax1) + mstore(add(_pPairing, 672), deltax2) + mstore(add(_pPairing, 704), deltay1) + mstore(add(_pPairing, 736), deltay2) + + + let success := staticcall(sub(gas(), 2000), 8, _pPairing, 768, _pPairing, 0x20) + + isOk := and(success, mload(_pPairing)) + } + + let pMem := mload(0x40) + mstore(0x40, add(pMem, pLastMem)) + + // Validate that all evaluations ∈ F + + checkField(calldataload(add(_pubSignals, 0))) + + checkField(calldataload(add(_pubSignals, 32))) + + checkField(calldataload(add(_pubSignals, 64))) + + + // Validate all evaluations + let isValid := checkPairing(_pA, _pB, _pC, _pubSignals, pMem) + + mstore(0, isValid) + return(0, 0x20) + } + } + } diff --git a/contracts/ignition/modules/deployVerifiers.ts b/contracts/ignition/modules/deployVerifiers.ts index 342036318..a72e75704 100644 --- a/contracts/ignition/modules/deployVerifiers.ts +++ b/contracts/ignition/modules/deployVerifiers.ts @@ -2,19 +2,36 @@ import { buildModule } from "@nomicfoundation/hardhat-ignition/modules"; export default buildModule("DeployVerifiers", (m) => { - const vcAndDiscloseVerifier = m.contract("Verifier_vc_and_disclose"); + // const vcAndDiscloseVerifier = m.contract("Verifier_vc_and_disclose"); - const registerVerifier = m.contract("Verifier_register_sha1_sha256_sha256_rsa_65537_4096"); - const registerVerifier2 = m.contract("Verifier_register_sha256_sha256_sha256_ecdsa_brainpoolP256r1"); - const registerVerifier3 = m.contract("Verifier_register_sha256_sha256_sha256_rsa_65537_4096"); + // const registerVerifier = m.contract("Verifier_register_sha1_sha256_sha256_rsa_65537_4096"); + // const registerVerifier2 = m.contract("Verifier_register_sha256_sha256_sha256_ecdsa_brainpoolP256r1"); + // const registerVerifier3 = m.contract("Verifier_register_sha256_sha256_sha256_rsa_65537_4096"); + const verifier1 = m.contract("Verifier_dsc_sha1_ecdsa_secp256r1"); + const verifier2 = m.contract("Verifier_dsc_sha256_ecdsa_secp521r1"); + const verifier3 = m.contract("Verifier_dsc_sha384_ecdsa_brainpoolP512r1"); + const verifier4= m.contract("Verifier_dsc_sha512_ecdsa_brainpoolP512r1"); + const verifier5 = m.contract("Verifier_dsc_sha512_ecdsa_secp521r1"); + const verifier6 = m.contract("Verifier_register_sha1_sha1_sha1_ecdsa_secp256r1"); + const verifier7 = m.contract("Verifier_register_sha256_sha256_sha256_rsapss_65537_64_2048"); + const verifier8 = m.contract("Verifier_register_sha512_sha512_sha256_rsa_65537_4096"); + const verifier9 = m.contract("Verifier_register_sha512_sha512_sha512_ecdsa_secp521r1"); + const verifier10 = m.contract("Verifier_register_sha512_sha512_sha512_ecdsa_brainpoolP512r1"); + const verifier11 = m.contract("Verifier_register_sha384_sha384_sha384_ecdsa_brainpoolP512r1"); - const dscVerifier = m.contract("Verifier_dsc_sha256_rsa_65537_4096"); + // const dscVerifier = m.contract("Verifier_dsc_sha256_rsa_65537_4096"); return { - vcAndDiscloseVerifier, - registerVerifier, - registerVerifier2, - registerVerifier3, - dscVerifier + verifier1, + verifier2, + verifier3, + verifier4, + verifier5, + verifier6, + verifier7, + verifier8, + verifier9, + verifier10, + verifier11 }; }); \ No newline at end of file diff --git a/contracts/package.json b/contracts/package.json index 95e6717bf..ececcf689 100644 --- a/contracts/package.json +++ b/contracts/package.json @@ -118,5 +118,4 @@ "ts-node": "^10.9.1", "typechain": "^8.3.2", "typescript": "^5.1.6" - } -} + }} diff --git a/contracts/scripts/setVerifiers.ts b/contracts/scripts/setVerifiers.ts index 61519cdfb..e05d7fd5d 100644 --- a/contracts/scripts/setVerifiers.ts +++ b/contracts/scripts/setVerifiers.ts @@ -19,7 +19,7 @@ try { const deployedAddresses = JSON.parse(fs.readFileSync(path.join(__dirname, "../ignition/deployments/chain-42220/deployed_addresses.json"), "utf-8")); console.log("Deployed addresses loaded:", deployedAddresses); - const identityVerificationHubAbiFile = fs.readFileSync(path.join(__dirname, "../ignition/deployments/chain-42220/artifacts/DeployHub#IdentityVerificationHubImplV1.json"), "utf-8"); + const identityVerificationHubAbiFile = fs.readFileSync(path.join(__dirname, "../ignition/deployments/prod/artifacts/DeployHub#IdentityVerificationHubImplV1.json"), "utf-8"); console.log("ABI file loaded"); const identityVerificationHubAbi = JSON.parse(identityVerificationHubAbiFile).abi; @@ -43,7 +43,8 @@ try { const wallet = new ethers.Wallet(process.env.CELO_KEY as string, provider); console.log("Wallet created"); - const hubAddress = deployedAddresses["DeployHub#IdentityVerificationHub"]; + // const hubAddress = deployedAddresses["DeployHub#IdentityVerificationHub"]; + const hubAddress = "0x77117D60eaB7C044e785D68edB6C7E0e134970Ea"; console.log("Hub address:", hubAddress); if (!hubAddress) { diff --git a/contracts/yarn.lock b/contracts/yarn.lock index 4b1fc8a35..ca3e13659 100644 --- a/contracts/yarn.lock +++ b/contracts/yarn.lock @@ -968,9 +968,9 @@ "@types/chai" "*" "@types/chai@*": - version "5.2.0" - resolved "https://registry.yarnpkg.com/@types/chai/-/chai-5.2.0.tgz#fe62a18d33001800d3590792ceb6126142f814a4" - integrity sha512-FWnQYdrG9FAC8KgPVhDFfrPL1FBsL3NtIt2WsxKvwu/61K6HiuDF3xAb7c7w/k9ML2QOUHcwTgU7dKLFPK6sBg== + version "5.2.1" + resolved "https://registry.yarnpkg.com/@types/chai/-/chai-5.2.1.tgz#85687a58b27eac736ec0e87e5cb98f21e57a0bb1" + integrity sha512-iu1JLYmGmITRzUgNiLMZD3WCoFzpYtueuyAgHTXqgwSRAMIlFTnZqG6/xenkpUGRJEzSfklUTI4GNSzks/dc0w== dependencies: "@types/deep-eql" "*" @@ -1054,9 +1054,9 @@ integrity sha512-xPyYSz1cMPnJQhl0CLMH68j3gprKZaTjG3s5Vi+fDgx+uhG9NOXwbVt52eFS8ECyXhyKcjDLCBEqBExKuiZb7Q== "@types/node@*": - version "22.13.10" - resolved "https://registry.yarnpkg.com/@types/node/-/node-22.13.10.tgz#df9ea358c5ed991266becc3109dc2dc9125d77e4" - integrity sha512-I6LPUvlRH+O6VRUqYOcMudhaIdUVWfsjnZavnsraHvpBwaEyMN29ry+0UVJhImYL16xsscu0aske3yA+uPOWfw== + version "22.13.14" + resolved "https://registry.yarnpkg.com/@types/node/-/node-22.13.14.tgz#70d84ec91013dcd2ba2de35532a5a14c2b4cc912" + integrity sha512-Zs/Ollc1SJ8nKUAgc7ivOEdIBM8JAKgrqqUYi2J997JuKO7/tpQC+WCetQ1sypiKCQWHdvdg9wBNpUPEWZae7w== dependencies: undici-types "~6.20.0" @@ -1352,9 +1352,9 @@ at-least-node@^1.0.0: integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg== axios@^1.5.1, axios@^1.6.2: - version "1.8.3" - resolved "https://registry.yarnpkg.com/axios/-/axios-1.8.3.tgz#9ebccd71c98651d547162a018a1a95a4b4ed4de8" - integrity sha512-iP4DebzoNlP/YN2dpwCgb8zoCmhtkajzS48JvwmkSkXvPI3DHc7m+XYL5tGnSlJtR6nImXZmdCuN5aP8dh1d8A== + version "1.8.4" + resolved "https://registry.yarnpkg.com/axios/-/axios-1.8.4.tgz#78990bb4bc63d2cae072952d374835950a82f447" + integrity sha512-eBSYY4Y68NNlHbHBMdeDmKNtDgXWhQsJcGqzO3iLUM0GraQFSS9cVgPX5I9b3lbdFKyYoAEGAZF1DwhTaljNAw== dependencies: follow-redirects "^1.15.6" form-data "^4.0.0" @@ -4455,9 +4455,9 @@ undici-types@~6.20.0: integrity sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg== undici@^5.14.0: - version "5.28.5" - resolved "https://registry.yarnpkg.com/undici/-/undici-5.28.5.tgz#b2b94b6bf8f1d919bc5a6f31f2c01deb02e54d4b" - integrity sha512-zICwjrDrcrUE0pyyJc1I2QzBkLM8FINsgOrt6WjA+BgajVq9Nxu2PbFFXUrAggLfDXlZGZBVZYw7WNV5KiBiBA== + version "5.29.0" + resolved "https://registry.yarnpkg.com/undici/-/undici-5.29.0.tgz#419595449ae3f2cdcba3580a2e8903399bd1f5a3" + integrity sha512-raqeBD6NQK4SkWhQzeYKd1KmIG6dllBOTt55Rmkt4HtI9mwdWtJljnrXjAFUBLTSN67HWrOIZ3EPF4kjUw80Bg== dependencies: "@fastify/busboy" "^2.0.0" @@ -4497,9 +4497,9 @@ v8-compile-cache-lib@^3.0.1: integrity sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg== validator@^13.6.0: - version "13.12.0" - resolved "https://registry.yarnpkg.com/validator/-/validator-13.12.0.tgz#7d78e76ba85504da3fee4fd1922b385914d4b35f" - integrity sha512-c1Q0mCiPlgdTVVVIJIrBuxNicYE+t/7oKeI9MWLj3fh/uq2Pxh/3eeWbVZ4OcGW1TUf53At0njHw5SMdA3tmMg== + version "13.15.0" + resolved "https://registry.yarnpkg.com/validator/-/validator-13.15.0.tgz#2dc7ce057e7513a55585109eec29b2c8e8c1aefd" + integrity sha512-36B2ryl4+oL5QxZ3AzD0t5SsMNGvTtQHpjgFO5tbNxfXbMFkY822ktCDe1MnlqV3301QQI9SLHDNJokDI+Z9pA== wasmbuilder@0.0.16: version "0.0.16"