Versions in this module Expand all Collapse all v1 v1.0.2 Mar 20, 2022 Changes in this version + var BasePoint = &twExtendedPoint + var Basepoint []byte + var Cofactor = byte(4) + var ScalarQ = &scalar + func DSASign(sym [57]byte, pub Point, msg []byte) [114]byte + func DSAVerify(sig [114]byte, pub Point, msg []byte) bool + func Ed448DeriveSecret(pubkey PublicKey, privkey PrivateKey) [56]byte + func Ed448Sign(privkey PrivateKey, message []byte) [114]byte + func Ed448Verify(pubkey PublicKey, signature, message []byte) bool + func EdPrivateKeyToX448(edKey PrivateKey) [56]byte + func EdPublicKeyToX448(edKey PublicKey) [56]byte + func GenerateSeed(reader io.Reader) ([]uint8, error) + func LadderScalarBaseMult(curve GoldilocksCurve, k []byte) (*big.Int, *big.Int) + func LadderScalarMult(curve GoldilocksCurve, x1, y1 *big.Int, k []byte) (*big.Int, *big.Int) + func SHA512Hash(password, salt []uint8) []uint8 + func SignSecretAndNonce(secret, n PrivateKey, msg []byte) [114]byte + func SignWithPrivate(privkey PrivateKey, message []byte) [114]byte + func ToMontgomeryCurve(x, y *big.Int) (*big.Int, *big.Int) + func ToWeierstrassCurve(p, u, v *big.Int) (*big.Int, *big.Int, *big.Int) + type Curve interface + ComputeSecret func(private [privKeyBytes]byte, public [pubKeyBytes]byte) (secret [sha512.Size]byte) + GenerateKeys func(read io.Reader) (priv [privKeyBytes]byte, pub [pubKeyBytes]byte, ok bool) + Sign func(priv [privKeyBytes]byte, message []byte) (signature [signatureBytes]byte, ok bool) + Verify func(signature [signatureBytes]byte, message []byte, pub [pubKeyBytes]byte) (valid bool) + func NewCurve() Curve + type Curve25519 interface + func CurveP25519() Curve25519 + type Curve25519Params struct + func (curve *Curve25519Params) Add(x1, y1, x2, y2 *big.Int) (*big.Int, *big.Int) + func (curve *Curve25519Params) Double(x1, y1 *big.Int) (*big.Int, *big.Int) + func (curve *Curve25519Params) IsOnCurve(x, y *big.Int) bool + func (curve *Curve25519Params) Params() *elliptic.CurveParams + func (curve *Curve25519Params) ScalarBaseMult(k []byte) (*big.Int, *big.Int) + func (curve *Curve25519Params) ScalarMult(x1, y1 *big.Int, k []byte) (*big.Int, *big.Int) + type CurveParams struct + func (curve *CurveParams) Add(x1, y1, x2, y2 *big.Int) (*big.Int, *big.Int) + func (curve *CurveParams) Double(x1, y1 *big.Int) (*big.Int, *big.Int) + func (curve *CurveParams) IsOnCurve(x, y *big.Int) bool + func (curve *CurveParams) MapToCurve(u *big.Int) (*big.Int, *big.Int) + func (curve *CurveParams) Params() *elliptic.CurveParams + func (curve *CurveParams) ScalarBaseMult(k []byte) (*big.Int, *big.Int) + func (curve *CurveParams) ScalarMult(x1, y1 *big.Int, k []byte) (*big.Int, *big.Int) + type DecafCurve interface + GenerateKeys func() (priv [privKeyBytes]byte, pub [pubKeyBytes]byte, ok bool) + Sign func(priv [privKeyBytes]byte, message []byte) (signature [signatureBytes]byte, ok bool) + Verify func(signature [signatureBytes]byte, message []byte, pub [pubKeyBytes]byte) (valid bool, err error) + func NewDecafCurve() DecafCurve + type EdwardsCurveParams struct + BitSize int + D *big.Int + Gx *big.Int + Gy *big.Int + N *big.Int + Name string + P *big.Int + func (curve *EdwardsCurveParams) Add(p, q Point) Point + func (curve *EdwardsCurveParams) Double(p Point) Point + func (curve *EdwardsCurveParams) IsOnCurve(p Point) bool + func (curve *EdwardsCurveParams) Params() *EdwardsCurveParams + type ExtendedPrivate [114]uint8 + func ChildPrivateToPrivate(s ExtendedPrivate, index uint32) ExtendedPrivate + func SeedToExtendedPrivate(s []uint8) ExtendedPrivate + type ExtendedPublic [114]uint8 + func ChildPrivateToPublic(s ExtendedPrivate, index uint32) ExtendedPublic + func ChildPublicToPublic(pub ExtendedPublic, index uint32) ExtendedPublic + func ExtendedPrivateToPublic(s ExtendedPrivate) ExtendedPublic + type GoldilocksCurve interface + func Curve448() GoldilocksCurve + type GoldilocksEdCurve interface + Add func(p, q Point) Point + Double func(p Point) Point + IsOnCurve func(p Point) bool + Params func() *EdwardsCurveParams + ScalarBaseMult func(k Scalar) Point + ScalarMult func(p Point, k Scalar) Point + type Point interface + Add func(q, r Point) + Copy func() Point + Decode func(src []byte, identity bool) (bool, error) + Double func() Point + EdDSADecode func(src []byte) bool + EdDSADecodeWithoutCofactor func(src []byte) bool + EdDSAEncode func() []byte + Encode func() []byte + Equals func(q Point) bool + EqualsMask func(q Point) uint32 + IsOnCurve func() bool + Sub func(q, r Point) + func ConstantTimeSelectPoint(bfalse, btrue Point, mask uint32) Point + func NewPoint(a [nLimbs]uint32, b [nLimbs]uint32, c [nLimbs]uint32, d [nLimbs]uint32) Point + func NewPointFromBytes(in ...[]byte) Point + func PointByPrivate(p PrivateKey) Point + func PointBySecret(p PrivateKey) Point + func PointDoubleScalarMul(q, r Point, a, b Scalar) Point + func PointDoubleScalarMulNonsecret(q Point, a, b Scalar) Point + func PointScalarMul(q Point, a Scalar) Point + func PrecomputedScalarMul(a Scalar) Point + func ScalarBaseMult(k Scalar) Point + func ScalarMult(p Point, k Scalar) Point + type PrivateKey [57]byte + func BytesToPrivateKey(key []byte) (pk PrivateKey) + func Ed448GenerateKey(reader io.Reader) (PrivateKey, error) + func PrivateToSecret(pk PrivateKey) PrivateKey + type PublicKey [57]byte + func BytesToPublicKey(key []byte) (pk PublicKey) + func Ed448DerivePublicKey(privkey PrivateKey) PublicKey + func PrivateToPublic(privkey PrivateKey) PublicKey + func SecretToPublic(sk PrivateKey) PublicKey + type Scalar interface + Add func(a, b Scalar) + BarretDecode func(src []byte) error + Copy func() Scalar + Decode func(src []byte) + Encode func() []byte + Equals func(a Scalar) bool + EqualsMask func(a Scalar) uint32 + Halve func(a Scalar) + Invert func() bool + Mul func(a, b Scalar) + Sub func(a, b Scalar) + func ConstantTimeSelectScalar(bfalse, btrue Scalar, mask uint32) Scalar + func NewScalar(in ...[]byte) Scalar v1.0.1-dev Sep 2, 2021