Skip to content
Merged
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
6 changes: 3 additions & 3 deletions file name encryption/AES-SIV-512-B64URL.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ let rootDirId = kdf(secret: initialSeed, len: 32, context: "rootDirId")

## Deriving Encryption Keys

All file names are encrypted using AES-SIV, which requires a 512 bit key (which is internally split into two 256 bit AES keys). Furthermore we need a 256 bit key for HMAC computations. We use the directory-specific seed from `dir.uvf` and feed it into the [KDF](../kdf/README.md):
All file names are encrypted using AES-SIV, which requires a 512 bit key (which is internally split into two 256 bit AES keys). Furthermore we need a 512 bit key for HMAC computations. We use the directory-specific seed from `dir.uvf` and feed it into the [KDF](../kdf/README.md):

```ts
let sivKey = kdf(secret: seed, len: 64, context: "siv")
let hmacKey = kdf(secret: seed, len: 32, context: "hmac")
let hmacKey = kdf(secret: seed, len: 64, context: "hmac")
```

## Mapping Directory IDs to Paths
Expand Down Expand Up @@ -238,7 +238,7 @@ flowchart TD
kdfSiv{{"kdf(secret,64,'siv')"}}
kdfSiv --> sivKey
directorySeed -->|secret:| kdfHmac
kdfHmac{{"kdf(secret,32,'hmac')"}}
kdfHmac{{"kdf(secret,64,'hmac')"}}
kdfHmac --> hmacKey
hmacKey -->|key:| hmacSha256
hmacSha256{{hmacSha256}}
Expand Down