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