 |
March 30, 2011, 07:31:25 PM |
|
Here's my take on the idea:
1: Your wallet is encrypted. There are multiple options. The primary options are two, asymmetric or symmetric. More on this later.
2: Your ecrypted wallet is split into numbered pieces. Probably 64k per piece. A wallet of, let's say, 512 kb would be 8 pieces. Each piece are given a label consisting of one random string + piece number, the random number would preferably the public key of the wallet owner. Example label: 1GJKkkdc6cnriW6CFsi2gxrTME1CJzcfpo-01 To prevent spammers from uploading a billion intentially wrong pieces with the same label as yours you would sign each piece cryptographically so that you can verify that they are yours at download. You would also include a date stamp.
3: The pieces are uploaded. Everybody would store such pieces. Since the labels include the public keys from the keypair that was used to generate the signatures, each node could discard pieces with labels that do not match the signature of the piece. This prevents spammers from flooding the network with bad pieces and thus makes it easier to get the right ones at download.
4: When you download your pieces you make a request for pieces labels with your public key. You check the date stamp and verify the signature. Then you decrypt it.
Regarding encryption:
Option 1 - asymmetric encryptions like RSA (PGP and GPG): Advantages: You don't have to enter the password every time or store it in plaintext on the machine that encrypts the wallet and uploads them. All you need on the computer is the public key of the key pair to encrypt. You only need the private key and password when decrypting after fetching your pieces. The private key can be a 4096 bit RSA key that is stored in a safe box in a bank once while the wallet still is just as usable as before and you can make backups continously. Disadvantages: You must back up your private key seperately. There is no point in doing this in the network too, then you'd lose most of the advantages compared it has over symmetric encryption. You could just as well use symmectric encryption if you have no good way to back up the private key.
Option 2 - symmetric encryption like AES: Advantages: You don't need to keep track of any key files. All you need is the password that you remember in your head. The password would be used as a key by hashing it with SHA256 (which is considered very strong). Disadvantages: You need to enter your pass every time you start your miner or it has to be stored in plaintext. If your password sucks then it WILL be broken quickly since all an attacker need is your public key (and since you put this as a label on your pieces it's easy to get) and then start to bruteforce the pass. If you use the same password for it as for your email/facebook/whatever and *ever* have mentioned your public key in email/facebook/whatever, then *THAT IS ALL* an attacker need to "e-swipe" your wallet! If any of those sites are hacked and your pass is leaked, YOU HAVE LOST YOUR BITCOINS IN SECONDS! Do NOT use the same password for this as for anything else!
Note that for symmetric encryption you should still have an asymmetric keypair to sign the pieces before uploading, but at the recovery stage only the public key is needed and only needed to identify and authenticate your own pieces.
Summary: Wallets are split in pieces, are encrypted, signed and uploaded. Nodes that store them check the signature aginst the uploaded encrypted piece so that bad (spammer) pieces can be discarded (this don't have to be done every time, maybe for every 3rd piece to save CPU?). To get them for recovery you send a request for pieces with your public key. You verify them, assemble them, and then decrypt them to get your wallet file. With RSA you need the private key and the pass, with AES you only need a pass (different advantages and disadvantages).
|