mirror of
https://github.com/nostr-protocol/nips.git
synced 2024-12-22 08:25:53 -05:00
Clarify function name in libsecp256k1
This commit is contained in:
parent
1002104ece
commit
be17e5dcd9
3
44.md
3
44.md
|
@ -142,7 +142,8 @@ validation rules, refer to BIP-340.
|
||||||
The operation produces a shared point, and we encode the shared point's 32-byte x coordinate, using method
|
The operation produces a shared point, and we encode the shared point's 32-byte x coordinate, using method
|
||||||
`bytes(P)` from BIP340. Private and public keys must be validated as per BIP340: pubkey must be a valid,
|
`bytes(P)` from BIP340. Private and public keys must be validated as per BIP340: pubkey must be a valid,
|
||||||
on-curve point, and private key must be a scalar in range `[1, secp256k1_order - 1]`.
|
on-curve point, and private key must be a scalar in range `[1, secp256k1_order - 1]`.
|
||||||
Some libraries, like libsecp256k1, apply sha256 on the output. The hashing is unnecessary in NIP44.
|
NIP44 doesn't do hashing of the output: keep this in mind, because some libraries hash it using sha256.
|
||||||
|
As an example, in libsecp256k1, unhashed version is available in `secp256k1_ec_pubkey_tweak_mul`
|
||||||
- Operators
|
- Operators
|
||||||
- `x[i:j]`, where `x` is a byte array and `i, j <= 0` returns a `(j - i)`-byte array with a copy of the
|
- `x[i:j]`, where `x` is a byte array and `i, j <= 0` returns a `(j - i)`-byte array with a copy of the
|
||||||
`i`-th byte (inclusive) to the `j`-th byte (exclusive) of `x`.
|
`i`-th byte (inclusive) to the `j`-th byte (exclusive) of `x`.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user