Add test for check_pubkey for x25519
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
This commit is contained in:
parent
f29857ca0a
commit
f941fb9972
1 changed files with 82 additions and 0 deletions
|
@ -41,6 +41,88 @@ ECP check pubkey Montgomery #2 (biggest)
|
||||||
depends_on:MBEDTLS_ECP_DP_CURVE25519_ENABLED
|
depends_on:MBEDTLS_ECP_DP_CURVE25519_ENABLED
|
||||||
ecp_check_pub:MBEDTLS_ECP_DP_CURVE25519:"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF":"0":"1":0
|
ecp_check_pub:MBEDTLS_ECP_DP_CURVE25519:"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF":"0":"1":0
|
||||||
|
|
||||||
|
ECP check pubkey Montgomery y ignored
|
||||||
|
depends_on:MBEDTLS_ECP_DP_CURVE25519_ENABLED
|
||||||
|
ecp_check_pub:MBEDTLS_ECP_DP_CURVE25519:"2":"-1":"1":0
|
||||||
|
|
||||||
|
ECP check pubkey Montgomery z is not 1
|
||||||
|
depends_on:MBEDTLS_ECP_DP_CURVE25519_ENABLED
|
||||||
|
ecp_check_pub:MBEDTLS_ECP_DP_CURVE25519:"2":"0":"2":MBEDTLS_ERR_ECP_INVALID_KEY
|
||||||
|
|
||||||
|
ECP check pubkey Montgomery x negative
|
||||||
|
depends_on:MBEDTLS_ECP_DP_CURVE25519_ENABLED
|
||||||
|
ecp_check_pub:MBEDTLS_ECP_DP_CURVE25519:"-1":"0":"1":MBEDTLS_ERR_ECP_INVALID_KEY
|
||||||
|
|
||||||
|
# see https://cr.yp.to/ecdh.html#validate
|
||||||
|
ECP check pubkey Montgomery low-order point #1
|
||||||
|
depends_on:MBEDTLS_ECP_DP_CURVE25519_ENABLED
|
||||||
|
ecp_check_pub:MBEDTLS_ECP_DP_CURVE25519:"0":"0":"1":MBEDTLS_ERR_ECP_INVALID_KEY
|
||||||
|
|
||||||
|
# see https://cr.yp.to/ecdh.html#validate
|
||||||
|
ECP check pubkey Montgomery low-order point #2
|
||||||
|
depends_on:MBEDTLS_ECP_DP_CURVE25519_ENABLED
|
||||||
|
ecp_check_pub:MBEDTLS_ECP_DP_CURVE25519:"1":"0":"1":MBEDTLS_ERR_ECP_INVALID_KEY
|
||||||
|
|
||||||
|
# see https://cr.yp.to/ecdh.html#validate
|
||||||
|
ECP check pubkey Montgomery low-order point #1 0
|
||||||
|
depends_on:MBEDTLS_ECP_DP_CURVE25519_ENABLED
|
||||||
|
ecp_check_pub:MBEDTLS_ECP_DP_CURVE25519:"0":"0":"1":MBEDTLS_ERR_ECP_INVALID_KEY
|
||||||
|
|
||||||
|
# see https://cr.yp.to/ecdh.html#validate
|
||||||
|
ECP check pubkey Montgomery low-order point #2 1
|
||||||
|
depends_on:MBEDTLS_ECP_DP_CURVE25519_ENABLED
|
||||||
|
ecp_check_pub:MBEDTLS_ECP_DP_CURVE25519:"1":"0":"1":MBEDTLS_ERR_ECP_INVALID_KEY
|
||||||
|
|
||||||
|
# see https://cr.yp.to/ecdh.html#validate
|
||||||
|
ECP check pubkey Montgomery low-order point #3 (let's call this u)
|
||||||
|
depends_on:MBEDTLS_ECP_DP_CURVE25519_ENABLED
|
||||||
|
ecp_check_pub:MBEDTLS_ECP_DP_CURVE25519:"b8495f16056286fdb1329ceb8d09da6ac49ff1fae35616aeb8413b7c7aebe0":"0":"1":MBEDTLS_ERR_ECP_INVALID_KEY
|
||||||
|
|
||||||
|
# see https://cr.yp.to/ecdh.html#validate
|
||||||
|
ECP check pubkey Montgomery low-order point #4 (let's call this v)
|
||||||
|
depends_on:MBEDTLS_ECP_DP_CURVE25519_ENABLED
|
||||||
|
ecp_check_pub:MBEDTLS_ECP_DP_CURVE25519:"57119fd0dd4e22d8868e1c58c45c44045bef839c55b1d0b1248c50a3bc959c5f":"0":"1":MBEDTLS_ERR_ECP_INVALID_KEY
|
||||||
|
|
||||||
|
# see https://cr.yp.to/ecdh.html#validate
|
||||||
|
ECP check pubkey Montgomery low-order point #5 p-1
|
||||||
|
depends_on:MBEDTLS_ECP_DP_CURVE25519_ENABLED
|
||||||
|
ecp_check_pub:MBEDTLS_ECP_DP_CURVE25519:"7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec":"0":"1":MBEDTLS_ERR_ECP_INVALID_KEY
|
||||||
|
|
||||||
|
# see https://cr.yp.to/ecdh.html#validate
|
||||||
|
ECP check pubkey Montgomery low-order point #6 p
|
||||||
|
depends_on:MBEDTLS_ECP_DP_CURVE25519_ENABLED
|
||||||
|
ecp_check_pub:MBEDTLS_ECP_DP_CURVE25519:"7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed":"0":"1":MBEDTLS_ERR_ECP_INVALID_KEY
|
||||||
|
|
||||||
|
# see https://cr.yp.to/ecdh.html#validate
|
||||||
|
ECP check pubkey Montgomery low-order point #7 p+1
|
||||||
|
depends_on:MBEDTLS_ECP_DP_CURVE25519_ENABLED
|
||||||
|
ecp_check_pub:MBEDTLS_ECP_DP_CURVE25519:"7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffee":"0":"1":MBEDTLS_ERR_ECP_INVALID_KEY
|
||||||
|
|
||||||
|
# see https://cr.yp.to/ecdh.html#validate
|
||||||
|
ECP check pubkey Montgomery low-order point #8 p+u
|
||||||
|
depends_on:MBEDTLS_ECP_DP_CURVE25519_ENABLED
|
||||||
|
ecp_check_pub:MBEDTLS_ECP_DP_CURVE25519:"80b8495f16056286fdb1329ceb8d09da6ac49ff1fae35616aeb8413b7c7aebcd":"0":"1":MBEDTLS_ERR_ECP_INVALID_KEY
|
||||||
|
|
||||||
|
# see https://cr.yp.to/ecdh.html#validate
|
||||||
|
ECP check pubkey Montgomery low-order point #9 p+v
|
||||||
|
depends_on:MBEDTLS_ECP_DP_CURVE25519_ENABLED
|
||||||
|
ecp_check_pub:MBEDTLS_ECP_DP_CURVE25519:"d7119fd0dd4e22d8868e1c58c45c44045bef839c55b1d0b1248c50a3bc959c4c":"0":"1":MBEDTLS_ERR_ECP_INVALID_KEY
|
||||||
|
|
||||||
|
# see https://cr.yp.to/ecdh.html#validate
|
||||||
|
ECP check pubkey Montgomery low-order point #10 2p-1
|
||||||
|
depends_on:MBEDTLS_ECP_DP_CURVE25519_ENABLED
|
||||||
|
ecp_check_pub:MBEDTLS_ECP_DP_CURVE25519:"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd9":"0":"1":MBEDTLS_ERR_ECP_INVALID_KEY
|
||||||
|
|
||||||
|
# see https://cr.yp.to/ecdh.html#validate
|
||||||
|
ECP check pubkey Montgomery low-order point #11 2p
|
||||||
|
depends_on:MBEDTLS_ECP_DP_CURVE25519_ENABLED
|
||||||
|
ecp_check_pub:MBEDTLS_ECP_DP_CURVE25519:"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffda":"0":"1":MBEDTLS_ERR_ECP_INVALID_KEY
|
||||||
|
|
||||||
|
# see https://cr.yp.to/ecdh.html#validate
|
||||||
|
ECP check pubkey Montgomery low-order point #12 2p+1
|
||||||
|
depends_on:MBEDTLS_ECP_DP_CURVE25519_ENABLED
|
||||||
|
ecp_check_pub:MBEDTLS_ECP_DP_CURVE25519:"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdb":"0":"1":MBEDTLS_ERR_ECP_INVALID_KEY
|
||||||
|
|
||||||
ECP check pubkey Koblitz #1 (point not on curve)
|
ECP check pubkey Koblitz #1 (point not on curve)
|
||||||
depends_on:MBEDTLS_ECP_DP_SECP224K1_ENABLED
|
depends_on:MBEDTLS_ECP_DP_SECP224K1_ENABLED
|
||||||
ecp_check_pub:MBEDTLS_ECP_DP_SECP224K1:"E2000000000000BB3A13D43B323337383935321F0603551D":"100101FF040830060101FF02010A30220603551D0E041B04636FC0C0":"1":MBEDTLS_ERR_ECP_INVALID_KEY
|
ecp_check_pub:MBEDTLS_ECP_DP_SECP224K1:"E2000000000000BB3A13D43B323337383935321F0603551D":"100101FF040830060101FF02010A30220603551D0E041B04636FC0C0":"1":MBEDTLS_ERR_ECP_INVALID_KEY
|
||||||
|
|
Loading…
Reference in a new issue