Skip to content

Commit 7a6fc57

Browse files
committed
numbers are hard
1 parent e884094 commit 7a6fc57

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/payment_envelope/envelope.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@ Use the following steps to decode and verify the payload.
6868
3. Decode the Hex-encoded `pubkey` and `sig` fields, yielding bytes.
6969
4. Compute the Double-SHA256 of the decoded payload bytes from step 2, i.e. `SHA-256(SHA-256(bytes))`
7070
5. Apply BIP-340 `lift_x` algorithm on the `pubkey` bytes to recover the full Public Key.
71-
A BIP-304 library will supply this step (it's essentially parsing a compressed public key.)
71+
A BIP-340 library will supply this step (it's essentially parsing a compressed public key.)
7272
6. Verify the BIP-340 Schnorr signature, using the Double-SHA256 hash as the `message`, and the full Public Key and `sig`.
73-
A BIP-304 library will supply the signature verification algorithm.
73+
A BIP-340 library will supply the signature verification algorithm.
7474
If this step fails, it suggests a MITM attack or faulty implementation.
7575
7. Parse the JSON payload bytes using a standard JSON parser.
7676
8. Check the `timeout` field: do not submit a payment transaction after the time `issued` + `timeout`.
@@ -83,9 +83,9 @@ signed by the _Payment Relay's_ private key, i.e. the envelope was created by th
8383
A reference implementation of these algorithms exist at [github.com/dogeorg/dogeconnect-go](https://github.com/dogeorg/dogeconnect-go)
8484
which can be packaged for mobile using [gomobile bind](https://pkg.go.dev/golang.org/x/mobile/cmd/gobind).
8585

86-
### BIP-304 Implementations
86+
### BIP-340 Implementations
8787

88-
| Language | BIP-304 Implementation |
88+
| Language | BIP-340 Implementation |
8989
|----------|---------------------------------------------------------------------|
9090
| C/C++ | <https://github.com/bitcoin-core/secp256k1> |
9191
| Go | <https://pkg.go.dev/github.com/btcsuite/btcd/btcec/v2/schnorr> |

0 commit comments

Comments
 (0)