Versions in this module Expand all Collapse all v1 v1.0.0 Nov 1, 2022 Changes in this version + func CheckInterval(val, min, max *big.Int) bool + func Clone(int2 *big.Int) *big.Int + func GetInt(val int64) *big.Int + func Hex2int(hexStr string) *big.Int + type Curve struct + A *big.Int + B *big.Int + GX *big.Int + GY *big.Int + N *big.Int + Name string + P *big.Int + func (c *Curve) AddPoint(P, Q *Point) (*Point, error) + func (c *Curve) ComputeY(x *big.Int) *big.Int + func (c *Curve) ConvertToMontgomeryCurve() *MontgomeryCurve + func (c *Curve) G() *Point + func (c *Curve) INF() *Point + func (c *Curve) IsOnCurve(P *Point) bool + func (c *Curve) MulPoint(d *big.Int, P *Point) (*Point, error) + func (c *Curve) NegPoint(P *Point) (*Point, error) + func (c *Curve) String() string + type ECDSA struct + Curve *MontgomeryCurve + GenPoint *Point + func NewECDSA() *ECDSA + func (ec *ECDSA) Sign(privateKey *big.Int, message string) (*big.Int, *big.Int) + func (ec *ECDSA) Verify(publicKey Point, message string, r, s *big.Int) bool + type ICurve interface + AddPoint func(P, Q *Point) (*Point, error) + ComputeY func(x *big.Int) *big.Int + G func() *Point + INF func() *Point + IsOnCurve func(P *Point) bool + MulPoint func(d *big.Int, P *Point) (*Point, error) + NegPoint func(P *Point) (*Point, error) + String func() string + type MontgomeryCurve struct + func NewCurve25519() *MontgomeryCurve + func (mc *MontgomeryCurve) ComputeY(x *big.Int) *big.Int + type Point struct + Curve ICurve + X *big.Int + Y *big.Int + func GetKeyPair(curve *MontgomeryCurve) (*big.Int, *Point) + func (p *Point) Add(other *Point) *Point + func (p *Point) Copy() *Point + func (p *Point) Eq(other *Point) bool + func (p *Point) IsAtInfinity() bool + func (p *Point) Mul(scalar *big.Int) *Point + func (p *Point) Neg() *Point + func (p *Point) String() string