Skip to content

Commit 21cf2e8

Browse files
committed
doc: add DLM key management documentation to README
Signed-off-by: Vincent Jardin <vjardin@free.fr>
1 parent 256a284 commit 21cf2e8

File tree

1 file changed

+102
-2
lines changed

1 file changed

+102
-2
lines changed

README.md

Lines changed: 102 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,8 @@ Commands:
155155
param-set <enable|disable> Enable/disable initialization command
156156
init Initialize device (factory reset to SSD state)
157157
osis Show OSIS (ID code protection) status
158-
key-set <idx> <file> Inject wrapped key from file at index
159-
key-verify <idx> Verify key at index
158+
key-set <type> <file> Inject wrapped DLM key (secdbg|nonsecdbg|rma)
159+
key-verify <type> Verify DLM key (secdbg|nonsecdbg|rma)
160160
ukey-set <idx> <file> Inject user wrapped key from file at index
161161
ukey-verify <idx> Verify user key at index
162162
@@ -197,6 +197,106 @@ When using UART (not USB), the following baud rates are supported:
197197

198198
Note: USB communication is not affected by baud rate settings.
199199

200+
## DLM Key Management
201+
202+
The RA family uses Device Lifecycle Management (DLM) with cryptographic keys to control
203+
debug access. These keys enable authenticated regression (unlocking) from locked states
204+
while preserving flash contents. See [security/SECURITY.md](security/SECURITY.md) for detailed explanation.
205+
206+
### Key Types
207+
208+
| Keyword | KYTY | Name | Purpose |
209+
|------------|------|----------------|--------------------------------------------|
210+
| secdbg | 0x01 | SECDBG_KEY | Secure debug authentication |
211+
| nonsecdbg | 0x02 | NONSECDBG_KEY | Non-secure debug authentication |
212+
| rma | 0x03 | RMA_KEY | Return Material Authorization |
213+
214+
### SECDBG_KEY (secdbg)
215+
216+
The Secure Debug Key enables authenticated regression from locked states back to SSD
217+
(Secure Software Development) state, allowing full debug access.
218+
219+
Benefits:
220+
- Enables secure debug access on deployed devices
221+
- Allows returning locked devices to development state
222+
- Preserves flash contents during state transition
223+
224+
Limits:
225+
- Requires knowledge of the injected key
226+
- Must be injected before transitioning to locked state
227+
- If lost, device cannot be unlocked without RMA
228+
229+
Usage:
230+
```sh
231+
radfu key-set secdbg secdbg.bin # Inject before locking
232+
radfu dlm-transit lck_dbg # Lock device
233+
# Later, use SECDBG_KEY to authenticate and regress to SSD
234+
```
235+
236+
### NONSECDBG_KEY (nonsecdbg)
237+
238+
The Non-Secure Debug Key enables authenticated regression to NSECSD (Non-Secure Software
239+
Development) state, allowing debug access to non-secure regions only.
240+
241+
Benefits:
242+
- Enables limited debug access on deployed devices
243+
- Protects secure code while allowing non-secure debugging
244+
- Useful for field debugging of non-secure application code
245+
246+
Limits:
247+
- Cannot access secure memory regions
248+
- Must be injected before transitioning to locked state
249+
- Provides less access than SECDBG_KEY
250+
251+
Usage:
252+
```sh
253+
radfu key-set nonsecdbg nonsecdbg.bin
254+
```
255+
256+
### RMA_KEY (rma)
257+
258+
The Return Material Authorization Key is used for the RMA flow, allowing the manufacturer
259+
to analyze failed devices returned from the field.
260+
261+
Benefits:
262+
- Enables full device analysis for failure investigation
263+
- Works even on fully locked devices
264+
- Required for warranty/RMA processes
265+
266+
Limits:
267+
- Typically only known to the manufacturer
268+
- Intended for factory/lab use only
269+
- May expose all device contents
270+
271+
Usage:
272+
```sh
273+
radfu key-set rma rma.bin
274+
# Used during RMA process to regress device state
275+
```
276+
277+
### Key Operations
278+
279+
```sh
280+
# Inject wrapped keys (before locking the device)
281+
radfu key-set secdbg secdbg.bin
282+
radfu key-set nonsecdbg nonsecdbg.bin
283+
radfu key-set rma rma.bin
284+
285+
# Verify key injection
286+
radfu key-verify secdbg
287+
radfu key-verify nonsecdbg
288+
radfu key-verify rma
289+
```
290+
291+
### Key Wrapping
292+
293+
DLM keys must be wrapped before injection. See [security/SECURITY.md](security/SECURITY.md) for the complete
294+
key wrapping process using the `rawrapkey.sh` script or Renesas SKMT tool.
295+
296+
The wrapping process requires:
297+
1. A UFPK (User Factory Programming Key) - generated locally
298+
2. A W-UFPK (Wrapped UFPK) - obtained from Renesas DLM portal at https://dlm.renesas.com/
299+
200300
## ID Code Protection (OSIS)
201301

202302
Renesas RA MCUs have a 128-bit OCD/Serial Programmer ID Setting Register (OSIS) that controls

0 commit comments

Comments
 (0)