diff options
| author | Jonathan Staab <shtaab@gmail.com> | 2023-08-12 14:05:41 -0700 |
|---|---|---|
| committer | Jonathan Staab <shtaab@gmail.com> | 2023-08-12 14:08:25 -0700 |
| commit | 3a37d7c8b96ffd6bcdddba3bfd472c379ac6b89f (patch) | |
| tree | ca7509b56e222059a3999c193c892f81212d3f7c /44.md | |
| parent | 06f8dbadc819d2434068d41044ad2f123efd62af (diff) | |
Tweak some wording
Diffstat (limited to '44.md')
| -rw-r--r-- | 44.md | 6 |
1 files changed, 3 insertions, 3 deletions
| @@ -6,9 +6,7 @@ Encrypted Payloads (Versioned) | |||
| 6 | 6 | ||
| 7 | `optional` `author:paulmillr` `author:staab` | 7 | `optional` `author:paulmillr` `author:staab` |
| 8 | 8 | ||
| 9 | The NIP introduces a versioned encryption data model, allowing multiple algorithm choices to exist simultaneously. | 9 | The NIP introduces a new data format for keypair-based encryption. This NIP is versioned to allow multiple algorithm choices to exist simultaneously. |
| 10 | |||
| 11 | The algorithm described in NIP-04 is potentially vulnerable to [padding oracle attacks](https://en.wikipedia.org/wiki/Padding_oracle_attack) and uses keys which are not indistinguishable from random. For more information, see [here](https://github.com/nostr-protocol/nips/pull/715#issuecomment-1675301250). | ||
| 12 | 10 | ||
| 13 | An encrypted payload MUST be encoded as a JSON object. Different versions may have different parameters. Every format has a `v` field specifying its version. | 11 | An encrypted payload MUST be encoded as a JSON object. Different versions may have different parameters. Every format has a `v` field specifying its version. |
| 14 | 12 | ||
| @@ -38,6 +36,8 @@ Example: | |||
| 38 | 36 | ||
| 39 | By default in the [libsecp256k1](https://github.com/bitcoin-core/secp256k1) ECDH implementation, the secret is the SHA256 hash of the shared point (both X and Y coordinates). We are using this exact implementation. In NIP-94, unhashed shared point was used. | 37 | By default in the [libsecp256k1](https://github.com/bitcoin-core/secp256k1) ECDH implementation, the secret is the SHA256 hash of the shared point (both X and Y coordinates). We are using this exact implementation. In NIP-94, unhashed shared point was used. |
| 40 | 38 | ||
| 39 | This encryption scheme replaces the one described in NIP-04, which is not secure. It used bad cryptographic building blocks and must not be used. | ||
| 40 | |||
| 41 | # Code Samples | 41 | # Code Samples |
| 42 | 42 | ||
| 43 | ## Javascript | 43 | ## Javascript |