Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrTooManyGoRoutines = errors.New("cannot configure more than 1024 go routines")
Functions ¶
func MultiExp ¶
func MultiExp(scalars []fr.Element, points []bls12381.G1Affine, numGoRoutines int) (*bls12381.G1Affine, error)
MultiExp computes a multi exponentiation -- That is, an inner product between points and scalars.
More precisely, the result is set to scalars[0]*points[0] + ... + scalars[n-1]*points[n-1], where n is the length of both slices If the slices differ in length, this function returns an error.
numGoRoutines is used to configure the amount of concurrency needed. Setting this value to a negative number or 0 will make it default to the number of CPUs.
Returns an error if the numGoRoutines exceeds 1024.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.