Documentation
¶
Index ¶
- type Int
- func (z *Int) Add(x, y *Int) *Int
- func (x *Int) Cmp(y *Int) (r int)
- func (x *Int) CmpAbs(y *Int) int
- func (z *Int) Exp(x, y, m *Int) *Int
- func (z *Int) SetInt64(x int64) *Int
- func (z *Int) SetUint64(x uint64) *Int
- func (x *Int) Sign() int
- func (x *Int) String() string
- func (z *Int) Sub(x, y *Int) *Int
- type Word
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Int ¶
func (*Int) CmpAbs ¶
CmpAbs compares the absolute values of x and y and returns:
-1 if |x| < |y| 0 if |x| == |y| +1 if |x| > |y|
func (*Int) Exp ¶
Exp sets z = x**y mod |m| (i.e. the sign of m is ignored), and returns z. If m == nil or m == 0, z = x**y unless y <= 0 then z = 1. If m != 0, y < 0, and x and m are not relatively prime, z is unchanged and nil is returned.
Modular exponentiation of inputs of a particular size is not a cryptographically constant-time operation.
Click to show internal directories.
Click to hide internal directories.