<feed xmlns='http://www.w3.org/2005/Atom'>
<title>plonkers/lib, branch main</title>
<subtitle>PLONK from scratch</subtitle>
<id>http://src.lordello.net/plonkers/atom/lib?h=main</id>
<link rel='self' href='http://src.lordello.net/plonkers/atom/lib?h=main'/>
<link rel='alternate' type='text/html' href='http://src.lordello.net/plonkers/'/>
<updated>2025-11-18T21:26:38Z</updated>
<entry>
<title>Polynomial Commitments Journal Entry</title>
<updated>2025-11-18T21:26:38Z</updated>
<author>
<name>Nicholas Rodrigues Lordello</name>
<email>n@lordello.net</email>
</author>
<published>2025-11-18T21:25:14Z</published>
<link rel='alternate' type='text/html' href='http://src.lordello.net/plonkers/commit/?id=619dec90d0fa11d1d4bcab9dd995833452918a46'/>
<id>urn:sha1:619dec90d0fa11d1d4bcab9dd995833452918a46</id>
<content type='text'>
Added journal entry on polynomial commitements (specifcially, KZG
commitments), and started thinking about how to implement them.

There is still a lot of work to be done, but pushing so I don't
lose the information I have so far.
</content>
</entry>
<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>Remove `conjugate`</title>
<updated>2025-08-01T14:28:43Z</updated>
<author>
<name>Nicholas Rodrigues Lordello</name>
<email>n@lordello.net</email>
</author>
<published>2025-08-01T14:28:43Z</published>
<link rel='alternate' type='text/html' href='http://src.lordello.net/plonkers/commit/?id=4ce648df90034d7dade55cadd5bd6251619cf922'/>
<id>urn:sha1:4ce648df90034d7dade55cadd5bd6251619cf922</id>
<content type='text'>
It only makes sense for fields implemented as towers, which is NOT what
we did here.
</content>
</entry>
<entry>
<title>Add Fp2 Optimizations</title>
<updated>2025-08-01T14:26:39Z</updated>
<author>
<name>Nicholas Rodrigues Lordello</name>
<email>n@lordello.net</email>
</author>
<published>2025-08-01T14:24:21Z</published>
<link rel='alternate' type='text/html' href='http://src.lordello.net/plonkers/commit/?id=ff6fd1144763e42f29710ed23ef7016442a03c9a'/>
<id>urn:sha1:ff6fd1144763e42f29710ed23ef7016442a03c9a</id>
<content type='text'>
Add optimizations for Fp2.
</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>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>Refactor Fields to be Functor Based</title>
<updated>2025-07-29T20:54:38Z</updated>
<author>
<name>Nicholas Rodrigues Lordello</name>
<email>n@lordello.net</email>
</author>
<published>2025-07-29T20:54:38Z</published>
<link rel='alternate' type='text/html' href='http://src.lordello.net/plonkers/commit/?id=c2f1680b6718a01c128fbb83ba3c50b70c3c5d7c'/>
<id>urn:sha1:c2f1680b6718a01c128fbb83ba3c50b70c3c5d7c</id>
<content type='text'>
Prime fields and polynomial extension fields are now functor based.
That is, you define field parameters and a functor will produce a
field module.

This is the first step to moving all BLS12-381 pairing definitions to
a single module, instead of splitting them. This makes the "this is
the curve and its pairing" very central, with the field and curve
modules being generic over their respective parameterization.

Added field exponentiation - and found out that Zarith supports
negative exponents, and `powm x ~-1 p` is a much more efficient way of
computing a field inverse (tests run ~5 times quicker).
</content>
</entry>
</feed>
