MetacoSA / NBitcoin

Comprehensive Bitcoin library for the .NET framework.
MIT License
1.88k stars 848 forks source link

How do I use NBitcoin to solve the 4 user stories mentioned in BIP38? #727

Open FreeSMIME opened 5 years ago

FreeSMIME commented 5 years ago

How do I use NBitcoin to solve the scenarios in BIP38? I'm confused about the UnitTests use of the objects "BitcoinEncryptedSecretEC" "BitcoinPassphraseCode" "BitcoinConfirmationCode", and what values are considered "public", "private", or "issuer" in the paper wallet scenario

NicolasDorier commented 5 years ago

Read on https://programmingblockchain.gitbooks.io/programmingblockchain/content/ about BIP38.

That said, BIP38 is kind of deprecated. If you want to do your stories, look about BIP39 (mnemonic) and BIP32. I talk about it in the book.

Read also https://github.com/NicolasDorier/NBitcoin.Docs to understand how to design a wallet. Once you understand, just use NBXplorer which is an implementation of those concepts.

NicolasDorier commented 5 years ago

Depending on the level of control you need, you can also use https://btcpayserver.org (a payment process built on top of nbxplorer)

AA-65537 commented 5 years ago

Thanks Nicolas, Just for closure, I am looking to create an authentication protocol based on zero knowledge proofs and let that co-exist as payable/spendable identifier. I'll look at the docs and see if I can figure out how to reuse the private key in Bip38/32 in a signature scheme