upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Staab <shtaab@gmail.com>2023-08-12 14:05:41 -0700
committerJonathan Staab <shtaab@gmail.com>2023-08-12 14:08:25 -0700
commit3a37d7c8b96ffd6bcdddba3bfd472c379ac6b89f (patch)
treeca7509b56e222059a3999c193c892f81212d3f7c
parent06f8dbadc819d2434068d41044ad2f123efd62af (diff)
Tweak some wording
-rw-r--r--44.md6
1 files changed, 3 insertions, 3 deletions
diff --git a/44.md b/44.md
index b84fb46..66bf565 100644
--- a/44.md
+++ b/44.md
@@ -6,9 +6,7 @@ Encrypted Payloads (Versioned)
6 6
7`optional` `author:paulmillr` `author:staab` 7`optional` `author:paulmillr` `author:staab`
8 8
9The NIP introduces a versioned encryption data model, allowing multiple algorithm choices to exist simultaneously. 9The NIP introduces a new data format for keypair-based encryption. This NIP is versioned to allow multiple algorithm choices to exist simultaneously.
10
11The 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
13An encrypted payload MUST be encoded as a JSON object. Different versions may have different parameters. Every format has a `v` field specifying its version. 11An 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
39By 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. 37By 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
39This 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