Skip to content

Commit

Permalink
docs(design): remove trailing whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
codahale committed Jan 1, 2025
1 parent 745de64 commit 2c5758c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions design.md
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ function stream_decrypt(key, nonce, ciphertext):
stream ← mix(stream, "key", key) // Mix the key into the protocol.
stream ← mix(stream, "nonce", nonce) // Mix the nonce into the protocol.
(_, plaintext) ← decrypt(stream, "message", ciphertext) // Decrypt the ciphertext.
plaintext
plaintext
```

This construction is IND-CPA-secure under the following assumptions:
Expand Down Expand Up @@ -338,13 +338,13 @@ That expands to the following sequence of primitive operations:

```text
t0 ← 0x01 || 0x01, 0x80 || "com.example.aead"
t1 ← t0 || 0x02 || "key" || 0x03, 0x01 || 0x06c47a03da9a2e6cdebdcafdfd62b57d || 0x80, 0x01
t2 ← t1 || 0x02 || "nonce" || 0x05, 0x01 || 0x3f4ac18bfa54206f5c6de81517618d43 || 0x80, 0x01
t3 ← t2 || 0x02 || "ad" || 0x02, 0x01 || "this is public" || 0x0e, 0x01
t1 ← t0 || 0x02 || "key" || 0x03, 0x01 || 0x06c47a03da9a2e6cdebdcafdfd62b57d || 0x80, 0x01
t2 ← t1 || 0x02 || "nonce" || 0x05, 0x01 || 0x3f4ac18bfa54206f5c6de81517618d43 || 0x80, 0x01
t3 ← t2 || 0x02 || "ad" || 0x02, 0x01 || "this is public" || 0x0e, 0x01
t4 ← t3 || 0x05 || "message" || 0x07, 0x01
t5 ← t4 || 0x03 || "key" || 0x03, 0x01
t6 ← t5 || 0x02 || "len" || 0x03, 0x01 || 0x20, 0x01 || 0x02, 0x01
kdk0 || ek0 ← turboshake128(0x22, t6, 64)
kdk0 || ek0 ← turboshake128(0x22, t6, 64)
t7 ← 0x02 || "kdk" || 0x07, 0x01 || kdk0 || 0x20, 0x01
(ciphertext, tag128, tag256) ← aegis128l::encrypt(ek0, "this is a secret")
t8 ← t7 || 0x02 || "tag" || 0x03, 0x01 || tag256 || 0x20, 0x01
Expand Down

0 comments on commit 2c5758c

Please sign in to comment.