From 5de76542c345475a05d31aca40d608e3070cb6ad Mon Sep 17 00:00:00 2001 From: fiatjaf Date: Wed, 8 Oct 2025 09:52:21 +0000 Subject: [PATCH] grammar. --- 4e.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/4e.md b/4e.md index 548d9a62..67f2021d 100644 --- a/4e.md +++ b/4e.md @@ -40,9 +40,9 @@ There are probably other advantages to not tying the user's identity to the keys } ``` -5. Now **Bob** (keypairs `(b, B)`) will send a DM to **Alice**. Because Bob's client fetched Alice's `kind:10044` event, instead of computing the conversation key with `ecdh(b, A)` he does `ecdh(b, E) = S` -6. Because Alice knows `e` Alice can decrypt Bob's message doing `ecdh(e, B) = S` and all is good -7. Now the fun part starts: Alice has decided to use a client called **Tortilla** to chat on her phone, and **Tortilla* wants to do encryption stuff. +5. Now **Bob** (keypair `(b, B)`) will send a DM to **Alice**. Because Bob's client fetched Alice's `kind:10044` event, instead of computing the conversation key with `ecdh(b, A)` he does `ecdh(b, E) = S` +6. Because Alice knows `e`, she can decrypt Bob's message doing `ecdh(e, B) = S` and all is good +7. Now the fun part starts: Alice has decided to use a client called **Tortilla** to chat on her phone, and **Tortilla** wants to do encryption stuff. 8. **Tortilla** sees that Alice has a `kind:10044` published, which means **Tortilla** won't create a new key, **Tortilla** will have to ask for **Cope** to share that key securely. So **Tortilla** generates a local keypair `(t, T)` that won't be shown or leave the device ever, and **Tortilla** publishes an announcement (`kind:4454`) for that local key (signed by Alice): ```jsonc @@ -56,22 +56,22 @@ There are probably other advantages to not tying the user's identity to the keys } ``` -9. **Tortilla** cannot proceed without known the secret key `e`, so it has to tell the user to turn **Cope** on. +9. **Tortilla** cannot proceed without knowing the secret key `e`, so it has to tell the user to turn **Cope** on. 10. Alice opens up **Cope** and **Cope** immediately looks for all `kind:4454` events from Alice, and sees that there is this app called "Tortilla on Android" signed by Alice herself, so **Cope** publishes the secret key `e` nip44-encrypted to `ecdh(c, T)` -- in which `c` is the secret key of a keypair that **Cope** has just generated locally. **Cope** does that using a new event, `kind:4455`: ```jsonc { "kind": 4455, - "pubkey": "" + "pubkey": "", "tags": [ - ["P", ""] + ["P", ""], ["p", ""] ], "content": "" } ``` -12. Immediately **Tortilla** wakes up and sees the `kind:4455` that had just been published by **Cope**, decrypts the content using `ecdh(t, C)` and now **Tortilla** also knows the secret key `e`. **Tortilla** can now decrypt and encrypt the same things **Cope** could before. +11. Immediately **Tortilla** wakes up and sees the `kind:4455` that has just been published by **Cope**, decrypts the content using `ecdh(t, C)` and now **Tortilla** also knows the secret key `e`. **Tortilla** can now decrypt and encrypt the same things **Cope** could before. ### The protocol flow again, now in a colorful infographic