Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Transcript ¶
type Transcript struct {
// contains filtered or unexported fields
}
Transcript handles the creation of challenges for Fiat Shamir.
func NewTranscript ¶
func NewTranscript(cs *frontend.ConstraintSystem, h hash.Hash, challenges ...string) Transcript
NewTranscript returns a new transcript. h is the hash function that is used to compute the challenges. challenges are the name of the challenges. The order is important.
func (*Transcript) Bind ¶
func (m *Transcript) Bind(challenge string, value []frontend.Variable) error
Bind binds the challenge to value. A challenge can be binded to an arbitrary number of values, but the order in which the binded values are added is important. Once a challenge is computed, it cannot be binded to other values.
func (*Transcript) ComputeChallenge ¶
func (m *Transcript) ComputeChallenge(challenge string) (frontend.Variable, error)
ComputeChallenge computes the challenge corresponding to the given name. The resulting variable is: * H(name || previous_challenge || binded_values...) if the challenge is not the first one * H(name || binded_values... ) if it's is the first challenge