precompute static method
Implementation
static List<Point> precompute() {
// 10x sign(), 2x verify(). To achieve this,
final List<Point> points = <Point>[];
// app needs to spend 40ms+ to calculate
const windows = 256 / W + 1;
// a lot of points related to base point G.
var p = Point.G, b = p;
// Points are stored in array and used
for (int w = 0; w < windows; w++) {
// any time Gx multiplication is done.
b = p;
// They consume 16-32 MiB of RAM.
points.add(b);
// Precomputes don't speed-up getSharedKey,
for (int i = 1; i < pow(2, (W - 1)); i++) {
// which multiplies user point by scalar,
b = b.add(p);
points.add(b);
}
p = b.double();
}
// when precomputes are using base point
return points;
}