utils

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2020 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// size of zero knowledge proof corresponding one input
	OneOfManyProofSize   = 704
	SnPrivacyProofSize   = 320
	SnNoPrivacyProofSize = 192

	OutputCoinsNoPrivacySize = 145 // PublicKey + coin commitment + SND + Randomness + Value + 9 flag
)

Variables

This section is empty.

Functions

func EstimateProofSize

func EstimateProofSize(nInput int, nOutput int, hasPrivacy bool) uint64

EstimateProofSize returns the estimated size of the proof in bytes

func GenerateChallenge

func GenerateChallenge(values [][]byte) *privacy.Scalar

GenerateChallengeFromByte get hash of n points in G append with input values return blake_2b(G[0]||G[1]||...||G[CM_CAPACITY-1]||<values>) G[i] is list of all generator point of Curve

Types

This section is empty.

Jump to

Keyboard shortcuts

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