Skip to content

Commit f7b8dd0

Browse files
NanoTDF Resource Locator KID (#40)
* NanoTDF Resource Locator KID * KAS w/identifier * Apply suggestions from code review Co-authored-by: Dave Mihalcik <[email protected]> * Resource locator identifier * Refactor protocol and identifier table layout Consolidated protocol and identifier values into a cleaner format by merging redundant rows and aligning columns. Also fixed a typo in the note about unreserved values and clarified version-specific information regarding the "Shared Resource Directory" flag. * Add Ephemeral Public Key length constraints to README Clarified the length constraints for the Ephemeral Public Key in the nanotdf schema documentation. This ensures better understanding and consistency regarding the expected byte sizes. --------- Co-authored-by: Dave Mihalcik <[email protected]>
1 parent 06f7d48 commit f7b8dd0

File tree

1 file changed

+30
-15
lines changed

1 file changed

+30
-15
lines changed

schema/nanotdf/README.md

Lines changed: 30 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,10 @@ consequently, is `TDFM` (think TDF mini/micro/etc) when base64 encoded.
110110

111111
This section contains a Resource Locator type that allows describing access to a
112112
resource. In the case of the KAS, the Resource Locator defines how to access a
113-
KAS. Refer to the Resource Locator object's definition in [Section 3.4.1].
113+
KAS and its key. The Key Identifier (KID) uses the Protocol Enum w/Identifier.
114+
Protocol Enum w/Identifier is required.
115+
116+
Refer to the Resource Locator object's definition in [Section 3.4.1].
114117

115118
##### 3.3.1.3 ECC And Binding Mode
116119

@@ -303,29 +306,39 @@ This section describes embedded types that are used in multiple places in a
303306
The Resource Locator is a way for the nanotdf to represent references to
304307
external resources in as succinct a format as possible.
305308

306-
| Section | Minimum Length (B) | Maximum Length (B) |
307-
|---------------|---------------------|---------------------|
308-
| Protocol Enum | 1 | 1 |
309-
| Body Length | 1 | 1 |
310-
| Body | 1 | 255 |
309+
| Section | Minimum Length (B) | Maximum Length (B) |
310+
|-----------------------|---------------------|---------------------|
311+
| Protocol Enum | 1 | 1 |
312+
| Body Length | 1 | 1 |
313+
| Body | 1 | 255 |
314+
| Identifier (optional) | 0 | 32 |
311315

312-
##### 3.4.1.1 Protocol Enum
316+
##### 3.4.1.1 Protocol Header
313317

314318
[Section 3.4.1.1]: #3411-protocol-enum
315319
[Protocol Enum]: #3411-protocol-enum
316320

317321
This is a single byte used to describe the protocol used to locate a resource.
318322
The following are the available values:
319323

320-
| Value | Protocol |
321-
|---------|---------------------------|
322-
| `0x00` | `http` |
323-
| `0x01` | `https` |
324-
| `0x02` | unreserved |
325-
| `0xff` | Shared Resource Directory |
324+
| Value | Protocol |
325+
|------------|-----------------------------|
326+
| Bits 3-0 | Protocol Enum Value |
327+
| `0x0` | `http` |
328+
| `0x1` | `https` |
329+
| `0x2` | unreserved |
330+
| `0xf` | Shared Resource Directory |
331+
332+
| Value | Identifier |
333+
|------------|----------------------------------------------------------|
334+
| Bits 7-4 | Used for lookups of KAS key, Remote Policy, Policy key |
335+
| `0x0` | None |
336+
| `0x1` | 2 Byte |
337+
| `0x2` | 8 Byte |
338+
| `0x3` | 32 Byte |
326339

327340
_Note: Any unlisted values are unreserved. Clients should consider their use
328-
an errorneous condition._
341+
an erroneous condition._
329342

330343
###### 3.4.1.1.1 The Shared Resource Directory
331344

@@ -335,6 +348,8 @@ of their nanotdf. The shared resource directory at this time is still an
335348
experimental part of the nanotdf and is included in the documentation to support
336349
a minor update to the nanotdf in a subsequent specification.
337350

351+
Note is this specification version ( > `opentdf/spec` 4.3.0) the "Shared Resource Directory" flag has moved.
352+
338353
##### 3.4.1.2 Body Length
339354

340355
The length of the Body that describes how to retrieve the Resource referenced by
@@ -879,4 +894,4 @@ fa ab 69 18 52 26 1b 2d 63 60 83 1a cb d5 f2 03 fb ef 17 f9
879894

880895
###### 6.2.6.1.8 Signature
881896

882-
There is no signature in this example
897+
There is no signature in this example

0 commit comments

Comments
 (0)