| 983d0211 | 14-Sep-2016 |
Matt Ma <matt.ma@linaro.org> |
ltc: remove test related source files
Test related source files have not been built into OP-TEE image all the time, so we remove them permanently.
Signed-off-by: Matt Ma <matt.ma@linaro.org> Review
ltc: remove test related source files
Test related source files have not been built into OP-TEE image all the time, so we remove them permanently.
Signed-off-by: Matt Ma <matt.ma@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| a50cb361 | 28-Jul-2016 |
Matt Ma <matt.ma@linaro.org> |
ltc: sync from official develop branch
All source files under src directory and header files under include directory have been synced, but have not added all macros newly added in official develop b
ltc: sync from official develop branch
All source files under src directory and header files under include directory have been synced, but have not added all macros newly added in official develop branch and the last synced SHA1 in official develop branch is 6ad52252688bb34f90b5e79da4830a927e87b81f
Signed-off-by: Matt Ma <matt.ma@linaro.org> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (HiKey) Reviewed-by: David Brown <david.brown@linaro.org>
show more ...
|
| 30d13250 | 06-Aug-2014 |
Steffen Jaeckel <s@jaeckel.eu> |
rsa_verify_hash: fix possible bleichenbacher signature attack
Fixes CVE-2016-6129
cherry-picked from: https://github.com/libtom/libtomcrypt/commit/5eb9743410ce4657e9d54fef26a2ee31a1b5dd09
Acked-by
rsa_verify_hash: fix possible bleichenbacher signature attack
Fixes CVE-2016-6129
cherry-picked from: https://github.com/libtom/libtomcrypt/commit/5eb9743410ce4657e9d54fef26a2ee31a1b5dd09
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU) Signed-off-by: Joakim Bech <joakim.bech@linaro.org>
show more ...
|
| 5f51bfda | 18-Aug-2016 |
Jens Wiklander <jens.wiklander@linaro.org> |
libfdt: undef sanitizer fix fdt_setprop()
Fixes undefined sanitizer problem in fdt_setprop().
The compiler (gcc 5.3) issues some runtime checks with -fsanitize=undefined which is triggered if for i
libfdt: undef sanitizer fix fdt_setprop()
Fixes undefined sanitizer problem in fdt_setprop().
The compiler (gcc 5.3) issues some runtime checks with -fsanitize=undefined which is triggered if for instance any of the pointers supplied to memcpy() is NULL as val can be in fdt_setprop() if there's no value.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMUv7) Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 9ff4f2cc | 05-Aug-2016 |
Jerome Forissier <jerome.forissier@linaro.org> |
arm32: AES using ARMv8-A cryptographic extensions
Add AES acceleration to LibTomCrypt in 32-bit mode using ARMv8 Cryptographic Extensions. Enabled when CFG_CRYPTO_AES_ARM32_CE=y.
The ARMv8 CE assem
arm32: AES using ARMv8-A cryptographic extensions
Add AES acceleration to LibTomCrypt in 32-bit mode using ARMv8 Cryptographic Extensions. Enabled when CFG_CRYPTO_AES_ARM32_CE=y.
The ARMv8 CE assembler code comes from the Linux kernel's arch/arm64/crypto/aes-ce-core.S (contributed by Ard Biesheuvel, Linaro) with minor updates:
- Removed the alignment hints in vld1/vst1 operations, for instance 'vld1.8 {q1}, [r1, :64]!' becomes 'vld1.8 {q1}, [r1]!'. This is required because the input and output buffers may not be 8-byte aligned. - ce_aes_ctr_encrypt(): do not increment the counter on the first block because the C wrapper already did. Do not increment the counter after the last block has been processed either, because the C wrapper will do it before calling ce_aes_ctr_encrypt() again. - aes_xts_decrypt(): drop the 'first' parameter which is not used (it would always be set to 1 by the caller).
Tested on HiKey with xtest [1] for functional tests and aes-perf [2] for speed. In the table below, a mode name followed by a '+' means accelerated with crypto extensions, while no '+' is with acceleration disabled (i.e., CFG_CRYPTO_AES_ARM32_CE=n).
Average encryption speed (MiB/s):
Size | Mode (KiB) | ECB CBC CTR XTS ECB+ CBC+ CTR+ XTS+ ------+-------------------------------------------------- 1 | 14.9 12.7 12.3 10.9 33.8 32.7 33.3 29.1 2 | 18.2 15.4 14.9 13.3 65.0 60.9 62.6 55.4 4 | 20.8 17.3 16.6 15.0 119.3 106.0 112.6 101.0 8 | 22.4 18.2 17.6 16.0 201.6 166.5 182.3 166.7 16 | 23.3 19.0 18.1 16.6 308.1 232.9 264.3 248.3 32 | 23.8 19.3 18.4 16.9 427.7 295.1 346.4 335.1 64 | 24.0 19.5 18.6 17.1 532.8 341.3 411.0 407.6 128 | 24.2 19.6 18.7 17.2 608.1 371.3 454.9 457.5 256 | 24.2 19.6 18.7 17.1 624.4 382.0 463.5 481.6 512 | 24.0 19.4 18.6 17.1 658.8 389.6 477.3 498.3
[1] https://github.com/OP-TEE/optee_test [2] https://github.com/linaro-swg/aes-perf.git
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: David Brown <david.brown@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 34777d46 | 04-Aug-2016 |
Jerome Forissier <jerome.forissier@linaro.org> |
arm64: libtomcrypt: rename AES CE files
aes_arm64_ce.c contains wrapper code for the assembly routines that implement AES using the ARMv8-A cryptographic extensions. It is currently used only in 64-
arm64: libtomcrypt: rename AES CE files
aes_arm64_ce.c contains wrapper code for the assembly routines that implement AES using the ARMv8-A cryptographic extensions. It is currently used only in 64-bit builds, but could be used for 32-bits as well. So, rename it to aes_armv8a_ce.c to better reflect its content and prepare for 32-bit support. Also rename the 64-bit assembly file (aes_modes_arm64_ce_a64.S -> aes_modes_armv8a_ce_a64.S) for consistency. Note: this naming scheme (xyz_armv8a_ce.c / xyz_armv8a_ce_a{32,64}.S) is already used for SHA1 and SHA2.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: David Brown <david.brown@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 51ac0e23 | 04-Aug-2016 |
Jerome Forissier <jerome.forissier@linaro.org> |
arm64: libtomcrypt: move inline assembly to .S file
In order to be able to re-use aes_arm64_ce.c for arm32, move all the inline assembly to aes_modes_arm64_ce_a64.S.
Signed-off-by: Jerome Forissier
arm64: libtomcrypt: move inline assembly to .S file
In order to be able to re-use aes_arm64_ce.c for arm32, move all the inline assembly to aes_modes_arm64_ce_a64.S.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: David Brown <david.brown@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 8c9d9445 | 23-Jul-2016 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: review assert and panic traces
Replace few "{ EMSG(...); panic(); }" with "panic(...);".
Disable file/line/func debug traces in panic() logs when CFG_TEE_CORE_DEBUG is disable.
Change __asse
core: review assert and panic traces
Replace few "{ EMSG(...); panic(); }" with "panic(...);".
Disable file/line/func debug traces in panic() logs when CFG_TEE_CORE_DEBUG is disable.
Change __assert_log() uses EMSG_RAW() to no pollute trace with __assert_log() internals (duplicated file/line/func traces).
Change assert() to use a low/high verbosity mode upon CFG_TEE_CORE_DEBUG as panic() does.
Change assert() to also trace the C function where assertion failed.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jen.wiklander@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Tested-by: Etienne Carriere <etienne.carriere@linaro.org> (QEMU)
show more ...
|
| d13278b8 | 23-Jul-2016 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: remove TEE_ASSERT()
TEE_ASSERT() can be confusing regarding assert() as assert() can be disabled through NDEBUG while TEE_ASSERT() can't. Instead one should explicitly implement "if (cond) { p
core: remove TEE_ASSERT()
TEE_ASSERT() can be confusing regarding assert() as assert() can be disabled through NDEBUG while TEE_ASSERT() can't. Instead one should explicitly implement "if (cond) { panic(); }"
This patch removes several inclusions on tee_common_unpg.h as it used to define TEE_ASSERT() that has been removed.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jen.wiklander@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Tested-by: Etienne Carriere <etienne.carriere@linaro.org> (QEMU)
show more ...
|
| 8ddf5a4e | 23-Jul-2016 |
Etienne Carriere <etienne.carriere@linaro.org> |
assert/panic: fix misuse of assert/panic
Currently implementation of macro assert() does not expand to a no-op when NDEBUG is defined. This will be done in a later change. Before that, fix misuses o
assert/panic: fix misuse of assert/panic
Currently implementation of macro assert() does not expand to a no-op when NDEBUG is defined. This will be done in a later change. Before that, fix misuses of assert() and TEE_ASSERT(): - Correct misplaced assert() that should panic() whatever NDEBUG. - Correct misplaced TEE_ASSERT() that should simply assert().
Also cleanup many inclusions of "assert.h" and few calls of assert().
Signed-off-by: Jens Wiklander <jen.wiklander@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Tested-by: Etienne Carriere <etienne.carriere@linaro.org> (QEMU)
show more ...
|
| 3b0115a7 | 02-Feb-2016 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: ltc: allocate memory pool unlocked
Allocate the LTC memory pool without the TEE_PAGER_AREA_LOCK to allow paging out data and make more physical pages available for paging.
Reviewed-by: Jerome
core: ltc: allocate memory pool unlocked
Allocate the LTC memory pool without the TEE_PAGER_AREA_LOCK to allow paging out data and make more physical pages available for paging.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: David Brown <david.brown@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 092a2b76 | 24-Jan-2016 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: pager: add support to page out r/w pages
Adds support in pager to page out read-write pages by encrypting them with AES-GCM to avoid leaking sensitive information. With this patch there are th
core: pager: add support to page out r/w pages
Adds support in pager to page out read-write pages by encrypting them with AES-GCM to avoid leaking sensitive information. With this patch there are three different ways of providing virtual memory: - read only, where each page is protected with a SHA-256 hash - read write locked, corresponding with previous zero initialized where mapped pages are removed from the usual pool of physical pages and only returned on explicit release - read write, *new* dirty read write pages triggers update to the storage using encryption (AES-GCM) before the page is reused.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: David Brown <david.brown@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 80d254e7 | 03-Feb-2016 |
Jens Wiklander <jens.wiklander@linaro.org> |
ltc: provide rng_generate()
Adds rng_generate() to the tee_crypt_provider interface to be used by pager and early initialization code where the complete crypto library might not be available.
Revie
ltc: provide rng_generate()
Adds rng_generate() to the tee_crypt_provider interface to be used by pager and early initialization code where the complete crypto library might not be available.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: David Brown <david.brown@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| c2f58080 | 27-Apr-2016 |
Jens Wiklander <jens.wiklander@linaro.org> |
ltc: bugfix find_prng()
When the prng_descriptor was changed to a pointer to descriptors in 7892cb1bcf8618990ed87458b898b37d6351428f "ltc: make prng_descriptor a pointer to descriptors" wasn't the f
ltc: bugfix find_prng()
When the prng_descriptor was changed to a pointer to descriptors in 7892cb1bcf8618990ed87458b898b37d6351428f "ltc: make prng_descriptor a pointer to descriptors" wasn't the find_prng() updated properly. This causes NULL pointer error if the PRNG name isn't found before the list is exhausted. This patch fixes this problem.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: David Brown <david.brown@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 05ffbba0 | 14-Jun-2016 |
Jens Wiklander <jens.wiklander@linaro.org> |
ltc: optionally compile with -Os
If CFG_CRYPTO_SIZE_OPTIMIZATION is y libtomcrypt is compiled with -Os regardless of the value of DEBUG.
Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Tested-by:
ltc: optionally compile with -Os
If CFG_CRYPTO_SIZE_OPTIMIZATION is y libtomcrypt is compiled with -Os regardless of the value of DEBUG.
Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU) Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| b908c675 | 25-May-2016 |
Jens Wiklander <jens.wiklander@linaro.org> |
Import libfdt v1.4.1
Imports libfdt code from https://git.kernel.org/cgit/utils/dtc/dtc.git tag "v1.4.1" commit 302fca9f4c283e1994cf0a5a9ce1cf43ca15e6d2.
API header files are moved to libfdt/includ
Import libfdt v1.4.1
Imports libfdt code from https://git.kernel.org/cgit/utils/dtc/dtc.git tag "v1.4.1" commit 302fca9f4c283e1994cf0a5a9ce1cf43ca15e6d2.
API header files are moved to libfdt/include.
Small changes to make fdt.h and libfdt.h c99 compiant.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Suggested-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| e2697b9b | 18-May-2016 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: ltc: dsa_sign() check size of hash
Checks size of supplied message to match the size of the digest prior to signing the message. Similar to what is done in rsassa_sign() except that the digest
core: ltc: dsa_sign() check size of hash
Checks size of supplied message to match the size of the digest prior to signing the message. Similar to what is done in rsassa_sign() except that the digest size must not exceed the modulus (q) size.
Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 26280f02 | 16-May-2016 |
Pascal Brand <pascal.brand@st.com> |
ltc: Fix CFG_CRYPTO=n CFG_CRYPTO_ECC=y
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org Signed-off-by: Pascal Brand <pascal.brand@st.com> |
| 6c841fe9 | 21-Mar-2016 |
Jerome Forissier <jerome.forissier@linaro.org> |
libtomcrypt: mpa_desc.c: check return status of allocations
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Pascal
libtomcrypt: mpa_desc.c: check return status of allocations
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Pascal Brand <pascal.brand@linaro.org>
show more ...
|
| d3295019 | 16-Mar-2016 |
Pascal Brand <pascal.brand@st.com> |
LTC: no definition of LTC_NO_FAST
LTC_NO_FAST resets LTC_FAST if the latter has been set. Indeed, LTC_FAST is never set on ARM architecture, so LTC_NO_FAST has no effect
Reviewed-by: Jerome Forissi
LTC: no definition of LTC_NO_FAST
LTC_NO_FAST resets LTC_FAST if the latter has been set. Indeed, LTC_FAST is never set on ARM architecture, so LTC_NO_FAST has no effect
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Pascal Brand <pascal.brand@st.com>
show more ...
|
| 49a4b3bb | 16-Mar-2016 |
Pascal Brand <pascal.brand@st.com> |
CFG_CRYPTO_SIZE_OPTIMIZATION?=y by default
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Pascal Brand <pascal.bra
CFG_CRYPTO_SIZE_OPTIMIZATION?=y by default
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Pascal Brand <pascal.brand@st.com>
show more ...
|
| 8a6a60a5 | 16-Mar-2016 |
Pascal Brand <pascal.brand@st.com> |
Rename libtomcrypt_with_optimize_size in CFG_CRYPTO_SIZE_OPTIMIZATION
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-b
Rename libtomcrypt_with_optimize_size in CFG_CRYPTO_SIZE_OPTIMIZATION
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Pascal Brand <pascal.brand@st.com>
show more ...
|
| 7823a7b5 | 11-Mar-2016 |
Pascal Brand <pascal.brand@st.com> |
Introduce CFG_CRYPTO_WITH_CE
CFG_CRYPTO_WITH_CE is inroduced in this patch, and fixes CFG_CRYPTO=n CFG_ARM64_core=n compilation issue on HiKey and Juno.
CFG_CRYPTO_WITH_CE indicates Crypto Engine a
Introduce CFG_CRYPTO_WITH_CE
CFG_CRYPTO_WITH_CE is inroduced in this patch, and fixes CFG_CRYPTO=n CFG_ARM64_core=n compilation issue on HiKey and Juno.
CFG_CRYPTO_WITH_CE indicates Crypto Engine acceleration can be used. CFG_CRYPTO_xxx_CE configuration variables are automatically set, according to other configuration variables (CFG_ARM32_core or CFG-ARM64_core, SHA and AES available).
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Pascal Brand <pascal.brand@st.com>
show more ...
|
| 8c1413f0 | 22-Jan-2016 |
Philippe PAGE <philippe.page@st.com> |
libtomcrypt: ASN1/DER fixes
- Synchronization with LibTomCrypt from origin/develop branch (commit 4a3b53dbee4bca1f151d9a64e9584a4c8152f0b1)
- Only "src/pk/asn1/der" directory has been synchroni
libtomcrypt: ASN1/DER fixes
- Synchronization with LibTomCrypt from origin/develop branch (commit 4a3b53dbee4bca1f151d9a64e9584a4c8152f0b1)
- Only "src/pk/asn1/der" directory has been synchronized
- Additional changes over synchronization: Several default case added in switch case condition when missing.
Signed-off-by: Philippe PAGE <philippe.page@st.com> Reviewed-by: Etienne CARRIERE <etienne.carriere@st.com> Tested-by: Etienne CARRIERE <etienne.carriere@st.com>
show more ...
|
| f17691b3 | 19-Jan-2016 |
Jens Wiklander <jens.wiklander@linaro.org> |
ltc: make cipher_descriptor a pointer to descriptors
Saves 3376 bytes by making cipher_descriptor an array of pointers to descriptor instead of an array of descriptors.
Reviewed-by: Jerome Forissie
ltc: make cipher_descriptor a pointer to descriptors
Saves 3376 bytes by making cipher_descriptor an array of pointers to descriptor instead of an array of descriptors.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (HiKey) Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU) Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|