diff options
| author | pablof7z <pfer@me.com> | 2024-09-28 17:39:41 -0500 |
|---|---|---|
| committer | pablof7z <pfer@me.com> | 2024-09-28 17:39:41 -0500 |
| commit | fcc32565795f3f60151cde030700159502186d71 (patch) | |
| tree | 2f400600397443e6b5896c24872da1f81b9b4321 /44.md | |
| parent | 9f9ab83ee9809251d0466f22c188a0f13abd585a (diff) | |
| parent | a736e629be5c4c9125d98bdb4965851d8110c483 (diff) | |
Merge branch 'master' into cashu-wallet
Diffstat (limited to '44.md')
| -rw-r--r-- | 44.md | 4 |
1 files changed, 3 insertions, 1 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | NIP-44 | 1 | NIP-44 |
| 2 | ===== | 2 | ====== |
| 3 | 3 | ||
| 4 | Encrypted Payloads (Versioned) | 4 | Encrypted Payloads (Versioned) |
| 5 | ------------------------------ | 5 | ------------------------------ |
| @@ -142,6 +142,8 @@ 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 | NIP44 doesn't do hashing of the output: keep this in mind, because some libraries hash it using sha256. | ||
| 146 | As an example, in libsecp256k1, unhashed version is available in `secp256k1_ec_pubkey_tweak_mul` | ||
| 145 | - Operators | 147 | - 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 | 148 | - `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`. | 149 | `i`-th byte (inclusive) to the `j`-th byte (exclusive) of `x`. |