All over the D&TD forum, there has been talk about creative things you can do with private and public keys, to emulate multi-signature transactions, or create shared secrets. While these things are all theoretically possible, it takes programming experience and familiarity with an ECDSA library to actually execute them.
Not anymore!. I have just recently integrated an ECDSA calculator into Armory, and anyone can use it, even with low-RAM computers by running Armory with the --noblockchain option. Using this interface you can:
- Multiply private keys together
- Scalar "multiply" elliptic curve points (public keys)
- Add elliptic curve points together
- Compute addresses from public keys
- Compute public keys from private keys
- Create and verify signature blocks to send through email
- Import addresses created with the calculator into your wallet
- Do all of the above with arbitrary keys, not necessarily in any wallet!
You can download Windows binaries, or find instructions for building on Linux on
the Armory webpage.
If you find this useful/interesting/amazing, please consider donating to my crowdfunding campaign, to help me continue to work on Armory (donate with credit card or BTC)! All donations of $10 or more come with my hour-long cryptography seminar titled Understanding Cryptography: Using Boring Math for Something Useful. It includes a brief introduction to elliptic curves. So, what is this calculator useful for?Here are
lots of great uses for this calculator. Here are two specific examples:
(1)Emulated 2-of-2 multisig Note: this is only for the case that one party will be redeeming the full amount of the encumbered funds: there is no trust-free way to split the funds with this method (which makes it useful for Casascius+OtherParty physical bitcoins).
- Each party produces a new address (which should not be in their wallet [explained later])
- From the wallet properties dialog, or the "Keys" tab in the calculator, fetch public keys and exchange with the other party.
- Fetch your own private key for the public key you just sent
- Use the middle entry in the calculator dialog, to multiply the other person's public key (enter x,y pair) by your private key
- Both parties get the same answer! This is because party A has private key a and public key a*G and party B has private key b and public key b*G. Both parties then end up producing a*b*G which is a new public key. However, neither party can calculate a*b (which is the private key for the public key both parties calculated).
- Calculate the address for the public key, and fund it with the amount of money agreed upon.
This is called an "Elliptic-Curve Diffie-Hellman" exchange (ECDH). It is usually for creating a shared secret with your public keys (such as an encryption key). In this case, it lets you produce an address that only someone with both private keys can access.
At the end of this process, one person must send the other person their private key, so that they can calculate the shared private key and redeem the funds! This is why the private key you generate should not be part of any wallet, because it will eventually be shared and you never want to share a private key in one of your wallets!
This could be used by Casascius and another party: Casascius and other party execute the process above, and fund the address with 1000 BTC (for a 1000 BTC gold bar). Casascius gets his hand on the gold bar, and puts his tamper-proof private key on it. He sends it to the other party, and they put
their tamper-proof private key sticker on the other side. Now, the user with the gold bar is the only person that will ever see both private keys (once he peels them off) and thus, the only person that can ever spend them! Just plug one into the 'a' field of the calculator and the other one into the 'b' field of the calculator (if Casascius wanted to do this, I would add a simpler, reduced interface for multiplying private keys, but it is technically do-able as-is).
(2)Send Signed Messages Remember when MtGox got hacked, and they had to retroactively verify every account's identity? This could've been soooo much easier:
"Dear user: We need to verify the identity of account 198483202. The first time this account was funded, the address 1Qkj3F3qZjkPdkj389 was used to send BTC. Please provide your name and email address, in a message signed by address 1Qkj3F3qZjkPdkj389."
This works because the account must've been originally funded by an address owned by the user. If this message signing interface existed, it would've given MtGox a
very easy way to identify most users. In case the user doesn't have the address anymore, they can just email MtGox and ask for alternative identity verification (which turned out to be the default).
Also consider the online casino situation. You dump 200 BTC into this anonymous online casino. Now, 3 weeks later, someone attempts to gamble with the money and/or cashout. How does the casino know that you are authorized to do these things? Well, all they care about is that the person requesting the cashout is the same person who originally funded the account. To be absolutely safe, they could've collected your identity and provided you a login, but that would dramatically reduce the anonymity of the system. Instead, the casino only records the first address ever used to fund your account, and that is your "username"! The user signs a message saying "I would like to withdraw 100 BTC to the following address: ..." Or it could be used as a way to "sign in" to your account. In all cases, the user never had to identify themselves, and the only piece of relevant information: that the same user who funded the account is requesting something: is easy to verify with a signed message!