Commit Graph

12 Commits

Author SHA1 Message Date
Mamy André-Ratsimbazafy acfc99c4f0
Add an unsafe modular exponentiation that may leak exponent bits to timing attacks/oscilloscopes/memory cache attacks 2020-02-22 18:18:17 +01:00
Mamy André-Ratsimbazafy 4b65d0d723
Skeleton of modular exponentiation 2020-02-22 16:37:31 +01:00
Mamy André-Ratsimbazafy d7d20c50b6
Add primitive for window-based modular exponentiation 2020-02-17 00:13:42 +01:00
Mamy André-Ratsimbazafy 5620bbfaee
rename io tests ti io bigints 2020-02-16 11:29:27 +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 6226d86726
Update IO: dumpHex -> toHex dumpRawUint -> serializeRawUint 2020-02-12 21:57:39 +01:00
Mamy André-Ratsimbazafy 89fce3b1c4
Wrap tests in main. Fixes C codegen bug due to templates invocation on global variable in test_primitives 2020-02-12 00:25:48 +01:00
Mamy André-Ratsimbazafy 8d160189d1
Fix extended prec multiplication carry. Passing modulo tests against medium BigInt (192~256 bits) 2020-02-10 22:19:47 +01:00
Mamy André-Ratsimbazafy 153e898263
word_types -> primitives + delete the "config" file / debug template 2020-02-09 16:22:55 +01:00
Mamy André-Ratsimbazafy ff8b22e1d1
Use file-wide "no exceptions" enforcement 2020-02-09 01:03:06 +01:00
Mamy André-Ratsimbazafy 9db77ad0eb
Prepare for testing finite fields, comment cleanups 2020-02-09 00:52:24 +01:00
mratsim eb15fb33b5 Rebrand to Constantine. Bigints representation should stay opaque. Exporting just the word_types would make a super small library. 2018-12-01 20:12:05 +01:00