Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I tried Crypto but they said a different exchange would be more suitable. I'm interested in how bitcoin addresses are created so I read through the technical details here - https://en.bitcoin.it/wiki/Technical_background_of_version_1_Bitcoin_addresses

I'm wondering how they can go from step 0 through to step 1. That is, how can you create the public key given only the private key?

Ideally I'd love to do it in python if possible.

share|improve this question
add comment

1 Answer

In ECDSA, the public key can be computed directly from the private key and algorithm parameters, see: http://en.wikipedia.org/wiki/Elliptic_Curve_DSA

If you want Python code, look at the Charm toolkit here:

https://github.com/JHUISI/charm/blob/master/charm/schemes/pksig/pksig_ecdsa.py#L38

x here is the private key, y is the public key, and g ** x corresponds to dA * G on the Wikipedia page.

share|improve this answer
    
I've learnt I'm not getting into a career with cryptography. Thanks for your help, I'm looking through now trying to figure it out. A little lost with how I use charm to generate it but I'll keep trying –  Peleus Apr 3 '13 at 0:11
add comment

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.