Security Various potential attacks on the bitcoin network and its use as a payment system, real or theoretical, have been considered. The bitcoin protocol includes several features that protect it against some of those attacks, such as unauthorized spending, double spending, forging bitcoins, and tampering with the blockchain. Other attacks, such as theft of private keys, require due care by users.
Unauthorized spending Unauthorized spending is mitigated by bitcoin's implementation of public-private key cryptography. For example, when Alice sends a bitcoin to Bob, Bob becomes the new owner of the bitcoin. Eve, observing the transaction, might want to spend the bitcoin Bob just received, but she cannot sign the transaction without the knowledge of Bob's private key. A variant race attack (which has been called a Finney attack by reference to Hal Finney) requires the participation of a miner. Instead of sending both payment requests (to pay Bob and Alice with the same coins) to the network, Eve issues only Alice's payment request to the network, while the accomplice tries to mine a block that includes the payment to Bob instead of Alice. There is a positive probability that the rogue miner will succeed before the network, in which case the payment to Alice will be rejected. As with the plain race attack, Alice can reduce the risk of a Finney attack by waiting for the payment to be included in the blockchain.
History modification Each block that is added to the blockchain, starting with the block containing a given transaction, is called a confirmation of that transaction. Ideally, merchants and services that receive payment in bitcoin should wait for at least a few confirmations to be distributed over the network before assuming that the payment was done. The more confirmations that the merchant waits for, the more difficult it is for an attacker to successfully reverse the transaction—unless the attacker controls more than half the total network power, in which case it is called a 51% attack, or a majority attack. Although more difficult for attackers of a smaller size, there may be financial incentives that make history modification attacks profitable.
Quantum-Enabled Attacks The cryptographic primitives employed by Bitcoin are pre-quantum and therefore vulnerable to an attack from a adversary with a cryptographically-relevant, general-purpose quantum computer. The Bitcoin protocol uses the
Elliptic Curve Digital Signature Algorithm (ECDSA) to sign and verify transactions. ECDSA is vulnerable to attacks from a quantum computer due to its reliance on the security of the
discrete logarithm problem. The Bitcoin protocol allows senders to send Bitcoin to the
hash of the recipient's public key. The hash obscures the public key of the recipient and is therefore quantum-resistant while unspent. However, in order for the recipient to transact with the received bitcoin, the recipient would need to broadcast their public key. This broadcast could allow a quantum-enabled attacker to derive the private key from the public key and steal the Bitcoin. Additionally, the security of the
proof of work may be vulnerable to a general-purpose quantum computer with sufficient depth and stability to perform
hashing.
Grover's algorithm can be applied to the hash-based proof of work of the Bitcoin protocol to quadratically reduce the time it takes to find a valid nonce. If such quantum computers were available that could perform Grover's algorithm on a hash-based, proof-of-work blockchain, an attacker would very likely be capable of performing a 51% attack due to the massive speed-up.
Scalability Privacy Deanonymisation of clients Deanonymisation is a strategy in data mining in which anonymous data is cross-referenced with other sources of data to re-identify the anonymous data source. Along with transaction graph analysis, which may reveal connections between bitcoin addresses (pseudonyms), there is a possible attack which links a user's pseudonym to its
IP address. If the peer is using
Tor, the attack includes a method to separate the peer from the Tor network, forcing them to use their real IP address for any further transactions. The cost of the attack on the full bitcoin network was estimated to be under €1500 per month, as of 2014. == See also ==