Documentation
¶
Index ¶
- func Add(a, b []ristretto.Scalar) ([]ristretto.Scalar, error)
- func AddScalar(a []ristretto.Scalar, b ristretto.Scalar) []ristretto.Scalar
- func Exp(a []ristretto.Scalar, b []ristretto.Point, N, M int) (ristretto.Point, error)
- func FromScalar(a ristretto.Scalar, n uint32) []ristretto.Scalar
- func Hadamard(a, b []ristretto.Scalar) ([]ristretto.Scalar, error)
- func InnerProduct(a, b []ristretto.Scalar) (ristretto.Scalar, error)
- func MulScalar(a []ristretto.Scalar, b ristretto.Scalar) []ristretto.Scalar
- func Neg(a []ristretto.Scalar) []ristretto.Scalar
- func ScalarPowers(a ristretto.Scalar, n uint32) []ristretto.Scalar
- func ScalarPowersSum(a ristretto.Scalar, n uint64) ristretto.Scalar
- func SplitPoints(x []ristretto.Point, n uint32) ([]ristretto.Point, []ristretto.Point, error)
- func SplitScalars(x []ristretto.Scalar, n uint32) ([]ristretto.Scalar, []ristretto.Scalar, error)
- func Sub(a, b []ristretto.Scalar) ([]ristretto.Scalar, error)
- func SubScalar(a []ristretto.Scalar, b ristretto.Scalar) []ristretto.Scalar
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Add ¶
Add adds two scalar slices a and b, returning the resulting slice and an error if a and b were different sizes
func FromScalar ¶
FromScalar takes a scalar,a, scaToVec will return a slice of size n, with all elements equal to a
func InnerProduct ¶
InnerProduct takes two scalar arrays and constructs the inner product
func MulScalar ¶
MulScalar take a scalar b, and a vector a then multiplies every element in the scalar vector by b
func ScalarPowers ¶
ScalarPowers constructs a vector of powers vecPowers(5, 3) = <5^0, 5^1, 5^2>
func ScalarPowersSum ¶
ScalarPowersSum constructs the Scalar power and then sums up each value
func SplitPoints ¶
SplitPoints will split a slice x using n Result will be two slices a and b where a = [0,n) and b = [n, len(x))
func SplitScalars ¶
SplitScalars will split a slice x using n Result will be two slices a and b where a = [0,n) and b = [n, len(x)) Method same as above XXX: use unit test to make sure they output same sizes
Types ¶
This section is empty.