danwallach / ElectionGuard-TypeScript

TypeScript implementation of ElectionGuard (subset for ballot encryption)
MIT License
8 stars 0 forks source link

PowRadix acceleration #13

Open danwallach opened 2 years ago

danwallach commented 2 years ago

Current on powRadixSpeedup branch. Possibly dependent on #8. If we had more vicious testing, we'd be more confident that the speedup was correct / bug-free.

danwallach commented 2 years ago

Currently working without the Montgomery transformation, but with the necessary code to support going back and forth. Regardless, it's still quite fast. The hacl-wasm branch uses the full Montgomery transformation.

danwallach commented 2 years ago

New branch, montgomery-arithmetic (https://github.com/danwallach/ElectionGuard-TypeScript/tree/montgomery-arithmetic), implements all the right transformations. Somehow, we end up running a little slower rather than faster. Unexpected! So for now, we're not merging that branch, and will stick with what's fastest.