1
0
Fork 0
mirror of https://github.com/bitcoin/bips.git synced 2025-02-23 07:15:30 +01:00

- Update optional flags to PaymentDetails definition in paymentrequest.proto

- Add DER encoding requirement for EC public keys and ECC signatures
- Add SHA-256 hashing requirement for ECC signatures
- Add FIPS 180-4 SHS link
This commit is contained in:
Matt David 2016-03-09 18:57:48 -08:00
parent de42024b1a
commit a8c0246295
2 changed files with 14 additions and 8 deletions

View file

@ -425,6 +425,10 @@ When a Store & Forward server is in use during the Payment Protocol exchange, an
Store & Forward servers MAY accept and/or overwrite EncryptedPayment messages until an EncryptedPaymentACK message with matching identifier and valid Receiver signature is received, after which the server MAY reject all further EncryptedPayment messages matching that identifier. This feature SHOULD be used for updating Payment metadata or replacing invalid transactions with valid ones. Clients SHOULD keep in mind Receivers can broadcast a transaction without returning an ACK. If a payment message needs to be updated, it SHOULD include at least one input referenced in the original transaction to prevent the Receiver from broadcasting both transactions and getting paid twice. Store & Forward servers MAY accept and/or overwrite EncryptedPayment messages until an EncryptedPaymentACK message with matching identifier and valid Receiver signature is received, after which the server MAY reject all further EncryptedPayment messages matching that identifier. This feature SHOULD be used for updating Payment metadata or replacing invalid transactions with valid ones. Clients SHOULD keep in mind Receivers can broadcast a transaction without returning an ACK. If a payment message needs to be updated, it SHOULD include at least one input referenced in the original transaction to prevent the Receiver from broadcasting both transactions and getting paid twice.
==Public Key & Signature Encoding==
* Each EC public key (sender_public_key, receiver_public_key) included in any message defined in this BIP MUST be DER [ITU.X690.1994] encoded.
* Each ECC signature included in any message defined in this BIP MUST use the SHA-256 hashing algorithm and MUST be DER [ITU.X690.1994] encoded.
==Implementation== ==Implementation==
A reference implementation for a Store & Forward server supporting this proposal can be found here: A reference implementation for a Store & Forward server supporting this proposal can be found here:
@ -492,3 +496,4 @@ message PaymentDetails {
* [http://csrc.nist.gov/publications/nistpubs/800-90A/SP800-90A.pdf HMAC_DRBG] * [http://csrc.nist.gov/publications/nistpubs/800-90A/SP800-90A.pdf HMAC_DRBG]
* [https://tools.ietf.org/html/rfc6979 RFC6979] * [https://tools.ietf.org/html/rfc6979 RFC6979]
* [https://en.bitcoin.it/wiki/Address_reuse Address Reuse] * [https://en.bitcoin.it/wiki/Address_reuse Address Reuse]
* [http://csrc.nist.gov/publications/fips/fips180-4/fips-180-4.pdf FIPS 180-4 (Secure Hash Standard)]

View file

@ -17,14 +17,15 @@ message Output {
} }
message PaymentDetails { message PaymentDetails {
optional string network = 1 [default = "main"]; // "main" or "test" optional string network = 1 [default = "main"]; // "main" or "test"
repeated Output outputs = 2; // Where payment should be sent repeated Output outputs = 2; // Where payment should be sent
required uint64 time = 3; // Timestamp; when payment request created required uint64 time = 3; // Timestamp; when payment request created
optional uint64 expires = 4; // Timestamp; when this request should be considered invalid optional uint64 expires = 4; // Timestamp; when this request should be considered invalid
optional string memo = 5; // Human-readable description of request for the customer optional string memo = 5; // Human-readable description of request for the customer
optional string payment_url = 6; // URL to send Payment and get PaymentACK optional string payment_url = 6; // URL to send Payment and get PaymentACK
optional bytes merchant_data = 7; // Arbitrary data to include in the Payment message optional bytes merchant_data = 7; // Arbitrary data to include in the Payment message
optional bool subtract_fee = 1000; // Allow SubtractableFee optional uint64 subtractable_fee = 1000; // How many Satoshis can be subtracted from the requested amount and instead applied towards the fee
//optional bool replace_by_fee = 1001; // Force RBF true or false (version: 2) optional uint64 fee_per_kb = 1001; // Minimum transaction fee that must be included with the transaction in order for it to be accepted with zero confirmations.
optional bool replace_by_fee = 1002; // Indicates the sender can enable the Replace By Fee flag for this transaction and the receiver will still consider it accepted with zero confirmations. Otherwise, RBF transactions will not be accepted by the receiver until they are confirmed.
} }
message PaymentRequest { message PaymentRequest {
optional uint32 payment_details_version = 1 [default = 1]; optional uint32 payment_details_version = 1 [default = 1];