entropyxyz / synedrion

Implementation of Canetti-Gennaro-Goldfeder-Makriyannis-Peled threshold signing scheme
https://docs.rs/synedrion
GNU Affero General Public License v3.0
63 stars 10 forks source link

Add an associated type for `crypto_bigint::DynResidueParams` to Uint traits. #7

Closed fjarri closed 1 year ago

fjarri commented 1 year ago

Currently every time we need an integer in Montgomery form, we use UintModLike::new passing it the modulus, effectively instantiating DynResidueParams every time. This is slow, in many cases we would be able to reuse them. To do that, it has to be an associated type in UintModLike, which means we will need a trait for it as well.

fjarri commented 1 year ago

Added in commit 7288fba15051e50f6b1616962d40f4ba3421eaa1