Documentation
¶
Overview ¶
Package blindsecp256k1 implements the Blind signature scheme explained at "New Blind Signature Schemes Based on the (Elliptic Curve) Discrete Logarithm Problem", by Hamid Mala & Nafiseh Nezhadansari https://sci-hub.st/10.1109/ICCKE.2013.6682844
LICENSE can be found at https://github.com/arnaucube/go-blindsecp256k1/blob/master/LICENSE
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
Types ¶
type Point ¶
Point represents a point on the secp256k1 curve
func DecompressPoint ¶
DecompressPoint unpacks a Point from the given byte array of 33 bytes https://bitcointalk.org/index.php?topic=162805.msg1712294#msg1712294
func NewPointFromBytes ¶
NewPointFromBytes returns a new *Point from a given byte array with length 64 which has encoded the point coordinates each one as 32 bytes in little-endian.
func NewPointFromBytesUncompressed ¶
NewPointFromBytesUncompressed returns a new *Point from a given byte array with length 64 which has encoded the point coordinates each one as 32 bytes in little-endian.
func NewRequestParameters ¶
NewRequestParameters returns a new random k (secret) & R (public) parameters
func (*Point) BytesUncompressed ¶
BytesUncompressed returns a byte array of length 64, with the X & Y coordinates of the Point encoded in little-endian. [ X (32 bytes) | Y (32 bytes)]
func (*Point) Compress ¶
Compress packs a Point to a byte array of 33 bytes, encoded in little-endian.
func (Point) MarshalJSON ¶
MarshalJSON implements the json marshaler for the Point
func (*Point) UnmarshalJSON ¶
UnmarshalJSON implements the json unmarshaler for the Point
type PrivateKey ¶
PrivateKey represents the signer's private key
func NewPrivateKey ¶
func NewPrivateKey() (*PrivateKey, error)
NewPrivateKey returns a new random private key
func (*PrivateKey) BigInt ¶
func (sk *PrivateKey) BigInt() *big.Int
BigInt returns a *big.Int representation of the PrivateKey
func (*PrivateKey) BlindSign ¶
BlindSign performs the blind signature on the given mBlinded using the PrivateKey and the secret k values.
func (*PrivateKey) Public ¶
func (sk *PrivateKey) Public() *PublicKey
Public returns the PublicKey from the PrivateKey
type PublicKey ¶
type PublicKey Point
PublicKey represents the signer's public key
func NewPublicKeyFromBytes ¶
NewPublicKeyFromBytes returns a new *PublicKey from a given byte array with length 64 which has encoded the public key coordinates each one as 32 bytes in little-endian.
func NewPublicKeyFromBytesUncompressed ¶
NewPublicKeyFromBytesUncompressed returns a new *PublicKey from a given byte array with length 64 which has encoded the public key coordinates each one as 32 bytes in little-endian.
func NewPublicKeyFromECDSA ¶
NewPublicKeyFromECDSA returns a *PublicKey from a serialized/marshaled array of bytes generated by the ethereum/standard ECDSA PubKey implementation.
func (*PublicKey) BytesUncompressed ¶
BytesUncompressed returns a byte array of length 64, with the X & Y coordinates of the PublicKey encoded in little-endian. [ X (32 bytes) | Y (32 bytes)]
func (PublicKey) MarshalJSON ¶
MarshalJSON implements the json marshaler for the PublicKey
func (*PublicKey) UnmarshalJSON ¶
UnmarshalJSON implements the json unmarshaler for the PublicKey
type Signature ¶
Signature contains the signature values S & F
func DecompressSignature ¶
DecompressSignature unpacks a Signature from the given byte array of 65 bytes
func NewSignatureFromBytes ¶
NewSignatureFromBytes returns a new *Signature from a given byte array with length 96 which has encoded S and the F point coordinates each one as 32 bytes in little-endian.
func NewSignatureFromBytesUncompressed ¶
NewSignatureFromBytesUncompressed returns a new *Signature from a given byte array with length 96 which has encoded S and the F point coordinates each one as 32 bytes in little-endian.
func Unblind ¶
func Unblind(sBlind *big.Int, u *UserSecretData) *Signature
Unblind performs the unblinding operation of the blinded signature for the given the UserSecretData
func (*Signature) BytesUncompressed ¶
BytesUncompressed returns a byte array of length 96, with the S, F.X and F.Y coordinates of the Signature encoded in little-endian. [ S (32 bytes | F.X (32 bytes) | F.Y (32 bytes)]
func (*Signature) Compress ¶
Compress packs a Signature to a byte array of 65 bytes, encoded in little-endian.
func (Signature) MarshalJSON ¶
MarshalJSON implements the json marshaler for the Signature
func (*Signature) UnmarshalJSON ¶
UnmarshalJSON implements the json unmarshaler for the Signature
type UserSecretData ¶
UserSecretData contains the secret values from the User (a, b) and the public F
Directories
¶
Path | Synopsis |
---|---|
Package blindsecp256k1v0 implements the Blind signature scheme explained at "An Efficient Blind Signature Scheme Based on the Elliptic Curve Discrete Logarithm Problem", by Morteza Nikooghadama & Ali Zakerolhosseini http://www.isecure-journal.com/article_39171_47f9ec605dd3918c2793565ec21fcd7a.pdf LICENSE can be found at https://github.com/arnaucube/go-blindsecp256k1/blob/master/LICENSE
|
Package blindsecp256k1v0 implements the Blind signature scheme explained at "An Efficient Blind Signature Scheme Based on the Elliptic Curve Discrete Logarithm Problem", by Morteza Nikooghadama & Ali Zakerolhosseini http://www.isecure-journal.com/article_39171_47f9ec605dd3918c2793565ec21fcd7a.pdf LICENSE can be found at https://github.com/arnaucube/go-blindsecp256k1/blob/master/LICENSE |