# The following two manually crafted test cases are redundant with
# systematically generated test cases, but useful to have as an anchor when
# debugging changes to the test code or to the test case generation.

PSA storage read: AES-GCM+CTR
depends_on:PSA_WANT_KEY_TYPE_AES:PSA_WANT_ALG_GCM:PSA_WANT_ALG_CTR
key_storage_read:PSA_KEY_LIFETIME_PERSISTENT:PSA_KEY_TYPE_AES:128:PSA_KEY_USAGE_EXPORT | PSA_KEY_USAGE_ENCRYPT:PSA_ALG_GCM:PSA_ALG_CTR:"404142434445464748494a4b4c4d4e4f":"505341004b45590000000000010000000024800001010000000250050010c00410000000404142434445464748494a4b4c4d4e4f":1

PSA storage save: AES-GCM+CTR
depends_on:PSA_WANT_KEY_TYPE_AES
key_storage_save:PSA_KEY_LIFETIME_PERSISTENT:PSA_KEY_TYPE_AES:128:PSA_KEY_USAGE_EXPORT | PSA_KEY_USAGE_ENCRYPT:PSA_ALG_GCM:PSA_ALG_CTR:"404142434445464748494a4b4c4d4e4f":"505341004b45590000000000010000000024800001010000000250050010c00410000000404142434445464748494a4b4c4d4e4f"

PSA storage save: PASSWORD-JPAKE(SHA_256)
depends_on:PSA_WANT_ALG_JPAKE:PSA_WANT_ALG_SHA_256:CAN_EXERCISE_JPAKE
key_storage_save:0x0001:PSA_KEY_TYPE_PASSWORD:8:PSA_KEY_USAGE_DERIVE | PSA_KEY_USAGE_EXPORT:PSA_ALG_JPAKE(PSA_ALG_SHA_256):PSA_ALG_NONE:"4c":"505341004b455900000000000100000003120800014000000901000a00000000010000004c"

PSA storage read: PASSWORD-JPAKE(SHA_256)
depends_on:PSA_WANT_ALG_JPAKE:PSA_WANT_ALG_SHA_256:CAN_EXERCISE_JPAKE
key_storage_read:0x0001:PSA_KEY_TYPE_PASSWORD:8:PSA_KEY_USAGE_DERIVE | PSA_KEY_USAGE_EXPORT:PSA_ALG_JPAKE(PSA_ALG_SHA_256):PSA_ALG_NONE:"4c":"505341004b455900000000000100000003120800014000000901000a00000000010000004c":TEST_FLAG_EXERCISE

PSA storage save: PASSWORD-JPAKE(SHA_256) (non-exportable)
depends_on:PSA_WANT_ALG_JPAKE:PSA_WANT_ALG_SHA_256:CAN_EXERCISE_JPAKE
key_storage_save:0x0001:PSA_KEY_TYPE_PASSWORD:8:PSA_KEY_USAGE_DERIVE:PSA_ALG_JPAKE(PSA_ALG_SHA_256):PSA_ALG_NONE:"4c":"505341004b455900000000000100000003120800004000000901000a00000000010000004c"

PSA storage read: PASSWORD-JPAKE(SHA_256) (non-exportable)
depends_on:PSA_WANT_ALG_JPAKE:PSA_WANT_ALG_SHA_256:CAN_EXERCISE_JPAKE
key_storage_read:0x0001:PSA_KEY_TYPE_PASSWORD:8:PSA_KEY_USAGE_DERIVE:PSA_ALG_JPAKE(PSA_ALG_SHA_256):PSA_ALG_NONE:"4c":"505341004b455900000000000100000003120800004000000901000a00000000010000004c":TEST_FLAG_EXERCISE

# A key with the legacy encoding of JPAKE from Mbed TLS 3.x.
# Since TF-PSA-Crypto 1.0.0, we no longer officially support creating such keys.
# However, we do support reading persistent keys that were created under
# Mbed TLS 3.x.
PSA storage read: PASSWORD-JPAKE_BETA
depends_on:PSA_WANT_ALG_JPAKE:PSA_WANT_ALG_SHA_256:CAN_EXERCISE_JPAKE
key_storage_read:0x0001:PSA_KEY_TYPE_PASSWORD:8:PSA_KEY_USAGE_DERIVE | PSA_KEY_USAGE_EXPORT:PSA_ALG_JPAKE_BETA:PSA_ALG_NONE:"4c":"505341004b455900000000000100000003120800014000000001000a00000000010000004c":TEST_FLAG_EXERCISE

# Create a persistent key which is larger than MBEDTLS_PSA_STATIC_KEY_SLOT_BUFFER_SIZE
# so that when psa_get_key_attributes() tries to load it from the storage it will fail.
PSA storage read: key larger than MBEDTLS_PSA_STATIC_KEY_SLOT_BUFFER_SIZE
depends_on:PSA_WANT_KEY_TYPE_RAW_DATA:MBEDTLS_PSA_STATIC_KEY_SLOTS
key_storage_read:PSA_KEY_LIFETIME_PERSISTENT:PSA_KEY_TYPE_RAW_DATA:PSA_BYTES_TO_BITS(MBEDTLS_PSA_STATIC_KEY_SLOT_BUFFER_SIZE + 1):PSA_KEY_USAGE_EXPORT:PSA_ALG_NONE:PSA_ALG_NONE:"":"":TEST_FLAG_OVERSIZED_KEY
