| Age | Commit message (Collapse) | Author |
|
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.
|
|
So it comes as no surprise the the pairing value in most
implementations is different to what we have here: they implement Fp12
as a tower which behaves different to our polynomial extension field.
|
|
I could not get the result to match it, or find an implementation that
matched it either... I plan on modifying the pairing implementation to
match what I consider is the "canonical" one, that is implemented over
a Fp12-tower and used in most implementations used in the
wild (including Ethereum's and ZCash's).
|
|
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.
|
|
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.
|
|
Explaining the motivation for them, and how they are magic.
|
|
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.
|
|
This includes operations for all 3 curves relevant to PLONK.
|
|
|
|
|
|
|
|
|
|
Notably, only `Fp[X]/1+x^2`, or `Fp2` is tested at the moment. More
tests for `Fp12` coming right up!
|
|
In this commit, we refactor the module to contain all the fields that we
need: namely the prime field for the BN254 curve, but also the extension
fields (polynomial rings) needed for the elliptic curve pairings used by
PLONK.
In addition, I added a "journal" for documenting findings as I go as
well as useful resources I used when implementing this from scratch.
|