<feed xmlns='http://www.w3.org/2005/Atom'>
<title>plonkers/lib/pairing.mli, branch main</title>
<subtitle>PLONK from scratch</subtitle>
<id>http://src.lordello.net/plonkers/atom/lib/pairing.mli?h=main</id>
<link rel='self' href='http://src.lordello.net/plonkers/atom/lib/pairing.mli?h=main'/>
<link rel='alternate' type='text/html' href='http://src.lordello.net/plonkers/'/>
<updated>2025-08-01T16:02:12Z</updated>
<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>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>Refactor Curve Into Functor</title>
<updated>2025-07-30T07:01:58Z</updated>
<author>
<name>Nicholas Rodrigues Lordello</name>
<email>n@lordello.net</email>
</author>
<published>2025-07-30T07:01:58Z</published>
<link rel='alternate' type='text/html' href='http://src.lordello.net/plonkers/commit/?id=395fa4a06d5c4ac90f65838137728ed569bc4f90'/>
<id>urn:sha1:395fa4a06d5c4ac90f65838137728ed569bc4f90</id>
<content type='text'>
Curves can now be generically instantiated with a functor, depending
on its parameterization (underlying field, Weirstrass `b` value,
generator point and order).

This makes things very nice! We also now define `E12` explicitely,
with a test that `twist E2.g = E12.g`.
</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>
