arkworks-rs / algebra

Libraries for finite field, elliptic curve, and polynomial arithmetic
https://arkworks.rs
Apache License 2.0
628 stars 245 forks source link

Implement improved squaring algorithms #533

Open Pratyush opened 1 year ago

Pratyush commented 1 year ago

Implement the optimized squaring algorithm outlined in https://hackmd.io/@gnark/modular_multiplication#Montgomery-squaring.

An example implementation is available here: https://github.com/mratsim/constantine/blob/e47159e4/constantine/arithmetic/limbs_montgomery.nim#L169-L205

mmagician commented 1 year ago

WIP