2019-06-24 13:47:24 +02:00
|
|
|
Register SE driver: good
|
|
|
|
register_one:2:PSA_DRV_SE_HAL_VERSION:PSA_SUCCESS
|
2019-06-24 14:34:59 +02:00
|
|
|
|
|
|
|
# Run this test case a second time to verify that the library deinit
|
|
|
|
# unregistered the first driver.
|
|
|
|
Register SE driver: good, again
|
|
|
|
register_one:2:PSA_DRV_SE_HAL_VERSION:PSA_SUCCESS
|
|
|
|
|
2019-06-26 11:50:30 +02:00
|
|
|
Register SE driver: invalid lifetime (0)
|
|
|
|
register_one:0:PSA_DRV_SE_HAL_VERSION:PSA_ERROR_INVALID_ARGUMENT
|
|
|
|
|
2019-06-24 14:34:59 +02:00
|
|
|
Register SE driver: invalid lifetime (VOLATILE)
|
|
|
|
register_one:PSA_KEY_LIFETIME_VOLATILE:PSA_DRV_SE_HAL_VERSION:PSA_ERROR_INVALID_ARGUMENT
|
|
|
|
|
|
|
|
Register SE driver: invalid lifetime (PERSISTENT)
|
2019-06-26 11:50:30 +02:00
|
|
|
register_one:PSA_KEY_LIFETIME_PERSISTENT:PSA_DRV_SE_HAL_VERSION:PSA_ERROR_INVALID_ARGUMENT
|
2019-06-24 14:34:59 +02:00
|
|
|
|
2019-06-24 19:58:12 +02:00
|
|
|
Register SE driver: invalid version (ancient)
|
|
|
|
register_one:2:0x00000003:PSA_ERROR_NOT_SUPPORTED
|
|
|
|
|
|
|
|
Register SE driver: invalid version (future)
|
|
|
|
register_one:2:PSA_DRV_SE_HAL_VERSION + 1:PSA_ERROR_NOT_SUPPORTED
|
2019-06-24 14:34:59 +02:00
|
|
|
|
|
|
|
Register SE driver: already registered
|
|
|
|
register_twice:3
|
|
|
|
|
|
|
|
Register SE driver: maximum number of drivers
|
|
|
|
register_max:
|
2019-07-12 23:47:47 +02:00
|
|
|
|
2019-07-24 13:44:03 +02:00
|
|
|
SE key import-export (p_allocate allows all slots)
|
2019-07-23 16:13:14 +02:00
|
|
|
key_creation_import_export:0:0
|
2019-07-12 23:47:47 +02:00
|
|
|
|
2019-07-24 13:44:03 +02:00
|
|
|
SE key import-export (p_allocate allows 1 slot)
|
2019-07-23 16:13:14 +02:00
|
|
|
key_creation_import_export:ARRAY_LENGTH( ram_slots ) - 1:0
|
|
|
|
|
2019-07-24 13:44:03 +02:00
|
|
|
SE key import-export, check after restart (slot 0)
|
2019-07-23 16:13:14 +02:00
|
|
|
key_creation_import_export:0:1
|
|
|
|
|
2019-07-24 13:44:03 +02:00
|
|
|
SE key import-export, check after restart (slot 3)
|
2019-07-23 16:13:14 +02:00
|
|
|
key_creation_import_export:3:1
|
2019-07-24 13:45:02 +02:00
|
|
|
|
2019-08-05 14:55:50 +02:00
|
|
|
Key creation in a specific slot (0)
|
2019-08-05 14:59:15 +02:00
|
|
|
key_creation_in_chosen_slot:0:0:PSA_SUCCESS
|
2019-08-05 14:55:50 +02:00
|
|
|
|
|
|
|
Key creation in a specific slot (max)
|
2019-08-05 14:59:15 +02:00
|
|
|
key_creation_in_chosen_slot:ARRAY_LENGTH( ram_slots ) - 1:0:PSA_SUCCESS
|
|
|
|
|
|
|
|
Key creation in a specific slot (0, restart)
|
|
|
|
key_creation_in_chosen_slot:0:1:PSA_SUCCESS
|
|
|
|
|
|
|
|
Key creation in a specific slot (max, restart)
|
|
|
|
key_creation_in_chosen_slot:ARRAY_LENGTH( ram_slots ) - 1:1:PSA_SUCCESS
|
2019-08-05 14:55:50 +02:00
|
|
|
|
|
|
|
Key creation in a specific slot (too large)
|
2019-08-05 14:59:15 +02:00
|
|
|
key_creation_in_chosen_slot:ARRAY_LENGTH( ram_slots ):0:PSA_ERROR_INVALID_ARGUMENT
|
2019-08-05 14:55:50 +02:00
|
|
|
|
2019-08-06 18:36:36 +02:00
|
|
|
Key import smoke test: AES-CTR
|
|
|
|
import_key_smoke:PSA_KEY_TYPE_AES:PSA_ALG_CTR:"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
2019-07-24 13:45:36 +02:00
|
|
|
|
2019-08-06 18:36:36 +02:00
|
|
|
Key import smoke test: AES-CBC
|
|
|
|
import_key_smoke:PSA_KEY_TYPE_AES:PSA_ALG_CBC_NO_PADDING:"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
2019-07-24 13:45:36 +02:00
|
|
|
|
2019-08-06 18:36:36 +02:00
|
|
|
Key import smoke test: AES-CMAC
|
|
|
|
import_key_smoke:PSA_KEY_TYPE_AES:PSA_ALG_CMAC:"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
2019-07-24 13:45:36 +02:00
|
|
|
|
2019-08-06 18:36:36 +02:00
|
|
|
Key import smoke test: AES-CCM
|
|
|
|
import_key_smoke:PSA_KEY_TYPE_AES:PSA_ALG_CCM:"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
2019-07-24 13:45:36 +02:00
|
|
|
|
2019-08-06 18:36:36 +02:00
|
|
|
Key import smoke test: AES-GCM
|
|
|
|
import_key_smoke:PSA_KEY_TYPE_AES:PSA_ALG_GCM:"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
2019-07-24 13:45:36 +02:00
|
|
|
|
2019-08-06 18:36:36 +02:00
|
|
|
Key import smoke test: CAMELLIA-CTR
|
|
|
|
import_key_smoke:PSA_KEY_TYPE_CAMELLIA:PSA_ALG_CTR:"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
2019-07-24 13:45:36 +02:00
|
|
|
|
2019-08-06 18:36:36 +02:00
|
|
|
Key import smoke test: CAMELLIA-CBC
|
|
|
|
import_key_smoke:PSA_KEY_TYPE_CAMELLIA:PSA_ALG_CBC_NO_PADDING:"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
2019-07-24 13:45:36 +02:00
|
|
|
|
2019-08-06 18:36:36 +02:00
|
|
|
Key import smoke test: CAMELLIA-CMAC
|
|
|
|
import_key_smoke:PSA_KEY_TYPE_CAMELLIA:PSA_ALG_CMAC:"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
2019-07-24 13:45:36 +02:00
|
|
|
|
2019-08-06 18:36:36 +02:00
|
|
|
Key import smoke test: CAMELLIA-CCM
|
|
|
|
import_key_smoke:PSA_KEY_TYPE_CAMELLIA:PSA_ALG_GCM:"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
2019-07-24 13:45:36 +02:00
|
|
|
|
2019-08-06 18:36:36 +02:00
|
|
|
Key import smoke test: CAMELLIA-CCM
|
|
|
|
import_key_smoke:PSA_KEY_TYPE_CAMELLIA:PSA_ALG_GCM:"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
2019-07-24 13:45:36 +02:00
|
|
|
|
2019-08-06 18:36:36 +02:00
|
|
|
Key import smoke test: HMAC-SHA-256
|
|
|
|
import_key_smoke:PSA_KEY_TYPE_HMAC:PSA_ALG_HMAC( PSA_ALG_SHA_256 ):"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
2019-07-24 13:45:36 +02:00
|
|
|
|
2019-08-06 18:36:36 +02:00
|
|
|
Key import smoke test: HKDF-SHA-256
|
|
|
|
import_key_smoke:PSA_KEY_TYPE_DERIVE:PSA_ALG_HKDF( PSA_ALG_SHA_256 ):"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
2019-07-24 13:45:36 +02:00
|
|
|
|
2019-08-06 18:36:36 +02:00
|
|
|
Key import smoke test: RSA PKCS#1v1.5 signature
|
|
|
|
import_key_smoke:PSA_KEY_TYPE_RSA_KEY_PAIR:PSA_ALG_RSA_PKCS1V15_SIGN_RAW:"30818902818100af057d396ee84fb75fdbb5c2b13c7fe5a654aa8aa2470b541ee1feb0b12d25c79711531249e1129628042dbbb6c120d1443524ef4c0e6e1d8956eeb2077af12349ddeee54483bc06c2c61948cd02b202e796aebd94d3a7cbf859c2c1819c324cb82b9cd34ede263a2abffe4733f077869e8660f7d6834da53d690ef7985f6bc30203010001"
|
2019-07-24 13:45:36 +02:00
|
|
|
|
2019-08-06 18:36:36 +02:00
|
|
|
Key import smoke test: RSA PKCS#1v1.5 encryption
|
|
|
|
import_key_smoke:PSA_KEY_TYPE_RSA_KEY_PAIR:PSA_ALG_RSA_PKCS1V15_CRYPT:"30818902818100af057d396ee84fb75fdbb5c2b13c7fe5a654aa8aa2470b541ee1feb0b12d25c79711531249e1129628042dbbb6c120d1443524ef4c0e6e1d8956eeb2077af12349ddeee54483bc06c2c61948cd02b202e796aebd94d3a7cbf859c2c1819c324cb82b9cd34ede263a2abffe4733f077869e8660f7d6834da53d690ef7985f6bc30203010001"
|
2019-07-24 13:45:36 +02:00
|
|
|
|
2019-08-06 18:36:36 +02:00
|
|
|
Key import smoke test: RSA OAEP encryption
|
|
|
|
import_key_smoke:PSA_KEY_TYPE_RSA_KEY_PAIR:PSA_ALG_RSA_OAEP( PSA_ALG_SHA_256 ):"30818902818100af057d396ee84fb75fdbb5c2b13c7fe5a654aa8aa2470b541ee1feb0b12d25c79711531249e1129628042dbbb6c120d1443524ef4c0e6e1d8956eeb2077af12349ddeee54483bc06c2c61948cd02b202e796aebd94d3a7cbf859c2c1819c324cb82b9cd34ede263a2abffe4733f077869e8660f7d6834da53d690ef7985f6bc30203010001"
|
2019-07-24 13:45:36 +02:00
|
|
|
|
2019-08-06 18:36:36 +02:00
|
|
|
Key import smoke test: ECDSA secp256r1
|
|
|
|
import_key_smoke:PSA_KEY_TYPE_ECC_KEY_PAIR( PSA_ECC_CURVE_SECP256R1 ):PSA_ALG_ECDSA_ANY:"49c9a8c18c4b885638c431cf1df1c994131609b580d4fd43a0cab17db2f13eee"
|
2019-07-24 13:45:36 +02:00
|
|
|
|
2019-08-06 18:36:36 +02:00
|
|
|
Key import smoke test: ECDH secp256r1
|
|
|
|
import_key_smoke:PSA_KEY_TYPE_ECC_KEY_PAIR( PSA_ECC_CURVE_SECP256R1 ):PSA_ALG_ECDH:"49c9a8c18c4b885638c431cf1df1c994131609b580d4fd43a0cab17db2f13eee"
|
2019-07-24 13:45:36 +02:00
|
|
|
|
2019-08-06 18:36:36 +02:00
|
|
|
Key import smoke test: ECDH secp256r1 with HKDF
|
|
|
|
import_key_smoke:PSA_KEY_TYPE_ECC_KEY_PAIR( PSA_ECC_CURVE_SECP256R1 ):PSA_ALG_KEY_AGREEMENT( PSA_ALG_ECDH, PSA_ALG_HKDF( PSA_ALG_SHA_256 ) ):"49c9a8c18c4b885638c431cf1df1c994131609b580d4fd43a0cab17db2f13eee"
|
2019-07-24 13:45:36 +02:00
|
|
|
|
2019-07-24 13:45:02 +02:00
|
|
|
Generate key: not supported
|
|
|
|
generate_key_not_supported:PSA_KEY_TYPE_AES:128
|
2019-08-05 15:55:54 +02:00
|
|
|
|
2019-08-06 18:36:36 +02:00
|
|
|
Key generation smoke test: AES-128-CTR
|
|
|
|
generate_key_smoke:PSA_KEY_TYPE_AES:128:PSA_ALG_CTR
|
|
|
|
|
|
|
|
Key generation smoke test: AES-256-CTR
|
|
|
|
generate_key_smoke:PSA_KEY_TYPE_AES:128:PSA_ALG_CTR
|
|
|
|
|
|
|
|
Key generation smoke test: HMAC-SHA-256
|
|
|
|
generate_key_smoke:PSA_KEY_TYPE_HMAC:256:PSA_ALG_HMAC( PSA_ALG_SHA_256 )
|
|
|
|
|
2019-08-05 15:55:54 +02:00
|
|
|
Key registration: smoke test
|
2019-08-05 17:17:52 +02:00
|
|
|
register_key_smoke_test:MIN_DRIVER_LIFETIME:-1:PSA_SUCCESS
|
2019-08-05 15:55:54 +02:00
|
|
|
|
|
|
|
Key registration: invalid lifetime (volatile)
|
2019-08-05 17:17:52 +02:00
|
|
|
register_key_smoke_test:PSA_KEY_LIFETIME_VOLATILE:-1:PSA_ERROR_INVALID_ARGUMENT
|
2019-08-05 15:55:54 +02:00
|
|
|
|
|
|
|
Key registration: invalid lifetime (internal storage)
|
2019-08-05 17:17:52 +02:00
|
|
|
register_key_smoke_test:PSA_KEY_LIFETIME_PERSISTENT:-1:PSA_ERROR_INVALID_ARGUMENT
|
2019-08-05 15:55:54 +02:00
|
|
|
|
|
|
|
Key registration: invalid lifetime (no registered driver)
|
2019-08-05 17:17:52 +02:00
|
|
|
register_key_smoke_test:MIN_DRIVER_LIFETIME + 1:-1:PSA_ERROR_INVALID_ARGUMENT
|
|
|
|
|
|
|
|
Key registration: with driver validation (accepted)
|
|
|
|
register_key_smoke_test:MIN_DRIVER_LIFETIME:1:PSA_SUCCESS
|
|
|
|
|
|
|
|
Key registration: with driver validation (rejected)
|
|
|
|
register_key_smoke_test:MIN_DRIVER_LIFETIME:0:PSA_ERROR_NOT_PERMITTED
|
2019-08-07 21:05:24 +02:00
|
|
|
|
|
|
|
Import-sign-verify: sign in driver, ECDSA
|
|
|
|
depends_on:MBEDTLS_ECDSA_C:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED
|
|
|
|
sign_verify:1:PSA_KEY_TYPE_ECC_KEY_PAIR( PSA_ECC_CURVE_SECP256R1 ):PSA_ALG_ECDSA_ANY:0:"49c9a8c18c4b885638c431cf1df1c994131609b580d4fd43a0cab17db2f13eee":"54686973206973206e6f74206120686173682e"
|
|
|
|
|
|
|
|
Import-sign-verify: sign in software, ECDSA
|
|
|
|
depends_on:MBEDTLS_ECDSA_C:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED
|
|
|
|
sign_verify:0:PSA_KEY_TYPE_ECC_KEY_PAIR( PSA_ECC_CURVE_SECP256R1 ):PSA_ALG_ECDSA_ANY:0:"49c9a8c18c4b885638c431cf1df1c994131609b580d4fd43a0cab17db2f13eee":"54686973206973206e6f74206120686173682e"
|
|
|
|
|
|
|
|
Generate-sign-verify: sign in driver, ECDSA
|
|
|
|
depends_on:MBEDTLS_ECDSA_C:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED
|
|
|
|
sign_verify:1:PSA_KEY_TYPE_ECC_KEY_PAIR( PSA_ECC_CURVE_SECP256R1 ):PSA_ALG_ECDSA_ANY:256:"49c9a8c18c4b885638c431cf1df1c994131609b580d4fd43a0cab17db2f13eee":"54686973206973206e6f74206120686173682e"
|
|
|
|
|
|
|
|
Generate-sign-verify: sign in software, ECDSA
|
|
|
|
depends_on:MBEDTLS_ECDSA_C:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED
|
|
|
|
sign_verify:0:PSA_KEY_TYPE_ECC_KEY_PAIR( PSA_ECC_CURVE_SECP256R1 ):PSA_ALG_ECDSA_ANY:256:"49c9a8c18c4b885638c431cf1df1c994131609b580d4fd43a0cab17db2f13eee":"54686973206973206e6f74206120686173682e"
|