mmcloughlin / ec3

Elliptic Curve Cryptography Compiler: an incomplete experiment in code-generation for elliptic curves in Go
BSD 3-Clause "New" or "Revised" License
56 stars 5 forks source link

ir for multi-precision arithmetic #96

Open mmcloughlin opened 4 years ago

mmcloughlin commented 4 years ago

In order to support more elaborate optimizations for the underlying multi-precision arithmetic, it might help to introduce a simpler "generic assembly" precisely for this purpose. Rather than manipulating avo functions, this would instead be a small RTL (Register Transfer Language) with the smallest instruction set possible to implement routines like Montgomery Multiplication. Benefits:

Related #46 #95 #49

mmcloughlin commented 4 years ago

z3 bindings in Go:

Useful C API examples: https://github.com/Z3Prover/z3/blob/71d68b8fe082b5efb8cf9990e7275b3b97acbb62/examples/c/test_capi.c

Migrating to #99