Skip to content

Commit

Permalink
Rearrange
Browse files Browse the repository at this point in the history
  • Loading branch information
expede committed Jul 12, 2023
1 parent 1efeb25 commit 679a1ab
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ Each encrypted payload MUST include a unique 24-byte [initialization vector][IV]

### 2.1.2 Diffie-Hellman Key Derivation

AWAKE MUST use [HKDF] to derive keys. Key derivation in the AWAKE handshake MUST use the following algorithm:
AWAKE MUST use [HKDF] to derive keys. The shared secret MUST be generated using [X25519]. Non-extractable keys SHOULD be used where available. The sender MUST rotate their public key on every new session.

Key derivation in the AWAKE handshake MUST use the following algorithm:

``` javascript
// JS-flavored Pseudocode
Expand All @@ -76,9 +78,7 @@ const pseudorandomBits = hkdf.generateBits({
const [XChaChaKey, iv, nextSecret] = pseudorandomBits.splitKeysAndIv()
```

The shared secret MUST be generated using [X25519]. Non-extractable keys SHOULD be used where available. The sender MUST rotate their public key on every send.

This step MUST [omit the the info parameter][HDKF Randomness], since no input secret is available.
Note that AWAKE key derivation step MUST [omit the the info parameter][HDKF Randomness], since no input secret is available.

``` mermaid
flowchart
Expand Down

0 comments on commit 679a1ab

Please sign in to comment.