Is it possible / trivial to compute the public key (or the bitcoin address) from the private key? I haven't studied asymmetric cryptography, but as far as I understand it, the public key is a function of the two secret prime numbers: I would thus guess that the answer to my question is yes.
If that is the case, how should I do it, practically?
Concretely, I want to store my bitcoin wallet information on one QR code. I could very well store both the public/private keys (using the URI format for inst.) but I would prefer storing only the private key in order to reduce the complexity of the QR, if that is possible.
From what I've understood, private key is practically a random number, and you can generate the public key from it using elliptic curve cryptography (
http://en.wikipedia.org/wiki/Elliptic_Curve_DSA).
Here's some more information I found at the Bitcoin wiki:
https://en.bitcoin.it/wiki/Technical_background_of_Bitcoin_addresses,
https://en.bitcoin.it/wiki/Secp256k1The exact algorithm in bitcoin context takes some effort to find (not to mention understand), but if you have the patience you can probably dig it out from the javascript sources at
https://www.bitaddress.org/. (I found the link here:
https://bitcointalk.org/index.php?topic=78132.0).