Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions src/doc/kernel_attributes.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,30 @@ Specifies the current version of the Tock kernel.
1 indicates a development release, where 2 means alpha, 3 means beta, etc.
Little endian.

### Public Key (0x0104)

Encodes a public key the kernel can use for encrypting or signature
verification. Having a TLV for public keys simplifies adding a key to an
existing kernel binary.

```text
0 1 2 3 4 (bytes)
+----------+----------+----------+----------+
| Metadata |
+----------+----------+----------+----------+
| Reserved | Algorithm |
+----------+----------+----------+----------+
| Type = 0x0104 | Length = 8 |
+----------+----------+----------+----------+
```

- Algorithm: `u16`. The key algorithm. Little endian. List of known algorithms:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to divide this u16 such that the top word denotes the hashing algorithm and the lower word denotes the verification algorithm?

- `0x06`: ECDSAP256
- Reserved: `u16`. Reserved field.
- Metadata: `u32`. A metadata identifier for the key. This allows the kernel to
identify they key, and associate privileges or permissions associated with the
key. Little endian.

## Kernel Attributes Location

Kernel attributes are stored at the end of the kernel's flash region and
Expand Down