From c91ec76f41448982a5ab2fb74677e8306b985e14 Mon Sep 17 00:00:00 2001 From: Matt David Date: Fri, 4 Dec 2015 11:33:06 -0800 Subject: [PATCH] Remove anchors --- bip-invoicerequest-extension.mediawiki | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/bip-invoicerequest-extension.mediawiki b/bip-invoicerequest-extension.mediawiki index bd82a6c5..d11d5f8e 100644 --- a/bip-invoicerequest-extension.mediawiki +++ b/bip-invoicerequest-extension.mediawiki @@ -101,17 +101,16 @@ The new ReturnPaymentRequest message is an encapsulating message that allows the ===Overview=== -# Sender [[#invoicerequest-message-creation|creates]] InvoiceRequest +# Sender creates InvoiceRequest # Sender transmits InvoiceRequest to Receiver -# Receiver [[#ir-validation|validates]] InvoiceRequest +# Receiver validates InvoiceRequest # Receiver creates PaymentRequest -# Receiver [[#rpr-creation-encryption|encrypts]] the PaymentRequest -# Receiver [[#rpr-creation-encryption|creates]] ReturnPaymentRequest (containing an encrypted PaymentRequest) +# Receiver encrypts the PaymentRequest +# Receiver creates ReturnPaymentRequest (containing an encrypted PaymentRequest) # Receiver transmits ReturnPaymentRequest to Sender # Sender validates ReturnPaymentRequest -# Sender [[#rpr-validation-pr-decryption|decrypts and validates]] encrypted PaymentRequest +# Sender decrypts and validates encrypted PaymentRequest - ===InvoiceRequest Message Creation=== * Create an InvoiceRequest message @@ -124,17 +123,13 @@ The new ReturnPaymentRequest message is an encapsulating message that allows the ** Set pki_data as it would be set in BIP-0070 (see [Certificates](https://github.com/bitcoin/bips/blob/master/bip-0070.mediawiki#Certificates) section) ** Sign InvoiceRequest with signature == "" using the X509 Certificate's private key - ===InvoiceRequest Validation=== - * Validate sender_public_key is a valid EC public key * Validate notification_url if set, contains characters deemed valid for a URL (avoiding XSS related characters, etc). * If pki_type is None, InvoiceRequest is VALID * If pki_type is x509+sha256 and signature is valid for the serialized InvoiceRequest where signature is set to "", InvoiceRequest is VALID - ===ReturnPaymentRequest Message Creation and PaymentRequest Encryption=== - * Encrypt the serialized PaymentRequest using AES-256-CBC setup as described in [[#ECDH-AES-Setup ECDH Point Generation and AES-256 (CBC Mode) Setup]] * Create ReturnPaymentRequest message * Set encrypted_payment_request to be the encrypted value of the PaymentRequest @@ -142,17 +137,13 @@ The new ReturnPaymentRequest message is an encapsulating message that allows the * Set ephemeral_public_key to the public key of an EC keypair created using the secret point's X value. * Set payment_request_hash to generated SHA256 hash of the serialized PaymentRequest (without encryption) - ===ReturnPaymentRequest Validation and Decryption=== - * Validate ephemeral_public_key matches public key of an EC keypair created using the secret point's X value. * Decrypt the serialized PaymentRequest using AES-256-CBC setup as described in [[#ECDH-AES-Setup ECDH Point Generation and AES-256 (CBC Mode) Setup]] * Validate payment_request_hash matches SHA256 of the decrypted, serialized PaymentRequest * Deserialize the serialized PaymentRequest -{{anchor|ECDH-AES-Setup}} ===ECDH Point Generation and AES-256 (CBC Mode) Setup=== - * Generate the '''secret point''' using [https://en.wikipedia.org/wiki/Elliptic_curve_Diffie–Hellman ECDH] using the local entity's private key and the remote entity's public key as inputs. * Initialize [http://csrc.nist.gov/publications/nistpubs/800-90A/SP800-90A.pdf HMAC_DRBG] ** Use '''secret point's''' X value for Entropy