#ITEM 1- Implement Savas & Koç Montgomery modular inverse algorithm #14
Comments
One thing to bear in mind is that we can use the hardcoded addition chain for the inversion algorithm. The spending for the operations acts as exactly doubling each operation so this can benchmarked against the other two. |
But is it the same? Applies on the same way¿? Or something should be refactored? PS: You refer to this right? |
Yes, you are correct. The need to refactor is why I used the word 'template'. |
Since @Bounce23 said that we could go for an addition chain algorithm which will enable us to perform inversion operations in CTime. So this closes dusk-network#15 dusk-network#17 and dusk-network#14 for now.
As mentioned on last commits this will remain closed until addition chain implementations are found or discarded. |
The optimum method of Modular inverse was always this algorithm as using addition chains required defining all of the temporary t value field elements up to and including 2^260. |
This definitely closes: dusk-network#17, dusk-network#15 and #9 and opens the door for the development of dusk-network#14 . - Implemented more exhaustive tests for `kalinski_inverse()` function, which performs the modular inverse of the given `FieldElement`. - Added doc comments for `half()` and `plus_p_and_half()` functions. - Removed some debugging prints.
This closes dusk-network#14 . Implemented the same test as were implemented for `kalinski_inverse()`. All of them passed correctly.
This issue is under the item: https://gitlab.dusk.network/dusk-org/tech/issues/1.
The goal is to implement:
Montgomery inversion - Erkay Sava ̧s & Çetin Kaya Koç
J Cryptogr Eng (2018) 8:201–210
https://doi.org/10.1007/s13389-017-0161-x
And benchmark the algo vs. Kalinski's one implemented on #9 .
Addition chais are probably a higher performance solution. Maybe @Bounce23 can bring some light researching a bit.
The text was updated successfully, but these errors were encountered: