Documentation ¶
Overview ¶
Copyright IBM Corp. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
Copyright IBM Corp. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
Copyright IBM Corp. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
Copyright IBM Corp. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
Copyright IBM Corp. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
Index ¶
- func ComputePedersenCommitment(opening []*math.Zr, base []*math.G1, c *math.Curve) (*math.G1, error)
- func GetBytesArray(bytes ...[]byte) []byte
- func GetZrArray(elements ...[]*math.Zr) []*math.Zr
- func NewNymSigner(sk, bf *math.Zr, nymParams []*math.G1, nym *math.G1, curve *math.Curve) (*nymSigner, error)
- func Sum(values []*math.Zr, c *math.Curve) (*math.Zr, error)
- type G1Array
- type G2Array
- type GTArray
- type NYMSig
- type NymVerifier
- type Prover
- type SchnorrProof
- type SchnorrProver
- type SchnorrVerifier
- type SigningIdentity
- type Verifier
- type WrappedSigningIdentity
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComputePedersenCommitment ¶
func ComputePedersenCommitment(opening []*math.Zr, base []*math.G1, c *math.Curve) (*math.G1, error)
ComputePedersenCommitment returns the commitment to opening relative to base in passed curve.
func GetBytesArray ¶
GetBytesArray takes a series of array of bytes and returns the concatenation
func GetZrArray ¶
GetZrArray takes a series of Zr elements and returns the corresponding array
func NewNymSigner ¶
Types ¶
type G1Array ¶
G1Array is an array of G1 elements
func GetG1Array ¶
GetG1Array takes a series of G1 elements and returns the corresponding array
type G2Array ¶
G2Array is an array of G2 elements
func GetG2Array ¶
GetG2Array takes a series of G2 elements and returns the corresponding array
type GTArray ¶
GTArray is an array of GT elements
func GetGTArray ¶
GetGTArray takes a series of GT elements and returns the corresponding array
type NYMSig ¶
NYMSig is the SOK signature produced by nymSigner
func (*NYMSig) Deserialize ¶
Deserialize un-marshals NYMSig
type NymVerifier ¶
NymVerifier verify SOK signature produced by nymSigner
func NewNymVerifier ¶
func (*NymVerifier) Deserialize ¶
func (v *NymVerifier) Deserialize(raw []byte) error
Deserialize returns an error if it fails to deserialize a NymVerifier from raw.
func (*NymVerifier) Serialize ¶
func (v *NymVerifier) Serialize() ([]byte, error)
Serialize returns a serialized pseudonym (PedGen^SK*Q^BF)
type SchnorrProof ¶
SchnorrProof carries a ZKP for statement (w_1, ..., w_n): Com = \Prod_{j=1}^n P_i^w_i
type SchnorrProver ¶
type SchnorrProver struct { *SchnorrVerifier Witness []*math.Zr Randomness []*math.Zr Challenge *math.Zr }
SchnorrProver produces a Schnorr proof
type SchnorrVerifier ¶
SchnorrVerifier verifies a SchnorrProof
func (*SchnorrVerifier) ComputeChallenge ¶
func (v *SchnorrVerifier) ComputeChallenge(raw []byte) (*math.Zr, error)
ComputeChallenge takes an array of bytes and returns the corresponding hash.
func (*SchnorrVerifier) RecomputeCommitment ¶
func (v *SchnorrVerifier) RecomputeCommitment(zkp *SchnorrProof) (*math.G1, error)
RecomputeCommitment is called by the verifier. It takes a SchnorrProof and returns the corresponding randomness commitment.
func (*SchnorrVerifier) RecomputeCommitments ¶
func (v *SchnorrVerifier) RecomputeCommitments(zkps []*SchnorrProof, challenge *math.Zr) ([]*math.G1, error)
type SigningIdentity ¶
type SigningIdentity interface { driver.SigningIdentity }
type WrappedSigningIdentity ¶
func (*WrappedSigningIdentity) Serialize ¶
func (w *WrappedSigningIdentity) Serialize() ([]byte, error)