You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/api/drivers/Devicekey.md
+4-146Lines changed: 4 additions & 146 deletions
Original file line number
Diff line number
Diff line change
@@ -23,15 +23,15 @@ The root of trust is generated at the first use of DeviceKey if the true random
23
23
24
24
### Key derivation API
25
25
26
-
`generate_derived_key`: This API generates a new key based on an array of data ([salt](https://en.wikipedia.org/wiki/Salt_(cryptography)) the caller provides. A single salt value always generates the same key, so if you need a new key, you must use a new salt value. The salt can be have any value - array, string and so on.
26
+
`generate_derived_key`: This API generates a new key based on an array of data ([salt](https://en.wikipedia.org/wiki/Salt_(cryptography)) the caller provides. A single salt value always generates the same key, so if you need a new key, you must use a new salt value. The salt can have any value - array, string and so on.
27
27
28
28
The generated keys can be 128 or 256 bits in length.
29
29
30
30
#### Root of Trust Injection API
31
31
32
32
`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).
33
33
34
-
#### Using DeviceKey
34
+
#### Using DeviceKey
35
35
36
36
DeviceKey is a singleton class, meaning that the system can have only a single instance of it.
37
37
@@ -45,7 +45,7 @@ To instantiate DeviceKey, you need to call its `get_instance` member function as
45
45
46
46
Run the DeviceKey functionality test with the `mbed` command as following:
47
47
48
-
```
48
+
```
49
49
mbed test -n features-device_key-tests-device_key-functionality
50
50
```
51
51
@@ -55,146 +55,4 @@ Run the DeviceKey functionality test with the `mbed` command as following:
55
55
56
56
### DeviceKey example
57
57
58
-
```
59
-
/*
60
-
* Copyright (c) 2018 ARM Limited. All rights reserved.
61
-
* SPDX-License-Identifier: Apache-2.0
62
-
* Licensed under the Apache License, Version 2.0 (the License); you may
63
-
* not use this file except in compliance with the License.
64
-
* You may obtain a copy of the License at
65
-
*
66
-
* http://www.apache.org/licenses/LICENSE-2.0
67
-
*
68
-
* Unless required by applicable law or agreed to in writing, software
69
-
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
70
-
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
71
-
* See the License for the specific language governing permissions and
0 commit comments