Documentation ¶
Index ¶
- func Add(a, b *ecdsa.PublicKey) *ecdsa.PublicKey
- func BlindMessage(rState *BlindRequesterState, Q, R *ecdsa.PublicKey, m *big.Int) *big.Int
- func BlindSession(sState *BlindSignerState) (*ecdsa.PublicKey, *ecdsa.PublicKey)
- func BlindSign(sState *BlindSignerState, R *ecdsa.PublicKey, mHat *big.Int) *big.Int
- func BlindVerify(Q *ecdsa.PublicKey, sig *BlindSignature) bool
- func ECDH(priv *ecdsa.PrivateKey, pub *ecdsa.PublicKey) *big.Int
- func GenerateKey(rand io.Reader) (*ecdsa.PrivateKey, error)
- func KeysEqual(a, b *ecdsa.PublicKey) bool
- func RandFieldElement(rand io.Reader) (k *big.Int, err error)
- func ScalarBaseMult(k *big.Int) *ecdsa.PublicKey
- func ScalarMult(k *big.Int, B *ecdsa.PublicKey) *ecdsa.PublicKey
- func Secp256k1() elliptic.Curve
- type BlindRequesterState
- type BlindSignature
- type BlindSignerState
- type KoblitzCurve
- func (curve *KoblitzCurve) Add(x1, y1, x2, y2 *big.Int) (*big.Int, *big.Int)
- func (curve *KoblitzCurve) Double(x1, y1 *big.Int) (*big.Int, *big.Int)
- func (curve *KoblitzCurve) IsOnCurve(x, y *big.Int) bool
- func (curve *KoblitzCurve) Params() *elliptic.CurveParams
- func (curve *KoblitzCurve) ScalarBaseMult(k []byte) (*big.Int, *big.Int)
- func (curve *KoblitzCurve) ScalarMult(Bx, By *big.Int, k []byte) (*big.Int, *big.Int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BlindMessage ¶
Calculates a blinded version of message m
func BlindSession ¶
func BlindSession(sState *BlindSignerState) (*ecdsa.PublicKey, *ecdsa.PublicKey)
Request that the signer start a blind signature protocol. Returns the signer's public key and an EC point named R.
func BlindVerify ¶
func BlindVerify(Q *ecdsa.PublicKey, sig *BlindSignature) bool
func GenerateKey ¶
func GenerateKey(rand io.Reader) (*ecdsa.PrivateKey, error)
GenerateKey generates a public and private key pair
func RandFieldElement ¶
RandFieldElement returns a random element of the field underlying the given curve using the procedure given in [NSA] A.2.1.
Implementation copied from Go's crypto/ecdsa package since the function wasn't public. Modified to always use secp256k1 curve.
func ScalarBaseMult ¶
Multiplies the base G by a large integer. The resulting point is represented as an ECDSA public key since that's typically how they're used.
func ScalarMult ¶
Multiply a large integer and a point. The resulting point is represented as an ECDSA public key.
Types ¶
type BlindRequesterState ¶
type BlindSignature ¶
func BlindExtract ¶
func BlindExtract(rState *BlindRequesterState, sHat *big.Int) *BlindSignature
Extract true signature from the blind signature
type BlindSignerState ¶
type KoblitzCurve ¶
type KoblitzCurve struct { P *big.Int // the order of the underlying field N *big.Int // the order of the base point B *big.Int // the constant of the KoblitzCurve equation Gx, Gy *big.Int // (x,y) of the base point BitSize int // the size of the underlying field }
A Koblitz Curve with a=0.
func (*KoblitzCurve) Params ¶
func (curve *KoblitzCurve) Params() *elliptic.CurveParams