Commit Graph

13 Commits

Author SHA1 Message Date
Mamy Ratsimbazafy 4ff0e3d90b
Internals refactor + renewed focus on perf (#17)
* Lay out the refactoring objectives and tradeoffs

* Refactor the 32 and 64-bit primitives [skip ci]

* BigInts and Modular BigInts compile

* Make the bigints test compile

* Fix modular reduction

* Fix reduction tests vs GMP

* Implement montegomery mul, pow, inverse, WIP finite field compilation

* Make FiniteField compile

* Fix exponentiation compilation

* Fix Montgomery magic constant computation  for 2^64 words

* Fix typo in non-optimized CIOS - passing finite fields IO tests

* Add limbs comparisons [skip ci]

* Fix on precomputation of the Montgomery magic constant

* Passing all tests including 𝔽p2

* modular addition, the test for mersenne prime was wrong

* update benches

* Fix "nimble test" + typo on out-of-place field addition

* bigint division, normalization is needed: https://travis-ci.com/github/mratsim/constantine/jobs/298359743

* missing conversion in subborrow non-x86 fallback - https://travis-ci.com/github/mratsim/constantine/jobs/298359744

* Fix little-endian serialization

* Constantine32 flag to run 32-bit constantine on 64-bit machines

* IO Field test, ensure that BaseType is used instead of uint64 when the prime can field in uint32

* Implement proper addcarry and subborrow fallback for the compile-time VM

* Fix export issue when the logical wordbitwidth == physical wordbitwidth - passes all tests (32-bit and 64-bit)

* Fix uint128 on ARM

* Fix C++ conditional copy and ARM addcarry/subborrow

* Add investigation for SIGFPE in Travis

* Fix debug display for unsafeDiv2n1n

* multiplexer typo

* moveMem bug in glibc of Ubuntu 16.04?

* Was probably missing an early clobbered register annotation on conditional mov

* Note on Montgomery-friendly moduli

* Strongly suspect a GCC before GCC 7 codegen bug (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87139)

* hex conversion was (for debugging) not taking requested order into account + inlining comment

* Use 32-bit limbs on ARM64, uint128 builtin __udivti4 bug?

* Revert "Use 32-bit limbs on ARM64, uint128 builtin __udivti4 bug?"

This reverts commit 087f9aa7fb40bbd058d05cbd8eec7fc082911f49.

* Fix subborrow fallback for non-x86 (need to maks the borrow)
2020-03-16 16:33:51 +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 Ratsimbazafy 80f822c227
Set up CI with Azure Pipelines (#13)
* Set up CI with Azure Pipelines

[skip ci]

* Add task for testing without GMP

* Add C++ testing + no GMP on windows

* Add the Nim wrapper for GMP to Azure build

* Add Azure badge

* Fix nimble test tasks

* Workaround windows path in Azure

* Fix nim binaries path and mingw on 32-bit

* add stew test dependency

* Fix nim/nimble path

* disable GMP tests on windows
2020-02-23 18:27:26 +01:00
Mamy Ratsimbazafy acbb0f57f7
Travis CI (#14)
* add Travis config for x86_64 and ARM64

* Add Travis badge

* add stew test dependency

* comment out unused 64-bit word extended precision arithmetic for ARM CI
2020-02-23 17:56:43 +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 fe59efb8d8
reorganize the repo 2020-02-12 00:20:31 +01:00
Mamy André-Ratsimbazafy 5dc97927c5
Switch to personal project -> update copyright 2020-02-08 11:42:35 +01:00
Bruno Škvorc 3e9a03fc02
Update README.md 2019-01-02 15:09:55 +01:00
mratsim 27e2d2d2bc Implement to Montgomery domain conversion 2018-12-02 19:28:42 +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
Jacek Sieka 28c4b2cf98
readme: update license 2018-09-05 12:47:55 -06:00
Jacek Sieka 97ec36f447
ci: update
readme: fix badges, license
tests: fix
nimble: add description
2018-09-04 22:38:34 -06:00
mratsim 34e72296d3 initial commit 2018-07-24 16:52:18 +02:00