commitments

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PartsCap    = 3
	MaxPartSize = int64(1 * 1024 * 1024) // 1 MB - rather liberal
)
View Source
const (
	HashLength = 256
)

Variables

This section is empty.

Functions

func NewBuilder

func NewBuilder() *builder

func ParseSecrets

func ParseSecrets(secrets []*big.Int) ([][]*big.Int, error)

Types

type HashCommitDecommit

type HashCommitDecommit struct {
	C HashCommitment
	D HashDeCommitment
}

func NewHashCommitment

func NewHashCommitment(secrets ...*big.Int) *HashCommitDecommit

func NewHashCommitmentWithRandomness

func NewHashCommitmentWithRandomness(r *big.Int, secrets ...*big.Int) *HashCommitDecommit

func (*HashCommitDecommit) DeCommit

func (cmt *HashCommitDecommit) DeCommit() (bool, HashDeCommitment)

func (*HashCommitDecommit) Verify

func (cmt *HashCommitDecommit) Verify() bool

type HashCommitment

type HashCommitment = *big.Int

type HashDeCommitment

type HashDeCommitment = []*big.Int

func NewHashDeCommitmentFromBytes

func NewHashDeCommitmentFromBytes(marshalled [][]byte) HashDeCommitment

Jump to

Keyboard shortcuts

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