| 0f4b02e6 | 01-Jul-2019 |
Joakim Bech <joakim.bech@linaro.org> |
ltc: allow usage of rand_bn functions for ECC builds
To be able to backport [1] we have to enable the "rand_bn" functions.
Link: [1] https://github.com/libtom/libtomcrypt/commit/f0a51bbdbd50e03a439
ltc: allow usage of rand_bn functions for ECC builds
To be able to backport [1] we have to enable the "rand_bn" functions.
Link: [1] https://github.com/libtom/libtomcrypt/commit/f0a51bbdbd50e03a43914c9ee912c451b6ad82e5
Signed-off-by: Joakim Bech <joakim.bech@linaro.org> Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| 03121b2c | 27-Jun-2019 |
Sumit Garg <sumit.garg@linaro.org> |
core: crypto: libtomcrypt: fix LTC_CLEAN_STACK bug
LTC_CLEAN_STACK uses burn_stack() API that uses a recursive call which leads to approx. double the size of stack cleaned than expected on ARM64, be
core: crypto: libtomcrypt: fix LTC_CLEAN_STACK bug
LTC_CLEAN_STACK uses burn_stack() API that uses a recursive call which leads to approx. double the size of stack cleaned than expected on ARM64, because it consumes stack space in 32-byte chunks and assumes only buf is pushed onto the stack while ignoring any other data such as lr, fp, etc.. This causes stack overflow corrupting canaries in case we perform a SHA512 hash operation which utilizes maximum stack as compared to other libtomcrypt APIs. So get rid of this recursive call via using variable length array to clean stack.
Also, convert zeromem() API as a wrapper to call memzero_explicit().
Fixes: ad565116a0d7 ("core: crypto: libtomcrypt: enable LTC_CLEAN_STACK") Suggested-by: Daniel Thompson <daniel.thompson@linaro.org> Signed-off-by: Sumit Garg <sumit.garg@linaro.org> Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| 95d0db1e | 15-May-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: add system wide mempool_default
Adds system wide mempool_default for temporary large memory allocations.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Etienne Carriere
core: add system wide mempool_default
Adds system wide mempool_default for temporary large memory allocations.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| ad565116 | 25-Feb-2019 |
Jerome Forissier <jerome.forissier@linaro.org> |
core: crypto: libtomcrypt: enable LTC_CLEAN_STACK
Enables LTC_CLEAN_STACK so that LibTomCrypt will wipe key material and other sensitive data once no longer used.
Signed-off-by: Jerome Forissier <j
core: crypto: libtomcrypt: enable LTC_CLEAN_STACK
Enables LTC_CLEAN_STACK so that LibTomCrypt will wipe key material and other sensitive data once no longer used.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Suggested-by: Bastien Simondi <bsimondi@netflix.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Joakim Bech <joakim.bech@linaro.org>
show more ...
|
| 7513149e | 07-Feb-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: remove flags argument from tee_pager_alloc()
Removes the flags argument from tee_pager_alloc() since it's only used with TEE_MATTR_LOCKED. The exception is the bignum pool, but since it still
core: remove flags argument from tee_pager_alloc()
Removes the flags argument from tee_pager_alloc() since it's only used with TEE_MATTR_LOCKED. The exception is the bignum pool, but since it still releases all locked pages each time the pool becomes unused it's efficient usage of memory.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 4b5c81cc | 17-Apr-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: ltc: fix preallocation of MPI bignums
Fixes the preallocation to make room for the actual content also in crypto_bignum_allocate() by calling mbedtls_mpi_grow().
Acked-by: Etienne Carriere <e
core: ltc: fix preallocation of MPI bignums
Fixes the preallocation to make room for the actual content also in crypto_bignum_allocate() by calling mbedtls_mpi_grow().
Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| a70f4504 | 27-Mar-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: ltc: add tomcrypt_init() when not crypto lib
Adds tomcrypt_init() which is only available when LTC isn't configured as the crypto lib. tomcrypt_init() performs the same initialization as crypt
core: ltc: add tomcrypt_init() when not crypto lib
Adds tomcrypt_init() which is only available when LTC isn't configured as the crypto lib. tomcrypt_init() performs the same initialization as crypto_init() does when LTC is configured as the crypto lib.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| c7e27e83 | 28-Mar-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: tomcrypt.c: conditionally init for aciphers
Adds #if defined(_CFG_CORE_LTC_ACIPHER) around code only needed if LTC is configured for asymmetric ciphers (RSA, DSA, DH or ECC).
Acked-by: Jerome
core: tomcrypt.c: conditionally init for aciphers
Adds #if defined(_CFG_CORE_LTC_ACIPHER) around code only needed if LTC is configured for asymmetric ciphers (RSA, DSA, DH or ECC).
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| a1cbb728 | 27-Mar-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: LTC use only _CFG_CORE_LTC_ variables
LTC is only taking _CFG_CORE_LTC_ prefixed variables into account for configuration.
_CFG_CORE_LTC_ prefixed variables are assigned based on CFG_CRYPTO_
core: LTC use only _CFG_CORE_LTC_ variables
LTC is only taking _CFG_CORE_LTC_ prefixed variables into account for configuration.
_CFG_CORE_LTC_ prefixed variables are assigned based on CFG_CRYPTO_ and other variables for unchanged LTC configuration.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 5edbd86a | 26-Mar-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: ltc: tomcrypt.c: remove unused includes
Removes #include of files not needed any longer.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander
core: ltc: tomcrypt.c: remove unused includes
Removes #include of files not needed any longer.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 1f3b1115 | 26-Mar-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: ltc: rename prng_mpa to prng_crypto
Changes the name of the registered prng descriptor from "prng_mpa" to "prng_crypto" to better reflect the source of the prng.
Acked-by: Jerome Forissier <j
core: ltc: rename prng_mpa to prng_crypto
Changes the name of the registered prng descriptor from "prng_mpa" to "prng_crypto" to better reflect the source of the prng.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 78887e60 | 26-Mar-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: ltc: move remaining external files from src
Moves the remaining external source files from tomcrypt src directory.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens
core: ltc: move remaining external files from src
Moves the remaining external source files from tomcrypt src directory.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 25cc72e0 | 26-Mar-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: ltc: move remaining exported aes functions
Moves remaining exported aes functions to aes.c
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wikland
core: ltc: move remaining exported aes functions
Moves remaining exported aes functions to aes.c
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 0f1ae054 | 11-Mar-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: ltc: move remaining exported hash functions
Moves remaining exported hash functions to hash.c
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wikl
core: ltc: move remaining exported hash functions
Moves remaining exported hash functions to hash.c
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| eebeb1e2 | 11-Mar-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: ltc: move dh wrappers to separate file
Moves the DH wrappers in tee_ltc_provider.c to its own file, dh.c.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklande
core: ltc: move dh wrappers to separate file
Moves the DH wrappers in tee_ltc_provider.c to its own file, dh.c.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 89ed30d1 | 11-Mar-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: ltc: move rsa wrappers to separate file
Moves the RSA wrappers in tee_ltc_provider.c to its own file, rsa.c.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wikla
core: ltc: move rsa wrappers to separate file
Moves the RSA wrappers in tee_ltc_provider.c to its own file, rsa.c.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 6644e2f0 | 11-Mar-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: ltc: move ecc wrappers to separate file
Moves the ECC wrappers in tee_ltc_provider.c to its own file, ecc.c.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wikla
core: ltc: move ecc wrappers to separate file
Moves the ECC wrappers in tee_ltc_provider.c to its own file, ecc.c.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 1ac17bb5 | 11-Mar-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: ltc: move dsa wrappers to separate file
Moves the DSA wrappers in tee_ltc_provider.c to its own file, dsa.c.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wikla
core: ltc: move dsa wrappers to separate file
Moves the DSA wrappers in tee_ltc_provider.c to its own file, dsa.c.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| f7859906 | 27-Mar-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: ltc: dsa_import() use inlen instead of MAX_RSA_SIZE
Upstream has changed dsa_import() to use inlen instead of MAX_RSA_SIZE. This is needed when compiling LTC with DSA but without RSA support.
core: ltc: dsa_import() use inlen instead of MAX_RSA_SIZE
Upstream has changed dsa_import() to use inlen instead of MAX_RSA_SIZE. This is needed when compiling LTC with DSA but without RSA support.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| e7dbc357 | 02-Jul-2018 |
Summer Qin <summer.qin@arm.com> |
core: add encrypt key length in AES encrypt API
Adds size of expanded AES encryption key to crypto_aes_expand_enc_key() and crypto_aes_enc_block() to make the functions more safe to call.
Reviewed-
core: add encrypt key length in AES encrypt API
Adds size of expanded AES encryption key to crypto_aes_expand_enc_key() and crypto_aes_enc_block() to make the functions more safe to call.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Summer Qin <summer.qin@arm.com> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 17c68af4 | 22-Mar-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: crypto: move AES-CTS wrappers from libtomcrypt/ to crypto/
Moves the AES-CTS implementation from LTC wrapper to core/crypto.
The AES-CTS implementation can be overridden in a crypto library b
core: crypto: move AES-CTS wrappers from libtomcrypt/ to crypto/
Moves the AES-CTS implementation from LTC wrapper to core/crypto.
The AES-CTS implementation can be overridden in a crypto library by setting CFG_CRYPTO_CTS_FROM_CRYPTOLIB:=y
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| f1e9b21b | 08-Mar-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: crypto: introduce struct crypto_authenc_ops
Uses struct crypto_authenc_ops pointer in crypto context for authenc ciphers (AES-GCM and AES-CCM) as a glue layer instead of a switch(algo) in each
core: crypto: introduce struct crypto_authenc_ops
Uses struct crypto_authenc_ops pointer in crypto context for authenc ciphers (AES-GCM and AES-CCM) as a glue layer instead of a switch(algo) in each cryto_authenc_*() function.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 96098f01 | 08-Mar-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: crypto: introduce struct crypto_cipher_ops
Uses struct crypto_cipher_ops pointer in crypto context for ciphers as a glue layer instead of a switch(algo) in each crypto_cipher_*() function.
Re
core: crypto: introduce struct crypto_cipher_ops
Uses struct crypto_cipher_ops pointer in crypto context for ciphers as a glue layer instead of a switch(algo) in each crypto_cipher_*() function.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 5da36a24 | 08-Mar-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: crypto: introduce struct crypto_mac_ops
Uses struct crypto_mac_ops pointer in crypto context for MACs as a glue layer instead of a switch(algo) in each crypto_mac_*() function.
Moves CBC-MAC
core: crypto: introduce struct crypto_mac_ops
Uses struct crypto_mac_ops pointer in crypto context for MACs as a glue layer instead of a switch(algo) in each crypto_mac_*() function.
Moves CBC-MAC implementation from LTC wrapper to core/crypto.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 6648f482 | 08-Mar-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: crypto: introduce struct crypto_hash_ops
Uses struct crypto_hash_ops pointer in crypto context for hashes as a glue layer instead of a switch(algo) in each crypto_hash_*() function.
Reviewed-
core: crypto: introduce struct crypto_hash_ops
Uses struct crypto_hash_ops pointer in crypto context for hashes as a glue layer instead of a switch(algo) in each crypto_hash_*() function.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|