| #
eaa924ef |
| 02-Dec-2024 |
Matej Zachar <zachar.matej@gmail.com> |
core: ltc: Ed25519 sign correctly returns TEE_ERROR_SHORT_BUFFER
Returns TEE_ERROR_SHORT_BUFFER when there is not enough space to hold signature so applications using the API can determine the requi
core: ltc: Ed25519 sign correctly returns TEE_ERROR_SHORT_BUFFER
Returns TEE_ERROR_SHORT_BUFFER when there is not enough space to hold signature so applications using the API can determine the required buffer size when supplying 0 sized signature buffer.
This is happening from PKCS#11 TA when client library uses 1. method from "5.2 Conventions for functions returning output in a variable-length buffer" defined in PKCS#11 v3.0 spec.
Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com> Signed-off-by: Matej Zachar <zachar.matej@gmail.com>
show more ...
|
| #
c4cab13e |
| 20-Feb-2023 |
Clement Faure <clement.faure@nxp.com> |
core: crypto: fix memory leak in Ed25519 support
The software implementation of ED25519 algorithm has a memory leak in the key and key pair allocation. Upon every public key allocation, a key pair i
core: crypto: fix memory leak in Ed25519 support
The software implementation of ED25519 algorithm has a memory leak in the key and key pair allocation. Upon every public key allocation, a key pair is allocated (public and private components). When freeing the public key, only the public component is freed. To reproduce the issue:
$ while xtest 4016; do :; done
Until the following error:
* regression_4016 Test TEE Internal API ED25519 sign/verify E/LD: copy_section_headers:1124 sys_copy_from_ta_bin E/TC:? 0 ldelf_init_with_ldelf:131 ldelf failed with res: 0xffff000c /usr/src/debug/optee-test/master.imx-r0/host/xtest/regression_4000.c:6062: xtest_teec_open_session(&session, &crypt_user_ta_uuid, ((void *)0), &ret_orig) has an unexpected value: 0xffff000c = TEEC_ERROR_OUT_OF_MEMORY, expected 0x0 = TEEC_SUCCESS regression_4016 FAILED
To fix the memory leak, a separate public key allocation function must be defined along a ED25519 public key structure.
Fixes: 0aaad418ac8b ("core: crypto: add Ed25519 support") Signed-off-by: Clement Faure <clement.faure@nxp.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| #
e4c24b7f |
| 17-Oct-2022 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: libtomcrypt: fix Ed25519 signature
Fixes signature size value not properly set from caller argument in crypto_acipher_ed25519_sign() and crypto_acipher_ed25519ctx_sign().
Prior this patch cou
core: libtomcrypt: fix Ed25519 signature
Fixes signature size value not properly set from caller argument in crypto_acipher_ed25519_sign() and crypto_acipher_ed25519ctx_sign().
Prior this patch could execution fail or not fail and possibly overflow caller passed buffer, depending on content previously loaded in siglen stack memory cell.
Fixes: a116848b51a2 ("core: libtomcrypt: add Ed25519 support") Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
a116848b |
| 12-Aug-2022 |
Valerii Chubar <valerii_chubar@epam.com> |
core: libtomcrypt: add Ed25519 support
Enable Ed25519 implementation of libtomcrypt and add the OP-TEE wrappers.
Signed-off-by: Valerii Chubar <valerii_chubar@epam.com> Signed-off-by: Sergiy Kibrik
core: libtomcrypt: add Ed25519 support
Enable Ed25519 implementation of libtomcrypt and add the OP-TEE wrappers.
Signed-off-by: Valerii Chubar <valerii_chubar@epam.com> Signed-off-by: Sergiy Kibrik <Sergiy_Kibrik@epam.com> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|