Hanno Becker 8d88a6e20d Check support for cipher in mbedtls_cipher_setup_psa()
mbedtls_cipher_setup_psa() should return
MBEDTLS_ERR_CIPHER_FEATURE_UNAVAILABLE when the requested
cipher is not supported by PSA, so that the caller can
try the original mbedtls_cipher_setup() instead.

The previous version of mbedtls_cipher_setup_psa(), however,
only attempted to translate the cipher mode (GCM, CCM, CBC,
ChaChaPoly, Stream), but didn't consider the underlying
cipher primitive. Hence, it wouldn't fail when attempting
to setup a cipher context for, say, 3DES-CBC, where CBC
is currently supported by PSA but 3DES isn't.

This commit adds a check to mbedtls_cipher_setup_psa()
for whether the requested cipher primitive is available
in the underlying PSA Crypto implementation, and fails
cleanly with MBEDTLS_ERR_CIPHER_FEATURE_UNAVAILABLE if
it is isn't.
2018-11-22 14:03:39 +00:00
..
2018-08-13 13:49:52 +03:00
2018-06-18 10:30:30 +02:00
2017-09-06 17:51:14 +03:00
2018-11-05 18:08:46 +02:00
2018-05-15 09:21:57 +01:00
2018-11-09 13:57:37 +00:00
2018-11-09 15:01:07 +00:00
2018-07-24 16:43:20 +01:00
2015-09-04 14:21:07 +02:00
2018-10-16 10:41:31 +02:00
2018-05-25 14:54:14 +01:00
2015-09-04 14:21:07 +02:00
2017-10-29 17:53:52 +02:00