| ab35d7ad | 28-Apr-2015 |
Cedric Chaumont <cedric.chaumont@st.com> |
GP Internal Core API v1.1 : TEE configuration properties
Signed-off-by: Cedric Chaumont <cedric.chaumont@st.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Jerome Forissier
GP Internal Core API v1.1 : TEE configuration properties
Signed-off-by: Cedric Chaumont <cedric.chaumont@st.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Tested-by: Cedric Chaumont <cedric.chaumont@linaro.org> (STM boards) Tested-by: Cedric Chaumont <cedric.chaumont@linaro.org> (ARM Juno board)
show more ...
|
| 855171e1 | 04-May-2015 |
Jerome Forissier <jerome.forissier@linaro.org> |
crypto: initialize with service_init()
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@lin
crypto: initialize with service_init()
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Pascal Brand <pascal.brand@linaro.org>
show more ...
|
| 7583c59e | 27-Mar-2015 |
Cedric Chaumont <cedric.chaumont@st.com> |
GP Internal Core API v1.1 : add new functions, panicked IDs
- Add new functions (that will replace deprecated functions) TEE_GetObjectInfo1, TEE_RestrictObjectUsage1, TEE_CopyObjectAttributes1, TEE_
GP Internal Core API v1.1 : add new functions, panicked IDs
- Add new functions (that will replace deprecated functions) TEE_GetObjectInfo1, TEE_RestrictObjectUsage1, TEE_CopyObjectAttributes1, TEE_CloseAndDeletePersistentObject1
- Support of deprecated functions available (will be removed in future release). Note: TEE_ERROR_STORAGE_NOT_AVAILABLE case not implemented in OP-TEE core (e.g. media removal)
- Add panicked functions identifiers (debug purpose)
Signed-off-by: Cedric Chaumont <cedric.chaumont@st.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Tested-by: Cedric Chaumont <cedric.chaumont@linaro.org> (STM boards) Tested-by: Cedric Chaumont <cedric.chaumont@linaro.org> (ARM Juno board)
show more ...
|
| c9b91489 | 13-Mar-2015 |
Pascal Brand <pascal.brand@st.com> |
Fix RSA key pair generation when public exponent is provided
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Tested-by: Pascal Bra
Fix RSA key pair generation when public exponent is provided
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Tested-by: Pascal Brand <pascal.brand@linaro.org> (STM platform) Signed-off-by: Pascal Brand <pascal.brand@st.com>
show more ...
|
| 61ea19fd | 19-Mar-2015 |
Jens Wiklander <jens.wiklander@linaro.org> |
arm32: update types to be 64bit ready
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Pascal Brand <pascal.brand@linaro.org> |
| 851aa858 | 19-Mar-2015 |
Jens Wiklander <jens.wiklander@linaro.org> |
Fix some 64bit printf warnings
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Pascal Brand <pascal.brand@linaro.org> |
| 7f74c64a | 01-Apr-2015 |
Pascal Brand <pascal.brand@st.com> |
Update ABI-32bits and v1.1 uint32_t changes
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Tested-by: Pascal Brand <pascal.brand@linaro.org> (STM platform) Signed-off-by: Pascal Brand <pasc
Update ABI-32bits and v1.1 uint32_t changes
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Tested-by: Pascal Brand <pascal.brand@linaro.org> (STM platform) Signed-off-by: Pascal Brand <pascal.brand@st.com>
show more ...
|
| 8a1e7b89 | 30-Mar-2015 |
Jerome Forissier <jerome.forissier@linaro.org> |
Rename CFG_TRACE_LEVEL to TRACE_LEVEL
The trace level macro is not meant to be configured directly, it takes its value from CFG_TEE_CORE_LOG_LEVEL (when the TEE core is compiled) or from CFG_TEE_TA_
Rename CFG_TRACE_LEVEL to TRACE_LEVEL
The trace level macro is not meant to be configured directly, it takes its value from CFG_TEE_CORE_LOG_LEVEL (when the TEE core is compiled) or from CFG_TEE_TA_LOG_LEVEL (when user libraries are compiled). Therefore it should not have a CFG_ prefix.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 86ffc420 | 17-Mar-2015 |
SY Chiu <sy.chiu@linaro.org> |
Added new interface in PRNG Hal to inject entropy
- Added add_entropy interface in crypto_ops.prng, and expose new interface tee_prng_add_entropy() for platform vendor to inject entropy. - Injec
Added new interface in PRNG Hal to inject entropy
- Added add_entropy interface in crypto_ops.prng, and expose new interface tee_prng_add_entropy() for platform vendor to inject entropy. - Inject entropy using current timestamp every time when a session is opened or closed.
Signed-off-by: SY Chiu <sy.chiu@linaro.org> Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Tested-by: SY Chiu <sy.chiu@linaro.org> (FVP,QEMU) Tested-by: Pascal Brand <pascal.brand@linaro.org> (QEMU)
show more ...
|
| 177603c7 | 06-Mar-2015 |
Jens Wiklander <jens.wiklander@linaro.org> |
Define 32-bit ABI
Defines 32-bit ABI for various types passed by reference. Either by an explicit conversion to/from TEE_Param and TEE_Attribute or by changing size_t to uint32_t. Affected interface
Define 32-bit ABI
Defines 32-bit ABI for various types passed by reference. Either by an explicit conversion to/from TEE_Param and TEE_Attribute or by changing size_t to uint32_t. Affected interfaces are SVC interface and parameters passed to user TA inside tee_user_ta_enter().
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU, FVP) Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Reviewed-by: Joakim Bech <joakim.bech@linaro.org>
show more ...
|
| 60699957 | 09-Mar-2015 |
Pascal Brand <pascal.brand@st.com> |
Check of the identity of the TA invoking a TA operation
On the following operations invoke command close cancel the one that is at the origin of the operations is checked. It could be a
Check of the identity of the TA invoking a TA operation
On the following operations invoke command close cancel the one that is at the origin of the operations is checked. It could be a TA or the core. In case of a TA, this is checked that it is the same as the one that opened the session.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Tested-by: Pascal Brand <pascal.brand@linaro.org> (QEMU) Signed-off-by: Pascal Brand <pascal.brand@st.com>
show more ...
|
| 7018ae01 | 04-Mar-2015 |
SY Chiu <sy.chiu@linaro.org> |
Added Abstract Layer for PRNG
- Extended crypto_ops with a new prng_ops which handles prng operations. - Replace calls to get_rng_array() with crypto_ops.prng.read(), this enforces PRNG operations
Added Abstract Layer for PRNG
- Extended crypto_ops with a new prng_ops which handles prng operations. - Replace calls to get_rng_array() with crypto_ops.prng.read(), this enforces PRNG operations go through PRNG HAL, instead of invoking platform-dependent PRNG implementation directly. - Create a new mpa_set_random_generator() interface for mpa user to register a callback to generate random number, instead of expecting the user to provide a get_rng_array(). This enables libmpa uses crypto_ops.prng.read(). - Added a new configuration CFG_WITH_PRNG_SOFTWARE to toggle SW/HW-dependent PRNG implementation. - The SW PRNG implementation is supplied by backed cryto library(libtomcrypt). - Added a new SW PRNG 'Fortuna' to libtomcrypt. - Added a new SW PRNG 'RC4' to libtomcrypt, when Fortuna is not available due to AES and SHA256 not available, fallback to RC4. - Get rid of bad implemented SW PRNG in plat_vexpress(rng_support.c). - If CFG_WITH_PRNG_SOFTWARE is not enabled, the platform needs to supply hw_get_random_byte().
Signed-off-by: SY Chiu <sy.chiu@linaro.org> Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Tested-by: Pascal Brand <pascal.brand@linaro.org> (STM platform) Tested-by: SY Chiu <sy.chiu@linaro.org> (QEMU)
show more ...
|
| 1fd927eb | 11-Mar-2015 |
James Kung <james.kung@linaro.org> |
TEE Core File Operation Abstraction Layer
Tested-by: James Kung <james.kung@linaro.org> (QEMU platform) Signed-off-by: James Kung <james.kung@linaro.org> Reviewed-by: Jerome Forissier <jerome.foriss
TEE Core File Operation Abstraction Layer
Tested-by: James Kung <james.kung@linaro.org> (QEMU platform) Signed-off-by: James Kung <james.kung@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 7c876f12 | 02-Mar-2015 |
Pascal Brand <pascal.brand@st.com> |
CFG_TEE_CORE_TA_TRACE to disable TA traces
In order to disable TA traces, whatever the compilation options of the TAs, CFG_TEE_CORE_TA_TRACE can be defined to n
Reviewed-by: Jerome Forissier <jerom
CFG_TEE_CORE_TA_TRACE to disable TA traces
In order to disable TA traces, whatever the compilation options of the TAs, CFG_TEE_CORE_TA_TRACE can be defined to n
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Tested-by: Pascal Brand <pascal.brand@linaro.org> (STM platform) Signed-off-by: Pascal Brand <pascal.brand@st.com>
show more ...
|
| abd4a750 | 12-Feb-2015 |
Pascal Brand <pascal.brand@st.com> |
Persistent Object Sharing Rules adjust with respect to GP v1.1
This patch implements this part of the GlobalPlatform Internal Core API v1.1
Multiple handles may be opened on the same object simulta
Persistent Object Sharing Rules adjust with respect to GP v1.1
This patch implements this part of the GlobalPlatform Internal Core API v1.1
Multiple handles may be opened on the same object simultaneously using the functions TEE_OpenPersistentObject or TEE_CreatePersistentObject, but sharing MUST be explicitly allowed. More precisely, at any one time the following constraints apply: If more than one handle is opened on the same object, and if any of these object handles was opened with the flag TEE_DATA_FLAG_ACCESS_READ, then all the object handles MUST have been opened with the flag TEE_DATA_FLAG_SHARE_READ. There is a corresponding constraint with the flags TEE_DATA_FLAG_ACCESS_WRITE and TEE_DATA_FLAG_SHARE_WRITE. Accessing an object with write-meta rights is exclusive and can never be shared.
When one of the functions TEE_OpenPersistentObject or TEE_CreatePersistentObject is called and if opening the object would violate these constraints, then the function returns the return code TEE_ERROR_ACCESS_CONFLICT.
Fix #174
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Suggested-by: xlyu <jpmhesheit@gmail.com> Tested-by: Pascal Brand <pascal.brand@linaro.org> (QEMU) Signed-off-by: Pascal Brand <pascal.brand@st.com>
show more ...
|
| c2e1a053 | 19-Dec-2014 |
Jerome Forissier <jerome.forissier@linaro.org> |
crypto API: make sure TEE_Attribute parameters are readable
Fixes https://github.com/OP-TEE/optee_os/issues/161.
Services that take a TEE_Attribute array for input must check that the memory is rea
crypto API: make sure TEE_Attribute parameters are readable
Fixes https://github.com/OP-TEE/optee_os/issues/161.
Services that take a TEE_Attribute array for input must check that the memory is readable before using it. This is accomplished by check_attr_read_access(), which is either called directly by the system service or by tee_svc_cryp_check_attr(). Buffers pointed to by 'reference' attributes are also validated. Then, it is no longer necessary to check accessibility in other functions such as tee_svc_cryp_obj_store_attr_raw().
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 ...
|
| fa530828 | 03-Feb-2015 |
Pascal Brand <pascal.brand@st.com> |
Internal API extension on Cache Operations
Following extensions are introduced: - TEE_CacheClean() - TEE_CacheFlush() - TEE_CacheInvalidate()
Reviewed-by: Jerome Forissier <jerome.foris
Internal API extension on Cache Operations
Following extensions are introduced: - TEE_CacheClean() - TEE_CacheFlush() - TEE_CacheInvalidate()
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Tested-by: Pascal Brand <pascal.brand@linaro.org> (STM platform) Signed-off-by: Pascal Brand <pascal.brand@st.com>
show more ...
|
| db5f4ae4 | 21-Jan-2015 |
Joakim Bech <joakim.bech@linaro.org> |
Fix information leakage in key generator
When generating keys we are using the RNG available for the particular platform in use. For some reason we always or'ed a bit in the last byte, which means t
Fix information leakage in key generator
When generating keys we are using the RNG available for the particular platform in use. For some reason we always or'ed a bit in the last byte, which means that we leak information. Leaking information like this is considered as a security flaw and therefore we have removed the line setting this bit.
Fix #178
Signed-off-by: Joakim Bech <joakim.bech@linaro.org> Tested-by: Joakim Bech <joakim.bech@linaro.org> (QEMU) Reviewed-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 ...
|
| d9428c3c | 20-Jan-2015 |
SY Chiu <sy.chiu@linaro.org> |
SE API: Change configuration to be prefixed with CFG_*
Signed-off-by: SY Chiu <sy.chiu@linaro.org> Tested-by: SY Chiu <sy.chiu@linaro.org> (Modified QEMU + jcardsim) |
| e4d3a4a6 | 16-Dec-2014 |
SY Chiu <sy.chiu@linaro.org> |
SE API: hide private interfaces
- Split each headers into module.h and module_priv.h, move the methods that is only used internally by SE implementation to module_priv.h, and export module_priv.
SE API: hide private interfaces
- Split each headers into module.h and module_priv.h, move the methods that is only used internally by SE implementation to module_priv.h, and export module_priv.h to rest of TEE Core - Added new include path to se_api_self_tests.c for which needs to include private headers - Split aid.c and apdu.c from iso7816.c. Originally they have to be wriiten in the same file since they share some private data structures. Now, the private data structure can be shared via private headers. - Split reader.c from manager.c for the same reason above.
Signed-off-by: SY Chiu <sy.chiu@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Tested-by: SY Chiu <sy.chiu@linaro.org> (Modified QEMU + jcardsim)
show more ...
|
| 197d17e7 | 12-Dec-2014 |
SY Chiu <sy.chiu@linaro.org> |
SE API: implment lubutee and svc handler
- Implemented tee_se_service - Rename tee_se_reader_handle to tee_se_reader_proxy to avoid confuse with libutee - Implemented SE API(tee_internal_se_api.h)
SE API: implment lubutee and svc handler
- Implemented tee_se_service - Rename tee_se_reader_handle to tee_se_reader_proxy to avoid confuse with libutee - Implemented SE API(tee_internal_se_api.h) in libutee - Implemented svc handler for SE API - rename protocol.[ch] to iso7816.[ch] - prefix aid_* with "tee_se_" - add an option to enable/disable se_api_self_tests
Signed-off-by: SY Chiu <sy.chiu@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Tested-by: SY Chiu <sy.chiu@linaro.org> (Modified QEMU + jcardsim)
show more ...
|
| e022f121 | 25-Nov-2014 |
SY Chiu <sy.chiu@linaro.org> |
SE API: Session, Protocol and Channel implementation
- Implement Session which maintains the connection between TA and a specific SE Reader - Implement ISO7816 transport layer protocol, and Channe
SE API: Session, Protocol and Channel implementation
- Implement Session which maintains the connection between TA and a specific SE Reader - Implement ISO7816 transport layer protocol, and Channel management - Implement Utilities to handle AID(ISO7816-3) and APDU(ISO7816-4) - Brunch of self tests to velidate functionality of each module
Signed-off-by: SY Chiu <sy.chiu@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Tested-by: SY Chiu <sy.chiu@linaro.org> (Modified QEMU + jcardsim)
show more ...
|
| f362e777 | 25-Nov-2014 |
SY Chiu <sy.chiu@linaro.org> |
SE API: SE Manager and Reader implementation
- Introduce an interface for developers to write reader driver (core/include/tee/se/reader/interface.h) - A sample reader driver implementation: PC/SC
SE API: SE Manager and Reader implementation
- Introduce an interface for developers to write reader driver (core/include/tee/se/reader/interface.h) - A sample reader driver implementation: PC/SC passthru reader (core/tee/se/reader/passthru_reader) - Currently supported machine is qemu-virt (compile with --with-pcsc-passthru) - A selftest STA is included to test the functionality of SE Reader (core/arch/arm32/sta/se_api_self_tests.c) - To enable SE API, add "WITH_SE_API := y" in your platform config
Signed-off-by: SY Chiu <sy.chiu@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Tested-by: SY Chiu <sy.chiu@linaro.org> (Modified QEMU + jcardsim)
show more ...
|
| 0f2293b7 | 11-Dec-2014 |
Jerome Forissier <jerome.forissier@linaro.org> |
Add PKCS #5 v2.0 key derivation function 2 (PBKDF2)
This commit implements a crypto extension to support the key derivation function defined in section 5.2 of RFC 2898 (https://www.ietf.org/rfc/rfc2
Add PKCS #5 v2.0 key derivation function 2 (PBKDF2)
This commit implements a crypto extension to support the key derivation function defined in section 5.2 of RFC 2898 (https://www.ietf.org/rfc/rfc2898.txt), which is a re-publish of PKCS #5 v2.0. The underlying pseudorandom function is HMAC-SHA1, which is the default PRF specified in the RFC. It would be trivial to support the other HMAC functions already implemented in OP-TEE.
See documentation/extensions/crypto_pbkdf2.md for details.
Tested on PLATFORM=vexpress-qemu_virt with the test vectors from RFC 6070 (https://www.ietf.org/rfc/rfc6070.txt).
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Xiaoqiang Du <xiaoqiang.du@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Tested-by: Pascal Brand <pascal.brand@linaro.org> (STM platform)
show more ...
|
| cdb198a7 | 04-Dec-2014 |
Jerome Forissier <jerome.forissier@linaro.org> |
Add HMAC-based extract-and-expand key derivation function (HKDF)
HKDF (http://tools.ietf.org/html/rfc5869) is a key derivation algorithm. As per the RFC:
A key derivation function (KDF) is a bas
Add HMAC-based extract-and-expand key derivation function (HKDF)
HKDF (http://tools.ietf.org/html/rfc5869) is a key derivation algorithm. As per the RFC:
A key derivation function (KDF) is a basic and essential component of cryptographic systems. Its goal is to take some source of initial keying material and derive from it one or more cryptographically strong secret keys. [...] HKDF follows the "extract-then-expand" paradigm, where the KDF logically consists of two modules. [...] The goal of the "extract" stage is to "concentrate" the possibly dispersed entropy of the input keying material into a short, but cryptographically strong, pseudorandom key. [...] The second stage "expands" the pseudorandom key to the desired length; the number and lengths of the output keys depend on the specific cryptographic algorithms for which the keys are needed.
Since HKDF is not covered by the GlobalPlatform Internal API specification v1.0/v1.1, this commit introduces extensions to the specification. More specifically: it defines new algorithms, a new object type and new object attributes. This implementation supports all the usual hash functions (MD5, SHA-1, SHA-224, SHA-256, SHA-384, SHA-512) and may produce output keys of length up to 4096 bits (currently limited only by the maximum size allowed for an object of type TEE_TYPE_GENERIC_SECRET). Aside from minor updates to object manipulation functions to support the new data, the function TEE_DeriveKey() is mostly impacted.
The file documentation/extensions/crypto_hkdf.md contains the modifications to the GP Internal API v1.0 spec in order to support HKDF.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Xiaoqiang Du <xiaoqiang.du@linaro.org> Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Tested-by: Pascal Brand <pascal.brand@linaro.org> (STM platform) Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Joakim Bech <joakim.bech@linaro.org>
show more ...
|