Commit Graph

14 Commits

Author SHA1 Message Date
Mamy André-Ratsimbazafy bde619155b
30% faster constant-time inversion 2020-03-20 23:03:52 +01:00
Mamy André-Ratsimbazafy c956c82165
cleanup test imports 2020-02-25 20:55:23 +01:00
Mamy André-Ratsimbazafy 2aa33ea226
Fused initialization and arithmetic finite field primitive to have Fp2 less verbose and more efficient 2020-02-25 11:00:27 +01:00
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 ef5dd8345b
Allow compile-time bigint serialization + terminology: serialize -> export 2020-02-18 12:36:42 +01:00
Mamy André-Ratsimbazafy d7d20c50b6
Add primitive for window-based modular exponentiation 2020-02-17 00:13:42 +01:00
Mamy André-Ratsimbazafy c3d458e31b
Fix bug in redc: use montgomery mul for now. Add NIST P256 curve 2020-02-16 18:59:10 +01:00
Mamy André-Ratsimbazafy eb94c3d1bc
Add Montgomery Modular Multiplication 2020-02-15 02:59:08 +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 f6b229b19c
Modular addition and substraction tests 2020-02-13 00:11:45 +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 6226d86726
Update IO: dumpHex -> toHex dumpRawUint -> serializeRawUint 2020-02-12 21:57:39 +01:00