diff options
| author | Paul Miller <paul@paulmillr.com> | 2024-09-01 00:44:30 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-01 00:44:30 +0200 |
| commit | 1002104ece1fe3de7a091084d97e031c7291c9c0 (patch) | |
| tree | c8d41b184c4e55e31c8b967b28bde6a80e2c53d6 | |
| parent | 24e97c25390baa7d492d7ef71517e8f14e0e9a65 (diff) | |
nip44: clarify ecdh hashing
| -rw-r--r-- | 44.md | 1 |
1 files changed, 1 insertions, 0 deletions
| @@ -142,6 +142,7 @@ validation rules, refer to BIP-340. | |||
| 142 | The operation produces a shared point, and we encode the shared point's 32-byte x coordinate, using method | 142 | The operation produces a shared point, and we encode the shared point's 32-byte x coordinate, using method |
| 143 | `bytes(P)` from BIP340. Private and public keys must be validated as per BIP340: pubkey must be a valid, | 143 | `bytes(P)` from BIP340. Private and public keys must be validated as per BIP340: pubkey must be a valid, |
| 144 | on-curve point, and private key must be a scalar in range `[1, secp256k1_order - 1]`. | 144 | on-curve point, and private key must be a scalar in range `[1, secp256k1_order - 1]`. |
| 145 | Some libraries, like libsecp256k1, apply sha256 on the output. The hashing is unnecessary in NIP44. | ||
| 145 | - Operators | 146 | - Operators |
| 146 | - `x[i:j]`, where `x` is a byte array and `i, j <= 0` returns a `(j - i)`-byte array with a copy of the | 147 | - `x[i:j]`, where `x` is a byte array and `i, j <= 0` returns a `(j - i)`-byte array with a copy of the |
| 147 | `i`-th byte (inclusive) to the `j`-th byte (exclusive) of `x`. | 148 | `i`-th byte (inclusive) to the `j`-th byte (exclusive) of `x`. |