Searched hist:"9 c525fe4cdfe48d2394afe8440a56e7db36cc91f" (Results 1 – 4 of 4) sorted by relevance
| /optee_os/lib/libmbedtls/core/ |
| H A D | aes_ctr.c | 9c525fe4cdfe48d2394afe8440a56e7db36cc91f Wed Feb 03 14:56:37 UTC 2021 Jerome Forissier <jerome@forissier.org> libmbedtls: core: fix copy of AES context
The mbedtls_aes_context type cannot generally be copied with a simple assignment (dst = src) because it contains a pointer field ('rk') which needs to point to the 'buf' field. The current code is incorrect and causes errors in xtest 4003 on all platforms that do not have CFG_CRYPTO_WITH_CE=y. When CE is enabled, a different structure mbedtls_aes_context from aes_alt.h is used and the copy is correct.
Introduce a helper function: mbed_copy_mbedtls_aes_context() to perform the copy operation and use it when copying AES ECB, CBC and CTR contexts.
Signed-off-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
|
| H A D | aes_cbc.c | 9c525fe4cdfe48d2394afe8440a56e7db36cc91f Wed Feb 03 14:56:37 UTC 2021 Jerome Forissier <jerome@forissier.org> libmbedtls: core: fix copy of AES context
The mbedtls_aes_context type cannot generally be copied with a simple assignment (dst = src) because it contains a pointer field ('rk') which needs to point to the 'buf' field. The current code is incorrect and causes errors in xtest 4003 on all platforms that do not have CFG_CRYPTO_WITH_CE=y. When CE is enabled, a different structure mbedtls_aes_context from aes_alt.h is used and the copy is correct.
Introduce a helper function: mbed_copy_mbedtls_aes_context() to perform the copy operation and use it when copying AES ECB, CBC and CTR contexts.
Signed-off-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
|
| H A D | aes_ecb.c | 9c525fe4cdfe48d2394afe8440a56e7db36cc91f Wed Feb 03 14:56:37 UTC 2021 Jerome Forissier <jerome@forissier.org> libmbedtls: core: fix copy of AES context
The mbedtls_aes_context type cannot generally be copied with a simple assignment (dst = src) because it contains a pointer field ('rk') which needs to point to the 'buf' field. The current code is incorrect and causes errors in xtest 4003 on all platforms that do not have CFG_CRYPTO_WITH_CE=y. When CE is enabled, a different structure mbedtls_aes_context from aes_alt.h is used and the copy is correct.
Introduce a helper function: mbed_copy_mbedtls_aes_context() to perform the copy operation and use it when copying AES ECB, CBC and CTR contexts.
Signed-off-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
|
| H A D | mbed_helpers.h | 9c525fe4cdfe48d2394afe8440a56e7db36cc91f Wed Feb 03 14:56:37 UTC 2021 Jerome Forissier <jerome@forissier.org> libmbedtls: core: fix copy of AES context
The mbedtls_aes_context type cannot generally be copied with a simple assignment (dst = src) because it contains a pointer field ('rk') which needs to point to the 'buf' field. The current code is incorrect and causes errors in xtest 4003 on all platforms that do not have CFG_CRYPTO_WITH_CE=y. When CE is enabled, a different structure mbedtls_aes_context from aes_alt.h is used and the copy is correct.
Introduce a helper function: mbed_copy_mbedtls_aes_context() to perform the copy operation and use it when copying AES ECB, CBC and CTR contexts.
Signed-off-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
|