26

how long in bytes the private key is 32 bytes, or 256 bits then how many combinations of numbers it will contain There are 2^256 different private keys. That's a little larger than a 1 followed by 77 zeroes. what is the fastest computer or network of supercomputers At its peak around August 2011, the Bitcoin network was checking 15 trillion sha256 ...


24

The length of a key doesn't vary. Private keys are always 32 bytes, and public keys are always 65 bytes (or 33 bytes for a compressed public key). Public key hashes are always 20 bytes. The length of addresses vary because in Bitcoin's base58 encoding, leading zero bytes are expressed as a single "1". Other bytes require more than one character in order to ...


19

One method commonly in use is an "offline wallet." To generate an offline wallet, launch a bitcoin client on a known clean computer, virtual machine, or use a bootable Linux distribution like LinuxCoin. Make sure this system is NOT connected to the internet for this process. When the bitcoin client is first launched, it generates a brand new wallet.dat file ...


19

It gets it from the keypool, which has 100 pre-generated addresses by default. The next time you enter your passphrase, it will refill the pool with new addresses. Here's an example that shows the pool running out, and refilling when the password is supplied. The following commands were performed by a trained professional. Please don't try this at home (...


19

Yes, this is possible. However, I want to upfront state that this is not advisable for multiple reasons: Bitcoin keys are intended to be single use for privacy reasons, and leveraging them for encryption unnecessarily encourages treating them as a long-lived identity. There may be ugly and dangerous interactions when keys are used for multiple protocols ...


17

Another way to look at it is to take a look at a recent block that was mined, for example, block 388368. Looking at this block on blockchain.info, you can see that the hash for this block is: 0000000000000000021ff110a589e44f56979254a204557311204f803910fdfa It took roughly 10 minutes for all of the miners (doing a combined 700,000,000 giga-hashes per ...


16

A Bitcoin private key is a random 256-bit number. However, the public key reveals some information about the private key. The best known algorithms for breaking ECDSA require O(sqrt(n)) operations. That means 2^128 operations would be needed to break a Bitcoin account. The largest ECDSA key broken to date of the type that Bitcoin uses was 112 bits long. A ...


16

The "offline wallet" method described by David Perry is a good way to securely generate a bitcoin address/wallet.dat but in order to be secure from both loss and theft the first thing you will want to do is encrypt that wallet, and then make many different copies of it. One easy way to do this is using the program TrueCrypt as explained here. To summarise ...


11

Not in the current code. The way it works now, you have to make two RPC calls -- one to unlock the wallet for a period of time (walletpassphrase) and one to do the transaction (sendtoaddress). You can follow up with a command to lock the wallet immediately, if desired (walletlock). walletpassphrase <passphrase> <timeout> Stores the wallet ...


9

Private keys are 256 bit numbers Public keys are a pair of X,Y coordinates. Each coordinate is a 256 bit number. BUT for every X coordinate there are only two possible Y coordinates (one positive, one negative) so you can store a public key as just the X coordinate (256 bits) and the sign of the Y coordinate (1 bit) and the proper Y coordinate can be ...


9

All of Bitcoin's public-key cryptography is done with secp256k1. Every sane transaction has at least one secp256k1 signature and at least one secp256k1 public key or public key hash (address). A complete overnight failure of ECDSA/secp256k1 is the only technical failure I can think of which could destroy Bitcoin. This is very unlikely, though. Bitcoin is ...


9

No, there is not one private key. There is one Master private key. The master private key is then used to generate more private keys in a deterministic fashion, i.e. using the same master private key, you will generate the same private keys. Those private keys are what are actually used in your wallet. Their public keys are generated and the addressees ...


8

Looks like only the private keys are encrypted. Your addresses are stored unencrypted, so the software can show your balance without requiring a password.


7

Revalin made available a sript that you can try running: http://bitcointalk.org/index.php?topic=85495.msg942171#msg942171 There may not yet be anything else, but you'ld probably find someone willing to write one if you offered to send your wallet along with what you think the pass phrase might be and ask only for a fraction of the wallet's bitcoins back ...


7

Relation is one private key generates one public key and it is possible to recreate the public key. You can't recreate the private key though, so if you lose them, you lose all coins associated with that key. It is not computationally expensive to generate or recover keypairs, but you need specific programs for that support secp256k1 elliptic curve ...


6

Seems to me that the easiest way would be to create a brand new, encrypted wallet using the new client, then send all your coins to that one and forget about the old one. (You can force a new wallet by simply deleting wallet.dat before launching the client)


6

If the key pool is empty and the wallet is locked it will use an old key instead of generating a new key. When wallet encryption was implemented the block creation code was changed to make sure different coinbase transactions are generated in that case.


6

Below extract should answer your question. public class ECKeyPair implements Key { private static final SecureRandom secureRandom = new SecureRandom (); private static final X9ECParameters curve = SECNamedCurves.getByName ("secp256k1"); private static final ECDomainParameters domain = new ECDomainParameters (curve.getCurve (), curve.getG (), ...


6

Besides storing your current private keys, bitcoin wallet file also contains some pool of unused private keys. When encrypting wallet, this pool is flushed. If you make some transaction using new (encrypted) wallet then change is sent to one of addresses from the pool, which is not present in old (unencrypted) wallet. For example, you had 1BTC incoming ...


6

Yes. Yes. No. Note that that the software's encryption encrypts only the private keys, not transaction and address book information, so to protect your privacy you may want to add encrypting the file itself.


6

Problems: 1) Sybil attack (this is actually a huge one and has been for decades and decades in all kinds of applications). Other answers already mentioned this too. What is a majority if one attacker can easily pretend to be 10 million nodes? Bitcoin makes (mining) nodes do Proof of Work and it's the amount of (unfakeable) work done that counts, not the ...


6

The traditional answer for Bitcoin to this question is "pseudonymity, not anonymity". All the data published on the blockchain is necessary for the world to validate that transactions are valid, no theft occurs, no money is being printed, ... but not more. In particular, there are no identities on the chain, and reuse of (otherwise visible) addresses is ...


5

Another alternative is btcrecover, available on GitHub here. From the Tutorial: btcrecover is a free and open source multithreaded wallet password recovery tool with support for Armory, Bitcoin Core (a.k.a. Bitcoin-Qt), MultiBit (Classic and HD), Electrum (1.x and 2.x), mSIGNA (CoinVault), Hive for OS X, Blockchain.info (v1 and v2 wallet formats, both ...


5

The upcoming Bitcoin client v0.4 will have encryption on wallet.dat if you choose to set password on wallet.


5

bitaddress.org allows you to recreate your public key from a private key. Go to the "Wallet Details" tab, paste in the private key and click 'view details'. The page is a single large javascript program, and works entirely offline. If you don't trust it, you could disconnect from the Internet before pasting in your private key. If you really don't trust ...


5

Since 0.6.0, key import/export are available in the client itself, though only through RPC. The commands are called dumpprivkey and importprivkey. For example (on testnet): $ ./bitcoind getnewaddress n2JjZgLeCUgfubswxDm9zAaBGSLLHSLdNv $ ./bitcoind dumpprivkey n2JjZgLeCUgfubswxDm9zAaBGSLLHSLdNv ...


5

See the following links for an overview and for details. Note: In short, if you do not have a strong understanding of the BIP38 encryption and decryption workflow, do not BIP38-encrypt your paper wallet. Just print your paper wallet out without encryption, and keep it safe the same way you would jewels or cash. Just encrypting with AES provides excellent ...


5

The requirement for a one time pad to be secure is that it consists of uniformly random data, only known to the participants that should be able to encrypt/decrypt. The blockchain is not random (it's created by miners and users creating transactions), certainly not uniformly random (blocks and transactions have a very strict syntactic structure), and worst ...


5

If you want to encrypt messages, you should use a proper message/file encryption tool like PGP/GPG. Homebrewed cryptography using bitcoin things is prone to having poor security properties.


4

Bitcoin 0.5 will flush the key pool upon encryption. This means that when you encrypt a fresh wallet, none of its active reserve keys will ever have touched the disk in unencrypted form.


Only top voted, non community-wiki answers of a minimum length are eligible