MSM Pre computation
To understand the theory behind MSM pre computation technique refer to Niall Emmart's talk.
Core package
MSM PrecomputeBases
PrecomputeBases
and G2PrecomputeBases
exists for all supported curves.
Description
This function extends each provided base point with its multiples , where is a level of precomputation determined by the precompute_factor
. The extended set of points facilitates faster MSM computations by allowing the MSM algorithm to leverage precomputed multiples of base points, reducing the number of point additions required during the computation.
The precomputation process is crucial for optimizing MSM operations, especially when dealing with large sets of points and scalars. By precomputing and storing multiples of the base points, the MSM function can more efficiently compute the scalar-point multiplications.
PrecomputeBases
Precomputes points for MSM by extending each base point with its multiples.
func PrecomputeBases(bases core.HostOrDeviceSlice, cfg *core.MSMConfig, outputBases core.DeviceSlice) runtime.EIcicleError
Parameters
bases
: A slice of the original affine points to be extended with their multiples.cfg
: The MSM configuration parameters.outputBases
: The device slice allocated for storing the extended points.