Skip to content

Commit 060a1c6

Browse files
author
Veijo Pesonen
committed
NVStore: deprecated implementation removed
1 parent a8ee2d8 commit 060a1c6

File tree

16 files changed

+11
-2458
lines changed

16 files changed

+11
-2458
lines changed

TESTS/configs/baremetal.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@
3232
"events",
3333
"kv-global-api",
3434
"sd",
35-
"qspif",
36-
"nvstore"
35+
"qspif"
3736
],
3837
"target_overrides": {
3938
"*": {

TESTS/host_tests/trng_reset.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
This script is the host script for trng test sequence, it send the
1818
step signaling sequence and receive and transmit data to the device after
1919
reset if necesarry (default loading and storing mechanism while reseting the device
20-
is NVstore, in case NVstore isn't enabled we'll use current infrastructure,
20+
is KVStore, in case KVStore isn't enabled we'll use current infrastructure,
2121
for more details see main.cpp file)
2222
"""
2323

@@ -142,4 +142,4 @@ def test_steps(self):
142142
self.send_kv(MSG_KEY_EXIT, MSG_VALUE_DUMMY)
143143

144144
# The sequence is correct -- test passed.
145-
yield
145+
yield

TESTS/integration/COMMON/sample.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,6 @@ The [storage APIs](storage.html) include file system APIs, for file system opera
267267
<td><a href="littlefilesystem.html">LittleFileSystem</a></td>
268268
<td><a href="chainingblockdevice.html">ChainingBlockDevice</a></td>
269269
<td><a href="../apis/dataflashblockdevice.html">DataFlashBlockDevice</a></td>
270-
<td><a href="nvstore.html">NVStore</a></td>
271270
</tr>
272271
<tr>
273272
<td><a href="static-global-api.html">Static Global API</a></td>
@@ -3115,4 +3114,4 @@ An application can extend capabilities of `SimpleMessageParser` by adding new re
31153114

31163115
- [MessageParser](messageparser.html) API reference.
31173116
- [MessageBuilder](messagebuilder.html) API reference.
3118-
- [NFC architecture](../reference/nfc-technology.html).
3117+
- [NFC architecture](../reference/nfc-technology.html).

UNITTESTS/empty_baseline/unittest.cmake

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ set(unittest-sources
3131
../features/storage/kvstore/conf/kv_config.cpp
3232
../features/storage/kvstore/filesystemstore/FileSystemStore.cpp
3333
../features/storage/system_storage/SystemStorage.cpp
34-
../features/storage/nvstore/source/nvstore.cpp
3534
../features/storage/blockdevice/ChainingBlockDevice.cpp
3635
../features/storage/blockdevice/ReadOnlyBlockDevice.cpp
3736
../features/storage/blockdevice/SlicingBlockDevice.cpp

components/TARGET_PSA/TARGET_TFM/COMPONENT_SPE/mbed_lib.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "tfm-s",
3-
"macros": ["MBED_FAULT_HANDLER_DISABLED", "BYPASS_NVSTORE_CHECK=1"],
3+
"macros": ["MBED_FAULT_HANDLER_DISABLED"],
44
"config": {
55
"max_ns_thread_count": {
66
"help": "maximum allowed number of non-secure threads",

docs/design-documents/features/storage/BlockDevices/get_type_method.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ Below there is a list of some examples to explain the motivation and the need fo
2020
examples:
2121
- TDBStore needs to know if there are flash characteristics for the block device and if there aren�t it should use
2222
FlashSimBlockDevice to simulate a flash BlockDevice.
23-
- TDBStore should not co-exists with NVStore, but this is true only if TDBStore is running on internal memory. Therefore if TDBStore running on
24-
internal memory and NVStore is also there an error should be raised.
2523
- When creating a file system you would prefer working with FAT on top of SD while LITTLEFS on top of any flash block device.
2624
Those preference in favor of better performance.
2725

features/device_key/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
11
## DeviceKey
22

3-
DeviceKey is a mechanism that implements key derivation from a root of trust key. The DeviceKey mechanism generates symmetric keys that security features need. You can use these keys for encryption, authentication and more. The DeviceKey API allows key derivation without exposing the actual root of trust, to reduce the possibility of accidental exposure of the root of trust outside the device.
3+
DeviceKey is a mechanism that implements key derivation from a Root of Trust(RoT) key. The DeviceKey mechanism generates symmetric keys that security features need. You can use these keys for encryption, authentication and more. The DeviceKey API allows key derivation without exposing the actual RoT, to reduce the possibility of accidental exposure of the RoT outside the device.
44

55
We have implemented DeviceKey according to NIST SP 800-108, section "KDF in Counter Mode", with AES-CMAC as the pseudorandom function.
66

77
### Root of Trust
88

9-
The root of trust key, which DeviceKey uses to derive additional keys, is generated using the hardware random generator if it exists, or using a key injected to the device in the production process.
9+
The RoT key, which DeviceKey uses to derive additional keys, is generated using the hardware random generator if it exists, or using a key injected to the device in the production process.
1010

11-
The characteristics required by this root of trust are:
11+
The characteristics required by this RoT are:
1212

1313
- It must be unique per device.
1414
- It must be difficult to guess.
1515
- It must be at least 128 bits.
1616
- It must be kept secret.
1717

18-
The DeviceKey feature keeps the root of trust key in internal storage, using the NVStore component. Internal storage provides protection from external physical attacks to the device.
18+
The DeviceKey feature keeps the RoT key in internal storage, using the KVStore component. Internal storage provides protection from external physical attacks to the device.
1919

20-
The root of trust is generated at the first use of DeviceKey if the true random number generator is available in the device. If no true random number generator is available, you must pass the injected root of trust key to the DeviceKey before you call the key derivation API.
20+
The RoT is generated at the first use of DeviceKey if the True Random Number Generator(TRNG) is available in the device. If no TRNG is available, you must pass the injected RoT key to the DeviceKey before you call the key derivation API.
2121

2222
### Key derivation API
2323

2424
`generate_derived_key`: This API generates a new key based on a string (salt) the caller provides. The same key is generated for the same salt. Generated keys can be 128 or 256 bits in length.
2525

2626
#### Root of Trust Injection API
2727

28-
`device_inject_root_of_trust`: You must call this API once in the lifecycle of the device, before any call to key derivation, if the device does not support True Random Number Generator (`DEVICE_TRNG` is not defined).
28+
`device_inject_root_of_trust`: You must call this API once in the lifecycle of the device, before any call to key derivation, if the device does not support TRNG (`DEVICE_TRNG` is not defined).
2929

3030
#### Using DeviceKey
3131

features/storage/kvstore/tdbstore/TDBStore.cpp

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,6 @@
2424
#include "mbed_error.h"
2525
#include "mbed_wait_api.h"
2626
#include "MbedCRC.h"
27-
//Bypass the check of NVStore co existance if compiled for TARGET_TFM
28-
#if !(BYPASS_NVSTORE_CHECK)
29-
#include "features/storage/system_storage/SystemStorage.h"
30-
#endif
3127

3228
using namespace mbed;
3329

@@ -1016,18 +1012,6 @@ int TDBStore::init()
10161012
goto end;
10171013
}
10181014

1019-
//Bypass the check of NVStore co existance if compiled for TARGET_TFM
1020-
#if !(BYPASS_NVSTORE_CHECK)
1021-
1022-
//Check if we are on internal memory && try to set the internal memory for TDBStore use.
1023-
if (strcmp(_bd->get_type(), "FLASHIAP") == 0 &&
1024-
avoid_conflict_nvstore_tdbstore(TDBSTORE) == MBED_ERROR_ALREADY_INITIALIZED) {
1025-
1026-
MBED_ERROR(MBED_ERROR_ALREADY_INITIALIZED, "TDBStore in internal memory can not be initialize when NVStore is in use");
1027-
}
1028-
1029-
#endif
1030-
10311015
_max_keys = initial_max_keys;
10321016

10331017
ram_table = new ram_table_entry_t[_max_keys];

features/storage/nvstore/README.md

Lines changed: 0 additions & 60 deletions
This file was deleted.

0 commit comments

Comments
 (0)