lowRISC / opentitan

OpenTitan: Open source silicon root of trust
https://www.opentitan.org
Apache License 2.0
2.59k stars 779 forks source link

[crypto, doc] Write an explainer about Solinas reduction for otbn/crypto. #12403

Closed jadephilipoom closed 1 year ago

jadephilipoom commented 2 years ago

See discussion in https://github.com/lowRISC/opentitan/pull/11778

Current implementations of modular reduction for P-384 and {X,Ed}25519 use an algorithm called Solinas (aka generalized Mersenne) reduction for which there aren't good existing explanations. We should have an explaner markdown document that's referenced from both implementations so the code is easier to understand. I feel like I have a good idea for how to write this document.

cc @mcy @felixmiller

msfschaffner commented 1 year ago

@jadephilipoom is this one still relevant?

jadephilipoom commented 1 year ago

Technically I could still write it, but realistically I think it's not a priority. The code has a lot of comments to explain what's going on. Happy to close.