Skip to content

Commit 682b59f

Browse files
use 512 bit keys for HMAC-SHA256
1 parent 8d6fd67 commit 682b59f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

file name encryption/AES-SIV-512-B64URL.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@ let rootDirId = kdf(secret: initialSeed, len: 32, context: "rootDirId")
4646

4747
## Deriving Encryption Keys
4848

49-
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):
49+
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):
5050

5151
```ts
5252
let sivKey = kdf(secret: seed, len: 64, context: "siv")
53-
let hmacKey = kdf(secret: seed, len: 32, context: "hmac")
53+
let hmacKey = kdf(secret: seed, len: 64, context: "hmac")
5454
```
5555

5656
## Mapping Directory IDs to Paths
@@ -238,7 +238,7 @@ flowchart TD
238238
kdfSiv{{"kdf(secret,64,'siv')"}}
239239
kdfSiv --> sivKey
240240
directorySeed -->|secret:| kdfHmac
241-
kdfHmac{{"kdf(secret,32,'hmac')"}}
241+
kdfHmac{{"kdf(secret,64,'hmac')"}}
242242
kdfHmac --> hmacKey
243243
hmacKey -->|key:| hmacSha256
244244
hmacSha256{{hmacSha256}}

0 commit comments

Comments
 (0)