aboutsummaryrefslogtreecommitdiff
path: root/lib/pairing.ml
diff options
context:
space:
mode:
authorNicholas Rodrigues Lordello <[email protected]>2025-08-01 13:42:15 +0200
committerNicholas Rodrigues Lordello <[email protected]>2025-08-01 16:03:13 +0200
commite77561ac7f94668039adf9db57f0c6f9248eeb16 (patch)
tree5cb6b9acc88f034d30a86aff777f5e7621e880f4 /lib/pairing.ml
parent89f936fff830cd245d47fb5fb6e109c56216c7af (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/pairing.ml')
-rw-r--r--lib/pairing.ml2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/pairing.ml b/lib/pairing.ml
index ef67901..daed96c 100644
--- a/lib/pairing.ml
+++ b/lib/pairing.ml
@@ -73,7 +73,7 @@ struct
(fun f (p, q, r) ->
let t = line !r !r p in
let f = F.(f * t) in
- r := G2.add !r !r;
+ r := G2.double !r;
if bit then (
let t = line !r q p in
let f = F.(f * t) in