2018-08-22 16:36:36 +00:00
|
|
|
Hash: MD2
|
2018-09-17 11:58:36 +00:00
|
|
|
depends_on:MBEDTLS_MD2_C
|
2018-08-22 16:36:36 +00:00
|
|
|
hash_algorithm:PSA_ALG_MD2:16
|
|
|
|
|
|
|
|
Hash: MD4
|
2018-09-17 11:58:36 +00:00
|
|
|
depends_on:MBEDTLS_MD4_C
|
2018-08-22 16:36:36 +00:00
|
|
|
hash_algorithm:PSA_ALG_MD4:16
|
|
|
|
|
|
|
|
Hash: MD5
|
2018-09-17 11:58:36 +00:00
|
|
|
depends_on:MBEDTLS_MD5_C
|
2018-08-22 16:36:36 +00:00
|
|
|
hash_algorithm:PSA_ALG_MD5:16
|
|
|
|
|
|
|
|
Hash: RIPEMD160
|
2018-09-17 11:58:36 +00:00
|
|
|
depends_on:MBEDTLS_RIPEMD160_C
|
2018-08-22 16:36:36 +00:00
|
|
|
hash_algorithm:PSA_ALG_RIPEMD160:20
|
|
|
|
|
|
|
|
Hash: SHA-1
|
2018-09-17 11:58:36 +00:00
|
|
|
depends_on:MBEDTLS_SHA1_C
|
2018-08-22 16:36:36 +00:00
|
|
|
hash_algorithm:PSA_ALG_SHA_1:20
|
|
|
|
|
|
|
|
Hash: SHA-2 SHA-224
|
2018-09-17 11:58:36 +00:00
|
|
|
depends_on:MBEDTLS_SHA256_C
|
2018-08-22 16:36:36 +00:00
|
|
|
hash_algorithm:PSA_ALG_SHA_224:28
|
|
|
|
|
|
|
|
Hash: SHA-2 SHA-256
|
2018-09-17 11:58:36 +00:00
|
|
|
depends_on:MBEDTLS_SHA256_C
|
2018-08-22 16:36:36 +00:00
|
|
|
hash_algorithm:PSA_ALG_SHA_256:32
|
|
|
|
|
|
|
|
Hash: SHA-2 SHA-384
|
2018-09-17 11:58:36 +00:00
|
|
|
depends_on:MBEDTLS_SHA512_C
|
2018-08-22 16:36:36 +00:00
|
|
|
hash_algorithm:PSA_ALG_SHA_384:48
|
|
|
|
|
|
|
|
Hash: SHA-2 SHA-512
|
2018-09-17 11:58:36 +00:00
|
|
|
depends_on:MBEDTLS_SHA512_C
|
2018-08-22 16:36:36 +00:00
|
|
|
hash_algorithm:PSA_ALG_SHA_512:64
|
|
|
|
|
|
|
|
Hash: SHA-2 SHA-512/224
|
2018-09-17 11:58:36 +00:00
|
|
|
depends_on:MBEDTLS_SHA512_C:MBEDTLS_SHA512_256
|
2018-08-22 16:36:36 +00:00
|
|
|
hash_algorithm:PSA_ALG_SHA_512_224:28
|
|
|
|
|
|
|
|
Hash: SHA-2 SHA-512/256
|
2018-09-17 11:58:36 +00:00
|
|
|
depends_on:MBEDTLS_SHA512_C:MBEDTLS_SHA512_256
|
2018-08-22 16:36:36 +00:00
|
|
|
hash_algorithm:PSA_ALG_SHA_512_256:32
|
|
|
|
|
|
|
|
Hash: SHA-3 SHA3-224
|
2018-09-17 11:58:36 +00:00
|
|
|
depends_on:MBEDTLS_SHA3_C
|
2018-08-22 16:36:36 +00:00
|
|
|
hash_algorithm:PSA_ALG_SHA3_224:28
|
|
|
|
|
|
|
|
Hash: SHA-3 SHA3-256
|
2018-09-17 11:58:36 +00:00
|
|
|
depends_on:MBEDTLS_SHA3_C
|
2018-08-22 16:36:36 +00:00
|
|
|
hash_algorithm:PSA_ALG_SHA3_256:32
|
|
|
|
|
|
|
|
Hash: SHA-3 SHA3-384
|
2018-09-17 11:58:36 +00:00
|
|
|
depends_on:MBEDTLS_SHA3_C
|
2018-08-22 16:36:36 +00:00
|
|
|
hash_algorithm:PSA_ALG_SHA3_384:48
|
|
|
|
|
|
|
|
Hash: SHA-3 SHA3-512
|
2018-09-17 11:58:36 +00:00
|
|
|
depends_on:MBEDTLS_SHA3_C
|
2018-08-22 16:36:36 +00:00
|
|
|
hash_algorithm:PSA_ALG_SHA3_512:64
|
|
|
|
|
|
|
|
MAC: HMAC-MD2
|
2018-09-17 11:58:36 +00:00
|
|
|
depends_on:MBEDTLS_MD2_C
|
2018-09-17 12:13:26 +00:00
|
|
|
hmac_algorithm:PSA_ALG_HMAC( PSA_ALG_MD2 ):16:64
|
2018-08-22 16:36:36 +00:00
|
|
|
|
|
|
|
MAC: HMAC-MD4
|
2018-09-17 11:58:36 +00:00
|
|
|
depends_on:MBEDTLS_MD4_C
|
2018-09-17 12:13:26 +00:00
|
|
|
hmac_algorithm:PSA_ALG_HMAC( PSA_ALG_MD4 ):16:64
|
2018-08-22 16:36:36 +00:00
|
|
|
|
|
|
|
MAC: HMAC-MD5
|
2018-09-17 11:58:36 +00:00
|
|
|
depends_on:MBEDTLS_MD5_C
|
2018-09-17 12:13:26 +00:00
|
|
|
hmac_algorithm:PSA_ALG_HMAC( PSA_ALG_MD5 ):16:64
|
2018-08-22 16:36:36 +00:00
|
|
|
|
|
|
|
MAC: HMAC-RIPEMD160
|
2018-09-17 11:58:36 +00:00
|
|
|
depends_on:MBEDTLS_RIPEMD160_C
|
2018-09-17 12:13:26 +00:00
|
|
|
hmac_algorithm:PSA_ALG_HMAC( PSA_ALG_RIPEMD160 ):20:64
|
2018-08-22 16:36:36 +00:00
|
|
|
|
|
|
|
MAC: HMAC-SHA-1
|
2018-09-17 11:58:36 +00:00
|
|
|
depends_on:MBEDTLS_SHA1_C
|
2018-09-17 12:13:26 +00:00
|
|
|
hmac_algorithm:PSA_ALG_HMAC( PSA_ALG_SHA_1 ):20:64
|
2018-08-22 16:36:36 +00:00
|
|
|
|
|
|
|
MAC: HMAC-SHA-224
|
2018-09-17 11:58:36 +00:00
|
|
|
depends_on:MBEDTLS_SHA256_C
|
2018-09-17 12:13:26 +00:00
|
|
|
hmac_algorithm:PSA_ALG_HMAC( PSA_ALG_SHA_224 ):28:64
|
2018-08-22 16:36:36 +00:00
|
|
|
|
|
|
|
MAC: HMAC-SHA-256
|
2018-09-17 11:58:36 +00:00
|
|
|
depends_on:MBEDTLS_SHA256_C
|
2018-09-17 12:13:26 +00:00
|
|
|
hmac_algorithm:PSA_ALG_HMAC( PSA_ALG_SHA_256 ):32:64
|
2018-08-22 16:36:36 +00:00
|
|
|
|
|
|
|
MAC: HMAC-SHA-384
|
2018-09-17 11:58:36 +00:00
|
|
|
depends_on:MBEDTLS_SHA512_C
|
2018-09-17 12:13:26 +00:00
|
|
|
hmac_algorithm:PSA_ALG_HMAC( PSA_ALG_SHA_384 ):48:128
|
2018-08-22 16:36:36 +00:00
|
|
|
|
|
|
|
MAC: HMAC-SHA-512
|
2018-09-17 11:58:36 +00:00
|
|
|
depends_on:MBEDTLS_SHA512_C
|
2018-09-17 12:13:26 +00:00
|
|
|
hmac_algorithm:PSA_ALG_HMAC( PSA_ALG_SHA_512 ):64:128
|
2018-08-22 16:36:36 +00:00
|
|
|
|
|
|
|
MAC: HMAC-SHA-512/224
|
2018-09-17 11:58:36 +00:00
|
|
|
depends_on:MBEDTLS_SHA512_C:MBEDTLS_SHA512_256
|
2018-09-17 12:13:26 +00:00
|
|
|
hmac_algorithm:PSA_ALG_HMAC( PSA_ALG_SHA_512_224 ):28:128
|
2018-08-22 16:36:36 +00:00
|
|
|
|
|
|
|
MAC: HMAC-SHA-512/256
|
2018-09-17 11:58:36 +00:00
|
|
|
depends_on:MBEDTLS_SHA512_C:MBEDTLS_SHA512_256
|
2018-09-17 12:13:26 +00:00
|
|
|
hmac_algorithm:PSA_ALG_HMAC( PSA_ALG_SHA_512_256 ):32:128
|
2018-08-22 16:36:36 +00:00
|
|
|
|
|
|
|
MAC: HMAC-SHA3-224
|
2018-09-17 11:58:36 +00:00
|
|
|
depends_on:MBEDTLS_SHA3_C
|
2018-09-17 12:13:26 +00:00
|
|
|
hmac_algorithm:PSA_ALG_HMAC( PSA_ALG_SHA3_224 ):28:144
|
2018-08-22 16:36:36 +00:00
|
|
|
|
|
|
|
MAC: HMAC-SHA3-256
|
2018-09-17 11:58:36 +00:00
|
|
|
depends_on:MBEDTLS_SHA3_C
|
2018-09-17 12:13:26 +00:00
|
|
|
hmac_algorithm:PSA_ALG_HMAC( PSA_ALG_SHA3_256 ):32:136
|
2018-08-22 16:36:36 +00:00
|
|
|
|
|
|
|
MAC: HMAC-SHA3-384
|
2018-09-17 11:58:36 +00:00
|
|
|
depends_on:MBEDTLS_SHA3_C
|
2018-09-17 12:13:26 +00:00
|
|
|
hmac_algorithm:PSA_ALG_HMAC( PSA_ALG_SHA3_384 ):48:104
|
2018-08-22 16:36:36 +00:00
|
|
|
|
|
|
|
MAC: HMAC-SHA3-512
|
2018-09-17 11:58:36 +00:00
|
|
|
depends_on:MBEDTLS_SHA3_C
|
2018-09-17 12:13:26 +00:00
|
|
|
hmac_algorithm:PSA_ALG_HMAC( PSA_ALG_SHA3_512 ):64:72
|
2018-08-22 16:36:36 +00:00
|
|
|
|
|
|
|
MAC: CBC_MAC-AES-128
|
2018-09-17 11:58:36 +00:00
|
|
|
depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_C
|
2018-08-22 16:36:36 +00:00
|
|
|
mac_algorithm:PSA_ALG_CBC_MAC:ALG_IS_BLOCK_CIPHER_MAC:16:PSA_KEY_TYPE_AES:128
|
|
|
|
|
|
|
|
MAC: CBC_MAC-AES-192
|
2018-09-17 11:58:36 +00:00
|
|
|
depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_C
|
2018-08-22 16:36:36 +00:00
|
|
|
mac_algorithm:PSA_ALG_CBC_MAC:ALG_IS_BLOCK_CIPHER_MAC:16:PSA_KEY_TYPE_AES:192
|
|
|
|
|
|
|
|
MAC: CBC_MAC-AES-256
|
2018-09-17 11:58:36 +00:00
|
|
|
depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_C
|
2018-08-22 16:36:36 +00:00
|
|
|
mac_algorithm:PSA_ALG_CBC_MAC:ALG_IS_BLOCK_CIPHER_MAC:16:PSA_KEY_TYPE_AES:256
|
|
|
|
|
|
|
|
MAC: CBC_MAC-3DES
|
2018-09-17 11:58:36 +00:00
|
|
|
depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_C
|
2018-08-22 16:36:36 +00:00
|
|
|
mac_algorithm:PSA_ALG_CBC_MAC:ALG_IS_BLOCK_CIPHER_MAC:8:PSA_KEY_TYPE_DES:192
|
|
|
|
|
|
|
|
MAC: CMAC-AES-128
|
2018-09-17 11:58:36 +00:00
|
|
|
depends_on:MBEDTLS_AES_C:MBEDTLS_CMAC_C
|
2018-08-22 16:36:36 +00:00
|
|
|
mac_algorithm:PSA_ALG_CMAC:ALG_IS_BLOCK_CIPHER_MAC:16:PSA_KEY_TYPE_AES:128
|
|
|
|
|
|
|
|
MAC: CMAC-AES-192
|
2018-09-17 11:58:36 +00:00
|
|
|
depends_on:MBEDTLS_AES_C:MBEDTLS_CMAC_C
|
2018-08-22 16:36:36 +00:00
|
|
|
mac_algorithm:PSA_ALG_CMAC:ALG_IS_BLOCK_CIPHER_MAC:16:PSA_KEY_TYPE_AES:192
|
|
|
|
|
|
|
|
MAC: CMAC-AES-256
|
2018-09-17 11:58:36 +00:00
|
|
|
depends_on:MBEDTLS_AES_C:MBEDTLS_CMAC_C
|
2018-08-22 16:36:36 +00:00
|
|
|
mac_algorithm:PSA_ALG_CMAC:ALG_IS_BLOCK_CIPHER_MAC:16:PSA_KEY_TYPE_AES:256
|
|
|
|
|
|
|
|
MAC: CMAC-3DES
|
2018-09-17 11:58:36 +00:00
|
|
|
depends_on:MBEDTLS_DES_C:MBEDTLS_CMAC_C
|
2018-08-22 16:36:36 +00:00
|
|
|
mac_algorithm:PSA_ALG_CMAC:ALG_IS_BLOCK_CIPHER_MAC:8:PSA_KEY_TYPE_DES:192
|
|
|
|
|
|
|
|
Cipher: ARC4
|
2018-09-17 11:58:36 +00:00
|
|
|
depends_on:MBEDTLS_ARC4_C
|
2018-08-22 16:36:36 +00:00
|
|
|
cipher_algorithm:PSA_ALG_ARC4:ALG_IS_STREAM_CIPHER
|
|
|
|
|
2019-05-06 13:20:04 +00:00
|
|
|
Cipher: ChaCha20
|
|
|
|
depends_on:MBEDTLS_CHACHA_C
|
|
|
|
cipher_algorithm:PSA_ALG_CHACHA20:ALG_IS_STREAM_CIPHER
|
|
|
|
|
2018-08-22 16:36:36 +00:00
|
|
|
Cipher: CTR
|
2018-09-17 11:58:36 +00:00
|
|
|
depends_on:MBEDTLS_CIPHER_C:MBEDTLS_CIPHER_MODE_CTR
|
2018-08-22 16:36:36 +00:00
|
|
|
cipher_algorithm:PSA_ALG_CTR:ALG_IS_STREAM_CIPHER
|
|
|
|
|
|
|
|
Cipher: CFB
|
2018-09-17 11:58:36 +00:00
|
|
|
depends_on:MBEDTLS_CIPHER_C:MBEDTLS_CIPHER_MODE_CFB
|
2018-08-22 16:36:36 +00:00
|
|
|
cipher_algorithm:PSA_ALG_CFB:ALG_IS_STREAM_CIPHER
|
|
|
|
|
|
|
|
Cipher: OFB
|
2018-09-17 11:58:36 +00:00
|
|
|
depends_on:MBEDTLS_CIPHER_C:MBEDTLS_CIPHER_MODE_OFB
|
2018-08-22 16:36:36 +00:00
|
|
|
cipher_algorithm:PSA_ALG_OFB:ALG_IS_STREAM_CIPHER
|
|
|
|
|
|
|
|
Cipher: CBC-nopad
|
2018-09-17 11:58:36 +00:00
|
|
|
depends_on:MBEDTLS_CIPHER_C:MBEDTLS_CIPHER_MODE_CBC
|
2018-08-22 16:36:36 +00:00
|
|
|
cipher_algorithm:PSA_ALG_CBC_NO_PADDING:0
|
|
|
|
|
|
|
|
Cipher: CBC-PKCS#7
|
2018-09-17 11:58:36 +00:00
|
|
|
depends_on:MBEDTLS_CIPHER_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7
|
2018-08-22 16:36:36 +00:00
|
|
|
cipher_algorithm:PSA_ALG_CBC_PKCS7:0
|
|
|
|
|
|
|
|
Cipher: XTS
|
2018-09-17 11:58:36 +00:00
|
|
|
depends_on:MBEDTLS_CIPHER_C:MBEDTLS_CIPHER_MODE_XTS
|
2018-08-22 16:36:36 +00:00
|
|
|
cipher_algorithm:PSA_ALG_XTS:0
|
|
|
|
|
|
|
|
AEAD: CCM
|
2018-09-17 11:58:36 +00:00
|
|
|
depends_on:MBEDTLS_CCM_C
|
2019-05-06 13:10:16 +00:00
|
|
|
aead_algorithm:PSA_ALG_CCM:ALG_IS_AEAD_ON_BLOCK_CIPHER:16
|
2018-08-22 16:36:36 +00:00
|
|
|
|
|
|
|
AEAD: GCM
|
2018-09-17 11:58:36 +00:00
|
|
|
depends_on:MBEDTLS_GCM_C
|
2019-05-06 13:10:16 +00:00
|
|
|
aead_algorithm:PSA_ALG_GCM:ALG_IS_AEAD_ON_BLOCK_CIPHER:16
|
2018-08-22 16:36:36 +00:00
|
|
|
|
2019-05-06 13:20:04 +00:00
|
|
|
AEAD: ChaCha20_Poly1305
|
|
|
|
depends_on:MBEDTLS_CHACHAPOLY_C
|
|
|
|
aead_algorithm:PSA_ALG_CHACHA20_POLY1305:0:16
|
|
|
|
|
2018-08-22 16:36:36 +00:00
|
|
|
Asymmetric signature: RSA PKCS#1 v1.5 raw
|
2018-09-17 11:58:36 +00:00
|
|
|
depends_on:MBEDTLS_RSA_C:MBEDTLS_PKCS1_V15
|
2019-01-14 15:02:15 +00:00
|
|
|
asymmetric_signature_algorithm:PSA_ALG_RSA_PKCS1V15_SIGN_RAW:ALG_IS_RSA_PKCS1V15_SIGN | ALG_IS_HASH_AND_SIGN
|
2018-08-22 16:36:36 +00:00
|
|
|
|
|
|
|
Asymmetric signature: RSA PKCS#1 v1.5 SHA-256
|
2018-09-17 11:58:36 +00:00
|
|
|
depends_on:MBEDTLS_RSA_C:MBEDTLS_PKCS1_V15:MBEDTLS_SHA256_C
|
2019-01-14 15:02:15 +00:00
|
|
|
asymmetric_signature_algorithm:PSA_ALG_RSA_PKCS1V15_SIGN( PSA_ALG_SHA_256 ):ALG_IS_RSA_PKCS1V15_SIGN | ALG_IS_HASH_AND_SIGN
|
2018-08-22 16:36:36 +00:00
|
|
|
|
|
|
|
Asymmetric signature: RSA PSS SHA-256
|
2018-09-17 11:58:36 +00:00
|
|
|
depends_on:MBEDTLS_RSA_C:MBEDTLS_PKCS1_V21:MBEDTLS_SHA256_C
|
2019-01-14 15:02:15 +00:00
|
|
|
asymmetric_signature_algorithm:PSA_ALG_RSA_PSS( PSA_ALG_SHA_256 ):ALG_IS_RSA_PSS | ALG_IS_HASH_AND_SIGN
|
2018-08-22 16:36:36 +00:00
|
|
|
|
|
|
|
Asymmetric signature: SHA-256 + randomized DSA SHA-256 using SHA-256
|
2018-09-17 11:58:36 +00:00
|
|
|
depends_on:MBEDTLS_DSA_C:MBEDTLS_SHA256_C
|
2019-01-14 15:02:15 +00:00
|
|
|
asymmetric_signature_algorithm:PSA_ALG_DSA( PSA_ALG_SHA_256 ):ALG_IS_DSA | ALG_IS_RANDOMIZED_DSA | ALG_IS_HASH_AND_SIGN
|
2018-08-22 16:36:36 +00:00
|
|
|
|
Uniquify test case descriptions
Make check-test-cases.py pass.
Prior to this commit, there were many repeated test descriptions, but
none with the same test data and dependencies and comments, as checked
with the following command:
for x in tests/suites/*.data; do perl -00 -ne 'warn "$ARGV: $. = $seen{$_}\n" if $seen{$_}; $seen{$_}=$.' $x; done
Wherever a test suite contains multiple test cases with the exact same
description, add " [#1]", " [#2]", etc. to make the descriptions
unique. We don't currently use this particular arrangement of
punctuation, so all occurrences of " [#" were added by this script.
I used the following ad hoc code:
import sys
def fix_test_suite(data_file_name):
in_paragraph = False
total = {}
index = {}
lines = None
with open(data_file_name) as data_file:
lines = list(data_file.readlines())
for line in lines:
if line == '\n':
in_paragraph = False
continue
if line.startswith('#'):
continue
if not in_paragraph:
# This is a test case description line.
total[line] = total.get(line, 0) + 1
index[line] = 0
in_paragraph = True
with open(data_file_name, 'w') as data_file:
for line in lines:
if line in total and total[line] > 1:
index[line] += 1
line = '%s [#%d]\n' % (line[:-1], index[line])
data_file.write(line)
for data_file_name in sys.argv[1:]:
fix_test_suite(data_file_name)
2019-09-19 19:20:26 +00:00
|
|
|
Asymmetric signature: SHA-256 + deterministic DSA using SHA-256 [#1]
|
2018-09-17 11:58:36 +00:00
|
|
|
depends_on:MBEDTLS_DSA_C:MBEDTLS_SHA256_C:MBEDTLS_DSA_DETERMINISTIC
|
2019-01-14 15:02:15 +00:00
|
|
|
asymmetric_signature_algorithm:PSA_ALG_DETERMINISTIC_DSA( PSA_ALG_SHA_256 ):ALG_IS_DSA | ALG_IS_DETERMINISTIC_DSA | ALG_DSA_IS_DETERMINISTIC | ALG_IS_HASH_AND_SIGN
|
2018-08-22 16:36:36 +00:00
|
|
|
|
|
|
|
Asymmetric signature: randomized ECDSA (no hashing)
|
2018-09-17 11:58:36 +00:00
|
|
|
depends_on:MBEDTLS_ECDSA_C
|
2019-01-14 15:02:15 +00:00
|
|
|
asymmetric_signature_algorithm:PSA_ALG_ECDSA_ANY:ALG_IS_ECDSA | ALG_IS_RANDOMIZED_ECDSA | ALG_IS_HASH_AND_SIGN
|
2018-08-22 16:36:36 +00:00
|
|
|
|
|
|
|
Asymmetric signature: SHA-256 + randomized ECDSA
|
2018-09-17 11:58:36 +00:00
|
|
|
depends_on:MBEDTLS_ECDSA_C:MBEDTLS_SHA256_C
|
2019-01-14 15:02:15 +00:00
|
|
|
asymmetric_signature_algorithm:PSA_ALG_ECDSA( PSA_ALG_SHA_256 ):ALG_IS_ECDSA | ALG_IS_RANDOMIZED_ECDSA | ALG_IS_HASH_AND_SIGN
|
2018-08-22 16:36:36 +00:00
|
|
|
|
Uniquify test case descriptions
Make check-test-cases.py pass.
Prior to this commit, there were many repeated test descriptions, but
none with the same test data and dependencies and comments, as checked
with the following command:
for x in tests/suites/*.data; do perl -00 -ne 'warn "$ARGV: $. = $seen{$_}\n" if $seen{$_}; $seen{$_}=$.' $x; done
Wherever a test suite contains multiple test cases with the exact same
description, add " [#1]", " [#2]", etc. to make the descriptions
unique. We don't currently use this particular arrangement of
punctuation, so all occurrences of " [#" were added by this script.
I used the following ad hoc code:
import sys
def fix_test_suite(data_file_name):
in_paragraph = False
total = {}
index = {}
lines = None
with open(data_file_name) as data_file:
lines = list(data_file.readlines())
for line in lines:
if line == '\n':
in_paragraph = False
continue
if line.startswith('#'):
continue
if not in_paragraph:
# This is a test case description line.
total[line] = total.get(line, 0) + 1
index[line] = 0
in_paragraph = True
with open(data_file_name, 'w') as data_file:
for line in lines:
if line in total and total[line] > 1:
index[line] += 1
line = '%s [#%d]\n' % (line[:-1], index[line])
data_file.write(line)
for data_file_name in sys.argv[1:]:
fix_test_suite(data_file_name)
2019-09-19 19:20:26 +00:00
|
|
|
Asymmetric signature: SHA-256 + deterministic DSA using SHA-256 [#2]
|
2018-09-17 11:58:36 +00:00
|
|
|
depends_on:MBEDTLS_ECDSA_C:MBEDTLS_ECDSA_DETERMINISTIC:MBEDTLS_SHA256_C
|
2019-01-14 15:02:15 +00:00
|
|
|
asymmetric_signature_algorithm:PSA_ALG_DETERMINISTIC_ECDSA( PSA_ALG_SHA_256 ):ALG_IS_ECDSA | ALG_IS_DETERMINISTIC_ECDSA | ALG_ECDSA_IS_DETERMINISTIC | ALG_IS_HASH_AND_SIGN
|
2018-08-22 16:36:36 +00:00
|
|
|
|
2019-01-14 15:06:39 +00:00
|
|
|
Asymmetric signature: RSA PKCS#1 v1.5 with wildcard hash
|
|
|
|
depends_on:MBEDTLS_RSA_C:MBEDTLS_PKCS1_V15
|
|
|
|
asymmetric_signature_wildcard:PSA_ALG_RSA_PKCS1V15_SIGN( PSA_ALG_ANY_HASH ):ALG_IS_RSA_PKCS1V15_SIGN
|
|
|
|
|
|
|
|
Asymmetric signature: RSA PSS with wildcard hash
|
|
|
|
depends_on:MBEDTLS_RSA_C:MBEDTLS_PKCS1_V21
|
|
|
|
asymmetric_signature_wildcard:PSA_ALG_RSA_PSS( PSA_ALG_ANY_HASH ):ALG_IS_RSA_PSS
|
|
|
|
|
|
|
|
Asymmetric signature: randomized DSA with wildcard hash
|
|
|
|
depends_on:MBEDTLS_DSA_C
|
|
|
|
asymmetric_signature_wildcard:PSA_ALG_DSA( PSA_ALG_ANY_HASH ):ALG_IS_DSA | ALG_IS_RANDOMIZED_DSA
|
|
|
|
|
Uniquify test case descriptions
Make check-test-cases.py pass.
Prior to this commit, there were many repeated test descriptions, but
none with the same test data and dependencies and comments, as checked
with the following command:
for x in tests/suites/*.data; do perl -00 -ne 'warn "$ARGV: $. = $seen{$_}\n" if $seen{$_}; $seen{$_}=$.' $x; done
Wherever a test suite contains multiple test cases with the exact same
description, add " [#1]", " [#2]", etc. to make the descriptions
unique. We don't currently use this particular arrangement of
punctuation, so all occurrences of " [#" were added by this script.
I used the following ad hoc code:
import sys
def fix_test_suite(data_file_name):
in_paragraph = False
total = {}
index = {}
lines = None
with open(data_file_name) as data_file:
lines = list(data_file.readlines())
for line in lines:
if line == '\n':
in_paragraph = False
continue
if line.startswith('#'):
continue
if not in_paragraph:
# This is a test case description line.
total[line] = total.get(line, 0) + 1
index[line] = 0
in_paragraph = True
with open(data_file_name, 'w') as data_file:
for line in lines:
if line in total and total[line] > 1:
index[line] += 1
line = '%s [#%d]\n' % (line[:-1], index[line])
data_file.write(line)
for data_file_name in sys.argv[1:]:
fix_test_suite(data_file_name)
2019-09-19 19:20:26 +00:00
|
|
|
Asymmetric signature: deterministic DSA with wildcard hash [#1]
|
2019-01-14 15:06:39 +00:00
|
|
|
depends_on:MBEDTLS_DSA_C:MBEDTLS_DSA_DETERMINISTIC
|
|
|
|
asymmetric_signature_wildcard:PSA_ALG_DETERMINISTIC_DSA( PSA_ALG_ANY_HASH ):ALG_IS_DSA | ALG_IS_DETERMINISTIC_DSA | ALG_DSA_IS_DETERMINISTIC
|
|
|
|
|
|
|
|
Asymmetric signature: randomized ECDSA with wildcard hash
|
|
|
|
depends_on:MBEDTLS_ECDSA_C
|
|
|
|
asymmetric_signature_wildcard:PSA_ALG_ECDSA( PSA_ALG_ANY_HASH ):ALG_IS_ECDSA | ALG_IS_RANDOMIZED_ECDSA
|
|
|
|
|
Uniquify test case descriptions
Make check-test-cases.py pass.
Prior to this commit, there were many repeated test descriptions, but
none with the same test data and dependencies and comments, as checked
with the following command:
for x in tests/suites/*.data; do perl -00 -ne 'warn "$ARGV: $. = $seen{$_}\n" if $seen{$_}; $seen{$_}=$.' $x; done
Wherever a test suite contains multiple test cases with the exact same
description, add " [#1]", " [#2]", etc. to make the descriptions
unique. We don't currently use this particular arrangement of
punctuation, so all occurrences of " [#" were added by this script.
I used the following ad hoc code:
import sys
def fix_test_suite(data_file_name):
in_paragraph = False
total = {}
index = {}
lines = None
with open(data_file_name) as data_file:
lines = list(data_file.readlines())
for line in lines:
if line == '\n':
in_paragraph = False
continue
if line.startswith('#'):
continue
if not in_paragraph:
# This is a test case description line.
total[line] = total.get(line, 0) + 1
index[line] = 0
in_paragraph = True
with open(data_file_name, 'w') as data_file:
for line in lines:
if line in total and total[line] > 1:
index[line] += 1
line = '%s [#%d]\n' % (line[:-1], index[line])
data_file.write(line)
for data_file_name in sys.argv[1:]:
fix_test_suite(data_file_name)
2019-09-19 19:20:26 +00:00
|
|
|
Asymmetric signature: deterministic DSA with wildcard hash [#2]
|
2019-01-14 15:06:39 +00:00
|
|
|
depends_on:MBEDTLS_ECDSA_C:MBEDTLS_ECDSA_DETERMINISTIC
|
|
|
|
asymmetric_signature_wildcard:PSA_ALG_DETERMINISTIC_ECDSA( PSA_ALG_ANY_HASH ):ALG_IS_ECDSA | ALG_IS_DETERMINISTIC_ECDSA | ALG_ECDSA_IS_DETERMINISTIC
|
|
|
|
|
2018-08-22 16:36:36 +00:00
|
|
|
Asymmetric encryption: RSA PKCS#1 v1.5
|
2018-09-17 11:58:36 +00:00
|
|
|
depends_on:MBEDTLS_RSA_C:MBEDTLS_PKCS1_V15
|
2018-08-22 16:36:36 +00:00
|
|
|
asymmetric_encryption_algorithm:PSA_ALG_RSA_PKCS1V15_CRYPT:0
|
|
|
|
|
|
|
|
Asymmetric encryption: RSA OAEP using SHA-256
|
2018-09-17 11:58:36 +00:00
|
|
|
depends_on:MBEDTLS_RSA_C:MBEDTLS_PKCS1_V21:MBEDTLS_SHA256_C
|
2018-08-22 16:36:36 +00:00
|
|
|
asymmetric_encryption_algorithm:PSA_ALG_RSA_OAEP( PSA_ALG_SHA_256 ):ALG_IS_RSA_OAEP
|
|
|
|
|
|
|
|
Key derivation: HKDF using SHA-256
|
2018-09-17 11:58:36 +00:00
|
|
|
depends_on:MBEDTLS_SHA256_C
|
2018-08-22 16:36:36 +00:00
|
|
|
key_derivation_algorithm:PSA_ALG_HKDF( PSA_ALG_SHA_256 ):ALG_IS_HKDF
|
|
|
|
|
2019-11-21 19:10:13 +00:00
|
|
|
Key derivation: HKDF using SHA-384
|
|
|
|
depends_on:MBEDTLS_SHA512_C
|
|
|
|
key_derivation_algorithm:PSA_ALG_HKDF( PSA_ALG_SHA_384 ):ALG_IS_HKDF
|
|
|
|
|
|
|
|
Key derivation: TLS 1.2 PRF using SHA-256
|
|
|
|
depends_on:MBEDTLS_SHA256_C
|
|
|
|
key_derivation_algorithm:PSA_ALG_TLS12_PRF( PSA_ALG_SHA_256 ):ALG_IS_TLS12_PRF
|
|
|
|
|
|
|
|
Key derivation: TLS 1.2 PRF using SHA-384
|
|
|
|
depends_on:MBEDTLS_SHA512_C
|
|
|
|
key_derivation_algorithm:PSA_ALG_TLS12_PRF( PSA_ALG_SHA_384 ):ALG_IS_TLS12_PRF
|
|
|
|
|
|
|
|
Key derivation: TLS 1.2 PSK-to-MS using SHA-256
|
|
|
|
depends_on:MBEDTLS_SHA256_C
|
|
|
|
key_derivation_algorithm:PSA_ALG_TLS12_PSK_TO_MS( PSA_ALG_SHA_256 ):ALG_IS_TLS12_PSK_TO_MS
|
|
|
|
|
|
|
|
Key derivation: TLS 1.2 PSK-to-MS using SHA-384
|
|
|
|
depends_on:MBEDTLS_SHA512_C
|
|
|
|
key_derivation_algorithm:PSA_ALG_TLS12_PSK_TO_MS( PSA_ALG_SHA_384 ):ALG_IS_TLS12_PSK_TO_MS
|
|
|
|
|
2018-09-18 09:54:43 +00:00
|
|
|
Key agreement: FFDH, raw output
|
|
|
|
depends_on:MBEDTLS_DHM_C
|
2019-01-18 15:44:49 +00:00
|
|
|
key_agreement_algorithm:PSA_ALG_FFDH:ALG_IS_FFDH | ALG_IS_RAW_KEY_AGREEMENT:PSA_ALG_FFDH:PSA_ALG_CATEGORY_KEY_DERIVATION
|
2018-09-18 09:54:43 +00:00
|
|
|
|
|
|
|
Key agreement: FFDH, HKDF using SHA-256
|
|
|
|
depends_on:MBEDTLS_DHM_C
|
2019-01-18 15:44:49 +00:00
|
|
|
key_agreement_algorithm:PSA_ALG_KEY_AGREEMENT( PSA_ALG_FFDH, PSA_ALG_HKDF( PSA_ALG_SHA_256 ) ):ALG_IS_FFDH:PSA_ALG_FFDH:PSA_ALG_HKDF( PSA_ALG_SHA_256 )
|
2018-09-18 09:54:43 +00:00
|
|
|
|
2019-11-21 19:10:13 +00:00
|
|
|
Key agreement: FFDH, HKDF using SHA-384
|
|
|
|
depends_on:MBEDTLS_DHM_C
|
|
|
|
key_agreement_algorithm:PSA_ALG_KEY_AGREEMENT( PSA_ALG_FFDH, PSA_ALG_HKDF( PSA_ALG_SHA_384 ) ):ALG_IS_FFDH:PSA_ALG_FFDH:PSA_ALG_HKDF( PSA_ALG_SHA_384 )
|
|
|
|
|
2018-09-18 09:54:43 +00:00
|
|
|
Key agreement: ECDH, raw output
|
|
|
|
depends_on:MBEDTLS_ECDH_C
|
2019-01-18 15:44:49 +00:00
|
|
|
key_agreement_algorithm:PSA_ALG_ECDH:ALG_IS_ECDH | ALG_IS_RAW_KEY_AGREEMENT:PSA_ALG_ECDH:PSA_ALG_CATEGORY_KEY_DERIVATION
|
2018-09-18 09:54:43 +00:00
|
|
|
|
|
|
|
Key agreement: ECDH, HKDF using SHA-256
|
|
|
|
depends_on:MBEDTLS_ECDH_C
|
2019-01-18 15:44:49 +00:00
|
|
|
key_agreement_algorithm:PSA_ALG_KEY_AGREEMENT( PSA_ALG_ECDH, PSA_ALG_HKDF( PSA_ALG_SHA_256 ) ):ALG_IS_ECDH:PSA_ALG_ECDH:PSA_ALG_HKDF( PSA_ALG_SHA_256 )
|
2018-09-18 09:54:43 +00:00
|
|
|
|
2019-11-21 19:10:13 +00:00
|
|
|
Key agreement: ECDH, HKDF using SHA-384
|
|
|
|
depends_on:MBEDTLS_ECDH_C
|
|
|
|
key_agreement_algorithm:PSA_ALG_KEY_AGREEMENT( PSA_ALG_ECDH, PSA_ALG_HKDF( PSA_ALG_SHA_384 ) ):ALG_IS_ECDH:PSA_ALG_ECDH:PSA_ALG_HKDF( PSA_ALG_SHA_384 )
|
|
|
|
|
2018-08-22 16:43:09 +00:00
|
|
|
Key type: raw data
|
|
|
|
key_type:PSA_KEY_TYPE_RAW_DATA:KEY_TYPE_IS_UNSTRUCTURED
|
|
|
|
|
|
|
|
Key type: HMAC
|
|
|
|
key_type:PSA_KEY_TYPE_HMAC:KEY_TYPE_IS_UNSTRUCTURED
|
|
|
|
|
|
|
|
Key type: secret for key derivation
|
|
|
|
key_type:PSA_KEY_TYPE_DERIVE:KEY_TYPE_IS_UNSTRUCTURED
|
|
|
|
|
2019-12-02 16:26:44 +00:00
|
|
|
Block cipher key type: AES
|
2018-09-17 11:58:36 +00:00
|
|
|
depends_on:MBEDTLS_AES_C
|
2019-12-02 16:26:44 +00:00
|
|
|
block_cipher_key_type:PSA_KEY_TYPE_AES:16
|
2018-08-22 16:43:09 +00:00
|
|
|
|
2019-12-02 16:26:44 +00:00
|
|
|
Block cipher key type: DES
|
2018-09-17 11:58:36 +00:00
|
|
|
depends_on:MBEDTLS_DES_C
|
2019-12-02 16:26:44 +00:00
|
|
|
block_cipher_key_type:PSA_KEY_TYPE_DES:8
|
2018-08-22 16:43:09 +00:00
|
|
|
|
2019-12-02 16:26:44 +00:00
|
|
|
Block cipher key type: Camellia
|
2018-09-17 11:58:36 +00:00
|
|
|
depends_on:MBEDTLS_CAMELLIA_C
|
2019-12-02 16:26:44 +00:00
|
|
|
block_cipher_key_type:PSA_KEY_TYPE_CAMELLIA:16
|
2018-08-22 16:43:09 +00:00
|
|
|
|
2019-12-02 16:26:44 +00:00
|
|
|
Stream cipher key type: ARC4
|
2018-09-17 11:58:36 +00:00
|
|
|
depends_on:MBEDTLS_ARC4_C
|
2019-12-02 16:26:44 +00:00
|
|
|
stream_cipher_key_type:PSA_KEY_TYPE_ARC4
|
2018-08-22 16:43:09 +00:00
|
|
|
|
2019-12-02 16:26:44 +00:00
|
|
|
Stream cipher key type: ChaCha20
|
2019-05-06 13:20:04 +00:00
|
|
|
depends_on:MBEDTLS_CHACHA20_C
|
2019-12-02 16:26:44 +00:00
|
|
|
stream_cipher_key_type:PSA_KEY_TYPE_CHACHA20
|
2019-05-06 13:20:04 +00:00
|
|
|
|
2018-08-22 16:43:09 +00:00
|
|
|
Key type: RSA public key
|
2018-09-17 11:58:36 +00:00
|
|
|
depends_on:MBEDTLS_RSA_C
|
2018-08-22 16:43:09 +00:00
|
|
|
key_type:PSA_KEY_TYPE_RSA_PUBLIC_KEY:KEY_TYPE_IS_PUBLIC_KEY | KEY_TYPE_IS_RSA
|
|
|
|
|
|
|
|
Key type: RSA key pair
|
2018-09-17 11:58:36 +00:00
|
|
|
depends_on:MBEDTLS_RSA_C
|
2019-05-16 17:39:54 +00:00
|
|
|
key_type:PSA_KEY_TYPE_RSA_KEY_PAIR:KEY_TYPE_IS_KEY_PAIR | KEY_TYPE_IS_RSA
|
2018-08-22 16:43:09 +00:00
|
|
|
|
|
|
|
Key type: DSA public key
|
2018-09-17 11:58:36 +00:00
|
|
|
depends_on:MBEDTLS_DSA_C
|
2018-08-22 16:43:09 +00:00
|
|
|
key_type:PSA_KEY_TYPE_DSA_PUBLIC_KEY:KEY_TYPE_IS_PUBLIC_KEY | KEY_TYPE_IS_DSA
|
|
|
|
|
|
|
|
Key type: DSA key pair
|
2018-09-17 11:58:36 +00:00
|
|
|
depends_on:MBEDTLS_DSA_C
|
2019-05-16 17:39:54 +00:00
|
|
|
key_type:PSA_KEY_TYPE_DSA_KEY_PAIR:KEY_TYPE_IS_KEY_PAIR | KEY_TYPE_IS_DSA
|
2018-08-22 16:43:09 +00:00
|
|
|
|
2019-12-03 16:24:19 +00:00
|
|
|
ECC key family: SECP K1
|
2020-06-02 16:19:28 +00:00
|
|
|
ecc_key_family:PSA_ECC_FAMILY_SECP_K1
|
2019-12-03 16:24:19 +00:00
|
|
|
|
|
|
|
ECC key family: SECP R1
|
2020-06-02 16:19:28 +00:00
|
|
|
ecc_key_family:PSA_ECC_FAMILY_SECP_R1
|
2019-12-03 16:24:19 +00:00
|
|
|
|
|
|
|
ECC key family: SECP R2
|
2020-06-02 16:19:28 +00:00
|
|
|
ecc_key_family:PSA_ECC_FAMILY_SECP_R2
|
2019-12-03 16:24:19 +00:00
|
|
|
|
|
|
|
ECC key family: SECT K1
|
2020-06-02 16:19:28 +00:00
|
|
|
ecc_key_family:PSA_ECC_FAMILY_SECT_K1
|
2019-12-03 16:24:19 +00:00
|
|
|
|
|
|
|
ECC key family: SECT R1
|
2020-06-02 16:19:28 +00:00
|
|
|
ecc_key_family:PSA_ECC_FAMILY_SECT_R1
|
2019-12-03 16:24:19 +00:00
|
|
|
|
|
|
|
ECC key family: SECT R2
|
2020-06-02 16:19:28 +00:00
|
|
|
ecc_key_family:PSA_ECC_FAMILY_SECT_R2
|
2019-12-03 16:24:19 +00:00
|
|
|
|
|
|
|
ECC key family: Brainpool P R1
|
2020-06-02 16:19:28 +00:00
|
|
|
ecc_key_family:PSA_ECC_FAMILY_BRAINPOOL_P_R1
|
2019-12-03 16:24:19 +00:00
|
|
|
|
|
|
|
ECC key family: Montgomery (Curve25519, Curve448)
|
2020-06-02 16:19:28 +00:00
|
|
|
ecc_key_family:PSA_ECC_FAMILY_MONTGOMERY
|
2019-12-03 16:24:19 +00:00
|
|
|
|
|
|
|
DH group family: RFC 7919
|
|
|
|
dh_key_family:PSA_DH_GROUP_RFC7919
|