modm

package
v0.0.0-...-29f6767 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 2, 2020 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BitsPerLimb = 56
	LimbSize    = 5
)

Variables

This section is empty.

Functions

func Add

func Add(r, x, y *Bignum256)

func Contract

func Contract(out []byte, in *Bignum256)

func ContractSlidingWindow

func ContractSlidingWindow(r *[256]int8, s *Bignum256, windowSize uint)

func ContractWindow4

func ContractWindow4(r *[64]int8, in *Bignum256)

func Expand

func Expand(out *Bignum256, in []byte)

func ExpandRaw

func ExpandRaw(out *Bignum256, in []byte)

func IsAtMost128bitsVartime

func IsAtMost128bitsVartime(a *Bignum256) bool

can a fit in to (at most) 128 bits

func IsOneVartime

func IsOneVartime(a *Bignum256) bool

is a == 1

func IsZeroVartime

func IsZeroVartime(a *Bignum256) bool

is a == 0

func LessThanOrEqualVartime

func LessThanOrEqualVartime(a, b *Bignum256, limbSize int) bool

is a <= b

func LessThanVartime

func LessThanVartime(a, b *Bignum256, limbSize int) bool

is a < b

func Mul

func Mul(r, x, y *Bignum256)

func SubVartime

func SubVartime(out, a, b *Bignum256, limbSize int)

out = a - b, a must be larger than b

Types

type Bignum256

type Bignum256 [5]Element

func (*Bignum256) Reset

func (r *Bignum256) Reset()

type Element

type Element uint64

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL