Suggested enhancement
I tried to use the PSA_ALG_XTS cipher with the psa library and ran into two issues:
-
I was not able to generate a PSA_KEY_TYPE_AES key for AES-256-XTS (bits = 512), psa_generate_key returns PSA_INVALID_ARGUMENT. It works with bits = 256 though i.e. AES-128-XTS.
-
Trying to encrypt with PSA_ALG_XTS and a 256 bit AES key returns PSA_NOT_SUPPORTED. And indeed the switch statement here doesn't seem to mention PSA_ALG_XTS or MBEDTLS_MODE_XTS.
Justification
Mbed TLS needs this because it already seems to have support for it.
Edit (mpg): we might need this for 4.0
Suggested enhancement
I tried to use the
PSA_ALG_XTScipher with the psa library and ran into two issues:I was not able to generate a
PSA_KEY_TYPE_AESkey forAES-256-XTS(bits = 512),psa_generate_keyreturnsPSA_INVALID_ARGUMENT. It works with bits = 256 though i.e.AES-128-XTS.Trying to encrypt with
PSA_ALG_XTSand a 256 bit AES key returnsPSA_NOT_SUPPORTED. And indeed theswitchstatement here doesn't seem to mentionPSA_ALG_XTSorMBEDTLS_MODE_XTS.Justification
Mbed TLS needs this because it already seems to have support for it.
Edit (mpg): we might need this for 4.0