mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-12-23 09:15:35 +00:00
Fix ecp_check_pub() test cases
Negative x coordinate was tested with the value -1. It happens to be one of the low order points both for Curve25519 and Curve448 and might be rejected because of that and not because it is negative. Make sure that x < 0 is the only plausible reason for the point to be rejected. Signed-off-by: Janos Follath <janos.follath@arm.com>
This commit is contained in:
parent
be89c357ae
commit
51ccd62a08
|
@ -58,7 +58,7 @@ ecp_check_pub:MBEDTLS_ECP_DP_CURVE25519:"2":"0":"2":MBEDTLS_ERR_ECP_INVALID_KEY
|
||||||
|
|
||||||
ECP check pubkey Curve25519 x negative
|
ECP check pubkey Curve25519 x negative
|
||||||
depends_on:MBEDTLS_ECP_DP_CURVE25519_ENABLED
|
depends_on:MBEDTLS_ECP_DP_CURVE25519_ENABLED
|
||||||
ecp_check_pub:MBEDTLS_ECP_DP_CURVE25519:"-1":"0":"1":MBEDTLS_ERR_ECP_INVALID_KEY
|
ecp_check_pub:MBEDTLS_ECP_DP_CURVE25519:"-2":"0":"1":MBEDTLS_ERR_ECP_INVALID_KEY
|
||||||
|
|
||||||
# see https://cr.yp.to/ecdh.html#validate
|
# see https://cr.yp.to/ecdh.html#validate
|
||||||
ECP check pubkey Curve25519 low-order point #1
|
ECP check pubkey Curve25519 low-order point #1
|
||||||
|
@ -142,7 +142,7 @@ ecp_check_pub:MBEDTLS_ECP_DP_CURVE448:"2":"0":"2":MBEDTLS_ERR_ECP_INVALID_KEY
|
||||||
|
|
||||||
ECP check pubkey Curve448 x negative
|
ECP check pubkey Curve448 x negative
|
||||||
depends_on:MBEDTLS_ECP_DP_CURVE448_ENABLED
|
depends_on:MBEDTLS_ECP_DP_CURVE448_ENABLED
|
||||||
ecp_check_pub:MBEDTLS_ECP_DP_CURVE448:"-1":"0":"1":MBEDTLS_ERR_ECP_INVALID_KEY
|
ecp_check_pub:MBEDTLS_ECP_DP_CURVE448:"-2":"0":"1":MBEDTLS_ERR_ECP_INVALID_KEY
|
||||||
|
|
||||||
ECP check pubkey Curve448 low-order point #1
|
ECP check pubkey Curve448 low-order point #1
|
||||||
depends_on:MBEDTLS_ECP_DP_CURVE448_ENABLED
|
depends_on:MBEDTLS_ECP_DP_CURVE448_ENABLED
|
||||||
|
|
Loading…
Reference in a new issue