Documentation
¶
Index ¶
- func RecodeSigned5(s Signed161) [33]int32
- func RecodeSignedFromLimbs(limbs []uint64, ss []int32, w int32)
- type Signed161
- type UInt128
- func AddUInt128(x, y UInt128) UInt128
- func AddUint64(x, y uint64) UInt128
- func AddUint128AndUint64(x UInt128, y uint64) UInt128
- func MulUInt64(x, y uint64) UInt128
- func MulUint128AndUint64(u UInt128, n uint64) (dest UInt128)
- func SubUint128AndUint64(x UInt128, y uint64) UInt128
- func UInt128FromUint64(v uint64) UInt128
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RecodeSigned5 ¶
Recode this integer into 33 signed digits for a 5-bit window.
func RecodeSignedFromLimbs ¶
Types ¶
type Signed161 ¶
type Signed161 [3]uint64
A custom 161-bit integer type; used for splitting a scalar into a fraction. Negative values use two's complement notation; the value is truncated to 161 bits (upper bits in the top limb are ignored). Elements are mutable containers. WARNING: everything in here is vartime; do not use on secret values.
type UInt128 ¶
type UInt128 struct {
Hi, Lo uint64
}
func AddUInt128 ¶
func AddUint128AndUint64 ¶
func MulUint128AndUint64 ¶
func SubUint128AndUint64 ¶
func UInt128FromUint64 ¶
Click to show internal directories.
Click to hide internal directories.