Versions in this module Expand all Collapse all v0 v0.0.6 Jun 10, 2024 v0.0.5 Jun 9, 2024 v0.0.4 Jun 9, 2024 v0.0.3 Jun 9, 2024 v0.0.2 Jun 9, 2024 Changes in this version + const ErrPubKeyInvalidFormat + const ErrPubKeyInvalidLen + const ErrPubKeyMismatchedOddness + const ErrPubKeyNotOnCurve + const ErrPubKeyXTooBig + const ErrPubKeyYTooBig + const PubKeyBytesLenCompressed + const PubKeyBytesLenUncompressed + const PubKeyFormatCompressedEven + const PubKeyFormatCompressedOdd + const PubKeyFormatHybridEven + const PubKeyFormatHybridOdd + const PubKeyFormatUncompressed + const SecKeyBytesLen + var BytePointTable [32][256]JacobianPoint + var GeneratePrivateKey = GenerateSecretKey + var GeneratePrivateKeyFromRand = GenerateSecretKeyFromRand + var NewPrivateKey = NewSecretKey + var PrivKeyFromBytes = SecKeyFromBytes + func AddNonConst(p1, p2, result *JacobianPoint) + func DecompressY(x *FieldVal, odd bool, resultY *FieldVal) bool + func DoubleNonConst(p, result *JacobianPoint) + func GenerateSharedSecret(seckey *SecretKey, pubkey *PublicKey) []byte + func ScalarBaseMultNonConst(k *ModNScalar, result *JacobianPoint) + func ScalarMultNonConst(k *ModNScalar, point, result *JacobianPoint) + type CurveParams struct + BitSize int + ByteSize int + Gx *big.Int + Gy *big.Int + H int + N *big.Int + P *big.Int + func Params() *CurveParams + type Error struct + Description string + Err error + func (err Error) Error() string + func (err Error) Unwrap() (ee error) + type ErrorKind string + func (err ErrorKind) Error() string + type FieldVal struct + func (f *FieldVal) Add(val *FieldVal) *FieldVal + func (f *FieldVal) Add2(val *FieldVal, val2 *FieldVal) *FieldVal + func (f *FieldVal) AddInt(ui uint16) *FieldVal + func (f *FieldVal) Bytes() *[32]byte + func (f *FieldVal) Equals(val *FieldVal) bool + func (f *FieldVal) Inverse() *FieldVal + func (f *FieldVal) IsGtOrEqPrimeMinusOrder() bool + func (f *FieldVal) IsOdd() bool + func (f *FieldVal) IsOddBit() uint32 + func (f *FieldVal) IsOne() bool + func (f *FieldVal) IsOneBit() uint32 + func (f *FieldVal) IsZero() bool + func (f *FieldVal) IsZeroBit() uint32 + func (f *FieldVal) Mul(val *FieldVal) *FieldVal + func (f *FieldVal) Mul2(val *FieldVal, val2 *FieldVal) *FieldVal + func (f *FieldVal) MulInt(val uint8) *FieldVal + func (f *FieldVal) Negate(magnitude uint32) *FieldVal + func (f *FieldVal) NegateVal(val *FieldVal, magnitude uint32) *FieldVal + func (f *FieldVal) Normalize() *FieldVal + func (f *FieldVal) PutBytes(b *[32]byte) + func (f *FieldVal) PutBytesUnchecked(b []byte) + func (f *FieldVal) Set(val *FieldVal) *FieldVal + func (f *FieldVal) SetByteSlice(b []byte) bool + func (f *FieldVal) SetBytes(b *[32]byte) uint32 + func (f *FieldVal) SetInt(ui uint16) *FieldVal + func (f *FieldVal) Square() *FieldVal + func (f *FieldVal) SquareRootVal(val *FieldVal) bool + func (f *FieldVal) SquareVal(val *FieldVal) *FieldVal + func (f *FieldVal) Zero() + func (f FieldVal) String() string + type JacobianPoint struct + X FieldVal + Y FieldVal + Z FieldVal + func MakeJacobianPoint(x, y, z *FieldVal) JacobianPoint + func (p *JacobianPoint) Set(other *JacobianPoint) + func (p *JacobianPoint) ToAffine() + type KoblitzCurve struct + func S256() *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) + type ModNScalar struct + func NonceRFC6979(secKey []byte, hash []byte, extra []byte, version []byte, ...) *ModNScalar + func (s *ModNScalar) Add(val *ModNScalar) *ModNScalar + func (s *ModNScalar) Add2(val1, val2 *ModNScalar) *ModNScalar + func (s *ModNScalar) Bytes() [32]byte + func (s *ModNScalar) Equals(val *ModNScalar) bool + func (s *ModNScalar) InverseNonConst() *ModNScalar + func (s *ModNScalar) InverseValNonConst(val *ModNScalar) *ModNScalar + func (s *ModNScalar) IsOdd() bool + func (s *ModNScalar) IsOverHalfOrder() bool + func (s *ModNScalar) IsZero() bool + func (s *ModNScalar) IsZeroBit() uint32 + func (s *ModNScalar) Mul(val *ModNScalar) *ModNScalar + func (s *ModNScalar) Mul2(val, val2 *ModNScalar) *ModNScalar + func (s *ModNScalar) Negate() *ModNScalar + func (s *ModNScalar) NegateVal(val *ModNScalar) *ModNScalar + func (s *ModNScalar) PutBytes(b *[32]byte) + func (s *ModNScalar) PutBytesUnchecked(b []byte) + func (s *ModNScalar) Set(val *ModNScalar) *ModNScalar + func (s *ModNScalar) SetByteSlice(b []byte) bool + func (s *ModNScalar) SetBytes(b *[32]byte) uint32 + func (s *ModNScalar) SetInt(ui uint32) *ModNScalar + func (s *ModNScalar) Square() *ModNScalar + func (s *ModNScalar) SquareVal(val *ModNScalar) *ModNScalar + func (s *ModNScalar) Zero() + func (s ModNScalar) String() string + type PrivateKey = SecretKey + type PublicKey struct + func NewPublicKey(x, y *FieldVal) *PublicKey + func ParsePubKey(serialized []byte) (key *PublicKey, err error) + func (p *PublicKey) AsJacobian(result *JacobianPoint) + func (p *PublicKey) IsEqual(otherPubKey *PublicKey) bool + func (p *PublicKey) IsOnCurve() bool + func (p *PublicKey) ToECDSA() *ecdsa.PublicKey + func (p *PublicKey) X() *big.Int + func (p *PublicKey) Y() *big.Int + func (p PublicKey) SerializeCompressed() []byte + func (p PublicKey) SerializeUncompressed() []byte + type SecretKey struct + Key ModNScalar + func GenerateSecretKey() (*SecretKey, error) + func GenerateSecretKeyFromRand(rand io.Reader) (*SecretKey, error) + func NewSecretKey(key *ModNScalar) *SecretKey + func SecKeyFromBytes(secKeyBytes []byte) *SecretKey + func (p *SecretKey) PubKey() *PublicKey + func (p *SecretKey) Serialize() []byte + func (p *SecretKey) ToECDSA() *ecdsa.PrivateKey + func (p *SecretKey) Zero()