Documentation ¶
Index ¶
- Constants
- func AllZeroes(numbers []int) bool
- func AnyZeroes(numbers []int16) bool
- func BigIntSliceEqual(a, b []*big.Int) bool
- func BigIntToInt16(x []*big.Int) []int16
- func BiggestFloat64(f []float64) float64
- func CmpBigInt(x *big.Int, y *big.Int) bool
- func CmpMaxFromBigInt(x *big.Int, y *big.Int) *big.Int
- func CmpMinFromBigInt(x *big.Int, y *big.Int) *big.Int
- func ComplexRealToFloat64(c []complex128) []float64
- func FillBigIntSlice(s []*big.Int)
- func Float64ToComplexReal(f []float64) []complex128
- func Float64ToInt16(f []float64) []int16
- func GenerateRandSalt() []byte
- func Int16ToBigInt(s []int16) []*big.Int
- func Int16ToFloat64(f []int16) []float64
- func Int8ToFloat64(f []int8) []float64
- func IntToBigInt(s []int) []*big.Int
- func IntToInt16(s []int) []int16
- func Max(a ...int) int
- func MaxFromBigInt(x []*big.Int) *big.Int
- func MergePolysInt(f0, f1 []int16) []int16
- func MergePolysfloat64(f0, f1 []float64) []float64
- func Min(a float64, b float64) float64
- func MinFromBigInt(x []*big.Int) *big.Int
- func NegFloat64(x []float64) []float64
- func NegInt16(x []int16) []int16
- func Pmod(x, b int) int
- func RandElement(elements []int) int
- func RandomBytes(data []byte) error
- func RandomFft() float64
- func RandomHexString(length int) string
- func RoundAll(numbers []float64) []int
- func SmallestFloat64(f []float64) float64
- func SplitPolysFloat64(f []float64) ([]float64, []float64)
- func SplitPolysInt(f []int16) ([]int16, []int16)
- func Sqnorm(v [][]float64) float64
- func SquareInt16(x int16) int16
- func SubFloat64(x []float64, y []float64) []float64
- func SubInt16(x []int16, y []int16) []int16
- func UintFromBytes(b []byte) uint64
Constants ¶
const Q = 12289 //Q = 12*1024 + 1 (Q is the integer modulus which is used in Falcon.)
Variables ¶
This section is empty.
Functions ¶
func AllZeroes ¶
AllZeroes takes a slice of integers and returns true if all the elements of the slice are 0
func BigIntSliceEqual ¶
BigIntSliceEqual returns true if the slices a and b have the same length and contain the same elements.
func BigIntToInt16 ¶
func BiggestFloat64 ¶
func CmpMaxFromBigInt ¶
MaxFromBigNum compares x and y and returns the biggest one of them
func CmpMinFromBigInt ¶
MinFromBigNum compares x and y and returns the smallest one of them
func ComplexRealToFloat64 ¶
func ComplexRealToFloat64(c []complex128) []float64
func FillBigIntSlice ¶
func that fill a slice with bn.SetInt64(0)
func Float64ToComplexReal ¶
func Float64ToComplexReal(f []float64) []complex128
func Float64ToInt16 ¶
func GenerateRandSalt ¶
func GenerateRandSalt() []byte
GenerateRandSalt generates a random salt of length SaltLen. each bit has a 50% chance of being 0 or 1.
func Int16ToBigInt ¶
func that will take int16 slice and return big.Int slice
func Int16ToFloat64 ¶
func Int8ToFloat64 ¶
func IntToBigInt ¶
func IntToInt16 ¶
func MaxFromBigInt ¶
MaxFromBigNum returns the biggest one of them
func MergePolysInt ¶
Merge two polynomials into a single polynomial f
func MergePolysfloat64 ¶
Merge two polynomials into a single polynomial f
func MinFromBigInt ¶
MinFromBigNum returns the smallest one of them
func NegFloat64 ¶
func RandElement ¶
func RandomBytes ¶
RandomBytes fills the given byte slice with random bytes.
func RandomHexString ¶
RandomHexString generates a hex string with fixed length
func SmallestFloat64 ¶
func SplitPolysFloat64 ¶
Split a polynomial f in two polynomials.
func SplitPolysInt ¶
Split a polynomial f in two polynomials.
func SquareInt16 ¶
func SubFloat64 ¶
func UintFromBytes ¶
Types ¶
This section is empty.