Documentation ¶
Index ¶
- Variables
- func Add(a, b *bn256.G1) *bn256.G1
- func PedersenCommitment(a, r *big.Int) *bn256.G1
- func ScalarMul(p *bn256.G1, k *big.Int) *bn256.G1
- func Sub(a, b *bn256.G1) *bn256.G1
- func Verify(signature Signature, C *bn256.G1) error
- func VerifyPedersenCommitment(C *bn256.G1, proof Proof) error
- func VerifySchnorr(sig SchnorrSignature, publicKey *bn256.G1, m *big.Int) error
- func X(p *bn256.G1) *big.Int
- func Y(p *bn256.G1) *big.Int
- type Proof
- type SchnorrSignature
- type Signature
Constants ¶
This section is empty.
Variables ¶
View Source
var G *bn256.G1
View Source
var H *bn256.G1
View Source
var Hash func(...[]byte) *big.Int = defaultHash
Hash function that should return the value in Curve.N field
Functions ¶
func PedersenCommitment ¶
PedersenCommitment creates *bn256.G1 with pedersen commitment aH + rG
func VerifyPedersenCommitment ¶
VerifyPedersenCommitment - verifies proof that C commitment commits the value in [0..2^n-1]
func VerifySchnorr ¶
Types ¶
type Proof ¶
func CreatePedersenCommitment ¶
CreatePedersenCommitment - creates Pedersen commitment for given val, and generates proof that given val lies in [0..2^n-1]. Returns Proof, generated commitment and private key in case of success generation.
type SchnorrSignature ¶
func SignSchnorr ¶
Click to show internal directories.
Click to hide internal directories.