Documentation ¶
Index ¶
- type Challenge
- type Commitment
- type HmacDrbg
- type Nonce
- type ProofCommittedBuilder
- func (pcb *ProofCommittedBuilder) Commit(point curves.Point, scalar curves.Scalar) error
- func (pcb *ProofCommittedBuilder) CommitRandom(point curves.Point, reader io.Reader) error
- func (pcb ProofCommittedBuilder) GenerateProof(challenge curves.Scalar, secrets []curves.Scalar) ([]curves.Scalar, error)
- func (pcb *ProofCommittedBuilder) Get(index int) (curves.Point, curves.Scalar)
- func (pcb ProofCommittedBuilder) GetChallengeContribution() []byte
- type ProofMessage
- type ProofSpecificMessage
- type RevealedMessage
- type SharedBlindingMessage
- type SignatureBlinding
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Commitment ¶
Commitment represents a point Pedersen commitment of one or more points multiplied by scalars
type HmacDrbg ¶
type HmacDrbg struct {
// contains filtered or unexported fields
}
HmacDrbg is an HMAC deterministic random bit generator that can use any hash function. Handles reseeding automatically
type ProofCommittedBuilder ¶
type ProofCommittedBuilder struct {
// contains filtered or unexported fields
}
ProofCommittedBuilder is used to create proofs from multiple commitments where each secret is committed with a random blinding factor and turned into a Schnorr proof
func NewProofCommittedBuilder ¶
func NewProofCommittedBuilder(curve *curves.Curve) *ProofCommittedBuilder
NewProofCommittedBuilder creates a new builder using the specified curve
func (*ProofCommittedBuilder) Commit ¶
Commit uses the specified point and scalar to create a commitment
func (*ProofCommittedBuilder) CommitRandom ¶
CommitRandom uses the specified point and commits a random value to it
func (ProofCommittedBuilder) GenerateProof ¶
func (pcb ProofCommittedBuilder) GenerateProof(challenge curves.Scalar, secrets []curves.Scalar) ([]curves.Scalar, error)
GenerateProof converts the blinding factors and secrets into Schnorr proofs
func (ProofCommittedBuilder) GetChallengeContribution ¶
func (pcb ProofCommittedBuilder) GetChallengeContribution() []byte
GetChallengeContribution returns the bytes that should be added to a sigma protocol transcript for generating the challenge
type ProofMessage ¶
type ProofMessage interface { // IsHidden indicates the message should be hidden IsHidden() bool // GetBlinding is used for hidden messages // blindings can either be proof specific to a signature // or involved with other proofs like boundchecks, // set memberships, or inequalities so the blinding // factor is shared among proofs to produce a common // schnorr linking proof GetBlinding(reader io.Reader) curves.Scalar // GetMessage returns the underlying message GetMessage() curves.Scalar }
ProofMessage classifies how a message is presented in a proof Either Revealed or Hidden. Hidden has two sub categories: proof specific i.e. the message is only used for this proof or shared i.e. the message should be proved to be common across proofs
type ProofSpecificMessage ¶
func (ProofSpecificMessage) GetBlinding ¶
func (ps ProofSpecificMessage) GetBlinding(reader io.Reader) curves.Scalar
func (ProofSpecificMessage) GetMessage ¶
func (ps ProofSpecificMessage) GetMessage() curves.Scalar
func (ProofSpecificMessage) IsHidden ¶
func (ps ProofSpecificMessage) IsHidden() bool
type RevealedMessage ¶
func (RevealedMessage) GetBlinding ¶
func (r RevealedMessage) GetBlinding(reader io.Reader) curves.Scalar
func (RevealedMessage) GetMessage ¶
func (r RevealedMessage) GetMessage() curves.Scalar
func (RevealedMessage) IsHidden ¶
func (r RevealedMessage) IsHidden() bool
type SharedBlindingMessage ¶
type SharedBlindingMessage struct {
func (SharedBlindingMessage) GetBlinding ¶
func (ps SharedBlindingMessage) GetBlinding(reader io.Reader) curves.Scalar
func (SharedBlindingMessage) GetMessage ¶
func (ps SharedBlindingMessage) GetMessage() curves.Scalar
func (SharedBlindingMessage) IsHidden ¶
func (ps SharedBlindingMessage) IsHidden() bool
type SignatureBlinding ¶
type SignatureBlinding = curves.PairingScalar
SignatureBlinding is a value used for computing blind signatures