Oopenvela-robot[BugFix]: adapt ECDH LEGACY api and non-LEGACY api
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
optee_os: optee adapts native mbedtls neededby:3566086 Signed-off-by: makejian <makejian@xiaomi.com> | 3 个月前 | |
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> | 5 年前 | |
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> | 5 年前 | |
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> | 5 年前 | |
libmbedtls: support mbedtls bignum functions Implement bignum function based on mbedtls. Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Edison Ai <edison.ai@arm.com> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> | 7 年前 | |
optee_os: optee adapts native mbedtls neededby:3566086 Signed-off-by: makejian <makejian@xiaomi.com> | 3 个月前 | |
libmbedtls: support symmetrical ciphers Adds support for symmetrical ciphers. The XTS mode is not supported in mbedTLS and will be dealt with later. Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Edison Ai <edison.ai@arm.com> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> | 7 年前 | |
libmbedtls: support symmetrical ciphers Adds support for symmetrical ciphers. The XTS mode is not supported in mbedTLS and will be dealt with later. Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Edison Ai <edison.ai@arm.com> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> | 7 年前 | |
libmbedtls: support symmetrical ciphers Adds support for symmetrical ciphers. The XTS mode is not supported in mbedTLS and will be dealt with later. Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Edison Ai <edison.ai@arm.com> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> | 7 年前 | |
libmbedtls: support symmetrical ciphers Adds support for symmetrical ciphers. The XTS mode is not supported in mbedTLS and will be dealt with later. Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Edison Ai <edison.ai@arm.com> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> | 7 年前 | |
optee_os: optee adapts native mbedtls neededby:3566086 Signed-off-by: makejian <makejian@xiaomi.com> | 3 个月前 | |
[BugFix]: adapt ECDH LEGACY api and non-LEGACY api [Desc]: as title Signed-off-by: pengyinjie <pengyinjie@xiaomi.com> | 3 个月前 | |
opteeos/libmbedtls: support alloc ctx about sha3 series needby:3853605 Signed-off-by: makejian <makejian@xiaomi.com> | 3 个月前 | |
opteeos/libmbedtls: support alloc ctx about sha3 series needby:3853605 Signed-off-by: makejian <makejian@xiaomi.com> | 3 个月前 | |
optee_os: optee adapts native mbedtls neededby:3566086 Signed-off-by: makejian <makejian@xiaomi.com> | 3 个月前 | |
optee_os: optee adapts native mbedtls neededby:3566086 Signed-off-by: makejian <makejian@xiaomi.com> | 3 个月前 | |
optee_os: optee adapts native mbedtls neededby:3566086 Signed-off-by: makejian <makejian@xiaomi.com> | 3 个月前 | |
core: Fix memory leaks in sm2 of Mbedtls lib When enable mbedtls in optee-os , xtest run twice will be fail. Memory leakage exists in three functions. 1. grp and mpi in sm2_mbedtls_pke_encrypt 2. grp in sm2_mbedtls_dsa_sign 3. grp in sm2_mbedtls_dsa_verify Fixes: c84eee6397bb ("core: add support for SM2 using MBed TLS") Reviewed-by: Jerome Forissier <jerome@forissier.org> Signed-off-by: lubing <lubing@eswin.com> | 5 年前 | |
core: add support for SM2 using MBed TLS The SM2 algorithms (PKE, KEP and DSA) are currently implemented using LibTomCrypt. They are automatically disabled when MBed TLS is selected as the core crypto library (that is, when CFG_CRYPTOLIB_NAME=mbedtls CFG_CRYPTOLIB_DIR=lib/libmbedtls). This commit removes this restriction by porting the relevant files (core/lib/libtomcrypt/sm2-{dsa,kep,pke}.c) over to the MBed TLS API in lib/libmbedtls/core. Signed-off-by: Jerome Forissier <jerome@forissier.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> | 5 年前 | |
core: add support for SM2 using MBed TLS The SM2 algorithms (PKE, KEP and DSA) are currently implemented using LibTomCrypt. They are automatically disabled when MBed TLS is selected as the core crypto library (that is, when CFG_CRYPTOLIB_NAME=mbedtls CFG_CRYPTOLIB_DIR=lib/libmbedtls). This commit removes this restriction by porting the relevant files (core/lib/libtomcrypt/sm2-{dsa,kep,pke}.c) over to the MBed TLS API in lib/libmbedtls/core. Signed-off-by: Jerome Forissier <jerome@forissier.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> | 5 年前 | |
core: Fix memory leaks in sm2 of Mbedtls lib When enable mbedtls in optee-os , xtest run twice will be fail. Memory leakage exists in three functions. 1. grp and mpi in sm2_mbedtls_pke_encrypt 2. grp in sm2_mbedtls_dsa_sign 3. grp in sm2_mbedtls_dsa_verify Fixes: c84eee6397bb ("core: add support for SM2 using MBed TLS") Reviewed-by: Jerome Forissier <jerome@forissier.org> Signed-off-by: lubing <lubing@eswin.com> | 5 年前 | |
core: add support for SM2 using MBed TLS The SM2 algorithms (PKE, KEP and DSA) are currently implemented using LibTomCrypt. They are automatically disabled when MBed TLS is selected as the core crypto library (that is, when CFG_CRYPTOLIB_NAME=mbedtls CFG_CRYPTOLIB_DIR=lib/libmbedtls). This commit removes this restriction by porting the relevant files (core/lib/libtomcrypt/sm2-{dsa,kep,pke}.c) over to the MBed TLS API in lib/libmbedtls/core. Signed-off-by: Jerome Forissier <jerome@forissier.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> | 5 年前 | |
core: libmbedtls: CMAC: remove code duplication Use common code for AES CMAC and 3DES CMAC Signed-off-by: Alexander Zakharov <uglym8@gmail.com> Reviewed-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> | 5 年前 | |
core: with mbedtls as crypto lib compile LTC too When mbedtls is configured as crypto lib compile libtomcrypt too in order to complement with missing algorithms. Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> | 7 年前 |