Documentation ¶
Overview ¶
Package merlin implements Merlin proof transcripts.
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 is a Merlin proof transcript.
func NewTranscript ¶
func NewTranscript(appLabel string) *Transcript
NewTranscript initializes a new transcript with the specified protocol label.
func (*Transcript) AppendMessage ¶
func (t *Transcript) AppendMessage(label string, message []byte)
Append adds the message to the transcript with the supplied label. If the length of label or message will overflow a 32-bit unsigned integer this method will panic.
func (*Transcript) BuildRng ¶
func (t *Transcript) BuildRng() *TranscriptRngBuilder
BuildRng constructs a transcript RNG builder bound to the current transcript state.
func (*Transcript) Clone ¶
func (t *Transcript) Clone() *Transcript
Clone returns a deep-copy of the transcript.
func (*Transcript) ExtractBytes ¶
func (t *Transcript) ExtractBytes(dest []byte, label string)
ExtractBytes fills dest with the verifier's challenge bytes. The label parameter is metadata about the challenge, and is also appended to the transcript. See the Transcript Protocols section of the Merlin website for details on labels. If the length of label or dest will overflow a 32-bit unsigned integer this method will panic.
type TranscriptRngBuilder ¶
type TranscriptRngBuilder struct {
// contains filtered or unexported fields
}
TranscriptRngBuilder constructs a transcript RNG by rekeying the transcript with prover secrets and an external RNG.
func (*TranscriptRngBuilder) Finalize ¶
Finalize rekeys and finalizes the transcript, and constructs the RNG. If rng is nil, crypto/rand.Reader will be used.
Note: This invalidates the TranscriptRngBuilder.
func (*TranscriptRngBuilder) RekeyWithWitnessBytes ¶
func (rb *TranscriptRngBuilder) RekeyWithWitnessBytes(label string, witness []byte) *TranscriptRngBuilder
RekeyWithitnessBytes rekeys the transcript using the provided witness data. If the length of label or witness will overflow a 32-bit unsigned integer this method will panic.