-
Notifications
You must be signed in to change notification settings - Fork 577
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
secp112r2 blinded_var_point_multiply incorrect result #3800
Comments
I suppose this is related to #3723. But should a point being part of the prime order |
I think mathematically multiplication with a torsion factor (ie a point that is outside the prime order subgroup) is well defined, but we likely assume that the points order is exactly that of the subgroup. Specifically, for this routine we actually perform a multiplication of What other implementations are you testing that produce a consistent result here? |
OpenSSL, wolfSSL, libecc, Crypto++ as well as Botan's regular scalar multiplication ( PS: secp112r2 and secp128r2 have special points which cause Botan to throw The points: X = More information here: https://github.com/libecc/libecc/blob/b9329e2826f4d622dbb9ffdd9316e98fda7a023f/src/curves/prj_pt.c#L1038 |
Hi, Actually regarding the blinding of composite points (i.e. points that are not in the prime order subgroup), the order of the curve must be used and not the prime order (as indeed as pointed by @randombit the scalar multiplication by this prime order will not be the identity). libecc performs such blinding with the explanation here: https://github.com/libecc/libecc/blob/b9329e2826f4d622dbb9ffdd9316e98fda7a023f/src/curves/prj_pt.c#L1784 Regards, |
What's the value of supporting such curves? They're too big for toy problems that you'd give students, and too weak cryptographically to be of practical use. |
These curves can indeed be considered weak, but other curves with non 1 cofactors such as Wei25519 or Wei448 will exhibit the same issue while being considered "secure". |
This only matters in the case of performing a multiplication in a curve that has a cofactor and the point is not in the prime order subgroup. See GH #3800
This only matters in the case of performing a multiplication in a curve that has a cofactor and the point is not in the prime order subgroup. See GH #3800
@guidovranken Should be fixed now, I'll leave this open until you can confirm. |
Confirmed fixed. |
This will sometimes print:
but it should print:
Maybe secp112r2/custom curves are not compatible with
blinded_var_point_multiply
? Though ideally it should throw an exception then.The text was updated successfully, but these errors were encountered: