cheetah icon indicating copy to clipboard operation
cheetah copied to clipboard

Bring back Montgomery form?

Open Nashtare opened this issue 2 years ago • 0 comments

We were originally using Montgomery form for representing base field and scalar field elements, which has then be removed in favour of a canonical encoding for the base prime field, to match the implementation on winterfell and miden. However, if we stay away from the latter, we may want to go back to Montgomery form and use the same wrapping approach in winterfell for our own version of f64. While Fp6 multiplication and squaring may be slightly slower than it currently is, addition/subtraction/doubling should be faster. In addition, we wouldn't have to deal with canonicalization of elements before feeding them into a Hasher for instance, as all element representations are unique in Montgomery form.

Nashtare avatar Mar 03 '22 09:03 Nashtare