-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Investigate using new algorithm for scalar multiplication #1099
Comments
So this is about multiplication of a secret scalar with any public point, without precomputation (what we call It's very interesting, and apparently Mike Hamburg presented a simple variant of the ideas in a rump talk at CHES17, which is also described in the journal version of the paper. What makes this interesting: the approach here seems to be inspired by the Montgomery ladder but it works on every short Weierstrass curve. The slides even mention that it's possible to turn it into an x-only ladder, which so far I assumed is only possible on Montgomery curves. (Related: #262 but this uses a different method to speed up x-only ECDH).
We should not judge people based on their origin or nationality but even if you disagree, we should not judge algorithms based on the origin or nationality of their inventors. |
As somewhat discussed in my PR against noble-secp256k1, these algorithms are constant time on the number of bits in the scalar. It's above my pay grade to know what modifications would correctly make them constant time on a fixed number of bits. To pass the sniff test, I ran the initialization function, the per-bit transform for each leading zero, and then the initialization again to begin computing the real output value. I experimented with a couple of the algorithms they presented (8-, and 9-register), and found that in the context of JavaScript native bigints the 8-register version performed best. Which is fastest depends on the relationship between the cost of modmul, modadd, and modsub, as the 9-register version has 2 fewer multiplications, but 2 extra subtractions and 9 extra additions per iteration. |
North Korea has a history of targeting security researchers all over the world with very elaborate schemes, so i'm thinking primarily in this context here. I don't care who've made it, I do care about getting some subtle security issues in. Especially since the folks seem to be sitting inside NK, not outside. Also decided to mention this fact because i've never seen security papers from there. |
https://eprint.iacr.org/2017/669.pdf
https://web.archive.org/web/20201104025731/https://www.aimsciences.org/article/exportPdf?id=5c293be6-723e-4b97-ae1d-ff359e261cdb
Originally submitted as a pull request to my JS secp256k1 impl. I think it deserves some investigation.
Quirk: the algorithm researchers are from North Korea 😐
The text was updated successfully, but these errors were encountered: