Commit Graph

45 Commits (2b4268ac16abaf5b0a9a81a0d694a9990e8a218d)

Author SHA1 Message Date
Rajkumar Kanagaraj d956116c36 Update greentea config, header reference 2020-07-20 07:33:52 -07:00
Rajkumar Kanagaraj aafdb8a0a3 Update the header reference from feature/storage to stroage 2020-07-10 14:59:53 +01:00
Chun-Chieh Li 405ee472a6 DeviceKey: Fix test code with key size change in generate_root_of_trust() 2020-05-04 09:11:42 +08:00
Seppo Takalo fc9e75bddc Allow Devicekey::generate_root_of_trust() to define key size.
By default, generate 16 byte keys, to be compatible with bootloader.
But allow user to generate 32 byte keys as well.
2020-04-20 14:40:26 +03:00
Teppo Järvelin c5d5d21f05 Added missing optimizations based on mbedtls/baremetal.h config 2020-03-31 14:21:45 +03:00
Martin Kojtal ae0ec86d59
Merge pull request #12667 from boomer41/fix-devicekey
Add check for return code in DeviceKey to avoid injecting invalid ROT
2020-03-23 19:59:10 +01:00
Stephan Brunner c6e8ae56db
Use correct return value. 2020-03-23 09:26:30 +01:00
Stephan Brunner f01bc974ef
Add check for return code in DeviceKey to avoid injecting invalid ROT 2020-03-23 06:57:50 +01:00
Kimmo Vaisanen 29affbccab Remove explicit include of mbedtls/config.h
Including mbedtls/config.h should not be done explicitely. This prevents using MBEDTLS_CONFIG_FILE macro.
Correct config file is automatically included by other mbedtls header files.
2020-02-27 09:45:22 +02:00
Tymoteusz Bloch 0e7a53cdb1 DeviceKey Root of Trust generation refactored.
It's no longer automatically and silently created.
2020-02-18 16:32:20 +01:00
Veijo Pesonen 060a1c6df7 NVStore: deprecated implementation removed 2019-12-03 15:36:31 +02:00
Seppo Takalo f0790cd7b2 Remove usage of Mbed TLS internal function from DeviceKey.
DeviceKey was using mbedtls_ssl_safer_memcmp() to compare result against
buffer of equal length, but zero content. This comparison makes no sense
as the entropy function is already returning proper error, if it fails.
2019-11-04 16:13:33 +02:00
Seppo Takalo 7f089ac074 Add empty unittest to generate zero baseline for untested files. 2019-11-04 16:12:36 +02:00
Chun-Chieh Li 1bb351f410 DeviceKey: Fix random key doesn't generate on MBEDTLS_ENTROPY_HARDWARE_ALT
Originally, when DEVICE_TRNG is defined, MBEDTLS_ENTROPY_HARDWARE_ALT will also be defined
accordingly to provide entropy source. This is fine for targets supporting TRNG. However, for
targets without TRNG, it is also possible to provide non-TRNG entropy source solution via the
define MBEDTLS_ENTROPY_HARDWARE_ALT. Related discussion can be found at:

https://github.com/ARMmbed/mbed-os/issues/11680
2019-10-22 17:06:12 +08:00
Hugues Kamba f0f408b2d8 Upstream PR #11073 review request changes (#11135)
* Modify Doxygen grouping of `drivers` Public/Internal APIs
* Correct classification of `mbed_events.h`
* Amend name of Doxygen group containing Device Key API
* Classify `CallChain.h` as public API and relocate file
* Remove Doxygen group from `equeue_platform.h` as it has no Doxygen compliant documentation
* Move USB target specific code back to `usb/device/targets`
2019-08-02 12:32:40 +01:00
Hugues Kamba bfa1b4dd84 Drivers/Events/RTOS Public and internal APIs cleanup (#10955)
Separate drivers, events, and rtos internal APIs from public APIs.

* Move source files to source subdirs
* Move internal headers to internal subdirs
* Add Doxygen comments for documenting internal and public APIs
* Remove source code from header files in order to remove include pre-processor directives
that included header files not directly used by said header files
* Explicitly include header files instead of implicit inclusions via third-party header files.

Release Notes

This will break user code that was using an internal API as the internal header files have been moved.
This will only break if the user was including the header file using a namespace (i.e #include "foo/bar.h" instead of #include "bar.h"
2019-08-02 12:23:47 +01:00
int_szyk ae6f8be146 Newline at the end of files 2019-08-01 08:44:58 +02:00
int_szyk 8b68a1ea58 Updated testcases 2019-07-31 10:46:38 +02:00
Yossi Levy f74d545a9d When reading ROT from KVStore the return ROT key size was ignored 2019-04-30 17:44:24 +03:00
Ron Eldor c94b5861e4 Add mbedtls platform setup and teardown to modules
Add calls to `mbedtls_platform_setup()`
and `mbedtls_platform_teardown()` to all modules and tests using Mbed TLS.
2019-02-18 11:43:32 +02:00
Yossi Levy d8d91c336a Adding MBEDTLS_ENTROPY_NV_SEED macro check in device key to allow key derivation when there is no TRNG but there is DRBG 2019-02-13 14:18:45 +02:00
Yossi Levy 2adf5db881 Adding a test if device key buffer has changed after calling to entropy func. this should enable as to eliminate some rare cases when the trng fail but still return success. 2019-01-10 10:18:44 +02:00
Stephan Brunner 9d8835741b
Fix security bug in DeviceKey 2019-01-07 18:04:33 +01:00
Alastair D'Silva 2617c5d55b Don't use define checks on DEVICE_FOO macros (mbed code)
The DEVICE_FOO macros are always defined (either 0 or 1).

This patch replaces any instances of a define check on a DEVICE_FOO
macro with value test instead.

Signed-off-by: Alastair D'Silva <alastair@d-silva.org>
2018-12-20 10:16:42 +11:00
Yossi Levy cdcf14ef79 Fixing Doxygen descriptions 2018-12-03 16:08:07 +02:00
David Saada e073fb69b2 Change Device key to work with KVStore 2018-11-24 17:43:42 +02:00
Martin Kojtal bfb8b723c3 device key: fix coding style 2018-11-07 08:56:32 +00:00
Deepika 9db31d299b Resolve build issues in test
mbed.h was added in test, via greentea and utest header files. 'mbed.h' is removed
from header files and required header file and namespace is added to CPP/C files
2018-10-16 11:50:16 -05:00
Amanda Butler 2da54cbb4a
Edit DeviceKey.h
Standardize tense across documents, and edit some existing text for phrasing.
2018-10-12 10:58:58 -05:00
deepikabhavnani 6031bc2fb1 Updated doxygen comments 2018-10-12 10:41:52 -05:00
Martin Kojtal f2cc21d038 device key: add memset include 2018-06-28 14:17:15 +01:00
Yossi Levy 607e2ec28f Fixing some coverity issues. 2018-06-03 17:34:52 +03:00
Amanda Butler 44dc8624d5
Enable DeviceKey class reference for Doxygen
Add conditional, so Doxygen renders properly.
2018-05-24 18:59:12 -05:00
Yossi Levy f33f4dab26 Increase tests timeout to 45 second 2018-05-23 11:29:46 +03:00
Yossi Levy 7401aea36a Remove reset tests. Small change to cmac claculation in get_derived_key 2018-05-22 21:35:33 +03:00
Yossi Levy b95c5f79c0 Replace UINT16_MAX with (uint16_t)-1 because of build failure 2018-05-21 18:47:39 +03:00
Yossi Levy 492dc9f1fc Remove uneeded variables 2018-05-16 14:48:30 +03:00
Yossi Levy d816937975 Remove unnecessary remark 2018-05-16 13:24:46 +03:00
Yossi Levy bf9b2cb6c7 Fix for generate_key_by_trng 2018-05-16 12:17:20 +03:00
Yossi Levy d88f4b3084 Stricter parameter check 2018-05-16 11:44:45 +03:00
Yossi Levy 1cb43fa020 Fixing trng_get_bytes return status 2018-05-14 20:01:47 +03:00
Yossi Levy 789eb04617 Changed trng loop condition 2018-05-14 14:07:57 +03:00
Yossi Levy 73d1c8df93 Fix of error macros 2018-05-14 13:52:20 +03:00
Yossi Levy 9df32d1f00 Fix README.md grammar mistakes 2018-05-09 11:22:15 +03:00
Yossi Levy 98e83c2262 Implementing KDF in Counter Mode for key derivation function. Moving device key to features 2018-05-08 16:59:05 +03:00