-
Notifications
You must be signed in to change notification settings - Fork 2
Add initial draft for NFC Payment Solution #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
sondreb
wants to merge
3
commits into
main
Choose a base branch
from
bcip-nfc
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,85 @@ | ||
| # BCIP-0004 : NFC Payment Solution | ||
|
|
||
| ``` | ||
| Number: BCIP-0004 | ||
| Title: NFC Payment Solution | ||
| Type: Informational | ||
| Status: Draft | ||
| Authors: Blockcore <post@blockcore.net> | ||
| Created: 2023-09-19 | ||
| ``` | ||
|
|
||
| ## Abstract | ||
|
|
||
| This is a proposed solution for NFC payments using Blockcore. | ||
|
|
||
| NFC has primarily two modes, read/write data and authentication. The common NFC payment solutions are using the authentication mode, where the NFC card is used to authenticate the user and the payment is done using a different channel. Your regular payment cards from fiat banks are using this mode. The authentication mode is not suitable for Blockcore payments, because it requires a central authority to issue the cards and to verify the authentication. | ||
|
|
||
| While such a solution could be implemented, it requires a central authority (custodial wallet service) to issue the cards and to verify the authentication. This is not a solution that Blockcore will support, but it is possible to implement such a solution on top of Blockcore for anyone who wants to do that. | ||
|
|
||
| ## Motivation | ||
|
|
||
| NFC payments are a convenient way to pay for goods and services. It is a technology that is widely adopted and supported by most modern smartphones. It is also a technology that is widely used in payment terminals in stores and restaurants, or for festivals and events. | ||
|
|
||
| Making use and adoption of Bitcoin and other cryptocurrencies is a challenge, because it is not widely supported by payment terminals. The NFC payment solution will allow Blockcore to be used for smaller amounts, such as paying for a coffee or a beer at a festival. | ||
|
|
||
| ## Body | ||
|
|
||
| The deployment of NFC payment solution requires the following infrastructure: | ||
|
|
||
| - Blockcore Payment Server | ||
| - NFC Payment Terminal | ||
| - NFC Payment Card | ||
| - Blockcore Wallet (optional) | ||
|
|
||
| The proposed solution requires the private key to be stored on the physical NFC card. This will be the same private key for all payments, until the user decides to wipe/rewrite their private key. For privacy reasons, it is recommended to wipe the private key after some usage, such as after a day or a week or events. | ||
|
|
||
| The private key is written to the NFC card with encryption. It can be written multiple times, depending on which merchants the user want to utilize their NFC cards at. It is the users of the cards that decides who will be able to read the private key from the card. | ||
|
|
||
| During the writing process, user can decide to add an additional security layer in the form of a private PIN code. This must then be provided for each payment performed. | ||
|
|
||
| To activate an NFC card, the user can start the process within their Blockcore Wallet. When creating an new card, a private key will be derived from the current root private key under an hardened path. This means that cards follow the user wallets, for restore and backup purposes. | ||
|
|
||
| `m / purpose' / coin_type' / account' / change / address_index` | ||
|
|
||
| Purpose 44 is used for regular wallet key derivation, for NFC cards the purpose will be 423. Coin type will follow which chain the NFC card is used for, such as 0 for Bitcoin, see [SLIP-44](https://github.com/satoshilabs/slips/blob/master/slip-0044.md) for more information on all coint types. | ||
|
|
||
| "change" and "address_index" will always be 0, but the full derivation are used for potential future expansion where additional keys for each card might be used. | ||
|
|
||
| When creating a card within the wallet, the user can also pick which decentralized identity to attach to it (or none at all). This will allow the user to verify that they are the owner of the funds on the card, in case of an NFC cloning operation. | ||
|
|
||
| NFCs are not secure, they can be cloned and the private key can be extracted from the card. The private key will be stored encrypted with the public key of the merchants that the payeer want to use their card with. | ||
|
|
||
| That means that the owner of the card, decides who can actually decrypt their private key. Even if someone clones the card, they will still only be able to use the card with the pre-approved merchant, which can disable the card if they suspect that the card has been cloned. | ||
|
|
||
| The card can be used for identification and payment. The identification is used to verify membership, etc. | ||
|
|
||
| ### 1. Safety and Value Amounts | ||
|
|
||
| Since the security of the NFC card payment solution is not as strong as a hardware wallet, it is recommended to only use the card for smaller amounts. The NFC card can be used for identification and payment, but it is recommended to use a hardware wallet for larger amounts. | ||
|
|
||
| ### 2. Public Key Discovery | ||
|
|
||
|
sondreb marked this conversation as resolved.
|
||
| The public key of merchants should be published within the decentralized identity document (DID Document) of the merchant. This will allow the user to discover the public key of the merchant, and to encrypt the private key on the card with the public key of the merchant. | ||
|
|
||
| Additionally stores can post their public key on their website, or in their store, to allow customers to encrypt their private key with the public key of the merchant the store supports. This will then be a one-time operation the first time. | ||
|
|
||
| ### 3. Anonymous Pre-Created Cards | ||
|
|
||
| The solution also supports event organizers to pre-create cards for their event. This will allow the event organizer to create a card for each ticket holder, and to pre-load the card with a certain amount of funds. This will allow the ticket holders to use the card for payments at the event, and to use the card for identification (can be anonymous, like a ticket identification number). | ||
|
sondreb marked this conversation as resolved.
|
||
|
|
||
| ### 4. Card Fill Up | ||
|
|
||
| Cards can be filled up with funds by the user, or by the merchant. The merchant can fill up the card with funds, and the user can fill up the card with funds from their own wallet, like Blockcore Wallet. | ||
|
|
||
| The address of the card can be printed on the card using QR-code for quick and easy fill-up. | ||
|
|
||
| ## Considerations | ||
|
|
||
| Should the identity be stored unencrypted on the card and be readable by everyone, or should the user have option to encrypt it? Perhaps it can be a user-choice? | ||
|
|
||
| That means I can identity with the card, but I don't need to give merchant access to perform payments on my behalf. | ||
|
|
||
| ## References | ||
|
|
||
| This is a section for references such as links to other documents or to reference implementations. | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.