Versions in this module Expand all Collapse all v0 v0.1.0 Jul 20, 2023 Changes in this version + var ErrInvalidParse = errors.New("invalid parse") + func Init() error + func VersionText() string + type Int struct + func GeneratePrime(ctx *IntContext, bits int, safe bool) (*Int, error) + func NewInt() (*Int, error) + func One() *Int + func (i *Int) Hex() string + func (i *Int) MarshalJSON() ([]byte, error) + func (i *Int) MarshalText() ([]byte, error) + func (i *Int) SetConstantTime() *Int + func (i *Int) String() string + func (i *Int) UnmarshalJSON(data []byte) error + func (i *Int) UnmarshalText(data []byte) error + func (z *Int) Add(x, y *Int) error + func (z *Int) And(x, y *Int) error + func (z *Int) BitLen() int + func (z *Int) Bytes() ([]byte, error) + func (z *Int) BytesLen() int + func (z *Int) Cmp(x *Int) int + func (z *Int) ConstantTimeEq(x *Int) (bool, error) + func (z *Int) Div(ctx *IntContext, x, y *Int) error + func (z *Int) Exp(ctx *IntContext, x, y *Int) error + func (z *Int) FillBytes(buf []byte) error + func (z *Int) Lsh(x *Int, n uint) error + func (z *Int) Mod(ctx *IntContext, x, y *Int) error + func (z *Int) ModExp(ctx *IntContext, x, y, m *Int) error + func (z *Int) ModExpMont(mont *MontgomeryContext, ctx *IntContext, x, y, m *Int) error + func (z *Int) ModInverse(ctx *IntContext, g, n *Int) error + func (z *Int) ModMul(ctx *IntContext, x, y, m *Int) error + func (z *Int) ModMulMontgomery(mont *MontgomeryContext, ctx *IntContext, x, y *Int) error + func (z *Int) Mul(ctx *IntContext, x, y *Int) error + func (z *Int) Or(x, y *Int) error + func (z *Int) ProbablyPrime(ctx *IntContext) (bool, error) + func (z *Int) RandRange(max *Int) error + func (z *Int) Rsh(x *Int, n uint) error + func (z *Int) Set(x *Int) error + func (z *Int) SetBytes(buf []byte) *Int + func (z *Int) SetDecString(s string) error + func (z *Int) SetHexString(s string) error + func (z *Int) SetUInt64(x uint64) error + func (z *Int) Sub(x, y *Int) error + func (z *Int) Uint64() uint64 + type IntContext struct + func NewIntContext() (*IntContext, error) + func (c *IntContext) Attach() + func (c *IntContext) Destroy() + func (c *IntContext) Detach() + func (c *IntContext) GetInt() (*Int, error) + type MontgomeryContext struct + func NewMontgomeryContext() (*MontgomeryContext, error) + func (c *MontgomeryContext) Destroy() + func (c *MontgomeryContext) Set(m *Int, ctx *IntContext) error