<feed xmlns='http://www.w3.org/2005/Atom'>
<title>plonkers/lib/pairing.ml, branch main</title>
<subtitle>PLONK from scratch</subtitle>
<id>http://src.lordello.net/plonkers/atom/lib/pairing.ml?h=main</id>
<link rel='self' href='http://src.lordello.net/plonkers/atom/lib/pairing.ml?h=main'/>
<link rel='alternate' type='text/html' href='http://src.lordello.net/plonkers/'/>
<updated>2025-08-11T07:26:35Z</updated>
<entry>
<title>Experiment With Reference Implementation</title>
<updated>2025-08-11T07:26:35Z</updated>
<author>
<name>Nicholas Rodrigues Lordello</name>
<email>n@lordello.net</email>
</author>
<published>2025-08-11T07:26:35Z</published>
<link rel='alternate' type='text/html' href='http://src.lordello.net/plonkers/commit/?id=cec383521a82b68dc019e58d9b5a0056794f91fe'/>
<id>urn:sha1:cec383521a82b68dc019e58d9b5a0056794f91fe</id>
<content type='text'>
We experiment with the test vector from the IETF draft
"Pairing-Friendly Curves", but the implementation does not yield the
same test result (some coefficients are the same though)... I don't
know why, and I cannot find a reference implementation that _does_
return the pairing value from the test vector.
</content>
</entry>
<entry>
<title>Refactor Project</title>
<updated>2025-08-01T16:02:12Z</updated>
<author>
<name>Nicholas Rodrigues Lordello</name>
<email>n@lordello.net</email>
</author>
<published>2025-08-01T16:02:12Z</published>
<link rel='alternate' type='text/html' href='http://src.lordello.net/plonkers/commit/?id=51e1e445215c14e3ce90ab12906f07ffb2b09aaf'/>
<id>urn:sha1:51e1e445215c14e3ce90ab12906f07ffb2b09aaf</id>
<content type='text'>
We now put all field, curve, and pairing instantiations under
`bls12_381` module. We no longer have an `E12` curve - since we don't
use it.
</content>
</entry>
<entry>
<title>Batched Pairing Computation</title>
<updated>2025-08-01T12:49:14Z</updated>
<author>
<name>Nicholas Rodrigues Lordello</name>
<email>n@lordello.net</email>
</author>
<published>2025-08-01T12:49:14Z</published>
<link rel='alternate' type='text/html' href='http://src.lordello.net/plonkers/commit/?id=89f936fff830cd245d47fb5fb6e109c56216c7af'/>
<id>urn:sha1:89f936fff830cd245d47fb5fb6e109c56216c7af</id>
<content type='text'>
We batch pairing computations for efficient checking. This allows to
more efficiently implement things like BLS signatures (where we check
that some pairing dot another is equal to 1). This is because the
exponentiation in Fp12 is a _huge_ computational effort (and what takes
the most time in the pairing computation).

It looks like `@noble/curves` implements a pairing to another `Gt` that
is much more efficient to compute (as we do not need to untwist
coordinates at all, meaning no field inversion, and no computations in
Fp12), but I will hold off on implementing this until there is an actual
need for it (in case the current pairing implementation is too slow).
</content>
</entry>
<entry>
<title>Add Generator Test</title>
<updated>2025-08-01T10:08:24Z</updated>
<author>
<name>Nicholas Rodrigues Lordello</name>
<email>n@lordello.net</email>
</author>
<published>2025-08-01T09:41:26Z</published>
<link rel='alternate' type='text/html' href='http://src.lordello.net/plonkers/commit/?id=08c921a5ca703233185e9021d8cc50b620d08a39'/>
<id>urn:sha1:08c921a5ca703233185e9021d8cc50b620d08a39</id>
<content type='text'>
We use the `py_ecc` generator, and the generator test now passes as
expected. Note that we still haven't gotten to the bottom of why
`py_ecc` and `@noble/curves` have different `Gt` groups.
</content>
</entry>
<entry>
<title>Pairings With `py_ecc` Implementation</title>
<updated>2025-08-01T09:36:01Z</updated>
<author>
<name>Nicholas Rodrigues Lordello</name>
<email>n@lordello.net</email>
</author>
<published>2025-08-01T09:33:20Z</published>
<link rel='alternate' type='text/html' href='http://src.lordello.net/plonkers/commit/?id=b7f0c124574603619d10892f509558679aa59ddb'/>
<id>urn:sha1:b7f0c124574603619d10892f509558679aa59ddb</id>
<content type='text'>
We now have pairings working with the `py_ecc` implementation, but it
looks like different pairing implementations (such as `@noble/curves`)
map to different `Gt` groups.

I don't think it matters much (as long as we map to _some_ valid
group `GT`, and have bilinear properties), but I want to understand
_why_ this is the case.
</content>
</entry>
<entry>
<title>Pairing Tests and Refactor</title>
<updated>2025-07-28T10:35:51Z</updated>
<author>
<name>Nicholas Rodrigues Lordello</name>
<email>n@lordello.net</email>
</author>
<published>2025-07-28T10:35:51Z</published>
<link rel='alternate' type='text/html' href='http://src.lordello.net/plonkers/commit/?id=96c1a864a7c3cdd5006cef5ae8e30cdca61d303a'/>
<id>urn:sha1:96c1a864a7c3cdd5006cef5ae8e30cdca61d303a</id>
<content type='text'>
We refactored the extension field types to use an array for
coefficients instead of a tuple. Tests were modified to only have
string literals for numerical literals (istead of previously encoding
a whole `Fp12` in a single string for example). As a result, we get
better formatting and more line breaks instead of super dense and long
lines. Unfortunately, this makes a very big PR instead. The pairing
development will continue in the next one to not overgrow this too much.
</content>
</entry>
</feed>
