rangeproof

package
v0.0.0-...-08e435a Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddModBigInt

func AddModBigInt(a *big.Int, b *big.Int, n *big.Int) *big.Int

func Chameleon

func Chameleon(m string, kG *bn256.G1) *big.Int

func ChameleonP

func ChameleonP(m string, e *big.Int, s *big.Int, P *bn256.G1) *big.Int

func CryptoRandBigInt

func CryptoRandBigInt(order *big.Int) *big.Int

func GenCommitments

func GenCommitments(b,
	v *big.Int,
	bitWeights []*big.Int,
	bitKeys []*bn256.G1,
	G,
	H *bn256.G1) ([]*big.Int,
	[]*big.Int,
	[]*bn256.G1,
	[]*bn256.G1,
	*bn256.G1)

func GenRandomKeyPair

func GenRandomKeyPair() (*bn256.G1, *big.Int)

func GenRangeProof

func GenRangeProof(m string,
	b,
	v *big.Int,
	bitWeights []*big.Int,
	bitKeys []*bn256.G1,
	G,
	H *bn256.G1) ([]*big.Int,
	[][]*big.Int,
	[]*bn256.G1,
	*bn256.G1)

func GenRingSignatures

func GenRingSignatures(m string,
	bArr,
	vArr []*big.Int,
	CArr,
	CpArr []*bn256.G1,
	G,
	H *bn256.G1) ([]*big.Int,
	[][]*big.Int)

func MulModBigInt

func MulModBigInt(a *big.Int, b *big.Int, n *big.Int) *big.Int

func SignAOS

func SignAOS(allPublicks []*bn256.G1,
	mySecretk *big.Int,
	myPublickIdx int,
	m string) ([]*big.Int,
	[]*big.Int)

func SubModBigInt

func SubModBigInt(a *big.Int, b *big.Int, n *big.Int) *big.Int

func VerifyAOS

func VerifyAOS(allPublicks []*bn256.G1,
	e0 *big.Int,
	sArr []*big.Int,
	m string) bool

func VerifyRangeProof

func VerifyRangeProof(m string,
	eArr []*big.Int,
	sArrArr [][]*big.Int,
	bitKeys,
	CArr []*bn256.G1,
	C,
	G,
	H *bn256.G1) bool

Verification will be done on-chain. This is only here

for testing/benchmarking purposes.

Types

This section is empty.

Jump to

Keyboard shortcuts

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