mirror of
https://github.com/nostr-protocol/nips.git
synced 2024-12-23 00:45:53 -05:00
Tweak some wording
This commit is contained in:
parent
06f8dbadc8
commit
3a37d7c8b9
6
44.md
6
44.md
|
@ -6,9 +6,7 @@ Encrypted Payloads (Versioned)
|
||||||
|
|
||||||
`optional` `author:paulmillr` `author:staab`
|
`optional` `author:paulmillr` `author:staab`
|
||||||
|
|
||||||
The NIP introduces a versioned encryption data model, allowing multiple algorithm choices to exist simultaneously.
|
The NIP introduces a new data format for keypair-based encryption. This NIP is versioned to allow multiple algorithm choices to exist simultaneously.
|
||||||
|
|
||||||
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).
|
|
||||||
|
|
||||||
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.
|
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.
|
||||||
|
|
||||||
|
@ -38,6 +36,8 @@ Example:
|
||||||
|
|
||||||
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.
|
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.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
# Code Samples
|
# Code Samples
|
||||||
|
|
||||||
## Javascript
|
## Javascript
|
||||||
|
|
Loading…
Reference in New Issue
Block a user