mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-01-30 15:32:58 +00:00
test_suite_psa_crypto_util: increase the size of tested integers
- Replace 192 case with 256 - Replace 256 case with 512 - Add 521 case Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
This commit is contained in:
parent
5713c8a5ac
commit
bda440f82d
@ -1,71 +1,81 @@
|
||||
ECDSA Raw -> DER, 192bit, Success
|
||||
depends_on:PSA_WANT_ECC_SECP_R1_192
|
||||
ecdsa_raw_to_der:ECDSA_RAW_TO_DER:192:"010101010101010101010101010101010101010101010101020202020202020202020202020202020202020202020202":"303402180101010101010101010101010101010101010101010101010218020202020202020202020202020202020202020202020202":0
|
||||
|
||||
ECDSA Raw -> DER, 192bit, Raw data too short
|
||||
depends_on:PSA_WANT_ECC_SECP_R1_192
|
||||
ecdsa_raw_to_der:ECDSA_RAW_TO_DER:192:"0101010101010101010101010101010101010101010101010202020202020202020202020202020202020202020202":"303402180101010101010101010101010101010101010101010101010218020202020202020202020202020202020202020202020202":MBEDTLS_ERR_ASN1_INVALID_DATA
|
||||
|
||||
ECDSA Raw -> DER, 192bit, DER buffer too small
|
||||
depends_on:PSA_WANT_ECC_SECP_R1_192
|
||||
ecdsa_raw_to_der:ECDSA_RAW_TO_DER:192:"010101010101010101010101010101010101010101010101020202020202020202020202020202020202020202020202":"30340218010101010101010101010101010101010101010101010101":MBEDTLS_ERR_ASN1_BUF_TOO_SMALL
|
||||
|
||||
ECDSA Raw -> DER, 192bit, Null r
|
||||
depends_on:PSA_WANT_ECC_SECP_R1_192
|
||||
ecdsa_raw_to_der:ECDSA_RAW_TO_DER:192:"000000000000000000000000000000000000000000000000020202020202020202020202020202020202020202020202":"303402180101010101010101010101010101010101010101010101010218020202020202020202020202020202020202020202020202":MBEDTLS_ERR_ASN1_INVALID_DATA
|
||||
|
||||
ECDSA Raw -> DER, 192bit, Null s
|
||||
depends_on:PSA_WANT_ECC_SECP_R1_192
|
||||
ecdsa_raw_to_der:ECDSA_RAW_TO_DER:192:"010101010101010101010101010101010101010101010101000000000000000000000000000000000000000000000000":"303402180101010101010101010101010101010101010101010101010218020202020202020202020202020202020202020202020202":MBEDTLS_ERR_ASN1_INVALID_DATA
|
||||
|
||||
ECDSA Raw -> DER, 192bit, r with MSb set
|
||||
depends_on:PSA_WANT_ECC_SECP_R1_192
|
||||
ecdsa_raw_to_der:ECDSA_RAW_TO_DER:192:"810101010101010101010101010101010101010101010101020202020202020202020202020202020202020202020202":"30350219008101010101010101010101010101010101010101010101010218020202020202020202020202020202020202020202020202":0
|
||||
|
||||
ECDSA Raw -> DER, 192bit, s with MSb set
|
||||
depends_on:PSA_WANT_ECC_SECP_R1_192
|
||||
ecdsa_raw_to_der:ECDSA_RAW_TO_DER:192:"010101010101010101010101010101010101010101010101820202020202020202020202020202020202020202020202":"30350218010101010101010101010101010101010101010101010101021900820202020202020202020202020202020202020202020202":0
|
||||
|
||||
ECDSA DER -> Raw, 192bit, Success
|
||||
depends_on:PSA_WANT_ECC_SECP_R1_192
|
||||
ecdsa_raw_to_der:ECDSA_DER_TO_RAW:192:"303402180101010101010101010101010101010101010101010101010218020202020202020202020202020202020202020202020202":"010101010101010101010101010101010101010101010101020202020202020202020202020202020202020202020202":0
|
||||
|
||||
ECDSA DER -> Raw, 192bit, Raw buffer too small
|
||||
depends_on:PSA_WANT_ECC_SECP_R1_192
|
||||
ecdsa_raw_to_der:ECDSA_DER_TO_RAW:192:"303402180101010101010101010101010101010101010101010101010218020202020202020202020202020202020202020202020202":"0101010101010101010101010101010101010101010101010202020202020202020202020202020202020202020202":MBEDTLS_ERR_ASN1_BUF_TOO_SMALL
|
||||
|
||||
ECDSA DER -> Raw, 192bit, Wrong sequence tag
|
||||
depends_on:PSA_WANT_ECC_SECP_R1_192
|
||||
ecdsa_raw_to_der:ECDSA_DER_TO_RAW:192:"403402180101010101010101010101010101010101010101010101010218020202020202020202020202020202020202020202020202":"010101010101010101010101010101010101010101010101020202020202020202020202020202020202020202020202":MBEDTLS_ERR_ASN1_UNEXPECTED_TAG
|
||||
|
||||
ECDSA DER -> Raw, 192bit, Invalid sequence length
|
||||
depends_on:PSA_WANT_ECC_SECP_R1_192
|
||||
ecdsa_raw_to_der:ECDSA_DER_TO_RAW:192:"30FF02180101010101010101010101010101010101010101010101010218020202020202020202020202020202020202020202020202":"010101010101010101010101010101010101010101010101020202020202020202020202020202020202020202020202":MBEDTLS_ERR_ASN1_INVALID_LENGTH
|
||||
|
||||
ECDSA DER -> Raw, 192bit, Wrong integer tag
|
||||
depends_on:PSA_WANT_ECC_SECP_R1_192
|
||||
ecdsa_raw_to_der:ECDSA_DER_TO_RAW:192:"303401180101010101010101010101010101010101010101010101010218020202020202020202020202020202020202020202020202":"010101010101010101010101010101010101010101010101020202020202020202020202020202020202020202020202":MBEDTLS_ERR_ASN1_UNEXPECTED_TAG
|
||||
|
||||
ECDSA DER -> Raw, 192bit, Wrong r integer length (too small)
|
||||
depends_on:PSA_WANT_ECC_SECP_R1_192
|
||||
ecdsa_raw_to_der:ECDSA_DER_TO_RAW:192:"303402170101010101010101010101010101010101010101010101010218020202020202020202020202020202020202020202020202":"010101010101010101010101010101010101010101010101020202020202020202020202020202020202020202020202":MBEDTLS_ERR_ASN1_UNEXPECTED_TAG
|
||||
|
||||
ECDSA DER -> Raw, 192bit, Wrong r integer length (too large)
|
||||
depends_on:PSA_WANT_ECC_SECP_R1_192
|
||||
ecdsa_raw_to_der:ECDSA_DER_TO_RAW:192:"303402190101010101010101010101010101010101010101010101010218020202020202020202020202020202020202020202020202":"010101010101010101010101010101010101010101010101020202020202020202020202020202020202020202020202":MBEDTLS_ERR_ASN1_UNEXPECTED_TAG
|
||||
|
||||
ECDSA DER -> Raw, 192bit, Wrong s integer length (too small)
|
||||
depends_on:PSA_WANT_ECC_SECP_R1_192
|
||||
ecdsa_raw_to_der:ECDSA_DER_TO_RAW:192:"303402180101010101010101010101010101010101010101010101010217020202020202020202020202020202020202020202020202":"010101010101010101010101010101010101010101010101020202020202020202020202020202020202020202020202":MBEDTLS_ERR_ASN1_LENGTH_MISMATCH
|
||||
|
||||
ECDSA DER -> Raw, 192bit, Wrong s integer length (too large)
|
||||
depends_on:PSA_WANT_ECC_SECP_R1_192
|
||||
ecdsa_raw_to_der:ECDSA_DER_TO_RAW:192:"303402180101010101010101010101010101010101010101010101010219020202020202020202020202020202020202020202020202":"010101010101010101010101010101010101010101010101020202020202020202020202020202020202020202020202":MBEDTLS_ERR_ASN1_OUT_OF_DATA
|
||||
|
||||
ECDSA Raw -> DER, 256bit, Success
|
||||
depends_on:PSA_WANT_ECC_SECP_R1_256
|
||||
ecdsa_raw_to_der:ECDSA_RAW_TO_DER:256:"01010101010101010101010101010101010101010101010101010101010101010202020202020202020202020202020202020202020202020202020202020202":"30440220010101010101010101010101010101010101010101010101010101010101010102200202020202020202020202020202020202020202020202020202020202020202":0
|
||||
ecdsa_raw_to_der:ECDSA_RAW_TO_DER:256:"11111111111111111111111111111111111111111111111111111111111111112222222222222222222222222222222222222222222222222222222222222222":"30440220111111111111111111111111111111111111111111111111111111111111111102202222222222222222222222222222222222222222222222222222222222222222":0
|
||||
|
||||
ECDSA Raw -> DER, 256bit, Raw data too short
|
||||
depends_on:PSA_WANT_ECC_SECP_R1_256
|
||||
ecdsa_raw_to_der:ECDSA_RAW_TO_DER:256:"111111111111111111111111111111111111111111111111111111111111111122222222222222222222222222222222222222222222222222222222222222":"30440220111111111111111111111111111111111111111111111111111111111111111102202222222222222222222222222222222222222222222222222222222222222222":MBEDTLS_ERR_ASN1_INVALID_DATA
|
||||
|
||||
ECDSA Raw -> DER, 256bit, DER buffer too small
|
||||
depends_on:PSA_WANT_ECC_SECP_R1_256
|
||||
ecdsa_raw_to_der:ECDSA_RAW_TO_DER:256:"11111111111111111111111111111111111111111111111111111111111111112222222222222222222222222222222222222222222222222222222222222222":"304402201111111111111111111111111111111111111111111111111111111111111111022022222222222222222222222222222222222222222222222222222222222222":MBEDTLS_ERR_ASN1_BUF_TOO_SMALL
|
||||
|
||||
ECDSA Raw -> DER, 256bit, Null r
|
||||
depends_on:PSA_WANT_ECC_SECP_R1_256
|
||||
ecdsa_raw_to_der:ECDSA_RAW_TO_DER:256:"00000000000000000000000000000000000000000000000000000000000000002222222222222222222222222222222222222222222222222222222222222222":"30440220111111111111111111111111111111111111111111111111111111111111111102202222222222222222222222222222222222222222222222222222222222222222":MBEDTLS_ERR_ASN1_INVALID_DATA
|
||||
|
||||
ECDSA Raw -> DER, 256bit, Null s
|
||||
depends_on:PSA_WANT_ECC_SECP_R1_256
|
||||
ecdsa_raw_to_der:ECDSA_RAW_TO_DER:256:"11111111111111111111111111111111111111111111111111111111111111110000000000000000000000000000000000000000000000000000000000000000":"30440220111111111111111111111111111111111111111111111111111111111111111102202222222222222222222222222222222222222222222222222222222222222222":MBEDTLS_ERR_ASN1_INVALID_DATA
|
||||
|
||||
ECDSA Raw -> DER, 256bit, r with MSb set
|
||||
depends_on:PSA_WANT_ECC_SECP_R1_256
|
||||
ecdsa_raw_to_der:ECDSA_RAW_TO_DER:256:"91111111111111111111111111111111111111111111111111111111111111112222222222222222222222222222222222222222222222222222222222222222":"3045022100911111111111111111111111111111111111111111111111111111111111111102202222222222222222222222222222222222222222222222222222222222222222":0
|
||||
|
||||
ECDSA Raw -> DER, 256bit, s with MSb set
|
||||
depends_on:PSA_WANT_ECC_SECP_R1_256
|
||||
ecdsa_raw_to_der:ECDSA_RAW_TO_DER:256:"1111111111111111111111111111111111111111111111111111111111111111A222222222222222222222222222222222222222222222222222222222222222":"304502201111111111111111111111111111111111111111111111111111111111111111022100A222222222222222222222222222222222222222222222222222222222222222":0
|
||||
|
||||
ECDSA DER -> Raw, 256bit, Success
|
||||
depends_on:PSA_WANT_ECC_SECP_R1_256
|
||||
ecdsa_raw_to_der:ECDSA_DER_TO_RAW:256:"30440220010101010101010101010101010101010101010101010101010101010101010102200202020202020202020202020202020202020202020202020202020202020202":"01010101010101010101010101010101010101010101010101010101010101010202020202020202020202020202020202020202020202020202020202020202":0
|
||||
ecdsa_raw_to_der:ECDSA_DER_TO_RAW:256:"30440220111111111111111111111111111111111111111111111111111111111111111102202222222222222222222222222222222222222222222222222222222222222222":"11111111111111111111111111111111111111111111111111111111111111112222222222222222222222222222222222222222222222222222222222222222":0
|
||||
|
||||
ECDSA DER -> Raw, 256bit, Raw buffer too small
|
||||
depends_on:PSA_WANT_ECC_SECP_R1_256
|
||||
ecdsa_raw_to_der:ECDSA_DER_TO_RAW:256:"30440220111111111111111111111111111111111111111111111111111111111111111102202222222222222222222222222222222222222222222222222222222222222222":"111111111111111111111111111111111111111111111111111111111111111122222222222222222222222222222222222222222222222222222222222222":MBEDTLS_ERR_ASN1_BUF_TOO_SMALL
|
||||
|
||||
ECDSA DER -> Raw, 256bit, Wrong sequence tag
|
||||
depends_on:PSA_WANT_ECC_SECP_R1_256
|
||||
ecdsa_raw_to_der:ECDSA_DER_TO_RAW:256:"40440220111111111111111111111111111111111111111111111111111111111111111102202222222222222222222222222222222222222222222222222222222222222222":"11111111111111111111111111111111111111111111111111111111111111112222222222222222222222222222222222222222222222222222222222222222":MBEDTLS_ERR_ASN1_UNEXPECTED_TAG
|
||||
|
||||
ECDSA DER -> Raw, 256bit, Invalid sequence length
|
||||
depends_on:PSA_WANT_ECC_SECP_R1_256
|
||||
ecdsa_raw_to_der:ECDSA_DER_TO_RAW:256:"30ff0220111111111111111111111111111111111111111111111111111111111111111102202222222222222222222222222222222222222222222222222222222222222222":"11111111111111111111111111111111111111111111111111111111111111112222222222222222222222222222222222222222222222222222222222222222":MBEDTLS_ERR_ASN1_INVALID_LENGTH
|
||||
|
||||
ECDSA DER -> Raw, 256bit, Wrong integer tag
|
||||
depends_on:PSA_WANT_ECC_SECP_R1_256
|
||||
ecdsa_raw_to_der:ECDSA_DER_TO_RAW:256:"30440120111111111111111111111111111111111111111111111111111111111111111102202222222222222222222222222222222222222222222222222222222222222222":"11111111111111111111111111111111111111111111111111111111111111112222222222222222222222222222222222222222222222222222222222222222":MBEDTLS_ERR_ASN1_UNEXPECTED_TAG
|
||||
|
||||
ECDSA DER -> Raw, 256bit, Wrong r integer length (too small)
|
||||
depends_on:PSA_WANT_ECC_SECP_R1_256
|
||||
ecdsa_raw_to_der:ECDSA_DER_TO_RAW:256:"30440219111111111111111111111111111111111111111111111111111111111111111102202222222222222222222222222222222222222222222222222222222222222222":"11111111111111111111111111111111111111111111111111111111111111112222222222222222222222222222222222222222222222222222222222222222":MBEDTLS_ERR_ASN1_UNEXPECTED_TAG
|
||||
|
||||
ECDSA DER -> Raw, 256bit, Wrong r integer length (too large)
|
||||
depends_on:PSA_WANT_ECC_SECP_R1_256
|
||||
ecdsa_raw_to_der:ECDSA_DER_TO_RAW:256:"30440221111111111111111111111111111111111111111111111111111111111111111102202222222222222222222222222222222222222222222222222222222222222222":"11111111111111111111111111111111111111111111111111111111111111112222222222222222222222222222222222222222222222222222222222222222":MBEDTLS_ERR_ASN1_UNEXPECTED_TAG
|
||||
|
||||
ECDSA DER -> Raw, 256bit, Wrong s integer length (too small)
|
||||
depends_on:PSA_WANT_ECC_SECP_R1_256
|
||||
ecdsa_raw_to_der:ECDSA_DER_TO_RAW:256:"30440220111111111111111111111111111111111111111111111111111111111111111102192222222222222222222222222222222222222222222222222222222222222222":"11111111111111111111111111111111111111111111111111111111111111112222222222222222222222222222222222222222222222222222222222222222":MBEDTLS_ERR_ASN1_LENGTH_MISMATCH
|
||||
|
||||
ECDSA DER -> Raw, 256bit, Wrong s integer length (too large)
|
||||
depends_on:PSA_WANT_ECC_SECP_R1_256
|
||||
ecdsa_raw_to_der:ECDSA_DER_TO_RAW:256:"30440220111111111111111111111111111111111111111111111111111111111111111102212222222222222222222222222222222222222222222222222222222222222222":"11111111111111111111111111111111111111111111111111111111111111112222222222222222222222222222222222222222222222222222222222222222":MBEDTLS_ERR_ASN1_OUT_OF_DATA
|
||||
|
||||
ECDSA Raw -> DER, 512bit, Success
|
||||
depends_on:PSA_WANT_ECC_BRAINPOOL_P_R1_512
|
||||
ecdsa_raw_to_der:ECDSA_RAW_TO_DER:512:"1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111122222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222":"308184024011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111024022222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222":0
|
||||
|
||||
ECDSA DER -> Raw, 512bit, Success
|
||||
depends_on:PSA_WANT_ECC_BRAINPOOL_P_R1_512
|
||||
ecdsa_raw_to_der:ECDSA_DER_TO_RAW:512:"308184024011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111024022222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222":"1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111122222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222":0
|
||||
|
||||
# Bit length is rounded up to 528 to be multiple of 8
|
||||
ECDSA Raw -> DER, 521bit, Success
|
||||
depends_on:PSA_WANT_ECC_SECP_R1_521
|
||||
ecdsa_raw_to_der:ECDSA_RAW_TO_DER:528:"111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222":"30818802421111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110242222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222":0
|
||||
|
||||
# Bit length is rounded up to 528 to be multiple of 8
|
||||
ECDSA DER -> Raw, 521bit, Success
|
||||
depends_on:PSA_WANT_ECC_SECP_R1_521
|
||||
ecdsa_raw_to_der:ECDSA_DER_TO_RAW:528:"30818802421111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110242222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222":"111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222":0
|
||||
|
Loading…
x
Reference in New Issue
Block a user