-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
mbedtls_ecp_muladd hangs with oversized point coordinates #5376
Comments
(Speaking for myself) @guidovranken I might have missed something, but directly accessing point coordinates is not supported by the public API, is it? See https://github.com/ARMmbed/mbedtls/blob/development/include/mbedtls/ecp.h#L174 I agree, though, that if the ECP module makes assumptions about the size of coordinates, those should be checked at the entry of top-level API calls (at negligible cost). |
@hanno-arm It was supported (since it wasn't explicitly forbidden) in Mbed TLS 2. And it may be officially supported again in some 3.x version: we haven't settled yet on what fields we're going to add accessors for. |
Actually, the public API |
This was fixed by #6191 |
Summary
mbedtls_ecp_muladd hangs with oversized point coordinates (>= curve order).
System information
Mbed TLS version (number or commit id): acc74b8
Operating system and version: Ubuntu Linux 64 bit
Configuration (if not default, please attach
mbedtls_config.h
):Compiler and options (if you used a pre-built binary, please indicate how you obtained it):
Expected behavior
No hang
Actual behavior
Hang
Steps to reproduce
Additional information
This happens when the point coordinates are >= curve order, which is the case in the reproducer for the
b
point.This is not necessarily a bug but the documentation does not mandate passing only valid points to
mbedtls_ecp_muladd
. Moreover,mbedtls_ecp_muladd
does not hang when given other invalid points (not on curve, infinity). Additionally,mbedtls_ecp_mul
does not hang with oversized points.The text was updated successfully, but these errors were encountered: