shuklaayush / noir-bigint

BigInt library for Aztec's noir language
MIT License
30 stars 11 forks source link

Implement a PrimeField struct #4

Closed shuklaayush closed 1 year ago

shuklaayush commented 1 year ago

Most cryptography operations happen inside a prime field and require efficient modular multiplication (reduction). This is difficult to implement in a normal BigUint since that would involve expensive division operations. An alternate way is to represent elements in Montgomery form (https://en.wikipedia.org/wiki/Montgomery_modular_multiplication) which is what most crypto libraries do