Documentation
¶
Overview ¶
Package field provides modular operations over very high integers.
Index ¶
- type Field
- func (f Field) Add(res, x, y *big.Int)
- func (f Field) AreEqual(f1, f2 *big.Int) bool
- func (f Field) BitLen() int
- func (f Field) CondNeg(res, x *big.Int, cond int)
- func (f Field) Exponent(res, x, n *big.Int) *big.Int
- func (f Field) Inv(res, x *big.Int)
- func (f Field) IsEqual(f2 *Field) bool
- func (f Field) IsSquare(e *big.Int) bool
- func (f Field) IsZero(e *big.Int) bool
- func (f Field) LegendreSymbol(a *big.Int) *big.Int
- func (f Field) Mod(x *big.Int) *big.Int
- func (f Field) Mul(res, x, y *big.Int)
- func (f Field) Neg(res, x *big.Int) *big.Int
- func (f Field) One() *big.Int
- func (f Field) Order() *big.Int
- func (f Field) Random(res *big.Int) *big.Int
- func (f Field) Square(res, x *big.Int)
- func (f Field) SquareRoot(res, e *big.Int) *big.Int
- func (f Field) Sub(res, x, y *big.Int) *big.Int
- func (f Field) Zero() *big.Int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Field ¶
type Field struct {
// contains filtered or unexported fields
}
Field represents a Galois Field.
func (Field) LegendreSymbol ¶
LegendreSymbol applies the Legendre symbole on (a/p) and returns either {-1, 0, 1} mod field order.
func (Field) SquareRoot ¶
SquareRoot sets res to a square root of e mod the field's order, if such a square root exists.
Click to show internal directories.
Click to hide internal directories.