Here elliptic curve points do not follow the object oriented pattern with methods for adding, doubling, and multiplying. Instead this is implemented in methods of the curve, or even plain functions. This avoids allocations. Thus, the API is half-way between different paradigms and the routines in this library are not meant to be used directly.
The implementation is close to a verbatim port of the corresponding code in the Verificatum Elliptic Curve library (VEC) written in C. In particular, the addition and doubling routines have been translated by search and replace.
All coordinates of elliptic curve points and temporary values are stored using L = 2 * L' + 4 limbs, where L' is equal to the minimal number of limbs needed to represent the order of the underlying field.
The addition and doubling routines have full-multiplication depth 1 before every modular reduction. There may also be a few additions or multiplication with integers bounded by 8. Such expressions fit nicely into L limbs. After modular reduction L' words remain and new expressions can be formed. This approach reduces the number of modular reductions.
- Source:
Classes
Methods
(static) affine(curve, A)
Parameters:
Name | Type | Description |
---|---|---|
curve |
Elliptic curve. | |
A |
Point to affine. |
- Source:
(static) jadd_generic(curve, A, B, C)
Parameters:
Name | Type | Description |
---|---|---|
curve |
Elliptic curve. | |
A |
Holder of result. | |
B |
Point on curve. | |
C |
Point on curve. |
- Source:
(static) jdbl_a_eq_neg3(curve, A, B)
ASSUMES: a = -3 for the curve.
References: Bernstein Jacobi coordinates (2001).
Parameters:
Name | Type | Description |
---|---|---|
curve |
Elliptic curve. | |
A |
Holder of result. | |
B |
Point on curve. |
- Source:
(static) jdbl_generic(curve, A, B)
References: Cohen/Miyaji/Ono Jacobi coordinates (1998).
Parameters:
Name | Type | Description |
---|---|---|
curve |
Elliptic curve. | |
A |
Holder of result. | |
B |
Point on curve. |
- Source:
(static) jmul_naive(curve, A, B, e)
Parameters:
Name | Type | Description |
---|---|---|
curve |
Elliptic curve. | |
A |
Holder of result. | |
B |
Point on curve. | |
e |
Scalar. |
- Source: