11 Commits

Author SHA1 Message Date
Mamy André-Ratsimbazafy
6b05c69652
Rename Fq -> Fp 2020-02-24 17:10:09 +01:00
Mamy Ratsimbazafy
3bd70991d4
reorg the codebase + add/update READMEs in folders with research (#12)
* reorg the codebase + add/update READMEs in folders with research

* fix readme

* update pairing implementation papers

* Seperate hash-to-curve in its own folder, distinguish between norms, research and presentations

* Better markdown line breaks

* Add in-depth analysis of towers of extension fields for BN curve

* Fix Colm Ó hÉigeartaigh name and add Hash-to-Curve reference
2020-02-24 10:50:19 +01:00
Mamy André-Ratsimbazafy
bd1430157f
Add BLS12-381 curve:
- don't create "Mod" in curve parser: compile-time type incompatibility
- don't use "Mod" in const sections: compile-time type incompat  --> create a macro to get montgomery magics instead of a const array
2020-02-16 00:44:01 +01:00
Mamy André-Ratsimbazafy
05a2c6a34b
Properly precompute the montomery cosntants at compile-time and store them in ROM 2020-02-15 20:43:38 +01:00
Mamy André-Ratsimbazafy
e2333dce3c
Terminology nres -> mres, montgomeryResidue, montyResidue 2020-02-15 16:11:17 +01:00
Mamy André-Ratsimbazafy
d3ad4acb3a
Do less in curve generator macro:
- no more monty magic "negInvModWord"
- no public "matchingBigInt"

Improve comment on Montgomery procedures
2020-02-15 13:56:13 +01:00
Mamy André-Ratsimbazafy
398b871c4f
Reorg the repo to introduce prepare for introducing the R² (mod p) magic constant 2020-02-15 13:13:01 +01:00
Mamy André-Ratsimbazafy
301cf20195
Use Montgomery representation by default for Finite Field
- Fix montyMagic, modular inversion mode 2^2k was missing an iteration
- Fix test for buffer size in BigInt serialization
- Add UINT/Hex serialization for finite fields
- Montgomery conversion and redc
2020-02-15 00:26:40 +01:00
Mamy André-Ratsimbazafy
f418e08746
For finite fields, we will use the Montgomery n-residue form by default 2020-02-14 13:36:34 +01:00
Mamy André-Ratsimbazafy
3eb22f8fc7
Fix curve parser, implement smoke test for finite field 2020-02-12 23:57:51 +01:00
Mamy André-Ratsimbazafy
fe59efb8d8
reorganize the repo 2020-02-12 00:20:31 +01:00