utils

package
v0.0.0-...-7ece11e Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OneOfManyProofSize   = 704
	SnPrivacyProofSize   = 320
	SnNoPrivacyProofSize = 192

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

Variables

This section is empty.

Functions

func EstimateMultiRangeProofSize

func EstimateMultiRangeProofSize(nOutput int) uint64

estimateMultiRangeProofSize estimate multi range proof size

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) *operation.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