diff options
| author | Nicholas Rodrigues Lordello <[email protected]> | 2025-08-01 13:42:15 +0200 |
|---|---|---|
| committer | Nicholas Rodrigues Lordello <[email protected]> | 2025-08-01 16:03:13 +0200 |
| commit | e77561ac7f94668039adf9db57f0c6f9248eeb16 (patch) | |
| tree | 5cb6b9acc88f034d30a86aff777f5e7621e880f4 /lib/curves.ml | |
| parent | 89f936fff830cd245d47fb5fb6e109c56216c7af (diff) | |
Use Projective Coordinatesfeat/projective-coordinates
I modified the curve implementation to use projective coordinates, but
there wasn't a material speedup of the BLS12-381 pairing implementation.
I suspect it is related to the fact that I am not implementing the
Miller Loop in a way that takes advantage of the coordinate projection,
which makes things take more time in the end.
Diffstat (limited to 'lib/curves.ml')
| -rw-r--r-- | lib/curves.ml | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/curves.ml b/lib/curves.ml index 1182352..440a66d 100644 --- a/lib/curves.ml +++ b/lib/curves.ml @@ -1,6 +1,7 @@ module E = Curve.Make (struct module F = Fields.Fp + let a = F.zero let b = F.of_string "4" let g = @@ -19,6 +20,7 @@ end) module E2 = Curve.Make (struct module F = Fields.Fp2 + let a = F.zero let b = F.of_string "(4,4)" let g = @@ -46,6 +48,7 @@ end) module E12 = Curve.Make (struct module F = Fields.Fp12 + let a = F.zero let b = F.of_f @@ Fields.Fp.of_string "4" let g = |
