1

I've been looking around I can't understand or find a complete explanation of how to accomplish this, I've tried multiple way even this link How do you get a Bitcoin Public Key from a Private Key which is a similar question but still does not return the same uncompressed public key I create with NBITCOIN, can anyone help, thanks in advance

  • 1
    Post your code and results. Currently this question is to open-ended to be answerable. As an aside, if all you want to do is generate Pubkey/Privkey pairs, you could role your own address generator. See "How to Create Bitcoin Address" here: en.bitcoin.it/wiki/… – RLH Jan 12 '16 at 13:24
  • Oh, one more thing. If you make your own C# address generator, you can verify each step of the creation process by using the example provided in the link I mentioned. If your implementation (or NBitcoin's implementation in your app) is broken, you can inspect which step the app is failing on, and ask more specific questions from there. – RLH Jan 12 '16 at 13:27
  • Note that creating private/public keys yourself is riddled with dangers and is not advisable. Random number generator problems are common. Edge cases where public keys do not match the private key. And many other situations that can cause loss of money. It's a good exercise to try to do, but think twice before putting anything in production. You're probably better off using an existing library, for example like libpsecp256k1 that Bitcoin Core uses. – Jannes Jan 12 '16 at 13:36
  • Thank you all for your responses, my problem is really creating the Public Key from the Private key which I'm able to create by converting the random value to Hex inserting "80" in front of it and doing Sha256 twice to get the checksum and add it to the end of the private key and version then I get the WIF by the Base58Encode. But can't find any good explanation on how to calculate the public Key, any ideas will be greatly appreciated, Thanks in advance – user31889 Jan 13 '16 at 19:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.