powersoftau

package
v0.0.0-...-e2af113 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2018 License: MIT Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

Functions

func HashToG2

func HashToG2(digest []byte) *bls12.EP2

func NewKeypair

func NewKeypair(digest []byte) (*PublicKey, *PrivateKey)

func WriteNextChallenge

func WriteNextChallenge(filename string, ch *Challenge) error

func WriteResponse

func WriteResponse(filename string, ch *Challenge) error

Types

type Accumulator

type Accumulator struct {
	TauG1    []*bls12.EP
	TauG2    []*bls12.EP2
	AlphaTau []*bls12.EP
	BetaTau  []*bls12.EP
	BetaG2   *bls12.EP2
}

func ReadAccumulator

func ReadAccumulator(r io.Reader, compressed bool) (*Accumulator, error)

func (*Accumulator) WriteTo

func (a *Accumulator) WriteTo(w io.Writer, compressed bool) error

type Challenge

type Challenge struct {
	PreviousHash  []byte
	ChallengeHash []byte
	ResponseHash  []byte

	Accumulator *Accumulator
	PublicKey   *PublicKey
}

func ReadChallenge

func ReadChallenge(filename string) (*Challenge, error)

func (*Challenge) Compute

func (c *Challenge) Compute(processes int)

type PrivateKey

type PrivateKey struct {
	Tau, Alpha, Beta []byte
}

type PublicKey

type PublicKey struct {
	Tau, Alpha, Beta struct {
		S     *bls12.EP
		Sx    *bls12.EP
		SxG2x *bls12.EP2
	}
}

func (*PublicKey) WriteTo

func (p *PublicKey) WriteTo(w io.Writer) error

Jump to

Keyboard shortcuts

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