Relation which needs to be proven. Contains any public data that needs to be known to both prover and verifier

Constructors

Methods

attributeBoundPseudonym attributeBoundPseudonymVerifier bbdt16Mac bbdt16MacConstantTime bbdt16MacFromSetupParamRefs bbdt16MacFromSetupParamRefsConstantTime bbdt16MacFullVerifier bbdt16MacFullVerifierConstantTime bbdt16MacFullVerifierFromSetupParamRefs bbdt16MacFullVerifierFromSetupParamRefsConstantTime bbsPlusSignatureProver bbsPlusSignatureProverConstantTime bbsPlusSignatureProverFromSetupParamRefs bbsPlusSignatureProverFromSetupParamRefsConstantTime bbsPlusSignatureVerifier bbsPlusSignatureVerifierConstantTime bbsPlusSignatureVerifierFromSetupParamRefs bbsPlusSignatureVerifierFromSetupParamRefsConstantTime bbsSignatureProver bbsSignatureProverConstantTime bbsSignatureProverFromSetupParamRefs bbsSignatureProverFromSetupParamRefsConstantTime bbsSignatureVerifier bbsSignatureVerifierConstantTime bbsSignatureVerifierFromSetupParamRefs bbsSignatureVerifierFromSetupParamRefsConstantTime boundCheckBpp boundCheckBppFromCompressedParams boundCheckBppFromSetupParamRefs boundCheckLegoProver boundCheckLegoProverFromCompressedParams boundCheckLegoProverFromSetupParamRefs boundCheckLegoVerifier boundCheckLegoVerifierFromCompressedParams boundCheckLegoVerifierFromSetupParamRefs boundCheckSmc boundCheckSmcFromCompressedParams boundCheckSmcFromSetupParamRefs boundCheckSmcWithKVProver boundCheckSmcWithKVProverFromCompressedParams boundCheckSmcWithKVProverFromSetupParamRefs boundCheckSmcWithKVVerifier boundCheckSmcWithKVVerifierFromCompressedParams boundCheckSmcWithKVVerifierFromSetupParamRefs kbUniAccumulatorMembershipKV kbUniAccumulatorMembershipKVFullVerifier kbUniAccumulatorMembershipProver kbUniAccumulatorMembershipVerifier kbUniAccumulatorMembershipVerifierFromSetupParamRefs kbUniAccumulatorNonMembershipKV kbUniAccumulatorNonMembershipKVFullVerifier kbUniAccumulatorNonMembershipProver kbUniAccumulatorNonMembershipVerifier kbUniAccumulatorNonMembershipVerifierFromSetupParamRefs pedersenCommitmentG1 pedersenCommitmentG1FromSetupParamRef pseudonym pseudonymVerifier psSignature psSignatureConstantTime psSignatureFromSetupParamRefs psSignatureFromSetupParamRefsConstantTime publicInequalityG1 publicInequalityG1FromCompressedParams publicInequalityG1FromSetupParamRefs r1csCircomProver r1csCircomProverFromCompressedParams r1csCircomProverFromSetupParamRefs r1csCircomVerifier r1csCircomVerifierFromCompressedParams r1csCircomVerifierFromSetupParamRefs saverProver saverProverFromCompressedParams saverProverFromSetupParamRefs saverVerifier saverVerifierFromCompressedParams saverVerifierFromSetupParamRefs vbAccumulatorMembership vbAccumulatorMembershipFromSetupParamRefs vbAccumulatorMembershipKV vbAccumulatorMembershipKVFullVerifier vbAccumulatorNonMembership vbAccumulatorNonMembershipFromSetupParamRefs

Constructors

Methods

  • Statement for proving knowledge of secret key and attributes behind pseudonym

    Parameters

    Returns Uint8Array

  • Parameters

    • pseudonym: Uint8Array
    • basesForAttributes: Uint8Array[]
    • OptionalbaseForSecretKey: Uint8Array

    Returns Uint8Array

  • Parameters

    • macParams: BBDT16MacParams
    • revealedMessages: Map<number, Uint8Array>
    • encodeMessages: boolean

    Returns Uint8Array

  • Parameters

    • macParamsRef: number
    • revealedMessages: Map<number, Uint8Array>
    • encodeMessages: boolean

    Returns Uint8Array

  • Parameters

    • macParamsRef: number
    • revealedMessages: Map<number, Uint8Array>
    • encodeMessages: boolean

    Returns Uint8Array

  • Parameters

    • macParamsRef: number
    • secretKey: BBDT16MacSecretKey
    • revealedMessages: Map<number, Uint8Array>
    • encodeMessages: boolean

    Returns Uint8Array

  • Parameters

    • macParamsRef: number
    • secretKey: BBDT16MacSecretKey
    • revealedMessages: Map<number, Uint8Array>
    • encodeMessages: boolean

    Returns Uint8Array

  • Create statement for proving knowledge of BBS+ signature

    Parameters

    Returns Uint8Array

  • Create statement for proving knowledge of BBS+ signature

    Parameters

    Returns Uint8Array

  • Same as Statement.bbsPlusSignatureProver but does not take the parameters directly but a reference to them as indices in the array of SetupParam

    Parameters

    • sigParamsRef: number
    • revealedMessages: Map<number, Uint8Array>
    • encodeMessages: boolean

    Returns Uint8Array

  • Same as Statement.bbsPlusSignatureProver but does not take the parameters directly but a reference to them as indices in the array of SetupParam

    Parameters

    • sigParamsRef: number
    • revealedMessages: Map<number, Uint8Array>
    • encodeMessages: boolean

    Returns Uint8Array

  • Same as Statement.bbsPlusSignatureVerifier but does not take the parameters directly but a reference to them as indices in the array of SetupParam

    Parameters

    • sigParamsRef: number
    • publicKeyRef: number
    • revealedMessages: Map<number, Uint8Array>
    • encodeMessages: boolean

    Returns Uint8Array

  • Same as Statement.bbsPlusSignatureVerifier but does not take the parameters directly but a reference to them as indices in the array of SetupParam

    Parameters

    • sigParamsRef: number
    • publicKeyRef: number
    • revealedMessages: Map<number, Uint8Array>
    • encodeMessages: boolean

    Returns Uint8Array

  • Create statement for proving knowledge of BBS signature

    Parameters

    • sigParams: BBSSignatureParams
    • revealedMessages: Map<number, Uint8Array>
    • encodeMessages: boolean

    Returns Uint8Array

  • Create statement for proving knowledge of BBS signature

    Parameters

    • sigParams: BBSSignatureParams
    • revealedMessages: Map<number, Uint8Array>
    • encodeMessages: boolean

    Returns Uint8Array

  • Same as Statement.bbsSignatureProver but does not take the parameters directly but a reference to them as indices in the array of SetupParam

    Parameters

    • sigParamsRef: number
    • revealedMessages: Map<number, Uint8Array>
    • encodeMessages: boolean

    Returns Uint8Array

  • Same as Statement.bbsSignatureProver but does not take the parameters directly but a reference to them as indices in the array of SetupParam

    Parameters

    • sigParamsRef: number
    • revealedMessages: Map<number, Uint8Array>
    • encodeMessages: boolean

    Returns Uint8Array

  • Create statement for verifying knowledge of BBS signature

    Parameters

    Returns Uint8Array

  • Same as Statement.bbsSignatureVerifier but does not take the parameters directly but a reference to them as indices in the array of SetupParam

    Parameters

    • sigParamsRef: number
    • publicKeyRef: number
    • revealedMessages: Map<number, Uint8Array>
    • encodeMessages: boolean

    Returns Uint8Array

  • Same as Statement.bbsSignatureVerifier but does not take the parameters directly but a reference to them as indices in the array of SetupParam

    Parameters

    • sigParamsRef: number
    • publicKeyRef: number
    • revealedMessages: Map<number, Uint8Array>
    • encodeMessages: boolean

    Returns Uint8Array

  • Create statement for proving bounds of a message using Bulletproofs++.

    Parameters

    • min: number

      Inclusive lower bound on the message, must be a positive integer.

    • max: number

      Exclusive upper bound on the message, must be a positive integer.

    • params: BoundCheckBppParamsUncompressed

      Setup params for Bulletproofs++

    Returns Uint8Array

  • Same as Statement.boundCheckBpp except that it takes compressed parameters.

    Parameters

    • min: number

      Inclusive lower bound on the message.

    • max: number

      Exclusive upper bound on the message.

    • params: BoundCheckBppParams

      Setup params for Bulletproofs++

    Returns Uint8Array

  • Same as Statement.boundCheckBpp but does not take the parameters directly but a reference to them as indices in the array of SetupParam

    Parameters

    • min: number

      Inclusive lower bound on the message.

    • max: number

      Exclusive upper bound on the message.

    • params: number

      Index of setup params in array of SetupParam

    Returns Uint8Array

  • Create statement for proving bounds [min, max) of a message using LegoGroth16, for the prover.

    Parameters

    • min: number

      Inclusive lower bound on the message, must be a positive integer.

    • max: number

      Exclusive upper bound on the message, must be a positive integer.

    • snarkPk: LegoProvingKeyUncompressed

      Proving key for LegoGroth16

    Returns Uint8Array

  • Same as Statement.boundCheckLegoProver except that it takes compressed parameters.

    Parameters

    • min: number

      Inclusive lower bound on the message.

    • max: number

      Exclusive upper bound on the message.

    • snarkPk: LegoProvingKey

      Proving key for LegoGroth16

    Returns Uint8Array

  • Same as Statement.boundCheckLegoProver but does not take the parameters directly but a reference to them as indices in the array of SetupParam

    Parameters

    • min: number

      Inclusive lower bound on the message.

    • max: number

      Exclusive upper bound on the message.

    • snarkPkRef: number

      Index of proving key in array of SetupParam

    Returns Uint8Array

  • Create statement for verifying bounds [min, max) of a message using LegoGroth16, for the verifier.

    Parameters

    • min: number

      Inclusive lower bound on the message, must be a positive integer.

    • max: number

      Exclusive upper bound on the message, must be a positive integer.

    • snarkVk: LegoVerifyingKeyUncompressed

      Verifying key for LegoGroth16

    Returns Uint8Array

  • Same as Statement.boundCheckLegoVerifier except that it takes compressed parameters.

    Parameters

    • min: number

      Inclusive lower bound on the message.

    • max: number

      Exclusive upper bound on the message.

    • snarkVk: LegoVerifyingKey

      Verifying key for LegoGroth16

    Returns Uint8Array

  • Same as Statement.boundCheckLegoVerifier but does not take the parameters directly but a reference to them as indices in the array of SetupParam

    Parameters

    • min: number

      Inclusive lower bound on the message.

    • max: number

      Exclusive upper bound on the message.

    • snarkVkRef: number

      Index of verifying key in array of SetupParam

    Returns Uint8Array

  • Create statement for proving bounds of a message using set-membership check based range proof.

    Parameters

    • min: number

      Inclusive lower bound on the message, must be a positive integer.

    • max: number

      Exclusive upper bound on the message, must be a positive integer.

    • params: BoundCheckSmcParamsUncompressed

      Setup params for Bulletproofs++

    Returns Uint8Array

  • Same as Statement.boundCheckSmc except that it takes compressed parameters.

    Parameters

    • min: number

      Inclusive lower bound on the message.

    • max: number

      Exclusive upper bound on the message.

    • params: BoundCheckSmcParams

      Setup params for Bulletproofs++

    Returns Uint8Array

  • Same as Statement.boundCheckSmc but does not take the parameters directly but a reference to them as indices in the array of SetupParam

    Parameters

    • min: number

      Inclusive lower bound on the message.

    • max: number

      Exclusive upper bound on the message.

    • params: number

      Index of setup params in array of SetupParam

    Returns Uint8Array

  • Create statement for proving bounds [min, max) of a message using set-membership check based range proof and keyed verification, for the prover.

    Parameters

    Returns Uint8Array

  • Same as Statement.boundCheckSmcWithKVProver except that it takes compressed parameters.

    Parameters

    Returns Uint8Array

  • Same as Statement.boundCheckSmcWithKVProver but does not take the parameters directly but a reference to them as indices in the array of SetupParam

    Parameters

    • min: number

      Inclusive lower bound on the message.

    • max: number

      Exclusive upper bound on the message.

    • paramsRef: number

      Index of params in array of SetupParam

    Returns Uint8Array

  • Create statement for verifying bounds [min, max) of a message using LegoGroth16, for the verifier.

    Parameters

    Returns Uint8Array

  • Same as Statement.boundCheckSmcWithKVVerifier except that it takes compressed parameters.

    Parameters

    Returns Uint8Array

  • Same as Statement.boundCheckSmcWithKVVerifier but does not take the parameters directly but a reference to them as indices in the array of SetupParam

    Parameters

    • min: number

      Inclusive lower bound on the message.

    • max: number

      Exclusive upper bound on the message.

    • params: number

      Index of params in array of SetupParam

    Returns Uint8Array

  • Create statement for proving knowledge of KB universal accumulator membership

    Parameters

    • accumulated: Uint8Array

    Returns Uint8Array

  • Same as Statement.kbUniAccumulatorMembershipVerifier but does not take the parameters directly but a reference to them as indices in the array of SetupParam

    Parameters

    • params: number
    • publicKey: number
    • accumulated: Uint8Array

    Returns Uint8Array

  • Create statement for proving knowledge of ¸ non-membership

    Parameters

    • accumulated: Uint8Array

    Returns Uint8Array

  • Same as Statement.kbUniAccumulatorNonMembershipVerifier but does not take the parameters directly but a reference to them as indices in the array of SetupParam

    Parameters

    • params: number
    • publicKey: number
    • accumulated: Uint8Array

    Returns Uint8Array

  • Create statement for proving knowledge of opening of Pedersen commitment with commitment key and commitment in G1

    Parameters

    • commitmentKey: Uint8Array[]

      commitment key used to create the commitment

    • commitment: Uint8Array

    Returns Uint8Array

  • Same as Statement.pedersenCommitmentG1 but does not take the commitment key directly but a reference to it

    Parameters

    • commitmentKeyRef: number
    • commitment: Uint8Array

    Returns Uint8Array

  • Statement for proving knowledge of secret key behind pseudonym

    Parameters

    Returns Uint8Array

  • Create statement for proving knowledge of Pointcheval-Sanders signature

    Parameters

    Returns Uint8Array

  • Same as Statement.psSignature but does not take the parameters directly but a reference to them as indices in the array of SetupParam

    Parameters

    • sigParamsRef: number
    • publicKeyRef: number
    • revealedMessages: Map<number, Uint8Array>

    Returns Uint8Array

  • Same as Statement.psSignature but does not take the parameters directly but a reference to them as indices in the array of SetupParam

    Parameters

    • sigParamsRef: number
    • publicKeyRef: number
    • revealedMessages: Map<number, Uint8Array>

    Returns Uint8Array

  • Create statement for proving inequality of a credential

    Parameters

    • inequalTo: Uint8Array
    • commKey: PederCommKeyUncompressed

    Returns Uint8Array

  • Parameters

    • inequalTo: Uint8Array
    • commKey: PederCommKey

    Returns Uint8Array

  • Parameters

    • inequalTo: Uint8Array
    • commKey: number

    Returns Uint8Array

  • Parameters

    • processedR1cs: number
    • wasmBytes: number
    • snarkPkRef: number

    Returns Uint8Array

  • Parameters

    • publicInputsRef: number
    • snarkVkRef: number

    Returns Uint8Array

  • Same as Statement.saverProver but does not take the parameters directly but a reference to them as indices in the array of SetupParam

    Parameters

    • encGensRef: number
    • commKeyRef: number
    • encryptionKeyRef: number
    • snarkPkRef: number
    • chunkBitSize: number

      Must be same as the one used by the decryptor to create the parameters.

    Returns Uint8Array

  • Same as Statement.saverVerifier but does not take the parameters directly but a reference to them as indices in the array of SetupParam

    Parameters

    • encGensRef: number
    • commGensKey: number
    • encryptionKeyRef: number
    • snarkVkRef: number
    • chunkBitSize: number

    Returns Uint8Array

  • Same as Statement.vbAccumulatorMembership but does not take the parameters directly but a reference to them as indices in the array of SetupParam

    Parameters

    • params: number
    • publicKey: number
    • provingKey: number
    • accumulated: Uint8Array

    Returns Uint8Array

  • Same as Statement.vbAccumulatorNonMembership but does not take the parameters directly but a reference to them as indices in the array of SetupParam

    Parameters

    • params: number
    • publicKey: number
    • provingKey: number
    • accumulated: Uint8Array

    Returns Uint8Array