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: draft-dijkhuis-cfrg-hdkeys.md
+58
Original file line number
Diff line number
Diff line change
@@ -39,6 +39,8 @@ normative:
39
39
author:
40
40
- organization: ISO/IEC
41
41
date: 2019-09
42
+
RFC4648:
43
+
RFC5234:
42
44
RFC8017:
43
45
RFC9180:
44
46
RFC9380:
@@ -403,6 +405,62 @@ After step 7, the unit can use the value of `salt'` to derive next-level HDKeys.
403
405
404
406
Step 4 MAY be postponed to be combined with step 6. Steps 5 to 8 MAY be combined in concurrent execution for multiple indices.
405
407
408
+
## The HDK key alias format
409
+
410
+
An HDK can be represented canonically using the following string format, in augmented Backus-Naur form (ABNF) [RFC5234] and applying non-padded base64url encoding [RFC4648] for key handles:
411
+
412
+
~~~
413
+
hdk-key-alias = origin-alias "/" path
414
+
415
+
; The origin-alias is an opaque identifier for a device
416
+
; key pair, the associated HDK instantiation, and the seed.
417
+
origin-alias = 1*255no-slash
418
+
419
+
; The hdk-path identifies the indices and key handles to
420
+
; apply from left to right.
421
+
hdk-path = hdk-index *("/" hdk-sub-path)
422
+
423
+
hdk-sub-path = *(hdk-edge "/") hdk-index
424
+
hdk-edge = ("#" hdk-key-handle) / hdk-index
425
+
426
+
; The index is to be parsed to an integer between 0 and
427
+
; 2^32-1 (inclusive) and used as input to CreateContext.
428
+
hdk-index = non-zero-digit 0*9DIGIT
429
+
430
+
; The key handle is to be decoded from
431
+
hdk-key-handle = 1*base64url-char
432
+
433
+
no-slash = %x21-%x2E / %x30-%x7E ; ASCII printable, no "/"
434
+
non-zero-digit = %31-39
435
+
base64url-char = ALPHA / DIGIT / "-" / "_"
436
+
~~~
437
+
438
+
A unit MAY use the HDK key alias format to represent keys internally.
439
+
440
+
A unit MUST NOT directly include the device private key in the `origin-alias`.
441
+
442
+
A unit MUST NOT directly include the seed in the `origin-alias`.
443
+
444
+
When taking input in the HDK key alias format:
445
+
446
+
- a unit MAY pose further limitations on the value of `origin-alias`;
447
+
- a unit MUST limit either the amount of `hdk-edge` instances or the total length of the `hdk-key-alias`;
448
+
- a unit MUST verify that the byte strings represented by `hdk-key-handle` has the size of ciphertext in `KEM`.
0 commit comments