Documentation
¶
Index ¶
- func GenKeyImage(privKey *ecdsa.PrivateKey) *ecdsa.PublicKey
- func GenKeyRing(ring []*ecdsa.PublicKey, privKey *ecdsa.PrivateKey, s int) ([]*ecdsa.PublicKey, error)
- func GenNewKeyRing(size int, privKey *ecdsa.PrivateKey, s int) ([]*ecdsa.PublicKey, error)
- func Hash(m [32]byte, l, r []byte) [32]byte
- func HashPoint(p *ecdsa.PublicKey) (hx, hy *big.Int)
- func Link(sig1 *RingSign, sig2 *RingSign) bool
- func PadTo32Bytes(in []byte) (out []byte)
- func Verify(sig *RingSign) bool
- type L
- type RingSign
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenKeyImage ¶
func GenKeyImage(privKey *ecdsa.PrivateKey) *ecdsa.PublicKey
GenKeyImage calculates key image It is not possible to make a correlation between the public key and the corresponding key image I = x * H_p(P) where H_p is a hash function that returns a point H_p(P) = blake2b(P) * G
func GenKeyRing ¶
func GenKeyRing(ring []*ecdsa.PublicKey, privKey *ecdsa.PrivateKey, s int) ([]*ecdsa.PublicKey, error)
GenKeyRing takes public key ring and places the public key corresponding to `privKey` in index s of the ring Returns a key ring of type []*ecdsa.PublicKey
func GenNewKeyRing ¶
GenNewKeyRing creates a ring with size specified by `size` and places the public key corresponding to `privKey` in index s of the ring Returns a new key ring of type []*ecdsa.PublicKey
func Link ¶
Link compares two signatures to check if they are signed by the same private key Same key image implies double-spend
func PadTo32Bytes ¶
Types ¶
type RingSign ¶
type RingSign struct { Size int // size of ring M [32]byte // message C *big.Int // ring signature value S []*big.Int // faked secret keys L L // array of public keys I *ecdsa.PublicKey // key image Curve elliptic.Curve }
func Deserialize ¶
Deserialize converts the byteified signature into a RingSign struct