File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -107,18 +107,18 @@ The data part of a Lightning invoice consists of multiple sections:
107107
1081081 . ` timestamp ` : seconds-since-1970 (35 bits, big-endian)
1091091 . zero or more tagged parts
110- 1 . ` signature ` : Bitcoin-style signature of above (520 bits)
110+ 1 . ` signature ` : compact ECDSA/secp256k1 signature of the above (520 bits: 64-byte R||S + 1-byte recovery id )
111111
112112## Requirements
113113
114114A writer:
115115 - MUST set ` timestamp ` to the number of seconds since Midnight 1 January 1970, UTC in
116116 big-endian.
117- - MUST set ` signature ` to a valid 512-bit secp256k1 signature of the SHA2 256-bit hash of the
118- human-readable part, represented as UTF-8 bytes, concatenated with the
119- data part (excluding the signature) with 0 bits appended to pad the
120- data to the next byte boundary, with a trailing byte containing
121- the recovery ID (0, 1, 2, or 3) .
117+ - MUST set ` signature ` to a valid compact ECDSA signature over secp256k1 of the SHA-256
118+ hash of: the human-readable part ( as UTF-8 bytes) concatenated with the data part
119+ (excluding the signature), with 0 bits appended to pad to a byte boundary.
120+ The signature is encoded as 64 bytes (R || S), followed by a trailing 1- byte
121+ recovery id in {0,1,2,3} .
122122
123123A reader:
124124 - MUST check that the ` signature ` is valid (see the ` n ` tagged field specified below).
You can’t perform that action at this time.
0 commit comments