Take the 2-minute tour ×
Bitcoin Stack Exchange is a question and answer site for Bitcoin crypto-currency enthusiasts. It's 100% free, no registration required.

I am programming a specialty wallet software. I am able to generate a EC_key and valid bitcoin addresses. I am not sure what to save to a wallet file in order to recover the EC_key in the future. Must I save both the private and the public key? Can I just save the private key?

What is the preferred format to save these keys and what openssl function should I use to restore the keys?

share|improve this question

1 Answer 1

If you want to save your keys as a proper wallet.dat file, you would need to comply with its format.

If you want to store your keys for some other purposes, you only need to save the private keys (public ones can be recreated, you can check out my testing suite for that). You can save them in any format, but Wallet Import Format might be the best choice - it is compact and includes a checksum.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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