Vulnerability in x25519: no main subgroup check before scalar multiplication #1514
stark12381-wq
started this conversation in
General
Replies: 1 comment 1 reply
-
X25519 is the only operation implemented over Curve25519. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
This bug (or vulnerability) resembles GHSA-mrfv-m5wm-5w6w (https://nvd.nist.gov/vuln/detail/CVE-2025-69277) but affects checking of points for x25519 curve. Function crypto_scalarmult_curve25519_ref10 in file x25519_ref10.c doesn't perform check of main subgroup (like _crypto_scalarmult_ed25519 (for ed25519 curve) does by calling recently corrected function ge25519_is_on_main_subgroup). As far as there is implementation of check on main subgroup is done before scalar multiplication for ed25519 Edwards curve, it would be naturally from average user of library (say, without a PhD on implementation of ECC :) ) to expect the same functionality for x25519. But function crypto_scalarmult_curve25519_ref10 rejects only points from small subgroups. As result, points, that are not in small and at the same time not in the main subgroups can pass this check.
Best regards,
Oleg Taraskin
Beta Was this translation helpful? Give feedback.
All reactions