merlin

package module
v0.1.2-0...-d46ce57 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 16, 2021 License: BSD-3-Clause Imports: 3 Imported by: 0

README

Merlin is a STROBE-based transcript construction for zero-knowledge proofs. It automates the Fiat-Shamir transform, so that by using Merlin, non-interactive protocols can be implemented as if they were interactive.

For more details, see dalek-cryptography/merlin.

This project is released under the usual Go-friendly BSD-style license.

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
}

func NewTranscript

func NewTranscript(appLabel string) *Transcript

func (*Transcript) AppendMessage

func (t *Transcript) AppendMessage(label, message []byte)

Append adds the message to the transcript with the supplied label.

func (*Transcript) BuildRNG

func (t *Transcript) BuildRNG() *TranscriptRNG

BuildRNG returns the TranscriptRNG with the strbe state cloned.

func (*Transcript) ExtractBytes

func (t *Transcript) ExtractBytes(label []byte, outLen int) []byte

ExtractBytes returns a buffer filled 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.

type TranscriptRNG

type TranscriptRNG struct {
	// contains filtered or unexported fields
}

func (*TranscriptRNG) Finalize

func (t *TranscriptRNG) Finalize(rng io.Reader) (*TranscriptRNG, error)

Finalize uses the supplied rng to re key the transcript.

func (*TranscriptRNG) ReKeyWithWitnessBytes

func (t *TranscriptRNG) ReKeyWithWitnessBytes(label, witness []byte) *TranscriptRNG

ReKeyWithWitnessBytes rekeys the transcript with witness data.

func (*TranscriptRNG) Read

func (t *TranscriptRNG) Read(buf []byte) (int, error)

Read reads random data and writes to buf

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL