Documentation ¶
Overview ¶
Package field provides modular operations over very high integers.
Index ¶
- func String2Int(s string) big.Int
- 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) CondMov(res, x, y *big.Int, b bool)
- 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) Lsh(res, x *big.Int, n uint)
- 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) Sgn0(x *big.Int) int
- func (f Field) SqrtRatio(res, zMapConstant, e, v *big.Int) bool
- 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 ¶
func String2Int ¶
String2Int returns a big.Int representation of the integer s.
Types ¶
type Field ¶
type Field struct {
// contains filtered or unexported fields
}
Field represents a Gaulois Field.
func (Field) LegendreSymbol ¶
LegendreSymbol applies the Legendre symbole on (a/p) and returns either {-1, 0, 1} mod field order.
func (Field) SqrtRatio ¶
SqrtRatio res result to the square root of (e/v), and indicates whether (e/v) is a square.
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.