Documentation
¶
Index ¶
- Constants
- type Element
- func (x Element) Add(y Element) Element
- func (x Element) AddBytes(b []byte) Element
- func (x Element) AddUint32(y uint32) Element
- func (x Element) Bytes() []byte
- func (x Element) Cmp(y Element) int
- func (x Element) Double() Element
- func (x Element) Half() Element
- func (x Element) Inverse() Element
- func (x Element) IsOne() bool
- func (x Element) IsZero() bool
- func (x Element) Mul(y Element) Element
- func (x Element) String() string
- func (x Element) Sub(y Element) Element
- func (x Element) Text(base int) string
- func (x Element) ToUint32() uint32
Constants ¶
View Source
const (
Modulus = 2147483647
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Element ¶
type Element [1]uint32 // defined as an array to prevent mistaken use of arithmetic operators, or naive assignments.
Element of a prime order field, represented in Montgomery form to speed up multiplications.
func (Element) AddBytes ¶
AddBytes adds the Element to the given big-endian value. It expects exactly 4 input bytes.
func (Element) Bytes ¶
Bytes returns the big-endian encoded value of the Element, possibly with leading zeros.
Click to show internal directories.
Click to hide internal directories.