0

I have an iOS app which can generate Bitcoin private keys in either a hexadecimal or base64 output. I'd like take the resulting private key and generate the Bitcoin address from it. I've included the openssl library in my project but am confused as to which methods I should use and how to reference opaque pointers that come along with openssL methods when using them in swift.

  • Maybe use a iOS compatible bitcoin library like github.com/libbtc/libbtc? – Jonas Schnelli Mar 9 '18 at 6:40
  • I would love to get this to work in my iOS project but I'm not keen enough to understand how I can create a framework to include this library in iOS – Andrew Searson Mar 9 '18 at 7:59
0

I wanted to put this as a short comment, but it get’s unreadable. I also don’t go into segwit.

I am not clear on your question: are you looking how to use the OpenSSL library for iOS (then this might not be the right forum - review of parameters to an OpenSSL library is not bitcoin specific...), or more at the conceptual steps to come to an address? Then read on:-)

Searching for OpenSSL and keys in the forum reveals lots of hints on how to use OpenSSL at the command line. I put here some links, that I find useful for creation and conversion of keys:

https://bitcoin.stackexchange.com/questions/19597/bitcoin-address-generation?rq=1

https://bitcoin.stackexchange.com/questions/14013/what-are-steps-4-9-in-bitcoin-address-generation-for?rq=1

Then you‘ll have to go some additional steps, as described in bitcoin wiki.

And finally, if you want to check the addresses, this is a useful page:

http://gobittest.appspot.com/Address

Let us know how it goes, and see where we can bring you to your goal!

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.