Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions circuits/credentialAtomicQueryV3Universal-16-16-64.circom
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,6 @@ circuitQueryHash - hash of the query
component main{public [requestID,
issuerID,
issuerClaimNonRevState,
claimSchema,
slotIndex,
claimPathKey,
operator,
value,
valueArraySize,
timestamp,
isRevocationChecked,
proofType,
verifierID,
nullifierSessionID
]} = credentialAtomicQueryV3Universal(16, 16, 64); // issuerLevels, claimLevels, maxValueArraySize
11 changes: 1 addition & 10 deletions circuits/credentialAtomicQueryV3Universal.circom
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,6 @@ circuitQueryHash - hash of the query
component main{public [requestID,
issuerID,
issuerClaimNonRevState,
claimSchema,
slotIndex,
claimPathKey,
operator,
value,
valueArraySize,
timestamp,
isRevocationChecked,
proofType,
verifierID,
nullifierSessionID
proofType
]} = credentialAtomicQueryV3Universal(40, 32, 64); // issuerLevels, claimLevels, maxValueArraySize
File renamed without changes.
2 changes: 1 addition & 1 deletion circuits/universal/credentialAtomicQueryV3Universal.circom
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ template credentialAtomicQueryV3Universal(issuerLevels, claimLevels, maxValueArr
// on root stored in the index or value slot
// if it is not set verification is performed on according to the slotIndex. Value selected from the
// provided slot. For example if slotIndex is `1` value gets from `i_1` slot. If `4` from `v_1`.
signal {binary} merklized;
signal {binary} merklized;

/////////////////////////////////////////////////////////////////
// Claim checks
Expand Down
4 changes: 2 additions & 2 deletions test/linked/linked.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ import {describe} from "mocha";
const path = require("path");
const wasmTester = require("circom_tester").wasm;

describe("Test linkedMultiQuery10.circom", function () {
describe("Test linkedMultiQuery.circom", function () {

this.timeout(600000);

let circuit;

before(async () => {
circuit = await wasmTester(
path.join(__dirname, "../../circuits", "linkedMultiQuery10.circom"),
path.join(__dirname, "../../circuits", "linkedMultiQuery.circom"),
{
output: path.join(__dirname, "circuits", "build"),
recompile: true,
Expand Down
55 changes: 12 additions & 43 deletions testvectorgen/credentials/v3-universal/v3_universal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"context"
"encoding/json"
"math/big"
"strconv"
"testing"

"test/utils"
Expand Down Expand Up @@ -99,27 +98,17 @@ type Inputs struct {
}

type Outputs struct {
RequestID string `json:"requestID"`
UserID string `json:"userID"`
IssuerID string `json:"issuerID"`
IssuerClaimNonRevState string `json:"issuerClaimNonRevState"`
ClaimSchema string `json:"claimSchema"`
SlotIndex string `json:"slotIndex"`
Operator int `json:"operator"`
ClaimPathKey string `json:"claimPathKey"`
Value []string `json:"value"`
ValueArraySize int `json:"valueArraySize"`
Timestamp string `json:"timestamp"`
Merklized string `json:"merklized"`
ProofType string `json:"proofType"` // 1 for sig, 2 for mtp
IsRevocationChecked string `json:"isRevocationChecked"`
IssuerState string `json:"issuerState"`
LinkID string `json:"linkID"`
VerifierID string `json:"verifierID"`
NullifierSessionID string `json:"nullifierSessionID"`
OperatorOutput string `json:"operatorOutput"`
Nullifier string `json:"nullifier"`
CircuitQueryHash string `json:"circuitQueryHash"`
RequestID string `json:"requestID"`
UserID string `json:"userID"`
IssuerID string `json:"issuerID"`
IssuerClaimNonRevState string `json:"issuerClaimNonRevState"`
Timestamp string `json:"timestamp"`
ProofType string `json:"proofType"` // 1 for sig, 2 for mtp
IssuerState string `json:"issuerState"`
LinkID string `json:"linkID"`
OperatorOutput string `json:"operatorOutput"`
Nullifier string `json:"nullifier"`
CircuitQueryHash string `json:"circuitQueryHash"`
}

type TestData struct {
Expand Down Expand Up @@ -564,21 +553,11 @@ func generateTestDataWithOperatorAndRevCheck(t *testing.T, desc string, isUserID
UserID: userProfileID.BigInt().String(),
IssuerID: issuer.ID.BigInt().String(),
IssuerClaimNonRevState: issuer.State(t).String(),
ClaimSchema: "180410020913331409885634153623124536270",
SlotIndex: strconv.Itoa(slotIndex),
ClaimPathKey: claimPathKey,
Operator: operator,
Value: valueInput,
ValueArraySize: valueArrSize,
Timestamp: timestamp,
Merklized: merklized,
IsRevocationChecked: strconv.Itoa(isRevocationChecked),
ProofType: proofType,
IssuerState: issuerState,
LinkID: linkID,
OperatorOutput: operatorOutput,
VerifierID: inputs.VerifierID,
NullifierSessionID: inputs.NullifierSessionID,
Nullifier: nullifier,
CircuitQueryHash: circuitQueryHash,
}
Expand Down Expand Up @@ -713,20 +692,10 @@ func generateJSONLD_NON_INCLUSION_TestData(t *testing.T, isUserIDProfile, isSubj
UserID: userProfileID.BigInt().String(),
IssuerID: issuer.ID.BigInt().String(),
IssuerClaimNonRevState: issuerClaimNonRevState.String(),
ClaimSchema: "180410020913331409885634153623124536270",
SlotIndex: "0",
Operator: utils.NOOP,
ClaimPathKey: pathKey.String(),
Value: utils.PrepareStrArray([]string{}, 64),
ValueArraySize: 0,
Timestamp: timestamp,
Merklized: "1",
IssuerState: issuerAuthState.String(),
IsRevocationChecked: "1",
ProofType: "1",
LinkID: "0",
VerifierID: inputs.VerifierID,
NullifierSessionID: inputs.NullifierSessionID,
OperatorOutput: "0",
Nullifier: "0",
CircuitQueryHash: circuitQueryHash,
Expand All @@ -740,7 +709,7 @@ func generateJSONLD_NON_INCLUSION_TestData(t *testing.T, isUserIDProfile, isSubj
require.NoError(t, err)

utils.SaveTestVector(t, fileName, string(jsonData))
}
}

func calculateCircuitQueryHash(t *testing.T, inputs Inputs, merklized string, pathKey *big.Int) (string, error) {
merklizedBigInt, ok := big.NewInt(0).SetString(merklized, 10)
Expand Down