Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Field ¶
type Field struct {
// contains filtered or unexported fields
}
func (Field) ElementBits ¶
func (Field) ElementSize ¶
func (Field) ReductionMultiplier ¶
ReductionMultiplier returns the value an element must be multiplied by to reduce it modulo p upon overflow of the element size. Note that for the Crandall prime we have
2ⁿ - c ≡ 0 (mod p) 2ⁿ ≡ c (mod p)
However n may not be on a limb boundary, so we actually need the identity
2ˡ ≡ 2ˡ⁻ⁿ * c (mod p)
We'll call this the reduction multiplier.
Click to show internal directories.
Click to hide internal directories.