ingonyama-zk / icicle

A hardware acceleration library for compute intensive cryptography :ice_cube:
https://dev.ingonyama.com/icicle/overview
MIT License
340 stars 104 forks source link

Switch to Montgomery representation #663

Open HadarIngonyama opened 4 days ago

HadarIngonyama commented 4 days ago

This PR changes the basic field multiplier to be the Montgomery modular multiplier. This means that the Field class now assumes Montgomery as the default representation of elements.

cuda-backend-branch: hadar/gpu_mont_mult

HadarIngonyama commented 4 days ago

The PR is currently missing mul_const optimization which is critial for the EC adder. Even with that optimization the MSM performance is 5% worse in CUDA - can we find the cause?