<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://en.bitcoin.it/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Sergio+Demian+Lerner</id>
	<title>Bitcoin Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://en.bitcoin.it/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Sergio+Demian+Lerner"/>
	<link rel="alternate" type="text/html" href="https://en.bitcoin.it/wiki/Special:Contributions/Sergio_Demian_Lerner"/>
	<updated>2026-06-03T14:07:50Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Weaknesses&amp;diff=36556</id>
		<title>Weaknesses</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Weaknesses&amp;diff=36556"/>
		<updated>2013-04-01T13:53:51Z</updated>

		<summary type="html">&lt;p&gt;Sergio Demian Lerner: /* Denial of Service (DoS) attacks */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Might be a problem ==&lt;br /&gt;
=== Wallet Vulnerable To Theft ===&lt;br /&gt;
&lt;br /&gt;
The [[wallet]] is stored unencrypted, by default, and thus becomes a valuable target for theft.  Recent releases of the Bitcoin client now supports encryption to protect the wallet data, though the user must opt-in.&lt;br /&gt;
&lt;br /&gt;
=== Tracing a coin&#039;s history ===&lt;br /&gt;
Tracing a coin&#039;s history can be used to connect identities to addresses. [[Anonymity|More info]].&lt;br /&gt;
&lt;br /&gt;
=== Cancer nodes ===&lt;br /&gt;
It&#039;s trivial for an attacker to fill the network with clients controlled by him. This might be helpful in the execution of other attacks.&lt;br /&gt;
&lt;br /&gt;
For example, an attacker might connect 100,000 IP addresses to the IRC bootstrap channel. You would then be very likely to connect only to attacker nodes. This state can be exploited in (at least) the following ways:&lt;br /&gt;
* The attacker can refuse to relay blocks and transactions from everyone, disconnecting you from the network.&lt;br /&gt;
* The attacker can relay only blocks that he creates, putting you on a separate network. You&#039;re then open to [[double-spending]] attacks.&lt;br /&gt;
* If you rely on transactions with 0 confirmations, the attacker can just filter out certain transactions to execute a double-spending attack.&lt;br /&gt;
* Low-latency encryption/anonymization of Bitcoin&#039;s transmissions (With Tor, JAP, etc.) can be defeated relatively easy with a timing attack if you&#039;re connected to several of the attacker&#039;s nodes and the attacker is watching your transmissions at your ISP.&lt;br /&gt;
&lt;br /&gt;
Bitcoin makes these attacks more difficult by only making an outbound connection to one IP address per /16 (x.y.0.0). Incoming connections are unlimited and unregulated, but this is generally only a problem in the anonymity case, where you&#039;re probably already unable to accept incoming connections.&lt;br /&gt;
&lt;br /&gt;
Looking for suspiciously low network hash-rates may help prevent the second one.&lt;br /&gt;
&lt;br /&gt;
=== No authentication for IP transfers ===&lt;br /&gt;
Since there&#039;s no authentication when sending to an [[IP address]] (as opposed to a [[Address|Bitcoin address]]), executing a man-in-the-middle attack and stealing the sent BitCoins is trivial. This attack is downright &#039;&#039;likely&#039;&#039; if you&#039;re using Tor. For this reason, IP transfers are disabled by default in modern Bitcoin clients, though the feature can be enabled with a command line argument if desired.&lt;br /&gt;
&lt;br /&gt;
=== Packet sniffing ===&lt;br /&gt;
Someone who can see all of your Internet traffic can easily see when you send a transaction that you didn&#039;t receive (which means that it&#039;s yours). This would be made more difficult (but not impossible) if node-to-node encryption was used.&lt;br /&gt;
&lt;br /&gt;
=== Denial of Service (DoS) attacks ===&lt;br /&gt;
Sending lots of data to a node may make it so busy it cannot process normal Bitcoin transactions.  Bitcoin has some denial-of-service prevention built-in, but is likely still vulnerable to more sophisticated denial-of-service attacks.&lt;br /&gt;
&lt;br /&gt;
These are the current Bitcoin Satoshi client protections to deter DoS attacks, as of version 0.7.0:&lt;br /&gt;
&lt;br /&gt;
# Does not forward orphan transactions/blocks&lt;br /&gt;
# Does not forward double-spend transactions&lt;br /&gt;
# Does not forward the same block, transaction or alert twice to the same peer.&lt;br /&gt;
# Continuous rate-limit of free transactions to mitigate &#039;penny-flooding&#039;&lt;br /&gt;
# Keeps a DoS score of each connected peer and disconnects from a peer that send messages that fail to comply with the rules.&lt;br /&gt;
# Bans IP addresses that misbehave for a time lapse (24 hours default)&lt;br /&gt;
# Limits the number of stored orphan transactions (10000 by default)&lt;br /&gt;
# Uses a signature cache to prevent attacks that try to continuously trigger the re-verification of stored orphan transactions (protects from https://bitcointalk.org/index.php?topic=136422.0 attack)&lt;br /&gt;
# Limits the number of stored signatures in the signature cache (50000 signatures by default)&lt;br /&gt;
# Tries to catch all possible errors in transactions before the signature verifications take place, to avoid DoS attacks on CPU usage.&lt;br /&gt;
# Penalizes peers that send lots of duplicate/expired/invalid-signature/whatever alerts, so they eventually get banned.&lt;br /&gt;
# In orphan/signature caches, when removing an item, evicts a random entry.&lt;br /&gt;
# Data structures are specially chosen to avoid loops in which the number of iterations can be controller by an attacker that result in exponential complexity.&lt;br /&gt;
# Ignores big orphan transactions, to avoid a send-big-orphans memory exhaustion attack.&lt;br /&gt;
# In RPC: Only sends a HTTP 403 response if it&#039;s not using SSL to prevent a DoS during the SSL handshake.&lt;br /&gt;
# In RPC: Sleeps some time if authorization fails to deter brute-forcing short passwords.&lt;br /&gt;
# In GUI: Limits URI length to prevent a DoS against the QR-Code dialog&lt;br /&gt;
# Considers non-standard signature scripts with size greater than 500 bytes.&lt;br /&gt;
# Considers non-standard signature scripts that contain operations that are not PUSHs.&lt;br /&gt;
# Does not forward nor process non-standard transactions&lt;br /&gt;
&lt;br /&gt;
These are protocol rules built to prevent DoS:&lt;br /&gt;
&lt;br /&gt;
# Restricts the block size to 1 megabyte.&lt;br /&gt;
# Restricts the maximum number of signature checks a transaction input may request&lt;br /&gt;
# Limits the size of each script (up to 10000 bytes)&lt;br /&gt;
# Limits the size of each value pushed while evaluating a a script (up to 520 bytes)&lt;br /&gt;
# Limits the number of expensive operations in a script (up to 201 operations). All but pushs are considered expensive. Also each key argument of signature checking in multi-signature checking (OP_CHECKMULTISIG) is considered an additional operation.&lt;br /&gt;
# Limits the number of key arguments OP_CHECKMULTISIG can use (up to 20 keys)&lt;br /&gt;
# Limits the number of the stack elements that can be stored simultaneously (up to 1000 elements, in standard and alt stacks together)&lt;br /&gt;
# Limits the number of signature checks a block may request (up to 20000 checks)&lt;br /&gt;
&lt;br /&gt;
These are the Satoshi client protections added in version 0.8.0: &lt;br /&gt;
&lt;br /&gt;
# Transactions greater than 100 Kbytes are considered non-standard (protects from variations of the https://bitcointalk.org/index.php?topic=140078.0 attack).&lt;br /&gt;
# Only the UXTO (Unspent Transaction Output Set) is stored in memory, the remaining data is stored on disk.&lt;br /&gt;
# When processing a transaction, before fetching transaction inputs from disk to memory, the client checks that all the inputs are unspent (protects from the Continuous Hard Disk Seek/Read Activity (https://bitcointalk.org/index.php?topic=144122.0) DoS attack)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Satoshi client does not directly limit peer bandwidth nor CPU usage.&lt;br /&gt;
&lt;br /&gt;
=== Forcing clock drift against a target node ===&lt;br /&gt;
&lt;br /&gt;
See [http://culubas.blogspot.com/2011/05/timejacking-bitcoin_802.html Timejacking] for a description of this attack. It can be fixed by changing how nodes calculate the current time.&lt;br /&gt;
&lt;br /&gt;
=== Illegal content in the block chain ===&lt;br /&gt;
It is illegal in some countries to possess/distribute certain kinds of data. Since arbitrary data can be included in Bitcoin transactions, and clients must normally have a copy of all unspent transactions, this could cause legal problems.&lt;br /&gt;
&lt;br /&gt;
=== Security Vulnerabilities and bugs  ===&lt;br /&gt;
It&#039;s possible but unlikely that a newly discovered bug or security vulnerability in the standard client could lead to a block chain split, or the need for every node to upgrade in a short time period. For example, a single malformed message tailored to exploit a specific vulnerability, when spread from node to node, could cause the whole network to shutdown in a few hours. Bugs that break user anonymity, on the contrary, have been found, since the pseudo-anonymity property of Bitcoin has been analyzed less.&lt;br /&gt;
Starting from version 0.7.0, Bitcoin client can be considered a mature project. The security critical sections of the source code are updated less and less frequently and those parts have been reviewed by many computer security experts. Also Bitcoin Satoshi client has passed the test of being on-line for more than 3 years, without a single vulnerability being exploited &#039;&#039;in the wild&#039;&#039;. &lt;br /&gt;
See [[Common_Vulnerabilities_and_Exposures]] for a detailed list of vulnerabilities detected and fixed.&lt;br /&gt;
&lt;br /&gt;
== Probably not a problem ==&lt;br /&gt;
&lt;br /&gt;
===Breaking the cryptography===&lt;br /&gt;
SHA-256 and ECDSA are considered very strong currently, but they might be broken in the far future. If that happens, BitCoin can shift to a stronger algorithm. [https://bitcointalk.org/index.php?topic=191.msg1585#msg1585 More info].&lt;br /&gt;
&lt;br /&gt;
===Scalability===&lt;br /&gt;
BitCoin can easily scale beyond the level of traffic VISA sees globally today. See the discussion on the [[scalability]] page for more information.&lt;br /&gt;
&lt;br /&gt;
===Segmentation===&lt;br /&gt;
If there is even a &amp;quot;trickle&amp;quot; of a connection between two sides of a segmented network, things should still work perfectly. When block chains are combined, all of the non-generation transactions in the shorter chain are re-added to the transaction pool -- they&#039;ll start over at 0/unconfirmed, but they&#039;ll still be valid. No mature transactions will be lost unless the segmentation persists for longer than ~120 blocks. Then generations will start to mature, and any transactions based on those generations will become invalid when recombined with the longer chain. [https://bitcointalk.org/index.php?topic=241.msg2071#msg2071 More info].&lt;br /&gt;
&lt;br /&gt;
=== Attacking all users ===&lt;br /&gt;
The IP addresses of most users are totally public. You can use Tor to hide this, but the network won&#039;t work if everyone does this. BitCoin requires that &#039;&#039;some&#039;&#039; country is still free.&lt;br /&gt;
&lt;br /&gt;
=== Dropping transactions ===&lt;br /&gt;
Nodes that generate blocks can choose not to include a transaction in their blocks. When this happens, the transaction remains &amp;quot;active&amp;quot; and can be included in a later block. Two things discourage this:&lt;br /&gt;
* Nodes only hash a fixed-size &#039;&#039;header&#039;&#039;, so there is no speed advantage to dropping transactions.&lt;br /&gt;
* [[Satoshi]] has [https://bitcointalk.org/index.php?topic=165.msg1595#msg1595 communicated] that he will write code to stop this kind of thing if it becomes a problem.&lt;br /&gt;
&lt;br /&gt;
=== Attacker has a lot of computing power ===&lt;br /&gt;
An attacker that controls more than 50% of the network&#039;s computing power can, for the time that he is in control, exclude and modify the ordering of transactions. This allows him to:&lt;br /&gt;
* Reverse transactions that he sends while he&#039;s in control.  This has the potential to [[Double-spending#51.25_attack|double-spend transactions]] that previously had already been seen in the block chain.&lt;br /&gt;
* Prevent some or all transactions from gaining any confirmations&lt;br /&gt;
* Prevent some or all other miners from mining any valid blocks&lt;br /&gt;
The attacker &#039;&#039;can&#039;t&#039;&#039;:&lt;br /&gt;
* Reverse other people&#039;s transactions&lt;br /&gt;
* Prevent transactions from being sent at all (they&#039;ll show as 0/unconfirmed)&lt;br /&gt;
* Change the number of coins generated per block&lt;br /&gt;
* Create coins out of thin air&lt;br /&gt;
* Send coins that never belonged to him&lt;br /&gt;
&lt;br /&gt;
It&#039;s much more difficult to change historical blocks, and it becomes exponentially more difficult the further back you go. As above, changing historical blocks only allows you to exclude and change the ordering of transactions. It&#039;s impossible to change blocks created before the last checkpoint.&lt;br /&gt;
&lt;br /&gt;
Since this attack doesn&#039;t permit all that much power over the network, it is expected that no one will attempt it. A profit-seeking person will always gain more by just following the rules, and even someone trying to destroy the system will probably find other attacks more attractive. However, if this attack is successfully executed, it will be difficult or impossible to &amp;quot;untangle&amp;quot; the mess created -- any changes the attacker makes might become permanent.&lt;br /&gt;
&lt;br /&gt;
=== Spamming transactions ===&lt;br /&gt;
&lt;br /&gt;
It is easy to send transactions to yourself repeatedly. If these transactions fill blocks to the maximum size (1MB), other transactions would be delayed until the next block.&lt;br /&gt;
&lt;br /&gt;
This is made expensive by the [[transaction fee|fees]] that would be required after the 50KB of free transactions per block are exhausted. An attacker will eventually eliminate free transactions, but Bitcoin fees will always be low because raising fees above 0.01 BTC per KB would require spending transaction fees. An attacker will eventually run out of money. Even if an attacker wants to waste money, transactions are further prioritized by the time since the coins were last spent, so attacks spending the same coins repeatedly are less effective.&lt;br /&gt;
&lt;br /&gt;
=== The [[Double-spending#Finney_attack|Finney attack]] ===&lt;br /&gt;
Named for Hal Finney, who first described this variation of a double-spend attack involving accepting [http://www.bitcointalk.org/index.php?topic=3441.msg48384#msg48384 0-confirmation transactions].  Accepting 0-confirmation large-value transactions is problematic; accepting them for low-value transactions (after waiting several seconds to detect an ordinary double-spend attempt) is probably safe.&lt;br /&gt;
&lt;br /&gt;
===Rival/malicious client code===&lt;br /&gt;
Any rival client must follow Bitcoin&#039;s rules or else all current BitCoin clients will ignore it. You&#039;d have to actually get people to &#039;&#039;use&#039;&#039; your client. A better client that pretends to follow the same rules, but with an exception known only to the author (possibly by making it closed source), might conceivably be able to gain widespread adoption. At that point, its author could use his exception and go largely unnoticed.&lt;br /&gt;
&lt;br /&gt;
== Definitely not a problem ==&lt;br /&gt;
&lt;br /&gt;
===Coin destruction===&lt;br /&gt;
Bitcoin has 2.1 quadrillion raw units, making up 8 decimals of BTC precision, so the entire network could potentially operate on much less than the full quantity of Bitcoins. If deflation gets to the point where transactions of more than 10 BTC are unheard of, clients can just switch to another unit so that, for example, it shows 10 mBTC rather than 0.01 BTC.&lt;br /&gt;
&lt;br /&gt;
The maximum number of raw units might not be enough if the &#039;&#039;entire world&#039;&#039; starts using BTC, but it would not be too difficult to increase precision in that case. The transaction format and version number would be scheduled to change at some particular block number after a year or two, and everyone would have to update by then.&lt;br /&gt;
&lt;br /&gt;
===Generating tons of addresses===&lt;br /&gt;
Generating an address doesn&#039;t touch the network at all. You&#039;d only be wasting your CPU resources and disk space.&lt;br /&gt;
&lt;br /&gt;
Also, a collision is highly unlikely.&lt;br /&gt;
&lt;br /&gt;
Keys are 256 bit in length and are hashed in a 160 bit address.(2^160th power)&lt;br /&gt;
Divide it by the world population and you have about 215,000,000,000,000,000,000,000,000,000,000,000,000 addresses per capita.(2.15 x 10^38)[http://www.wolframalpha.com/input/?i=2^160+%2F+world+population]&lt;br /&gt;
&lt;br /&gt;
===Everyone calculates at the same rate===&lt;br /&gt;
If everyone began with identical blocks and started their nonce at 1 and incremented, the fastest machine would always win. However, each block contains a new, random public key known only to you in the list of transactions.  The 256-bit &amp;quot;Merkle tree&amp;quot; hash of this is part of the block header.&lt;br /&gt;
&lt;br /&gt;
So everyone begins with slightly different blocks and everyone truly has a random chance of winning (modified by CPU power).&lt;br /&gt;
&lt;br /&gt;
===Generate &amp;quot;valid&amp;quot; blocks with a lower difficulty than normal===&lt;br /&gt;
Using unmodified Bitcoin code, an attacker could segment himself from the main network and generate a long block chain with a lower difficulty than the real network. These blocks would be totally valid for his network. However, it would be impossible to combine the two networks (and the &amp;quot;false&amp;quot; chain would be destroyed in the process).&lt;br /&gt;
&lt;br /&gt;
* Even though your network&#039;s difficulty can be less than the real difficulty, this doesn&#039;t give you any advantage over the real network. You&#039;ll gain ground when the real network is taking more than 10 minutes to generate a block, but you&#039;ll lose ground when the network takes less than 10 minutes.&lt;br /&gt;
* Every few releases of Bitcoin, a recent block hash is hardcoded into the source code. Any blocks before that point can&#039;t be changed. An attacker starting at that point would have to reduce the difficulty, but this would require him to generate blocks at a much slower rate than once per 10 minutes. By the time he finally gets to a difficulty of 1, a new version of Bitcoin with an updated hardcoded block will probably have been released.&lt;br /&gt;
* &amp;quot;Block chain length&amp;quot; is calculated from the combined difficulty of all the blocks, not just the number of blocks in the chain. The one that represents the most CPU usage will win.&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
&lt;br /&gt;
* [[Double-spending]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Technical]]&lt;/div&gt;</summary>
		<author><name>Sergio Demian Lerner</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Weaknesses&amp;diff=36555</id>
		<title>Weaknesses</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Weaknesses&amp;diff=36555"/>
		<updated>2013-04-01T13:20:38Z</updated>

		<summary type="html">&lt;p&gt;Sergio Demian Lerner: /* Denial of Service (DoS) attacks */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Might be a problem ==&lt;br /&gt;
=== Wallet Vulnerable To Theft ===&lt;br /&gt;
&lt;br /&gt;
The [[wallet]] is stored unencrypted, by default, and thus becomes a valuable target for theft.  Recent releases of the Bitcoin client now supports encryption to protect the wallet data, though the user must opt-in.&lt;br /&gt;
&lt;br /&gt;
=== Tracing a coin&#039;s history ===&lt;br /&gt;
Tracing a coin&#039;s history can be used to connect identities to addresses. [[Anonymity|More info]].&lt;br /&gt;
&lt;br /&gt;
=== Cancer nodes ===&lt;br /&gt;
It&#039;s trivial for an attacker to fill the network with clients controlled by him. This might be helpful in the execution of other attacks.&lt;br /&gt;
&lt;br /&gt;
For example, an attacker might connect 100,000 IP addresses to the IRC bootstrap channel. You would then be very likely to connect only to attacker nodes. This state can be exploited in (at least) the following ways:&lt;br /&gt;
* The attacker can refuse to relay blocks and transactions from everyone, disconnecting you from the network.&lt;br /&gt;
* The attacker can relay only blocks that he creates, putting you on a separate network. You&#039;re then open to [[double-spending]] attacks.&lt;br /&gt;
* If you rely on transactions with 0 confirmations, the attacker can just filter out certain transactions to execute a double-spending attack.&lt;br /&gt;
* Low-latency encryption/anonymization of Bitcoin&#039;s transmissions (With Tor, JAP, etc.) can be defeated relatively easy with a timing attack if you&#039;re connected to several of the attacker&#039;s nodes and the attacker is watching your transmissions at your ISP.&lt;br /&gt;
&lt;br /&gt;
Bitcoin makes these attacks more difficult by only making an outbound connection to one IP address per /16 (x.y.0.0). Incoming connections are unlimited and unregulated, but this is generally only a problem in the anonymity case, where you&#039;re probably already unable to accept incoming connections.&lt;br /&gt;
&lt;br /&gt;
Looking for suspiciously low network hash-rates may help prevent the second one.&lt;br /&gt;
&lt;br /&gt;
=== No authentication for IP transfers ===&lt;br /&gt;
Since there&#039;s no authentication when sending to an [[IP address]] (as opposed to a [[Address|Bitcoin address]]), executing a man-in-the-middle attack and stealing the sent BitCoins is trivial. This attack is downright &#039;&#039;likely&#039;&#039; if you&#039;re using Tor. For this reason, IP transfers are disabled by default in modern Bitcoin clients, though the feature can be enabled with a command line argument if desired.&lt;br /&gt;
&lt;br /&gt;
=== Packet sniffing ===&lt;br /&gt;
Someone who can see all of your Internet traffic can easily see when you send a transaction that you didn&#039;t receive (which means that it&#039;s yours). This would be made more difficult (but not impossible) if node-to-node encryption was used.&lt;br /&gt;
&lt;br /&gt;
=== Denial of Service (DoS) attacks ===&lt;br /&gt;
Sending lots of data to a node may make it so busy it cannot process normal Bitcoin transactions.  Bitcoin has some denial-of-service prevention built-in, but is likely still vulnerable to more sophisticated denial-of-service attacks.&lt;br /&gt;
&lt;br /&gt;
These are the current Bitcoin Satoshi client protections to deter DoS attacks, as of version 0.7.0:&lt;br /&gt;
&lt;br /&gt;
# Does not forward orphan transactions/blocks&lt;br /&gt;
# Does not forward double-spend transactions&lt;br /&gt;
# Does not forward the same block, transaction or alert twice to the same peer.&lt;br /&gt;
# Continuous rate-limit of free transactions to mitigate &#039;penny-flooding&#039;&lt;br /&gt;
# Keeps a DoS score of each connected peer and disconnects from a peer that send messages that fail to comply with the rules.&lt;br /&gt;
# Bans IP addresses that misbehave for a time lapse (24 hours default)&lt;br /&gt;
# Limits the number of stored orphan transactions (10000 by default)&lt;br /&gt;
# Uses a signature cache to prevent attacks that try to continuously trigger the re-verification of stored orphan transactions (protects from https://bitcointalk.org/index.php?topic=136422.0 attack)&lt;br /&gt;
# Limits the number of stored signatures in the signature cache (50000 signatures by default)&lt;br /&gt;
# Tries to catch all possible errors in transactions before the signature verifications take place, to avoid DoS attacks on CPU usage.&lt;br /&gt;
# Penalizes peers that send lots of duplicate/expired/invalid-signature/whatever alerts, so they eventually get banned.&lt;br /&gt;
# In orphan/signature caches, when removing an item, evicts a random entry.&lt;br /&gt;
# Data structures are specially chosen to avoid loops in which the number of iterations can be controller by an attacker that result in exponential complexity.&lt;br /&gt;
# Ignores big orphan transactions, to avoid a send-big-orphans memory exhaustion attack.&lt;br /&gt;
# In RPC: Only sends a HTTP 403 response if it&#039;s not using SSL to prevent a DoS during the SSL handshake.&lt;br /&gt;
# In RPC: Sleeps some time if authorization fails to deter brute-forcing short passwords.&lt;br /&gt;
# In GUI: Limits URI length to prevent a DoS against the QR-Code dialog&lt;br /&gt;
# Considers non-standard signature scripts with size greater than 500 bytes.&lt;br /&gt;
# Considers non-standard signature scripts that contain operations that are not PUSHs.&lt;br /&gt;
# Does not forward nor process non-standard transactions&lt;br /&gt;
&lt;br /&gt;
These are protocol rules built to prevent DoS:&lt;br /&gt;
&lt;br /&gt;
# Restricts the block size to 1 megabyte.&lt;br /&gt;
# Restricts the maximum number of signature checks a transaction input may request&lt;br /&gt;
# Limits the size of each value pushed while evaluating a a script (up to 520 bytes)&lt;br /&gt;
# Limits the number of expensive operations in a script (up to 201 operations). All but pushs are considered expensive. Also each key argument of signature checking in multi-signature checking (OP_CHECKMULTISIG) is considered an additional operation.&lt;br /&gt;
# Limits the number of key arguments OP_CHECKMULTISIG can use (up to 20 keys)&lt;br /&gt;
# Limits the number of the stack elements that can be stored simultaneously (up to 1000 elements, in standard and alt stacks together)&lt;br /&gt;
# Limits the number of signature checks a block may request (up to 20000 checks)&lt;br /&gt;
&lt;br /&gt;
These are the Satoshi client protections added in version 0.8.0: &lt;br /&gt;
&lt;br /&gt;
# Transactions greater than 100 Kbytes are considered non-standard (protects from variations of the https://bitcointalk.org/index.php?topic=140078.0 attack).&lt;br /&gt;
# Only the UXTO (Unspent Transaction Output Set) is stored in memory, the remaining data is stored on disk.&lt;br /&gt;
# When processing a transaction, before fetching transaction inputs from disk to memory, the client checks that all the inputs are unspent (protects from the Continuous Hard Disk Seek/Read Activity (https://bitcointalk.org/index.php?topic=144122.0) DoS attack)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Satoshi client does not directly limit peer bandwidth nor CPU usage.&lt;br /&gt;
&lt;br /&gt;
=== Forcing clock drift against a target node ===&lt;br /&gt;
&lt;br /&gt;
See [http://culubas.blogspot.com/2011/05/timejacking-bitcoin_802.html Timejacking] for a description of this attack. It can be fixed by changing how nodes calculate the current time.&lt;br /&gt;
&lt;br /&gt;
=== Illegal content in the block chain ===&lt;br /&gt;
It is illegal in some countries to possess/distribute certain kinds of data. Since arbitrary data can be included in Bitcoin transactions, and clients must normally have a copy of all unspent transactions, this could cause legal problems.&lt;br /&gt;
&lt;br /&gt;
=== Security Vulnerabilities and bugs  ===&lt;br /&gt;
It&#039;s possible but unlikely that a newly discovered bug or security vulnerability in the standard client could lead to a block chain split, or the need for every node to upgrade in a short time period. For example, a single malformed message tailored to exploit a specific vulnerability, when spread from node to node, could cause the whole network to shutdown in a few hours. Bugs that break user anonymity, on the contrary, have been found, since the pseudo-anonymity property of Bitcoin has been analyzed less.&lt;br /&gt;
Starting from version 0.7.0, Bitcoin client can be considered a mature project. The security critical sections of the source code are updated less and less frequently and those parts have been reviewed by many computer security experts. Also Bitcoin Satoshi client has passed the test of being on-line for more than 3 years, without a single vulnerability being exploited &#039;&#039;in the wild&#039;&#039;. &lt;br /&gt;
See [[Common_Vulnerabilities_and_Exposures]] for a detailed list of vulnerabilities detected and fixed.&lt;br /&gt;
&lt;br /&gt;
== Probably not a problem ==&lt;br /&gt;
&lt;br /&gt;
===Breaking the cryptography===&lt;br /&gt;
SHA-256 and ECDSA are considered very strong currently, but they might be broken in the far future. If that happens, BitCoin can shift to a stronger algorithm. [https://bitcointalk.org/index.php?topic=191.msg1585#msg1585 More info].&lt;br /&gt;
&lt;br /&gt;
===Scalability===&lt;br /&gt;
BitCoin can easily scale beyond the level of traffic VISA sees globally today. See the discussion on the [[scalability]] page for more information.&lt;br /&gt;
&lt;br /&gt;
===Segmentation===&lt;br /&gt;
If there is even a &amp;quot;trickle&amp;quot; of a connection between two sides of a segmented network, things should still work perfectly. When block chains are combined, all of the non-generation transactions in the shorter chain are re-added to the transaction pool -- they&#039;ll start over at 0/unconfirmed, but they&#039;ll still be valid. No mature transactions will be lost unless the segmentation persists for longer than ~120 blocks. Then generations will start to mature, and any transactions based on those generations will become invalid when recombined with the longer chain. [https://bitcointalk.org/index.php?topic=241.msg2071#msg2071 More info].&lt;br /&gt;
&lt;br /&gt;
=== Attacking all users ===&lt;br /&gt;
The IP addresses of most users are totally public. You can use Tor to hide this, but the network won&#039;t work if everyone does this. BitCoin requires that &#039;&#039;some&#039;&#039; country is still free.&lt;br /&gt;
&lt;br /&gt;
=== Dropping transactions ===&lt;br /&gt;
Nodes that generate blocks can choose not to include a transaction in their blocks. When this happens, the transaction remains &amp;quot;active&amp;quot; and can be included in a later block. Two things discourage this:&lt;br /&gt;
* Nodes only hash a fixed-size &#039;&#039;header&#039;&#039;, so there is no speed advantage to dropping transactions.&lt;br /&gt;
* [[Satoshi]] has [https://bitcointalk.org/index.php?topic=165.msg1595#msg1595 communicated] that he will write code to stop this kind of thing if it becomes a problem.&lt;br /&gt;
&lt;br /&gt;
=== Attacker has a lot of computing power ===&lt;br /&gt;
An attacker that controls more than 50% of the network&#039;s computing power can, for the time that he is in control, exclude and modify the ordering of transactions. This allows him to:&lt;br /&gt;
* Reverse transactions that he sends while he&#039;s in control.  This has the potential to [[Double-spending#51.25_attack|double-spend transactions]] that previously had already been seen in the block chain.&lt;br /&gt;
* Prevent some or all transactions from gaining any confirmations&lt;br /&gt;
* Prevent some or all other miners from mining any valid blocks&lt;br /&gt;
The attacker &#039;&#039;can&#039;t&#039;&#039;:&lt;br /&gt;
* Reverse other people&#039;s transactions&lt;br /&gt;
* Prevent transactions from being sent at all (they&#039;ll show as 0/unconfirmed)&lt;br /&gt;
* Change the number of coins generated per block&lt;br /&gt;
* Create coins out of thin air&lt;br /&gt;
* Send coins that never belonged to him&lt;br /&gt;
&lt;br /&gt;
It&#039;s much more difficult to change historical blocks, and it becomes exponentially more difficult the further back you go. As above, changing historical blocks only allows you to exclude and change the ordering of transactions. It&#039;s impossible to change blocks created before the last checkpoint.&lt;br /&gt;
&lt;br /&gt;
Since this attack doesn&#039;t permit all that much power over the network, it is expected that no one will attempt it. A profit-seeking person will always gain more by just following the rules, and even someone trying to destroy the system will probably find other attacks more attractive. However, if this attack is successfully executed, it will be difficult or impossible to &amp;quot;untangle&amp;quot; the mess created -- any changes the attacker makes might become permanent.&lt;br /&gt;
&lt;br /&gt;
=== Spamming transactions ===&lt;br /&gt;
&lt;br /&gt;
It is easy to send transactions to yourself repeatedly. If these transactions fill blocks to the maximum size (1MB), other transactions would be delayed until the next block.&lt;br /&gt;
&lt;br /&gt;
This is made expensive by the [[transaction fee|fees]] that would be required after the 50KB of free transactions per block are exhausted. An attacker will eventually eliminate free transactions, but Bitcoin fees will always be low because raising fees above 0.01 BTC per KB would require spending transaction fees. An attacker will eventually run out of money. Even if an attacker wants to waste money, transactions are further prioritized by the time since the coins were last spent, so attacks spending the same coins repeatedly are less effective.&lt;br /&gt;
&lt;br /&gt;
=== The [[Double-spending#Finney_attack|Finney attack]] ===&lt;br /&gt;
Named for Hal Finney, who first described this variation of a double-spend attack involving accepting [http://www.bitcointalk.org/index.php?topic=3441.msg48384#msg48384 0-confirmation transactions].  Accepting 0-confirmation large-value transactions is problematic; accepting them for low-value transactions (after waiting several seconds to detect an ordinary double-spend attempt) is probably safe.&lt;br /&gt;
&lt;br /&gt;
===Rival/malicious client code===&lt;br /&gt;
Any rival client must follow Bitcoin&#039;s rules or else all current BitCoin clients will ignore it. You&#039;d have to actually get people to &#039;&#039;use&#039;&#039; your client. A better client that pretends to follow the same rules, but with an exception known only to the author (possibly by making it closed source), might conceivably be able to gain widespread adoption. At that point, its author could use his exception and go largely unnoticed.&lt;br /&gt;
&lt;br /&gt;
== Definitely not a problem ==&lt;br /&gt;
&lt;br /&gt;
===Coin destruction===&lt;br /&gt;
Bitcoin has 2.1 quadrillion raw units, making up 8 decimals of BTC precision, so the entire network could potentially operate on much less than the full quantity of Bitcoins. If deflation gets to the point where transactions of more than 10 BTC are unheard of, clients can just switch to another unit so that, for example, it shows 10 mBTC rather than 0.01 BTC.&lt;br /&gt;
&lt;br /&gt;
The maximum number of raw units might not be enough if the &#039;&#039;entire world&#039;&#039; starts using BTC, but it would not be too difficult to increase precision in that case. The transaction format and version number would be scheduled to change at some particular block number after a year or two, and everyone would have to update by then.&lt;br /&gt;
&lt;br /&gt;
===Generating tons of addresses===&lt;br /&gt;
Generating an address doesn&#039;t touch the network at all. You&#039;d only be wasting your CPU resources and disk space.&lt;br /&gt;
&lt;br /&gt;
Also, a collision is highly unlikely.&lt;br /&gt;
&lt;br /&gt;
Keys are 256 bit in length and are hashed in a 160 bit address.(2^160th power)&lt;br /&gt;
Divide it by the world population and you have about 215,000,000,000,000,000,000,000,000,000,000,000,000 addresses per capita.(2.15 x 10^38)[http://www.wolframalpha.com/input/?i=2^160+%2F+world+population]&lt;br /&gt;
&lt;br /&gt;
===Everyone calculates at the same rate===&lt;br /&gt;
If everyone began with identical blocks and started their nonce at 1 and incremented, the fastest machine would always win. However, each block contains a new, random public key known only to you in the list of transactions.  The 256-bit &amp;quot;Merkle tree&amp;quot; hash of this is part of the block header.&lt;br /&gt;
&lt;br /&gt;
So everyone begins with slightly different blocks and everyone truly has a random chance of winning (modified by CPU power).&lt;br /&gt;
&lt;br /&gt;
===Generate &amp;quot;valid&amp;quot; blocks with a lower difficulty than normal===&lt;br /&gt;
Using unmodified Bitcoin code, an attacker could segment himself from the main network and generate a long block chain with a lower difficulty than the real network. These blocks would be totally valid for his network. However, it would be impossible to combine the two networks (and the &amp;quot;false&amp;quot; chain would be destroyed in the process).&lt;br /&gt;
&lt;br /&gt;
* Even though your network&#039;s difficulty can be less than the real difficulty, this doesn&#039;t give you any advantage over the real network. You&#039;ll gain ground when the real network is taking more than 10 minutes to generate a block, but you&#039;ll lose ground when the network takes less than 10 minutes.&lt;br /&gt;
* Every few releases of Bitcoin, a recent block hash is hardcoded into the source code. Any blocks before that point can&#039;t be changed. An attacker starting at that point would have to reduce the difficulty, but this would require him to generate blocks at a much slower rate than once per 10 minutes. By the time he finally gets to a difficulty of 1, a new version of Bitcoin with an updated hardcoded block will probably have been released.&lt;br /&gt;
* &amp;quot;Block chain length&amp;quot; is calculated from the combined difficulty of all the blocks, not just the number of blocks in the chain. The one that represents the most CPU usage will win.&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
&lt;br /&gt;
* [[Double-spending]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Technical]]&lt;/div&gt;</summary>
		<author><name>Sergio Demian Lerner</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Weaknesses&amp;diff=36554</id>
		<title>Weaknesses</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Weaknesses&amp;diff=36554"/>
		<updated>2013-04-01T13:10:07Z</updated>

		<summary type="html">&lt;p&gt;Sergio Demian Lerner: /* Denial of Service (DoS) attacks */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Might be a problem ==&lt;br /&gt;
=== Wallet Vulnerable To Theft ===&lt;br /&gt;
&lt;br /&gt;
The [[wallet]] is stored unencrypted, by default, and thus becomes a valuable target for theft.  Recent releases of the Bitcoin client now supports encryption to protect the wallet data, though the user must opt-in.&lt;br /&gt;
&lt;br /&gt;
=== Tracing a coin&#039;s history ===&lt;br /&gt;
Tracing a coin&#039;s history can be used to connect identities to addresses. [[Anonymity|More info]].&lt;br /&gt;
&lt;br /&gt;
=== Cancer nodes ===&lt;br /&gt;
It&#039;s trivial for an attacker to fill the network with clients controlled by him. This might be helpful in the execution of other attacks.&lt;br /&gt;
&lt;br /&gt;
For example, an attacker might connect 100,000 IP addresses to the IRC bootstrap channel. You would then be very likely to connect only to attacker nodes. This state can be exploited in (at least) the following ways:&lt;br /&gt;
* The attacker can refuse to relay blocks and transactions from everyone, disconnecting you from the network.&lt;br /&gt;
* The attacker can relay only blocks that he creates, putting you on a separate network. You&#039;re then open to [[double-spending]] attacks.&lt;br /&gt;
* If you rely on transactions with 0 confirmations, the attacker can just filter out certain transactions to execute a double-spending attack.&lt;br /&gt;
* Low-latency encryption/anonymization of Bitcoin&#039;s transmissions (With Tor, JAP, etc.) can be defeated relatively easy with a timing attack if you&#039;re connected to several of the attacker&#039;s nodes and the attacker is watching your transmissions at your ISP.&lt;br /&gt;
&lt;br /&gt;
Bitcoin makes these attacks more difficult by only making an outbound connection to one IP address per /16 (x.y.0.0). Incoming connections are unlimited and unregulated, but this is generally only a problem in the anonymity case, where you&#039;re probably already unable to accept incoming connections.&lt;br /&gt;
&lt;br /&gt;
Looking for suspiciously low network hash-rates may help prevent the second one.&lt;br /&gt;
&lt;br /&gt;
=== No authentication for IP transfers ===&lt;br /&gt;
Since there&#039;s no authentication when sending to an [[IP address]] (as opposed to a [[Address|Bitcoin address]]), executing a man-in-the-middle attack and stealing the sent BitCoins is trivial. This attack is downright &#039;&#039;likely&#039;&#039; if you&#039;re using Tor. For this reason, IP transfers are disabled by default in modern Bitcoin clients, though the feature can be enabled with a command line argument if desired.&lt;br /&gt;
&lt;br /&gt;
=== Packet sniffing ===&lt;br /&gt;
Someone who can see all of your Internet traffic can easily see when you send a transaction that you didn&#039;t receive (which means that it&#039;s yours). This would be made more difficult (but not impossible) if node-to-node encryption was used.&lt;br /&gt;
&lt;br /&gt;
=== Denial of Service (DoS) attacks ===&lt;br /&gt;
Sending lots of data to a node may make it so busy it cannot process normal Bitcoin transactions.  Bitcoin has some denial-of-service prevention built-in, but is likely still vulnerable to more sophisticated denial-of-service attacks.&lt;br /&gt;
&lt;br /&gt;
These are the current Bitcoin Satoshi client protections to deter DoS attacks, as of version 0.7.0:&lt;br /&gt;
&lt;br /&gt;
# Does not forward orphan transactions/blocks&lt;br /&gt;
# Does not forward double-spend transactions&lt;br /&gt;
# Does not forward the same block, transaction or alert twice to the same peer.&lt;br /&gt;
# Restricts the maximum number of signature checks a transaction input may request&lt;br /&gt;
# Continuous rate-limit of free transactions to mitigate &#039;penny-flooding&#039;&lt;br /&gt;
# Keeps a DoS score of each connected peer and disconnects from a peer that send messages that fail to comply with the rules.&lt;br /&gt;
# Bans IP addresses that misbehave for a time lapse (24 hours default)&lt;br /&gt;
# Limits the number of stored orphan transactions (10000 by default)&lt;br /&gt;
# Uses a signature cache to prevent attacks that try to continuously trigger the re-verification of stored orphan transactions (protects from https://bitcointalk.org/index.php?topic=136422.0 attack)&lt;br /&gt;
# Limits the number of stored signatures in the signature cache (50000 signatures by default)&lt;br /&gt;
# Tries to catch all possible errors in transactions before the signature verifications take place, to avoid DoS attacks on CPU usage.&lt;br /&gt;
# Penalizes peers that send lots of duplicate/expired/invalid-signature/whatever alerts, so they eventually get banned.&lt;br /&gt;
# In orphan/signature caches, when removing an item, evicts a random entry.&lt;br /&gt;
# Data structures are specially chosen to avoid loops in which the number of iterations can be controller by an attacker that result in exponential complexity.&lt;br /&gt;
# Ignores big orphan transactions, to avoid a send-big-orphans memory exhaustion attack.&lt;br /&gt;
# In RPC: Only sends a HTTP 403 response if it&#039;s not using SSL to prevent a DoS during the SSL handshake.&lt;br /&gt;
# In RPC: Sleeps some time if authorization fails to deter brute-forcing short passwords.&lt;br /&gt;
# In GUI: Limits URI length to prevent a DoS against the QR-Code dialog&lt;br /&gt;
# Limits the size of each value pushed while evaluating a a script (up to 520 bytes)&lt;br /&gt;
# Limits the number of expensive operations in a script (up to 201 operations). All but pushs are considered expensive. Also each key argument of signature checking in multi-signature checking (OP_CHECKMULTISIG) is considered an additional operation.&lt;br /&gt;
# Limits the number of key arguments OP_CHECKMULTISIG can use (up to 20 keys)&lt;br /&gt;
# Limits the number of the stack elements that can be stored simultaneously (up to 1000 elements, in standard and alt stacks together)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These are the Satoshi client protections added in version 0.8.0: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# Transactions greater than 100 Kbytes are considered non-standard (protects from variations of the https://bitcointalk.org/index.php?topic=140078.0 attack).&lt;br /&gt;
# Only the UXTO (Unspent Transaction Output Set) is stored in memory, the remaining data is stored on disk.&lt;br /&gt;
# When processing a transaction, before fetching transaction inputs from disk to memory, the client checks that all the inputs are unspent (protects from the Continuous Hard Disk Seek/Read Activity (https://bitcointalk.org/index.php?topic=144122.0) DoS attack)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Satoshi client does not directly limit peer bandwidth nor CPU usage.&lt;br /&gt;
&lt;br /&gt;
=== Forcing clock drift against a target node ===&lt;br /&gt;
&lt;br /&gt;
See [http://culubas.blogspot.com/2011/05/timejacking-bitcoin_802.html Timejacking] for a description of this attack. It can be fixed by changing how nodes calculate the current time.&lt;br /&gt;
&lt;br /&gt;
=== Illegal content in the block chain ===&lt;br /&gt;
It is illegal in some countries to possess/distribute certain kinds of data. Since arbitrary data can be included in Bitcoin transactions, and clients must normally have a copy of all unspent transactions, this could cause legal problems.&lt;br /&gt;
&lt;br /&gt;
=== Security Vulnerabilities and bugs  ===&lt;br /&gt;
It&#039;s possible but unlikely that a newly discovered bug or security vulnerability in the standard client could lead to a block chain split, or the need for every node to upgrade in a short time period. For example, a single malformed message tailored to exploit a specific vulnerability, when spread from node to node, could cause the whole network to shutdown in a few hours. Bugs that break user anonymity, on the contrary, have been found, since the pseudo-anonymity property of Bitcoin has been analyzed less.&lt;br /&gt;
Starting from version 0.7.0, Bitcoin client can be considered a mature project. The security critical sections of the source code are updated less and less frequently and those parts have been reviewed by many computer security experts. Also Bitcoin Satoshi client has passed the test of being on-line for more than 3 years, without a single vulnerability being exploited &#039;&#039;in the wild&#039;&#039;. &lt;br /&gt;
See [[Common_Vulnerabilities_and_Exposures]] for a detailed list of vulnerabilities detected and fixed.&lt;br /&gt;
&lt;br /&gt;
== Probably not a problem ==&lt;br /&gt;
&lt;br /&gt;
===Breaking the cryptography===&lt;br /&gt;
SHA-256 and ECDSA are considered very strong currently, but they might be broken in the far future. If that happens, BitCoin can shift to a stronger algorithm. [https://bitcointalk.org/index.php?topic=191.msg1585#msg1585 More info].&lt;br /&gt;
&lt;br /&gt;
===Scalability===&lt;br /&gt;
BitCoin can easily scale beyond the level of traffic VISA sees globally today. See the discussion on the [[scalability]] page for more information.&lt;br /&gt;
&lt;br /&gt;
===Segmentation===&lt;br /&gt;
If there is even a &amp;quot;trickle&amp;quot; of a connection between two sides of a segmented network, things should still work perfectly. When block chains are combined, all of the non-generation transactions in the shorter chain are re-added to the transaction pool -- they&#039;ll start over at 0/unconfirmed, but they&#039;ll still be valid. No mature transactions will be lost unless the segmentation persists for longer than ~120 blocks. Then generations will start to mature, and any transactions based on those generations will become invalid when recombined with the longer chain. [https://bitcointalk.org/index.php?topic=241.msg2071#msg2071 More info].&lt;br /&gt;
&lt;br /&gt;
=== Attacking all users ===&lt;br /&gt;
The IP addresses of most users are totally public. You can use Tor to hide this, but the network won&#039;t work if everyone does this. BitCoin requires that &#039;&#039;some&#039;&#039; country is still free.&lt;br /&gt;
&lt;br /&gt;
=== Dropping transactions ===&lt;br /&gt;
Nodes that generate blocks can choose not to include a transaction in their blocks. When this happens, the transaction remains &amp;quot;active&amp;quot; and can be included in a later block. Two things discourage this:&lt;br /&gt;
* Nodes only hash a fixed-size &#039;&#039;header&#039;&#039;, so there is no speed advantage to dropping transactions.&lt;br /&gt;
* [[Satoshi]] has [https://bitcointalk.org/index.php?topic=165.msg1595#msg1595 communicated] that he will write code to stop this kind of thing if it becomes a problem.&lt;br /&gt;
&lt;br /&gt;
=== Attacker has a lot of computing power ===&lt;br /&gt;
An attacker that controls more than 50% of the network&#039;s computing power can, for the time that he is in control, exclude and modify the ordering of transactions. This allows him to:&lt;br /&gt;
* Reverse transactions that he sends while he&#039;s in control.  This has the potential to [[Double-spending#51.25_attack|double-spend transactions]] that previously had already been seen in the block chain.&lt;br /&gt;
* Prevent some or all transactions from gaining any confirmations&lt;br /&gt;
* Prevent some or all other miners from mining any valid blocks&lt;br /&gt;
The attacker &#039;&#039;can&#039;t&#039;&#039;:&lt;br /&gt;
* Reverse other people&#039;s transactions&lt;br /&gt;
* Prevent transactions from being sent at all (they&#039;ll show as 0/unconfirmed)&lt;br /&gt;
* Change the number of coins generated per block&lt;br /&gt;
* Create coins out of thin air&lt;br /&gt;
* Send coins that never belonged to him&lt;br /&gt;
&lt;br /&gt;
It&#039;s much more difficult to change historical blocks, and it becomes exponentially more difficult the further back you go. As above, changing historical blocks only allows you to exclude and change the ordering of transactions. It&#039;s impossible to change blocks created before the last checkpoint.&lt;br /&gt;
&lt;br /&gt;
Since this attack doesn&#039;t permit all that much power over the network, it is expected that no one will attempt it. A profit-seeking person will always gain more by just following the rules, and even someone trying to destroy the system will probably find other attacks more attractive. However, if this attack is successfully executed, it will be difficult or impossible to &amp;quot;untangle&amp;quot; the mess created -- any changes the attacker makes might become permanent.&lt;br /&gt;
&lt;br /&gt;
=== Spamming transactions ===&lt;br /&gt;
&lt;br /&gt;
It is easy to send transactions to yourself repeatedly. If these transactions fill blocks to the maximum size (1MB), other transactions would be delayed until the next block.&lt;br /&gt;
&lt;br /&gt;
This is made expensive by the [[transaction fee|fees]] that would be required after the 50KB of free transactions per block are exhausted. An attacker will eventually eliminate free transactions, but Bitcoin fees will always be low because raising fees above 0.01 BTC per KB would require spending transaction fees. An attacker will eventually run out of money. Even if an attacker wants to waste money, transactions are further prioritized by the time since the coins were last spent, so attacks spending the same coins repeatedly are less effective.&lt;br /&gt;
&lt;br /&gt;
=== The [[Double-spending#Finney_attack|Finney attack]] ===&lt;br /&gt;
Named for Hal Finney, who first described this variation of a double-spend attack involving accepting [http://www.bitcointalk.org/index.php?topic=3441.msg48384#msg48384 0-confirmation transactions].  Accepting 0-confirmation large-value transactions is problematic; accepting them for low-value transactions (after waiting several seconds to detect an ordinary double-spend attempt) is probably safe.&lt;br /&gt;
&lt;br /&gt;
===Rival/malicious client code===&lt;br /&gt;
Any rival client must follow Bitcoin&#039;s rules or else all current BitCoin clients will ignore it. You&#039;d have to actually get people to &#039;&#039;use&#039;&#039; your client. A better client that pretends to follow the same rules, but with an exception known only to the author (possibly by making it closed source), might conceivably be able to gain widespread adoption. At that point, its author could use his exception and go largely unnoticed.&lt;br /&gt;
&lt;br /&gt;
== Definitely not a problem ==&lt;br /&gt;
&lt;br /&gt;
===Coin destruction===&lt;br /&gt;
Bitcoin has 2.1 quadrillion raw units, making up 8 decimals of BTC precision, so the entire network could potentially operate on much less than the full quantity of Bitcoins. If deflation gets to the point where transactions of more than 10 BTC are unheard of, clients can just switch to another unit so that, for example, it shows 10 mBTC rather than 0.01 BTC.&lt;br /&gt;
&lt;br /&gt;
The maximum number of raw units might not be enough if the &#039;&#039;entire world&#039;&#039; starts using BTC, but it would not be too difficult to increase precision in that case. The transaction format and version number would be scheduled to change at some particular block number after a year or two, and everyone would have to update by then.&lt;br /&gt;
&lt;br /&gt;
===Generating tons of addresses===&lt;br /&gt;
Generating an address doesn&#039;t touch the network at all. You&#039;d only be wasting your CPU resources and disk space.&lt;br /&gt;
&lt;br /&gt;
Also, a collision is highly unlikely.&lt;br /&gt;
&lt;br /&gt;
Keys are 256 bit in length and are hashed in a 160 bit address.(2^160th power)&lt;br /&gt;
Divide it by the world population and you have about 215,000,000,000,000,000,000,000,000,000,000,000,000 addresses per capita.(2.15 x 10^38)[http://www.wolframalpha.com/input/?i=2^160+%2F+world+population]&lt;br /&gt;
&lt;br /&gt;
===Everyone calculates at the same rate===&lt;br /&gt;
If everyone began with identical blocks and started their nonce at 1 and incremented, the fastest machine would always win. However, each block contains a new, random public key known only to you in the list of transactions.  The 256-bit &amp;quot;Merkle tree&amp;quot; hash of this is part of the block header.&lt;br /&gt;
&lt;br /&gt;
So everyone begins with slightly different blocks and everyone truly has a random chance of winning (modified by CPU power).&lt;br /&gt;
&lt;br /&gt;
===Generate &amp;quot;valid&amp;quot; blocks with a lower difficulty than normal===&lt;br /&gt;
Using unmodified Bitcoin code, an attacker could segment himself from the main network and generate a long block chain with a lower difficulty than the real network. These blocks would be totally valid for his network. However, it would be impossible to combine the two networks (and the &amp;quot;false&amp;quot; chain would be destroyed in the process).&lt;br /&gt;
&lt;br /&gt;
* Even though your network&#039;s difficulty can be less than the real difficulty, this doesn&#039;t give you any advantage over the real network. You&#039;ll gain ground when the real network is taking more than 10 minutes to generate a block, but you&#039;ll lose ground when the network takes less than 10 minutes.&lt;br /&gt;
* Every few releases of Bitcoin, a recent block hash is hardcoded into the source code. Any blocks before that point can&#039;t be changed. An attacker starting at that point would have to reduce the difficulty, but this would require him to generate blocks at a much slower rate than once per 10 minutes. By the time he finally gets to a difficulty of 1, a new version of Bitcoin with an updated hardcoded block will probably have been released.&lt;br /&gt;
* &amp;quot;Block chain length&amp;quot; is calculated from the combined difficulty of all the blocks, not just the number of blocks in the chain. The one that represents the most CPU usage will win.&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
&lt;br /&gt;
* [[Double-spending]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Technical]]&lt;/div&gt;</summary>
		<author><name>Sergio Demian Lerner</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=CVE-2013-2293&amp;diff=35888</id>
		<title>CVE-2013-2293</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=CVE-2013-2293&amp;diff=35888"/>
		<updated>2013-03-05T21:01:32Z</updated>

		<summary type="html">&lt;p&gt;Sergio Demian Lerner: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== New DoS vulnerability by Forcing Continuous Hard Disk Seek/Read Activity ==&lt;br /&gt;
&lt;br /&gt;
Private Release Date: 08-JAN-2013&amp;lt;br /&amp;gt;&lt;br /&gt;
Public Release Date: 14-FEB-2013&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Systems Affected ==&lt;br /&gt;
&lt;br /&gt;
* Satoshi Bitcoin Client (Bitcoin-Qt, bitcoind)&lt;br /&gt;
* All Bitcoin clients that mimic the behavior related to transaction validation of Satoshi client versions prior 0.8.0&lt;br /&gt;
&lt;br /&gt;
== Affected Versions ==&lt;br /&gt;
&lt;br /&gt;
* Bitcoin version 0.7.2 released 2012-12-14&lt;br /&gt;
* Bitcoin version 0.7.1 released 2012-10-19&lt;br /&gt;
* Bitcoin version 0.7.0 released 2012-09-17&lt;br /&gt;
* Bitcoin version 0.6.3 released 2012-06-25&lt;br /&gt;
* Bitcoin version 0.6.2 released 2012-05-08&lt;br /&gt;
* Bitcoin version 0.6.1 released 2012-05-04&lt;br /&gt;
* Bitcoin version 0.6.0 released 2012-03-30&lt;br /&gt;
* Bitcoin version 0.5.3.1 released 2012-03-16&lt;br /&gt;
* Bitcoin version 0.5.3 released 2012-03-14&lt;br /&gt;
* Bitcoin version 0.5.2 released 2012-01-09&lt;br /&gt;
* Bitcoin version 0.5.1 released 2011-12-15&lt;br /&gt;
* Bitcoin version 0.5.0 released 2011-11-21&lt;br /&gt;
* Bitcoin version 0.4.0 released 2011-09-23&lt;br /&gt;
* Bitcoin version 0.3.24 released 2011-07-08&lt;br /&gt;
* Bitcoin version 0.3.23 released 2011-06-14&lt;br /&gt;
* Bitcoin version 0.3.22 released 2011-06-05&lt;br /&gt;
* Bitcoin version 0.3.21 released 2011-04-27&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
Transaction processing has two stages in Satoshi Bitcoin client. In the first stage, transaction inputs are fetched.&lt;br /&gt;
This is done by bringing to RAM the transactions that contains the outputs referred by the inputs.&lt;br /&gt;
In the second stage, previous outputs are verified to be unspent and the related scripts are evaluated.&lt;br /&gt;
Since double spends are not considered to be a DoS attempt by the protocol rules, a transaction that refers to previous spent outputs will pass the first processing stage without being discarded. An attacker can therefore construct transactions that, before being discarded in the second stage of processing, require the victim application to seek and read too many parts of the block chain that could be scattered thought the storage files, delaying any other processing.&lt;br /&gt;
&lt;br /&gt;
== Details ==&lt;br /&gt;
&lt;br /&gt;
We assume that the whole block chain does not fit in RAM, so each transaction fetch requires a HD seek and read. An average 7200 rpm hard drive&lt;br /&gt;
can random seek/read a 1Kb block in a non-cached 2 Gb file in 12 msec. Each prevout of a transaction consumes 44 bytes, with empty sigscripts.&lt;br /&gt;
The attacker creates transaction with many inputs an one output. In this way, the other sections of the transaction (output scripts, headers) are amortized and become irrelevant to this analysis.&lt;br /&gt;
For an Internet connection of 50 Kbytes/sec bandwidth, sending 45 bytes requires less than 1 msec.&lt;br /&gt;
By continuously sending this specially crafted transactions an attacker can block any Bitcoin peer from performing other tasks.&lt;br /&gt;
Also the attacker may be able to block 10 peers at the same time, since the relation of 1:10 in required resources.&lt;br /&gt;
Note that the attacker does not need to sign the inputs nor to have the full block-chain to perform the attack. He only requires the hashes of all previous transactions, which currently requires only 10876856*32=332 Mbytes of storage.&lt;br /&gt;
&lt;br /&gt;
Version 0.8.0 of the Satoshi client stores only unspent prevouts in memory and can abort processing right after a spent prevout is referred by a transaction.&lt;br /&gt;
&lt;br /&gt;
== Possible Attack Scenarios ==&lt;br /&gt;
&lt;br /&gt;
1. Because of the small resources required to mount the attack, it could be performed by botnets to massively attack the Bitcoin network.&lt;br /&gt;
&lt;br /&gt;
2. The attack can be used against miners to prevent them from sending blocks. Nevertheless, currently big miners are only connected  to there own front-line of Bitcoin nodes to preven such attacks.&lt;br /&gt;
&lt;br /&gt;
3. By using many nodes at once, an attacker may try to create a barrier that splits the network in unconnected components, in order to carry another kind of attack.&lt;br /&gt;
&lt;br /&gt;
== Not-a-problem variations ==&lt;br /&gt;
&lt;br /&gt;
1. A valid 1M transaction could be constructed to reference more than 22K unique input transactions. In theory that transaction would take more than 5 minutes to be verified. Nevertheless the attack is unpractical for two reasons:&amp;lt;br /&amp;gt;&lt;br /&gt;
a. The attacker should have to own those 22K transactions.&amp;lt;br /&amp;gt;&lt;br /&gt;
b. Those 22K transactions should have to be  scattered thought the blockchain to force HD seeking activity. If they were created in a limited period of time, they would end up confined in a limited portion of the block chain file. The result would be that the hard disk cache will help to reduce the read latency and so attack effectiveness will be reduced. Nevertheless version 0.8.0 of the Satoshi client considers transactions greater that 100K to be non-standard, so the vulnerability is further reduced.&lt;br /&gt;
&lt;br /&gt;
== Suggested Solution for 0.6/0.7 versions ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The client application could verify that prevouts are not spent each time they are fetched, and abort if a spent prevout is found.&lt;br /&gt;
&lt;br /&gt;
 bool CTransaction::FetchInputs(CTxDB&amp;amp; txdb, const map&amp;lt;uint256, CTxIndex&amp;gt;&amp;amp; mapTestPool,&lt;br /&gt;
                               bool fBlock, bool fMiner, MapPrevTx&amp;amp; inputsRet, bool&amp;amp; fInvalid)&lt;br /&gt;
 {&lt;br /&gt;
  ..&lt;br /&gt;
 for (unsigned int i = 0; i &amp;lt; vin.size(); i++)&lt;br /&gt;
    {&lt;br /&gt;
    // Read txPrev&lt;br /&gt;
    CTransaction&amp;amp; txPrev = inputsRet[prevout.hash].second;&lt;br /&gt;
    ....&lt;br /&gt;
   // NEW CODE BEGINS&lt;br /&gt;
    if (prevout.n &amp;gt;= txPrev.vout.size() || prevout.n &amp;gt;= txindex.vSpent.size())&lt;br /&gt;
        {&lt;br /&gt;
        fInvalid = true;&lt;br /&gt;
                return DoS(100, error(&amp;quot; .....&lt;br /&gt;
      }&lt;br /&gt;
    if (!txindex.vSpent[prevout.n].IsNull())&lt;br /&gt;
     return false;&lt;br /&gt;
   // NEW CODE ENDS&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Disclosure Timeline ==&lt;br /&gt;
&lt;br /&gt;
2013-01-09 - Vulnerability reported to Gavin Andressen and other core devs.&amp;lt;br /&amp;gt;&lt;br /&gt;
2013-01-09 - Gavin Andressen acknowledges report and confirms version 0.8 will not be vulnerable, permits disclosure after 0.8.0 release candidate 1 is available.&amp;lt;br /&amp;gt;&lt;br /&gt;
2013-02-09 - Bitcoin version 0.8.0 release candidate 1 is available, fixing the vulnerability&amp;lt;br /&amp;gt;&lt;br /&gt;
2013-02-14 - Vulnerability disclosure&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Credit ==&lt;br /&gt;
&lt;br /&gt;
This vulnerability was discovered by Sergio Demian Lerner, from Certimix.com.&lt;br /&gt;
This report was written by SDL.&lt;/div&gt;</summary>
		<author><name>Sergio Demian Lerner</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=CVE-2012-4684&amp;diff=35886</id>
		<title>CVE-2012-4684</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=CVE-2012-4684&amp;diff=35886"/>
		<updated>2013-03-05T19:29:06Z</updated>

		<summary type="html">&lt;p&gt;Sergio Demian Lerner: Created page with &amp;quot;== Network-wide DoS using malleable signatures in alerts ==  Private Release Date: 24-AGO-2012&amp;lt;br /&amp;gt; Public Release Date: 01-MAR-2013&amp;lt;br /&amp;gt;  == Systems Affected ==  * Satoshi ...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Network-wide DoS using malleable signatures in alerts ==&lt;br /&gt;
&lt;br /&gt;
Private Release Date: 24-AGO-2012&amp;lt;br /&amp;gt;&lt;br /&gt;
Public Release Date: 01-MAR-2013&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Systems Affected ==&lt;br /&gt;
&lt;br /&gt;
* Satoshi Bitcoin Client (Bitcoin-Qt, bitcoind)&lt;br /&gt;
* All Bitcoin clients that mimic the behavior related to the alert system of Satoshi client versions prior 0.6.3&lt;br /&gt;
&lt;br /&gt;
== Affected Versions ==&lt;br /&gt;
&lt;br /&gt;
* Bitcoin version 0.6.3 released 2012-06-25&lt;br /&gt;
* Bitcoin version 0.6.2 released 2012-05-08&lt;br /&gt;
* Bitcoin version 0.6.1 released 2012-05-04&lt;br /&gt;
* Bitcoin version 0.6.0 released 2012-03-30&lt;br /&gt;
* Bitcoin version 0.5.3.1 released 2012-03-16&lt;br /&gt;
* Bitcoin version 0.5.3 released 2012-03-14&lt;br /&gt;
* Bitcoin version 0.5.2 released 2012-01-09&lt;br /&gt;
* Bitcoin version 0.5.1 released 2011-12-15&lt;br /&gt;
* Bitcoin version 0.5.0 released 2011-11-21&lt;br /&gt;
* Bitcoin version 0.4.0 released 2011-09-23&lt;br /&gt;
* Bitcoin version 0.3.24 released 2011-07-08&lt;br /&gt;
* Bitcoin version 0.3.23 released 2011-06-14&lt;br /&gt;
* Bitcoin version 0.3.22 released 2011-06-05&lt;br /&gt;
* Bitcoin version 0.3.21 released 2011-04-27&lt;br /&gt;
&lt;br /&gt;
== Fixed in version ==&lt;br /&gt;
&lt;br /&gt;
* Bitcoin version 0.7.0 released 2012-09-17&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
Bitcoin protocol has an alert system to spread important news regarding the digital currency. Alerts are signed with a private ECDA key, so only the development team can issue new alerts. Nevertheless, prior version 0.7.0, alerts were identified by the hash of the message, which includes the signature. Bitcoin accepts BED-encoded signatures, which are malleable.&lt;br /&gt;
An attacker build new signatures at a high rate by changing the signature of an alert still in circulation and therefore increasing dramatically the number of valid alerts spreading across the network. This leads to halting all Bitcoin nodes in the network by RAM exhaustion in approximately 4 hours. The attack is persistent, since if a nodes restarted get flooded again by online peers.&lt;br /&gt;
&lt;br /&gt;
== Details ==&lt;br /&gt;
&lt;br /&gt;
There different ways an attacker can abuse the malleability of alert signatures:&lt;br /&gt;
&lt;br /&gt;
- 1. An attacker may try to fill the RAM of all the nodes by sending 2000 modified alerts, each of 1 Mbyte size, using padding zeros. Such 1 Mbyte alerts would slowly spread through the network, and finally reach every node.&lt;br /&gt;
&lt;br /&gt;
- 2.  An attacker may use the fact that an ECDSA signature consist of two numbers (r,s), and each one can be padded by zeros. By interleaving and extending the zero padding of s and r, the attacker can build a stream of correct signatures whose sizes grows with the square root of the number of signatures generated.&lt;br /&gt;
(for example, for X bytes of zero-padding you can generate X different modified signature alerts whose sizes are size(r)=72+i, size(s)=72+X-i for  0 &amp;lt;= i &amp;lt;= X)&lt;br /&gt;
&lt;br /&gt;
This attack can try to exhaust GUI resources. For example, running the attack for 1 hour over a 64 Kbytes/sec link, the attacker is able to produce 321446 alerts. We have not evaluated how Qt responds in each platform to 321446  calls to QMessageBox::critical() without user interaction, but it&#039;s plausible that the application halts.&lt;br /&gt;
&lt;br /&gt;
- 3.  An attacker can try to exhaust the victim&#039;s computer CPU by:&lt;br /&gt;
&lt;br /&gt;
- 3.1. Forcing excessive signature verification time (this only happens with the very first small alerts sent, and for old CPUs )&lt;br /&gt;
&lt;br /&gt;
- 3.2. Forcing excessive iterations of the loop : for (map&amp;lt;uint256, CAlert&amp;gt;::iterator mi = mapAlerts.begin(); mi != mapAlerts.end()Wink&lt;br /&gt;
&lt;br /&gt;
As an example, in the first hour an attacker is able to send 321446 small alerts. The following hour the attacker is able to send 207757 alerts, starting at size 1218. With a 64 Kbytes/sec link, the attacker can send this last alerts at 52 alerts/second. The code block inside the for loop will be executed 321446*52 = 16,890,430 times, and that takes more than a second to process on an average computer, so CPU is exhausted in the loop.&lt;br /&gt;
&lt;br /&gt;
To maximize the damage of an attack, an attacker requires an existing alert that is relevant for all versions of the protocol, and one that will not have expired and is still in the relay interval.  With such alert, the attacker can reach the maximum number of nodes. Because of this, the vulnerability should not be notified to users by using the alert system. By doing so the attacker may receive the tool required to mount the best possible attack.&lt;br /&gt;
&lt;br /&gt;
== Attack Scenario ==&lt;br /&gt;
&lt;br /&gt;
The best attack is to harm the entire network and possibly generate a rush to the coin. To simplify the analysis, we assume that an average connection bandwidth is 64 Kbytes/sec and that each node has 2 GB of RAM, plus 2 GB of swap space. We assume the attacker executes the attack 1 described in the previous section, which tries to exhaust RAM, but leaves the CPU resources intact to keep spreading the fake alerts. If the such an attack is executed, every node in the network will start trashing after 1.5 hours approximately, as Bitcoin application will be using more than 1.5 GB of RAM. After 2 hours, every node running in Windows 32-bits will halt, since the address space of 2 Gb will be filled. After 8.7 hours, every 64-bit node still alive will fill both the 2 Gb of RAM and the 4 gigabytes of hard disk swap space assumed, and the Bitcoin application will halt.&lt;br /&gt;
&lt;br /&gt;
It is supposed that, in Bitcoin-Qt application, QMessageBox::critical() with modal=false will be called for each alert, so the application may crash much sooner due to lack of Windows or whatever GUI resources Qt uses. This is only relevant to Bitcoin-qt and not Bitcoind releases.&lt;br /&gt;
&lt;br /&gt;
== Suggested Solutions for the 0.7.0 release ==&lt;br /&gt;
&lt;br /&gt;
# Change the way the hash of alerts is computed: exclude the signature from the hash.&lt;br /&gt;
# Reject alert signatures that are not DER-encoded.&lt;br /&gt;
# Check setKnown before checking signatures.&lt;br /&gt;
# Support a special fixed alert message that cancels all previous alerts. This would be a damage control measure if all other protections are violated.&lt;br /&gt;
&lt;br /&gt;
Solutions 1,3 and 4 were implemented in Bitcoin version 0.7.0.&lt;br /&gt;
&lt;br /&gt;
== Disclosure Time-line ==&lt;br /&gt;
&lt;br /&gt;
2012-08-24 - Vulnerability reported to Gavin Andressen and other core devs.&amp;lt;br /&amp;gt;&lt;br /&gt;
2012-08-24 - Gavin Andressen acknowledges report&amp;lt;br /&amp;gt;&lt;br /&gt;
2012-08-26 – Private discussions of Gavin Andressen, Gregory Maxwell and Sergio Lerner on how to address the vulnerability.&amp;lt;br /&amp;gt;&lt;br /&gt;
2012-08-26 – Fix finally scheduled for the 0.7.0 release&amp;lt;br /&amp;gt;&lt;br /&gt;
2012-09-17 - Bitcoin version 0.7.0 released&amp;lt;br /&amp;gt;&lt;br /&gt;
2013-03-01 - Patched Bitcoin versions reach 80% of the network nodes upgraded.&amp;lt;br /&amp;gt;&lt;br /&gt;
2013-03-01 - Vulnerability disclosure&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Credit ==&lt;br /&gt;
&lt;br /&gt;
This vulnerability was discovered by Sergio Demian Lerner, from [http://Certimix.com Certimix.com].&amp;lt;br /&amp;gt;&lt;br /&gt;
Bitcointalk user Enochian was the first to publish BER/DER encoding problems of Bitcoin signatures in this thread: https://bitcointalk.org/index.php?topic=8392.0. &amp;lt;br /&amp;gt;&lt;br /&gt;
This report was written by SDL.&lt;/div&gt;</summary>
		<author><name>Sergio Demian Lerner</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=CVE-2012-4683&amp;diff=35885</id>
		<title>CVE-2012-4683</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=CVE-2012-4683&amp;diff=35885"/>
		<updated>2013-03-05T19:24:13Z</updated>

		<summary type="html">&lt;p&gt;Sergio Demian Lerner: Created page with &amp;quot;== Targeted DoS by CPU exhaustion using alerts ==  Private Release Date: 23-AGO-2012&amp;lt;br /&amp;gt; Public Release Date: 01-MAR-2013&amp;lt;br /&amp;gt;  == Systems Affected ==  * Satoshi Bitcoin Cl...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Targeted DoS by CPU exhaustion using alerts ==&lt;br /&gt;
&lt;br /&gt;
Private Release Date: 23-AGO-2012&amp;lt;br /&amp;gt;&lt;br /&gt;
Public Release Date: 01-MAR-2013&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Systems Affected ==&lt;br /&gt;
&lt;br /&gt;
* Satoshi Bitcoin Client (Bitcoin-Qt, bitcoind)&lt;br /&gt;
* All Bitcoin clients that mimic the behavior related to the alert system of Satoshi client versions prior 0.6.3&lt;br /&gt;
&lt;br /&gt;
== Affected Versions ==&lt;br /&gt;
&lt;br /&gt;
* Bitcoin version 0.6.3 released 2012-06-25&lt;br /&gt;
* Bitcoin version 0.6.2 released 2012-05-08&lt;br /&gt;
* Bitcoin version 0.6.1 released 2012-05-04&lt;br /&gt;
* Bitcoin version 0.6.0 released 2012-03-30&lt;br /&gt;
* Bitcoin version 0.5.3.1 released 2012-03-16&lt;br /&gt;
* Bitcoin version 0.5.3 released 2012-03-14&lt;br /&gt;
* Bitcoin version 0.5.2 released 2012-01-09&lt;br /&gt;
* Bitcoin version 0.5.1 released 2011-12-15&lt;br /&gt;
* Bitcoin version 0.5.0 released 2011-11-21&lt;br /&gt;
* Bitcoin version 0.4.0 released 2011-09-23&lt;br /&gt;
* Bitcoin version 0.3.24 released 2011-07-08&lt;br /&gt;
* Bitcoin version 0.3.23 released 2011-06-14&lt;br /&gt;
* Bitcoin version 0.3.22 released 2011-06-05&lt;br /&gt;
* Bitcoin version 0.3.21 released 2011-04-27&lt;br /&gt;
&lt;br /&gt;
== Fixed in version ==&lt;br /&gt;
&lt;br /&gt;
* Bitcoin version 0.7.0 released 2012-09-17&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
Bitcoin protocol has an alert system to spread important news regarding the digital currency. Alerts are signed with a private ECDA key, so only the development team can issue new alerts. Alerts signatures are checked for every alert that is received. Each check takes some time, usually between 1 and 4 msecs. The verification time does not depend on the correctness of the signature. Therefore an attacker may flood a node with invalid alerts generated on-the-fly at no cost, and exhaust the victim&#039;s node CPU.&lt;br /&gt;
&lt;br /&gt;
== Details ==&lt;br /&gt;
&lt;br /&gt;
The Satoshi client prior version 0.7.0 does not define an alert signature verification failure as a DoS attack (using  return DoS(...); ).&lt;br /&gt;
&lt;br /&gt;
A malicious client app can start sending invalid alerts at a rate of almost 3000 alerts/second for a 64 Kbytes/sec link. The victim&#039;s computer will reach 100% CPU utilization for the core associated with the ThreadMessageHandler2() thread. Although that thread has priority THREAD_PRIORITY_BELOW_NORMAL, the computer will suffer a noticeable slowdown. The attack works even with a 3 Kbytes/sec bandwidth usage, so even a slow network link can be used for the attack.&lt;br /&gt;
&lt;br /&gt;
Alerts can be as short as 10 bytes. Here is a complete alert (without network message headers) that has an incorrect signature:&lt;br /&gt;
&lt;br /&gt;
    [0, 8, 48, 6, 2, 1, 10, 2, 1, 10]&lt;br /&gt;
&lt;br /&gt;
It has zero length payload and (r,s) = (10,10)&lt;br /&gt;
&lt;br /&gt;
The problem is still present even if you send the attacker sends correct alerts, previously received, since CheckSignature() is called before the signature is checked against mapAlerts. It was verified that, in an average computer, sending a 188-bytes correct alert continuously on a 64 Kbytes/sec link still rises the victim&#039;s CPU usage to 100%.&lt;br /&gt;
&lt;br /&gt;
== Possible Attack Scenarios ==&lt;br /&gt;
&lt;br /&gt;
* An attacker has a direct connection to the victim&#039;s node.&lt;br /&gt;
* An attacker has a direct connections to a set of nodes that, if put off-line, could cut the network in two unconnected components. The attacker may try then to double-spend in each of the components. Since the attack requires very few resources for the attacker, he may try to attack all those nodes at once from a single computer.&lt;br /&gt;
&lt;br /&gt;
== Suggested Solutions for the 0.7.0 version ==&lt;br /&gt;
&lt;br /&gt;
# Disconnect from any node that sends a bad alert (return DoS(...))&lt;br /&gt;
# Check that an alert is not verified more than once by checking the existence of the alert in mapAlerts before doing a CheckSignature()&lt;br /&gt;
&lt;br /&gt;
Both solutions were adopted in version 0.7.0, although a lower penalty is given to nodes for sending single incorrect alerts.&lt;br /&gt;
&lt;br /&gt;
== Disclosure Timeline ==&lt;br /&gt;
&lt;br /&gt;
2012-08-23 - Vulnerability reported to Gavin Andressen and other core devs.&amp;lt;br /&amp;gt;&lt;br /&gt;
2012-08-23 - Gavin Andressen acknowledges report and asserts that version 0.7 will be patched against these problems.&amp;lt;br /&amp;gt;&lt;br /&gt;
2012-09-17 - Bitcoin version 0.7.0 released&amp;lt;br /&amp;gt;&lt;br /&gt;
2013-03-01 - Patched Bitcoin version reach 80% of the network nodes upgraded.&amp;lt;br /&amp;gt;&lt;br /&gt;
2013-03-01 - Vulnerability disclosure&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Credit ==&lt;br /&gt;
&lt;br /&gt;
This vulnerability was discovered by Sergio Demian Lerner, from [http://Certimix.com Certimix.com].&lt;br /&gt;
This report was written by SDL.&lt;/div&gt;</summary>
		<author><name>Sergio Demian Lerner</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Common_Vulnerabilities_and_Exposures&amp;diff=35884</id>
		<title>Common Vulnerabilities and Exposures</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Common_Vulnerabilities_and_Exposures&amp;diff=35884"/>
		<updated>2013-03-05T19:16:58Z</updated>

		<summary type="html">&lt;p&gt;Sergio Demian Lerner: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!style=&amp;quot;width:16ex&amp;quot;| CVE&lt;br /&gt;
! Announced !! Affects !! Severity !! Attack is... !! Flaw !! Net&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2010-5137|CVE-2010-5137]]&lt;br /&gt;
| 2010-07-28&lt;br /&gt;
| wxBitcoin and bitcoind&lt;br /&gt;
|bgcolor=yellow| DoS&amp;lt;ref name=&amp;quot;DoS&amp;quot;&amp;gt;Attacker can disable some functionality, for example by crashing clients&amp;lt;/ref&amp;gt;&lt;br /&gt;
|bgcolor=pink| Easy&lt;br /&gt;
| OP_LSHIFT crash&lt;br /&gt;
|bgcolor=lime| 100%&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2010-5141|CVE-2010-5141]]&lt;br /&gt;
| 2010-07-28&lt;br /&gt;
| wxBitcoin and bitcoind&lt;br /&gt;
|bgcolor=pink| Theft&amp;lt;ref name=&amp;quot;Theft&amp;quot;&amp;gt;Attacker can take or create money outside known network rules&amp;lt;/ref&amp;gt;&lt;br /&gt;
|bgcolor=pink| Easy&lt;br /&gt;
|&lt;br /&gt;
|bgcolor=lime| 100%&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2010-5138|CVE-2010-5138]]&lt;br /&gt;
| 2010-07-29&lt;br /&gt;
| wxBitcoin and bitcoind&lt;br /&gt;
|bgcolor=yellow| DoS&amp;lt;ref name=&amp;quot;DoS&amp;quot;/&amp;gt;&lt;br /&gt;
|bgcolor=pink| Easy&lt;br /&gt;
| Unlimited SigOp DoS&lt;br /&gt;
|bgcolor=lime| 100%&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2010-5139|CVE-2010-5139]]&lt;br /&gt;
| 2010-08-15&lt;br /&gt;
| wxBitcoin and bitcoind&lt;br /&gt;
|bgcolor=pink| Theft&amp;lt;ref name=&amp;quot;Theft&amp;quot;/&amp;gt;&lt;br /&gt;
|bgcolor=pink| Easy&lt;br /&gt;
| Combined output overflow&lt;br /&gt;
|bgcolor=lime| 100%&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2010-5140|CVE-2010-5140]]&lt;br /&gt;
| 2010-09-29&lt;br /&gt;
| wxBitcoin and bitcoind&lt;br /&gt;
|bgcolor=yellow| DoS&amp;lt;ref name=&amp;quot;DoS&amp;quot;/&amp;gt;&lt;br /&gt;
|bgcolor=pink| Easy&lt;br /&gt;
| Never confirming transactions&lt;br /&gt;
|bgcolor=lime| 100%&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2011-4447|CVE-2011-4447]]&lt;br /&gt;
| 2011-11-11&lt;br /&gt;
| wxBitcoin and bitcoind&lt;br /&gt;
|bgcolor=pink| Exposure&amp;lt;ref name=&amp;quot;Exposure&amp;quot;&amp;gt;Attacker can access user data outside known acceptable methods&amp;lt;/ref&amp;gt;&lt;br /&gt;
|bgcolor=lime| Hard&lt;br /&gt;
| Wallet non-encryption&lt;br /&gt;
|bgcolor=lime| [http://luke.dashjr.org/programs/bitcoin/files/charts/CVE-2011-4447.html 99%]&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2012-1909|CVE-2012-1909]]&lt;br /&gt;
| 2012-03-07&lt;br /&gt;
| Bitcoin protocol and all clients&lt;br /&gt;
|bgcolor=pink| Netsplit&amp;lt;ref name=&amp;quot;Netsplit&amp;quot;&amp;gt;Attacker can create multiple views of the network, enabling [[double-spending]] with over 1 confirmation&amp;lt;/ref&amp;gt;&lt;br /&gt;
|bgcolor=lime| Very hard&lt;br /&gt;
| Transaction overwriting&lt;br /&gt;
|bgcolor=lime| [http://luke.dashjr.org/programs/bitcoin/files/charts/CVE-2012-1909.html 95%]&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2012-1910|CVE-2012-1910]]&lt;br /&gt;
| 2012-03-17&lt;br /&gt;
| Bitcoin-Qt for Windows&lt;br /&gt;
|bgcolor=pink| Unknown&amp;lt;ref name=&amp;quot;Unknown&amp;quot;&amp;gt;Extent of possible abuse is unknown&amp;lt;/ref&amp;gt;&lt;br /&gt;
|bgcolor=lime| Hard&lt;br /&gt;
| MingW non-multithreading&lt;br /&gt;
|bgcolor=lime| [http://luke.dashjr.org/programs/bitcoin/files/charts/CVE-2012-1910.html 100%]&lt;br /&gt;
|-&lt;br /&gt;
| [[#BIP-0016|BIP 0016]]&lt;br /&gt;
| 2012-04-01&lt;br /&gt;
| All Bitcoin clients&lt;br /&gt;
|bgcolor=yellow| Fake Conf&amp;lt;ref name=&amp;quot;FakeConf&amp;quot;&amp;gt;Attacker can double-spend with 1 confirmation&amp;lt;/ref&amp;gt;&lt;br /&gt;
|bgcolor=yellow| Miners&amp;lt;ref name=&amp;quot;MinerEasy&amp;quot;&amp;gt;Attacking requires mining block(s)&amp;lt;/ref&amp;gt;&lt;br /&gt;
| Mandatory P2SH protocol update&lt;br /&gt;
|bgcolor=lime| [http://luke.dashjr.org/programs/bitcoin/files/charts/BIP-0016.html 95%]&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2012-2459|CVE-2012-2459]]&lt;br /&gt;
| 2012-05-14&lt;br /&gt;
| bitcoind and Bitcoin-Qt&lt;br /&gt;
|bgcolor=pink| Netsplit&amp;lt;ref name=&amp;quot;Netsplit&amp;quot;/&amp;gt;&lt;br /&gt;
|bgcolor=pink| Easy&lt;br /&gt;
| Block hash collision (via merkle root)&lt;br /&gt;
|bgcolor=lime| [http://luke.dashjr.org/programs/bitcoin/files/charts/CVE-2012-2459.html 95%]&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2012-3584|CVE-2012-3584]]&lt;br /&gt;
| 2012-06-16&lt;br /&gt;
| Bitcoin p2p protocol&lt;br /&gt;
|bgcolor=yellow| DoS&amp;lt;ref name=&amp;quot;DoS&amp;quot;/&amp;gt;&lt;br /&gt;
|bgcolor=yellow| Miners&amp;lt;ref name=&amp;quot;MinerEasy&amp;quot;/&amp;gt;&lt;br /&gt;
| Poor miner incentives&lt;br /&gt;
| (no fix)&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2012-3789|CVE-2012-3789]]&lt;br /&gt;
| 2012-06-20&lt;br /&gt;
| bitcoind and Bitcoin-Qt&lt;br /&gt;
|bgcolor=yellow| DoS&amp;lt;ref name=&amp;quot;DoS&amp;quot;/&amp;gt;&lt;br /&gt;
|bgcolor=pink| Easy&lt;br /&gt;
| (Lack of) orphan txn resource limits&lt;br /&gt;
|bgcolor=yellow| [http://luke.dashjr.org/programs/bitcoin/files/charts/CVE-2012-3789 90%]&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2012-4682|CVE-2012-4682]]&lt;br /&gt;
| &lt;br /&gt;
| bitcoind and Bitcoin-Qt&lt;br /&gt;
|bgcolor=yellow| DoS&amp;lt;ref name=&amp;quot;DoS&amp;quot;/&amp;gt;&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|bgcolor=yellow| [http://luke.dashjr.org/programs/bitcoin/files/charts/CVE-2012-4682.html 80%]&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2012-4683|CVE-2012-4683]]&lt;br /&gt;
| 2012-08-23&lt;br /&gt;
| bitcoind and Bitcoin-Qt&lt;br /&gt;
| bgcolor=yellow| DoS&amp;lt;ref name=&amp;quot;DoS&amp;quot;/&amp;gt;&lt;br /&gt;
| bgcolor=pink| Easy&lt;br /&gt;
| Targeted DoS by CPU exhaustion using alerts&lt;br /&gt;
|bgcolor=yellow| [http://luke.dashjr.org/programs/bitcoin/files/charts/CVE-2012-4683.html 80%]&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2012-4684|CVE-2012-4684]]&lt;br /&gt;
| 2012-08-24&lt;br /&gt;
| bitcoind and Bitcoin-Qt&lt;br /&gt;
| bgcolor=yellow| DoS&amp;lt;ref name=&amp;quot;DoS&amp;quot;/&amp;gt;&lt;br /&gt;
| bgcolor=pink| Easy&lt;br /&gt;
| Network-wide DoS using malleable signatures in alerts&lt;br /&gt;
|bgcolor=yellow| [http://luke.dashjr.org/programs/bitcoin/files/charts/security.html?20124683 80%]&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2013-2272|CVE-2013-2272]]&lt;br /&gt;
| 2013-01-11&lt;br /&gt;
| bitcoind and Bitcoin-Qt&lt;br /&gt;
|bgcolor=yellow| Exposure&amp;lt;ref name=&amp;quot;Exposure&amp;quot;/&amp;gt;&lt;br /&gt;
|bgcolor=pink| Easy&lt;br /&gt;
| Remote discovery of node&#039;s wallet addresses&lt;br /&gt;
|bgcolor=pink| [http://luke.dashjr.org/programs/bitcoin/files/charts/security.html?20132272 22%]&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2013-2273|CVE-2013-2273]]&lt;br /&gt;
| 2013-01-30&lt;br /&gt;
| bitcoind and Bitcoin-Qt&lt;br /&gt;
|bgcolor=lime| Exposure&amp;lt;ref name=&amp;quot;Exposure&amp;quot;/&amp;gt;&lt;br /&gt;
|bgcolor=yellow| Easy&lt;br /&gt;
| Predictable change output&lt;br /&gt;
|bgcolor=pink| [http://luke.dashjr.org/programs/bitcoin/files/charts/security.html?20132273 22%]&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2013-2292|CVE-2013-2292]]&lt;br /&gt;
| 2013-01-30&lt;br /&gt;
| bitcoind and Bitcoin-Qt&lt;br /&gt;
|bgcolor=yellow| DoS&amp;lt;ref name=&amp;quot;DoS&amp;quot;/&amp;gt;&lt;br /&gt;
|bgcolor=lime| Hard&lt;br /&gt;
| A transaction that takes at least 3 minutes to verify&lt;br /&gt;
|bgcolor=pink| [http://luke.dashjr.org/programs/bitcoin/files/charts/security.html?20132292 -]&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2013-2293|CVE-2013-2293]]&lt;br /&gt;
| 2013-02-14&lt;br /&gt;
| bitcoind and Bitcoin-Qt&lt;br /&gt;
|bgcolor=yellow| DoS&amp;lt;ref name=&amp;quot;DoS&amp;quot;/&amp;gt;&lt;br /&gt;
|bgcolor=pink| Easy&lt;br /&gt;
| Continuous hard disk seek&lt;br /&gt;
|bgcolor=pink| [http://luke.dashjr.org/programs/bitcoin/files/charts/security.html?20132293 22%]&lt;br /&gt;
|-&lt;br /&gt;
| [[#BIP-0034|BIP 0034]]&lt;br /&gt;
| Future&lt;br /&gt;
| All Bitcoin clients&lt;br /&gt;
|bgcolor=yellow| Fake Conf&amp;lt;ref name=&amp;quot;FakeConf&amp;quot;/&amp;gt;&lt;br /&gt;
|bgcolor=yellow| Miners&amp;lt;ref name=&amp;quot;MinerEasy&amp;quot;&amp;gt;Attacking requires mining block(s)&amp;lt;/ref&amp;gt;&lt;br /&gt;
| Mandatory block protocol update&lt;br /&gt;
|bgcolor=yellow| [http://luke.dashjr.org/programs/bitcoin/files/charts/BIP-0034.html 80%]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&lt;br /&gt;
== CVE-2010-5137 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2010-07-28&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; OP_LSHIFT crash&lt;br /&gt;
 &amp;lt;b&amp;gt;Fix Deployment:&amp;lt;/b&amp;gt; 100%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| bitcoind&amp;lt;br&amp;gt;wxBitcoin || * - 0.3.4 || 0.3.5&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
On July 28 2010, two bugs were discovered and demonstrated on the test network. One caused bitcoin to crash on some machines when processing a transaction containing an OP_LSHIFT. This was never exploited on the main network, and was fixed by Bitcoin version 0.3.5.&lt;br /&gt;
&lt;br /&gt;
After these bugs were discovered, many currently-unused script words were disabled for safety.&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
* [http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-5137 US-CERT/NIST]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== CVE-2010-5141 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2010-07-28&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; ?&lt;br /&gt;
 &amp;lt;b&amp;gt;Fix Deployment:&amp;lt;/b&amp;gt; 100%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| bitcoind&amp;lt;br&amp;gt;wxBitcoin || * - 0.3.4 || 0.3.5&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
On July 28 2010, two bugs were discovered and demonstrated on the test network. One exploited a bug in the transaction handling code and allowed an attacker to spend coins that they did not own. This was never exploited on the main network, and was fixed by Bitcoin version 0.3.5.&lt;br /&gt;
&lt;br /&gt;
After these bugs were discovered, many currently-unused script words were disabled for safety.&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
* [http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-5141 US-CERT/NIST]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== CVE-2010-5138 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2010-07-29&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; Unlimited SigOp DoS&lt;br /&gt;
 &amp;lt;b&amp;gt;Fix Deployment:&amp;lt;/b&amp;gt; 100%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| bitcoind&amp;lt;br&amp;gt;wxBitcoin || * - 0.3.? || 0.3.?&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
On July 29 2010, it was discovered that block [http://blockexplorer.com/block/00000000000997f9fd2fe1ee376293ef8c42ad09193a5d2086dddf8e5c426b56 71036] contained several transactions with a ton of OP_CHECKSIG commands. There should only ever be one such command. This caused every node to do extra unnecessary work, and it could have been used as a denial-of-service attack. A new version of Bitcoin was quickly released. The new version did not cause a fork on the main network, though it did cause one on the test network (where someone had played around with the attack more).&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
* [http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-5138 US-CERT/NIST]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== CVE-2010-5139 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2010-08-15&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; Combined output overflow&lt;br /&gt;
 &amp;lt;b&amp;gt;Fix Deployment:&amp;lt;/b&amp;gt; 100%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| bitcoind&amp;lt;br&amp;gt;wxBitcoin || * - 0.3.10 || 0.3.11&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
On August 15 2010, it was [http://bitcointalk.org/index.php?topic=822.0 discovered] that block 74638 contained a transaction that created over 184 billion bitcoins for two different addresses. This was possible because the code used for checking transactions before including them in a block didn&#039;t account for the case of outputs so large that they overflowed when summed. A new version was published within a few hours of the discovery. The block chain had to be forked. Although many unpatched nodes continued to build on the &amp;quot;bad&amp;quot; block chain, the &amp;quot;good&amp;quot; block chain overtook it at a block height of 74691. The bad transaction no longer exists for people using the longest chain.&lt;br /&gt;
&lt;br /&gt;
The block and transaction:&lt;br /&gt;
&amp;lt;pre&amp;gt;CBlock(hash=0000000000790ab3, ver=1, hashPrevBlock=0000000000606865, hashMerkleRoot=618eba,&lt;br /&gt;
nTime=1281891957, nBits=1c00800e, nNonce=28192719, vtx=2)&lt;br /&gt;
  CTransaction(hash=012cd8, ver=1, vin.size=1, vout.size=1, nLockTime=0)&lt;br /&gt;
    CTxIn(COutPoint(000000, -1), coinbase 040e80001c028f00)&lt;br /&gt;
    CTxOut(nValue=50.51000000, scriptPubKey=0x4F4BA55D1580F8C3A8A2C7)&lt;br /&gt;
  CTransaction(hash=1d5e51, ver=1, vin.size=1, vout.size=2, nLockTime=0)&lt;br /&gt;
    CTxIn(COutPoint(237fe8, 0), scriptSig=0xA87C02384E1F184B79C6AC)&lt;br /&gt;
    CTxOut(nValue=92233720368.54275808, scriptPubKey=OP_DUP OP_HASH160 0xB7A7)&lt;br /&gt;
    CTxOut(nValue=92233720368.54275808, scriptPubKey=OP_DUP OP_HASH160 0x1512)&lt;br /&gt;
  vMerkleTree: 012cd8 1d5e51 618eba&lt;br /&gt;
&lt;br /&gt;
Block hash: 0000000000790ab3f22ec756ad43b6ab569abf0bddeb97c67a6f7b1470a7ec1c&lt;br /&gt;
Transaction hash: 1d5e512a9723cbef373b970eb52f1e9598ad67e7408077a82fdac194b65333c9&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
* [https://bitcointalk.org/index.php?topic=822.0 Discovery]&lt;br /&gt;
* [http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-5139 US-CERT/NIST]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== CVE-2010-5140 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2010-09-29&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; Never confirming transactions&lt;br /&gt;
 &amp;lt;b&amp;gt;Fix Deployment:&amp;lt;/b&amp;gt; 100%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| bitcoind&amp;lt;br&amp;gt;wxBitcoin || * - 0.3.12 || 0.3.13&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Around September 29, 2010, people started [https://bitcointalk.org/index.php?topic=1306.0 reporting] that their sent transactions would not confirm. This happened because people modified Bitcoin to send sub-0.01 transactions without any fees. A 0.01 fee was at that time required by the network for such transactions (essentially prohibiting them), so the transactions remained at 0 confirmations forever. This became a more serious issue because Bitcoin would send transactions using bitcoins gotten from transactions with 0 confirmations, and these resulting transactions would also never confirm. Because Bitcoin tends to prefer sending smaller coins, these invalid transactions quickly multiplied, contaminating the wallets of everyone who received them.&lt;br /&gt;
&lt;br /&gt;
Bitcoin was changed to only select coins with at least 1 confirmation. The remaining sub-0.01 transactions were cleared by generators who modified their version of Bitcoin to not require the micropayment fee. It took a while for everything to get cleared, though, because many of the intermediate transactions had been forgotten by the network by this point and had to be rebroadcast by the original senders.&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
* [https://bitcointalk.org/index.php?topic=1306.0 Initial reports]&lt;br /&gt;
* [http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-5140 US-CERT/NIST]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== CVE-2011-4447 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2011-11-11&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; Wallet non-encryption&lt;br /&gt;
 &amp;lt;b&amp;gt;Fix Deployment:&amp;lt;/b&amp;gt; 99%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| bitcoind&amp;lt;br&amp;gt;wxBitcoin || 0.4.0 - 0.4.1rc6 || 0.4.1&amp;lt;br&amp;gt;0.5.0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
* [https://bitcointalk.org/index.php?topic=51604.0 Announcement]&lt;br /&gt;
* [https://bitcointalk.org/index.php?topic=51474.0 Finding]&lt;br /&gt;
* [http://bitcoin.org/releases/2011/11/21/v0.5.0.html 0.5.0]&lt;br /&gt;
* [http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2011-4447 US-CERT/NIST]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== CVE-2012-1909 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2012-03-07&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; Transaction overwriting&lt;br /&gt;
 &amp;lt;b&amp;gt;Fix Deployment:&amp;lt;/b&amp;gt; 95%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| Bitcoin protocol || Before March 15th, 2012 || BIP 30&lt;br /&gt;
|-&lt;br /&gt;
| Bitcoin-Qt&amp;lt;br&amp;gt;bitcoind || * - 0.4.4rc2&amp;lt;br&amp;gt;0.5.0rc1 - 0.5.0.4rc2&amp;lt;br&amp;gt;0.5.1rc1 - 0.5.3rc2&amp;lt;br&amp;gt;0.6.0rc1 - 0.6.0rc2 || 0.4.4&amp;lt;br&amp;gt;0.5.0.4&amp;lt;br&amp;gt;0.5.3&amp;lt;br&amp;gt;0.6.0rc3&lt;br /&gt;
|-&lt;br /&gt;
| wxBitcoin || ALL || NONE&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
* [https://bitcointalk.org/index.php?topic=67738.0 Announcement]&lt;br /&gt;
* [https://en.bitcoin.it/wiki/BIP_0030 Fix]&lt;br /&gt;
* [https://bugs.gentoo.org/show_bug.cgi?id=407793 Gentoo bug tracker]&lt;br /&gt;
* [http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2012-1909 US-CERT/NIST]&lt;br /&gt;
&lt;br /&gt;
== CVE-2012-1910 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2012-03-17&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; MingW non-multithreading&lt;br /&gt;
 &amp;lt;b&amp;gt;Fix Deployment:&amp;lt;/b&amp;gt; 100%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| Bitcoin-Qt for Windows || 0.5.0rc1 - 0.5.0.4&amp;lt;br&amp;gt;0.5.1rc1 - 0.5.3.0&amp;lt;br&amp;gt;0.6.0rc1 - 0.6.0rc3 || 0.5.0.5&amp;lt;br&amp;gt;0.5.3.1&amp;lt;br&amp;gt;0.5.4&amp;lt;br&amp;gt;0.6.0rc4&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
* [https://bitcointalk.org/index.php?topic=69120.0 Announcement]&lt;br /&gt;
* [http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2012-1910 US-CERT/NIST]&lt;br /&gt;
&lt;br /&gt;
== BIP-0016 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2012-04-01&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; Mandatory P2SH protocol update&lt;br /&gt;
 &amp;lt;b&amp;gt;Deployment:&amp;lt;/b&amp;gt; 95%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| Bitcoin-Qt&amp;lt;br&amp;gt;bitcoind || * - 0.4.4&amp;lt;br&amp;gt;0.5.0rc1 - 0.5.0.5&amp;lt;br&amp;gt;0.5.1rc1 - 0.5.3&amp;lt;br&amp;gt;0.6.0rc1 || 0.4.5&amp;lt;br&amp;gt;0.5.0.6&amp;lt;br&amp;gt;0.5.4rc1&amp;lt;br&amp;gt;0.6.0rc2&lt;br /&gt;
|-&lt;br /&gt;
| wxBitcoin || ALL || NONE&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
* [[BIP 0016]]&lt;br /&gt;
&lt;br /&gt;
== CVE-2012-2459 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2012-05-14&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; Block hash collision (via merkle tree)&lt;br /&gt;
 &amp;lt;b&amp;gt;Fix Deployment:&amp;lt;/b&amp;gt; 95%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| Bitcoin-Qt&amp;lt;br&amp;gt;bitcoind || * - 0.4.6rc1&amp;lt;br&amp;gt;0.5.0rc1 - 0.5.5rc1&amp;lt;br&amp;gt;0.6.0rc1 - 0.6.0.7rc1&amp;lt;br&amp;gt;0.6.1rc1 - 0.6.1rc1 || 0.4.6&amp;lt;br&amp;gt;0.5.5&amp;lt;br&amp;gt;0.6.0.7&amp;lt;br&amp;gt;0.6.1rc2&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Block hash collisions can easily be made by duplicating transactions in the merkle tree.&lt;br /&gt;
Such a collision is invalid, but if recorded (as Bitcoin-Qt and bitcoind prior to 0.6.1 did) would prevent acceptance of the legitimate block with the same hash.&lt;br /&gt;
This could be used to fork the blockchain, including deep double-spend attacks.&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
* [https://bitcointalk.org/?topic=81749 Announcement]&lt;br /&gt;
* [https://bugs.gentoo.org/show_bug.cgi?id=415973 Gentoo bug tracker]&lt;br /&gt;
* [http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2012-2459 US-CERT/NIST]&lt;br /&gt;
* [https://bitcointalk.org/?topic=102395 Full Disclosure]&lt;br /&gt;
&lt;br /&gt;
== CVE-2012-3789 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2012-06-20&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; (Lack of) orphan txn resource limits&lt;br /&gt;
 &amp;lt;b&amp;gt;Fix Deployment:&amp;lt;/b&amp;gt; 90%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| Bitcoin-Qt&amp;lt;br&amp;gt;bitcoind || * - 0.4.7rc2&amp;lt;br&amp;gt;0.5.0rc1 - 0.5.6rc2&amp;lt;br&amp;gt;0.6.0rc1 - 0.6.0.8rc2&amp;lt;br&amp;gt;0.6.1rc1 - 0.6.2.2 || 0.4.7rc3&amp;lt;br&amp;gt;0.5.6rc3&amp;lt;br&amp;gt;0.6.0.9rc1&amp;lt;br&amp;gt;0.6.3rc1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
* [[CVE-2012-3789]]&lt;br /&gt;
* [https://bitcointalk.org/?topic=88734 0.6.3rc1 Announcement]&lt;br /&gt;
* [http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2012-3789 US-CERT/NIST]&lt;br /&gt;
&lt;br /&gt;
== CVE-2012-4682 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; &lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; &lt;br /&gt;
 &amp;lt;b&amp;gt;Fix Deployment:&amp;lt;/b&amp;gt; 80%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| Bitcoin-Qt&amp;lt;br&amp;gt;bitcoind || * - 0.4.7rc2&amp;lt;br&amp;gt;0.5.0rc1 - 0.5.6rc2&amp;lt;br&amp;gt;0.6.0rc1 - 0.6.0.8rc2&amp;lt;br&amp;gt;0.6.1rc1 - 0.6.2.2 || 0.4.7rc3&amp;lt;br&amp;gt;0.5.6rc3&amp;lt;br&amp;gt;0.6.0.9rc1&amp;lt;br&amp;gt;0.6.3rc1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
* [[CVE-2012-4682]]&lt;br /&gt;
&lt;br /&gt;
== CVE-2012-4683 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2012-08-23&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; Targeted DoS by CPU exhaustion using alerts&lt;br /&gt;
 &amp;lt;b&amp;gt;Fix Deployment:&amp;lt;/b&amp;gt; 80%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| Bitcoin-Qt&amp;lt;br&amp;gt;bitcoind || * - 0.4.7rc2&amp;lt;br&amp;gt;0.5.0rc1 - 0.5.6rc2&amp;lt;br&amp;gt;0.6.0rc1 - 0.6.0.8rc2&amp;lt;br&amp;gt;0.6.1rc1 - 0.6.2.2 || 0.7.0 &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
* [[CVE-2012-4683]]&lt;br /&gt;
* [https://bitcointalk.org/index.php?topic=148038.0 Announcement]&lt;br /&gt;
&lt;br /&gt;
== CVE-2012-4684 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2012-08-24&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; Network-wide DoS using malleable signatures in alerts&lt;br /&gt;
 &amp;lt;b&amp;gt;Fix Deployment:&amp;lt;/b&amp;gt; 80%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| Bitcoin-Qt&amp;lt;br&amp;gt;bitcoind || * - 0.4.7rc2&amp;lt;br&amp;gt;0.5.0rc1 - 0.5.6rc2&amp;lt;br&amp;gt;0.6.0rc1 - 0.6.0.8rc2&amp;lt;br&amp;gt;0.6.1rc1 - 0.6.2.2 - 0.6.3rc1 || 0.7.0 &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
* [[CVE-2012-4684]]&lt;br /&gt;
* [https://bitcointalk.org/index.php?topic=148109.0 Announcement]&lt;br /&gt;
&lt;br /&gt;
== CVE-2013-2272 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2013-01-11&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; Remote discovery of node&#039;s wallet addresses&lt;br /&gt;
 &amp;lt;b&amp;gt;Fix Deployment:&amp;lt;/b&amp;gt; 22%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| Bitcoin-Qt&amp;lt;br&amp;gt;bitcoind || * - 0.4.8rc4&amp;lt;br&amp;gt;0.5.0rc1 - 0.5.7&amp;lt;br&amp;gt;0.6.0rc1 - 0.6.0.10rc4&amp;lt;br&amp;gt;0.6.1rc1 - 0.6.4rc4&amp;lt;br&amp;gt;0.7.0rc1 - 0.7.2 || 0.4.9rc1&amp;lt;br&amp;gt;0.5.8rc1&amp;lt;br&amp;gt;0.6.0.11rc1&amp;lt;br&amp;gt;0.6.5rc1&amp;lt;br&amp;gt;0.7.3rc1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
&lt;br /&gt;
* [https://bitcointalk.org/?topic=135856 Announcement]&lt;br /&gt;
&lt;br /&gt;
== CVE-2013-2273 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2013-01-30&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; Predictable change output &lt;br /&gt;
 &amp;lt;b&amp;gt;Fix Deployment:&amp;lt;/b&amp;gt; 22%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| Bitcoin-Qt&amp;lt;br&amp;gt;bitcoind || * - 0.4.8rc4&amp;lt;br&amp;gt;0.5.0rc1 - 0.5.7&amp;lt;br&amp;gt;0.6.0rc1 - 0.6.0.10rc4&amp;lt;br&amp;gt;0.6.1rc1 - 0.6.4rc4&amp;lt;br&amp;gt;0.7.0rc1 - 0.7.2 || 0.4.9rc1&amp;lt;br&amp;gt;0.5.8rc1&amp;lt;br&amp;gt;0.6.0.11rc1&amp;lt;br&amp;gt;0.6.5rc1&amp;lt;br&amp;gt;0.7.3rc1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== CVE-2013-2292 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2013-01-30&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; A transaction that takes at least 3 minutes to verify&lt;br /&gt;
 &amp;lt;b&amp;gt;Fix Deployment:&amp;lt;/b&amp;gt; -&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| Bitcoin-Qt&amp;lt;br&amp;gt;bitcoind || All versions || No fix yet&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
* [[CVE-2013-2292]]&lt;br /&gt;
* [https://bitcointalk.org/?topic=140078 Announcement]&lt;br /&gt;
&lt;br /&gt;
== CVE-2013-2293 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2013-02-14&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; Continuous hard disk seek&lt;br /&gt;
 &amp;lt;b&amp;gt;Fix Deployment:&amp;lt;/b&amp;gt; 22%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| Bitcoin-Qt&amp;lt;br&amp;gt;bitcoind || * - 0.7.3rc1 || No fix yet (0.8.0 unaffected)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
&lt;br /&gt;
* [[CVE-2013-2293]]&lt;br /&gt;
* [https://bitcointalk.org/?topic=144122 Announcement]&lt;br /&gt;
&lt;br /&gt;
== BIP-0034 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; Future&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; Mandatory block protocol update&lt;br /&gt;
 &amp;lt;b&amp;gt;Deployment:&amp;lt;/b&amp;gt; 80%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| Bitcoin-Qt&amp;lt;br&amp;gt;bitcoind || * - 0.4.7&amp;lt;br&amp;gt;0.5.0rc1 - 0.5.7&amp;lt;br&amp;gt;0.6.0rc1 - 0.6.0.9&amp;lt;br&amp;gt;0.6.1rc1 - 0.6.3 || 0.4.8rc1&amp;lt;br&amp;gt;0.5.7rc1&amp;lt;br&amp;gt;0.6.0.10rc1&amp;lt;br&amp;gt;0.6.4rc1&lt;br /&gt;
|-&lt;br /&gt;
| wxBitcoin || ALL || NONE&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
* [[BIP 0034]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Definitions==&lt;br /&gt;
&lt;br /&gt;
A critical vulnerability is one that will have disastrous consequences if it is exploited.  A serious vulnerability is one that will have serious consequences if it is exploited&amp;lt;ref&amp;gt;[http://bitcointalk.org/index.php?topic=88892.0 http://bitcointalk.org/index.php?topic=88892.0]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
&lt;br /&gt;
* [[Changelog]]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Cateogory:Security]]&lt;/div&gt;</summary>
		<author><name>Sergio Demian Lerner</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Common_Vulnerabilities_and_Exposures&amp;diff=35883</id>
		<title>Common Vulnerabilities and Exposures</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Common_Vulnerabilities_and_Exposures&amp;diff=35883"/>
		<updated>2013-03-05T19:13:59Z</updated>

		<summary type="html">&lt;p&gt;Sergio Demian Lerner: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!style=&amp;quot;width:16ex&amp;quot;| CVE&lt;br /&gt;
! Announced !! Affects !! Severity !! Attack is... !! Flaw !! Net&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2010-5137|CVE-2010-5137]]&lt;br /&gt;
| 2010-07-28&lt;br /&gt;
| wxBitcoin and bitcoind&lt;br /&gt;
|bgcolor=yellow| DoS&amp;lt;ref name=&amp;quot;DoS&amp;quot;&amp;gt;Attacker can disable some functionality, for example by crashing clients&amp;lt;/ref&amp;gt;&lt;br /&gt;
|bgcolor=pink| Easy&lt;br /&gt;
| OP_LSHIFT crash&lt;br /&gt;
|bgcolor=lime| 100%&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2010-5141|CVE-2010-5141]]&lt;br /&gt;
| 2010-07-28&lt;br /&gt;
| wxBitcoin and bitcoind&lt;br /&gt;
|bgcolor=pink| Theft&amp;lt;ref name=&amp;quot;Theft&amp;quot;&amp;gt;Attacker can take or create money outside known network rules&amp;lt;/ref&amp;gt;&lt;br /&gt;
|bgcolor=pink| Easy&lt;br /&gt;
|&lt;br /&gt;
|bgcolor=lime| 100%&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2010-5138|CVE-2010-5138]]&lt;br /&gt;
| 2010-07-29&lt;br /&gt;
| wxBitcoin and bitcoind&lt;br /&gt;
|bgcolor=yellow| DoS&amp;lt;ref name=&amp;quot;DoS&amp;quot;/&amp;gt;&lt;br /&gt;
|bgcolor=pink| Easy&lt;br /&gt;
| Unlimited SigOp DoS&lt;br /&gt;
|bgcolor=lime| 100%&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2010-5139|CVE-2010-5139]]&lt;br /&gt;
| 2010-08-15&lt;br /&gt;
| wxBitcoin and bitcoind&lt;br /&gt;
|bgcolor=pink| Theft&amp;lt;ref name=&amp;quot;Theft&amp;quot;/&amp;gt;&lt;br /&gt;
|bgcolor=pink| Easy&lt;br /&gt;
| Combined output overflow&lt;br /&gt;
|bgcolor=lime| 100%&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2010-5140|CVE-2010-5140]]&lt;br /&gt;
| 2010-09-29&lt;br /&gt;
| wxBitcoin and bitcoind&lt;br /&gt;
|bgcolor=yellow| DoS&amp;lt;ref name=&amp;quot;DoS&amp;quot;/&amp;gt;&lt;br /&gt;
|bgcolor=pink| Easy&lt;br /&gt;
| Never confirming transactions&lt;br /&gt;
|bgcolor=lime| 100%&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2011-4447|CVE-2011-4447]]&lt;br /&gt;
| 2011-11-11&lt;br /&gt;
| wxBitcoin and bitcoind&lt;br /&gt;
|bgcolor=pink| Exposure&amp;lt;ref name=&amp;quot;Exposure&amp;quot;&amp;gt;Attacker can access user data outside known acceptable methods&amp;lt;/ref&amp;gt;&lt;br /&gt;
|bgcolor=lime| Hard&lt;br /&gt;
| Wallet non-encryption&lt;br /&gt;
|bgcolor=lime| [http://luke.dashjr.org/programs/bitcoin/files/charts/CVE-2011-4447.html 99%]&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2012-1909|CVE-2012-1909]]&lt;br /&gt;
| 2012-03-07&lt;br /&gt;
| Bitcoin protocol and all clients&lt;br /&gt;
|bgcolor=pink| Netsplit&amp;lt;ref name=&amp;quot;Netsplit&amp;quot;&amp;gt;Attacker can create multiple views of the network, enabling [[double-spending]] with over 1 confirmation&amp;lt;/ref&amp;gt;&lt;br /&gt;
|bgcolor=lime| Very hard&lt;br /&gt;
| Transaction overwriting&lt;br /&gt;
|bgcolor=lime| [http://luke.dashjr.org/programs/bitcoin/files/charts/CVE-2012-1909.html 95%]&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2012-1910|CVE-2012-1910]]&lt;br /&gt;
| 2012-03-17&lt;br /&gt;
| Bitcoin-Qt for Windows&lt;br /&gt;
|bgcolor=pink| Unknown&amp;lt;ref name=&amp;quot;Unknown&amp;quot;&amp;gt;Extent of possible abuse is unknown&amp;lt;/ref&amp;gt;&lt;br /&gt;
|bgcolor=lime| Hard&lt;br /&gt;
| MingW non-multithreading&lt;br /&gt;
|bgcolor=lime| [http://luke.dashjr.org/programs/bitcoin/files/charts/CVE-2012-1910.html 100%]&lt;br /&gt;
|-&lt;br /&gt;
| [[#BIP-0016|BIP 0016]]&lt;br /&gt;
| 2012-04-01&lt;br /&gt;
| All Bitcoin clients&lt;br /&gt;
|bgcolor=yellow| Fake Conf&amp;lt;ref name=&amp;quot;FakeConf&amp;quot;&amp;gt;Attacker can double-spend with 1 confirmation&amp;lt;/ref&amp;gt;&lt;br /&gt;
|bgcolor=yellow| Miners&amp;lt;ref name=&amp;quot;MinerEasy&amp;quot;&amp;gt;Attacking requires mining block(s)&amp;lt;/ref&amp;gt;&lt;br /&gt;
| Mandatory P2SH protocol update&lt;br /&gt;
|bgcolor=lime| [http://luke.dashjr.org/programs/bitcoin/files/charts/BIP-0016.html 95%]&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2012-2459|CVE-2012-2459]]&lt;br /&gt;
| 2012-05-14&lt;br /&gt;
| bitcoind and Bitcoin-Qt&lt;br /&gt;
|bgcolor=pink| Netsplit&amp;lt;ref name=&amp;quot;Netsplit&amp;quot;/&amp;gt;&lt;br /&gt;
|bgcolor=pink| Easy&lt;br /&gt;
| Block hash collision (via merkle root)&lt;br /&gt;
|bgcolor=lime| [http://luke.dashjr.org/programs/bitcoin/files/charts/CVE-2012-2459.html 95%]&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2012-3584|CVE-2012-3584]]&lt;br /&gt;
| 2012-06-16&lt;br /&gt;
| Bitcoin p2p protocol&lt;br /&gt;
|bgcolor=yellow| DoS&amp;lt;ref name=&amp;quot;DoS&amp;quot;/&amp;gt;&lt;br /&gt;
|bgcolor=yellow| Miners&amp;lt;ref name=&amp;quot;MinerEasy&amp;quot;/&amp;gt;&lt;br /&gt;
| Poor miner incentives&lt;br /&gt;
| (no fix)&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2012-3789|CVE-2012-3789]]&lt;br /&gt;
| 2012-06-20&lt;br /&gt;
| bitcoind and Bitcoin-Qt&lt;br /&gt;
|bgcolor=yellow| DoS&amp;lt;ref name=&amp;quot;DoS&amp;quot;/&amp;gt;&lt;br /&gt;
|bgcolor=pink| Easy&lt;br /&gt;
| (Lack of) orphan txn resource limits&lt;br /&gt;
|bgcolor=yellow| [http://luke.dashjr.org/programs/bitcoin/files/charts/CVE-2012-3789 90%]&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2012-4682|CVE-2012-4682]]&lt;br /&gt;
| &lt;br /&gt;
| bitcoind and Bitcoin-Qt&lt;br /&gt;
|bgcolor=yellow| DoS&amp;lt;ref name=&amp;quot;DoS&amp;quot;/&amp;gt;&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|bgcolor=yellow| [http://luke.dashjr.org/programs/bitcoin/files/charts/CVE-2012-4682.html 80%]&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2012-4683|CVE-2012-4683]]&lt;br /&gt;
| &lt;br /&gt;
| bitcoind and Bitcoin-Qt&lt;br /&gt;
|bgcolor=yellow| DoS&amp;lt;ref name=&amp;quot;DoS&amp;quot;/&amp;gt;&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|bgcolor=yellow| [http://luke.dashjr.org/programs/bitcoin/files/charts/CVE-2012-4683.html 80%]&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2012-4684|CVE-2012-4684]]&lt;br /&gt;
| &lt;br /&gt;
| bitcoind and Bitcoin-Qt&lt;br /&gt;
|&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|bgcolor=yellow| [http://luke.dashjr.org/programs/bitcoin/files/charts/security.html?20124683 80%]&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2013-2272|CVE-2013-2272]]&lt;br /&gt;
| 2013-01-11&lt;br /&gt;
| bitcoind and Bitcoin-Qt&lt;br /&gt;
|bgcolor=yellow| Exposure&amp;lt;ref name=&amp;quot;Exposure&amp;quot;/&amp;gt;&lt;br /&gt;
|bgcolor=pink| Easy&lt;br /&gt;
| Remote discovery of node&#039;s wallet addresses&lt;br /&gt;
|bgcolor=pink| [http://luke.dashjr.org/programs/bitcoin/files/charts/security.html?20132272 22%]&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2013-2273|CVE-2013-2273]]&lt;br /&gt;
| 2013-01-30&lt;br /&gt;
| bitcoind and Bitcoin-Qt&lt;br /&gt;
|bgcolor=lime| Exposure&amp;lt;ref name=&amp;quot;Exposure&amp;quot;/&amp;gt;&lt;br /&gt;
|bgcolor=yellow| Easy&lt;br /&gt;
| Predictable change output&lt;br /&gt;
|bgcolor=pink| [http://luke.dashjr.org/programs/bitcoin/files/charts/security.html?20132273 22%]&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2013-2292|CVE-2013-2292]]&lt;br /&gt;
| 2013-01-30&lt;br /&gt;
| bitcoind and Bitcoin-Qt&lt;br /&gt;
|bgcolor=yellow| DoS&amp;lt;ref name=&amp;quot;DoS&amp;quot;/&amp;gt;&lt;br /&gt;
|bgcolor=lime| Hard&lt;br /&gt;
| A transaction that takes at least 3 minutes to verify&lt;br /&gt;
|bgcolor=pink| [http://luke.dashjr.org/programs/bitcoin/files/charts/security.html?20132292 -]&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2013-2293|CVE-2013-2293]]&lt;br /&gt;
| 2013-02-14&lt;br /&gt;
| bitcoind and Bitcoin-Qt&lt;br /&gt;
|bgcolor=yellow| DoS&amp;lt;ref name=&amp;quot;DoS&amp;quot;/&amp;gt;&lt;br /&gt;
|bgcolor=pink| Easy&lt;br /&gt;
| Continuous hard disk seek&lt;br /&gt;
|bgcolor=pink| [http://luke.dashjr.org/programs/bitcoin/files/charts/security.html?20132293 22%]&lt;br /&gt;
|-&lt;br /&gt;
| [[#BIP-0034|BIP 0034]]&lt;br /&gt;
| Future&lt;br /&gt;
| All Bitcoin clients&lt;br /&gt;
|bgcolor=yellow| Fake Conf&amp;lt;ref name=&amp;quot;FakeConf&amp;quot;/&amp;gt;&lt;br /&gt;
|bgcolor=yellow| Miners&amp;lt;ref name=&amp;quot;MinerEasy&amp;quot;&amp;gt;Attacking requires mining block(s)&amp;lt;/ref&amp;gt;&lt;br /&gt;
| Mandatory block protocol update&lt;br /&gt;
|bgcolor=yellow| [http://luke.dashjr.org/programs/bitcoin/files/charts/BIP-0034.html 80%]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&lt;br /&gt;
== CVE-2010-5137 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2010-07-28&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; OP_LSHIFT crash&lt;br /&gt;
 &amp;lt;b&amp;gt;Fix Deployment:&amp;lt;/b&amp;gt; 100%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| bitcoind&amp;lt;br&amp;gt;wxBitcoin || * - 0.3.4 || 0.3.5&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
On July 28 2010, two bugs were discovered and demonstrated on the test network. One caused bitcoin to crash on some machines when processing a transaction containing an OP_LSHIFT. This was never exploited on the main network, and was fixed by Bitcoin version 0.3.5.&lt;br /&gt;
&lt;br /&gt;
After these bugs were discovered, many currently-unused script words were disabled for safety.&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
* [http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-5137 US-CERT/NIST]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== CVE-2010-5141 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2010-07-28&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; ?&lt;br /&gt;
 &amp;lt;b&amp;gt;Fix Deployment:&amp;lt;/b&amp;gt; 100%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| bitcoind&amp;lt;br&amp;gt;wxBitcoin || * - 0.3.4 || 0.3.5&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
On July 28 2010, two bugs were discovered and demonstrated on the test network. One exploited a bug in the transaction handling code and allowed an attacker to spend coins that they did not own. This was never exploited on the main network, and was fixed by Bitcoin version 0.3.5.&lt;br /&gt;
&lt;br /&gt;
After these bugs were discovered, many currently-unused script words were disabled for safety.&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
* [http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-5141 US-CERT/NIST]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== CVE-2010-5138 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2010-07-29&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; Unlimited SigOp DoS&lt;br /&gt;
 &amp;lt;b&amp;gt;Fix Deployment:&amp;lt;/b&amp;gt; 100%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| bitcoind&amp;lt;br&amp;gt;wxBitcoin || * - 0.3.? || 0.3.?&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
On July 29 2010, it was discovered that block [http://blockexplorer.com/block/00000000000997f9fd2fe1ee376293ef8c42ad09193a5d2086dddf8e5c426b56 71036] contained several transactions with a ton of OP_CHECKSIG commands. There should only ever be one such command. This caused every node to do extra unnecessary work, and it could have been used as a denial-of-service attack. A new version of Bitcoin was quickly released. The new version did not cause a fork on the main network, though it did cause one on the test network (where someone had played around with the attack more).&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
* [http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-5138 US-CERT/NIST]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== CVE-2010-5139 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2010-08-15&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; Combined output overflow&lt;br /&gt;
 &amp;lt;b&amp;gt;Fix Deployment:&amp;lt;/b&amp;gt; 100%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| bitcoind&amp;lt;br&amp;gt;wxBitcoin || * - 0.3.10 || 0.3.11&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
On August 15 2010, it was [http://bitcointalk.org/index.php?topic=822.0 discovered] that block 74638 contained a transaction that created over 184 billion bitcoins for two different addresses. This was possible because the code used for checking transactions before including them in a block didn&#039;t account for the case of outputs so large that they overflowed when summed. A new version was published within a few hours of the discovery. The block chain had to be forked. Although many unpatched nodes continued to build on the &amp;quot;bad&amp;quot; block chain, the &amp;quot;good&amp;quot; block chain overtook it at a block height of 74691. The bad transaction no longer exists for people using the longest chain.&lt;br /&gt;
&lt;br /&gt;
The block and transaction:&lt;br /&gt;
&amp;lt;pre&amp;gt;CBlock(hash=0000000000790ab3, ver=1, hashPrevBlock=0000000000606865, hashMerkleRoot=618eba,&lt;br /&gt;
nTime=1281891957, nBits=1c00800e, nNonce=28192719, vtx=2)&lt;br /&gt;
  CTransaction(hash=012cd8, ver=1, vin.size=1, vout.size=1, nLockTime=0)&lt;br /&gt;
    CTxIn(COutPoint(000000, -1), coinbase 040e80001c028f00)&lt;br /&gt;
    CTxOut(nValue=50.51000000, scriptPubKey=0x4F4BA55D1580F8C3A8A2C7)&lt;br /&gt;
  CTransaction(hash=1d5e51, ver=1, vin.size=1, vout.size=2, nLockTime=0)&lt;br /&gt;
    CTxIn(COutPoint(237fe8, 0), scriptSig=0xA87C02384E1F184B79C6AC)&lt;br /&gt;
    CTxOut(nValue=92233720368.54275808, scriptPubKey=OP_DUP OP_HASH160 0xB7A7)&lt;br /&gt;
    CTxOut(nValue=92233720368.54275808, scriptPubKey=OP_DUP OP_HASH160 0x1512)&lt;br /&gt;
  vMerkleTree: 012cd8 1d5e51 618eba&lt;br /&gt;
&lt;br /&gt;
Block hash: 0000000000790ab3f22ec756ad43b6ab569abf0bddeb97c67a6f7b1470a7ec1c&lt;br /&gt;
Transaction hash: 1d5e512a9723cbef373b970eb52f1e9598ad67e7408077a82fdac194b65333c9&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
* [https://bitcointalk.org/index.php?topic=822.0 Discovery]&lt;br /&gt;
* [http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-5139 US-CERT/NIST]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== CVE-2010-5140 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2010-09-29&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; Never confirming transactions&lt;br /&gt;
 &amp;lt;b&amp;gt;Fix Deployment:&amp;lt;/b&amp;gt; 100%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| bitcoind&amp;lt;br&amp;gt;wxBitcoin || * - 0.3.12 || 0.3.13&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Around September 29, 2010, people started [https://bitcointalk.org/index.php?topic=1306.0 reporting] that their sent transactions would not confirm. This happened because people modified Bitcoin to send sub-0.01 transactions without any fees. A 0.01 fee was at that time required by the network for such transactions (essentially prohibiting them), so the transactions remained at 0 confirmations forever. This became a more serious issue because Bitcoin would send transactions using bitcoins gotten from transactions with 0 confirmations, and these resulting transactions would also never confirm. Because Bitcoin tends to prefer sending smaller coins, these invalid transactions quickly multiplied, contaminating the wallets of everyone who received them.&lt;br /&gt;
&lt;br /&gt;
Bitcoin was changed to only select coins with at least 1 confirmation. The remaining sub-0.01 transactions were cleared by generators who modified their version of Bitcoin to not require the micropayment fee. It took a while for everything to get cleared, though, because many of the intermediate transactions had been forgotten by the network by this point and had to be rebroadcast by the original senders.&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
* [https://bitcointalk.org/index.php?topic=1306.0 Initial reports]&lt;br /&gt;
* [http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-5140 US-CERT/NIST]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== CVE-2011-4447 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2011-11-11&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; Wallet non-encryption&lt;br /&gt;
 &amp;lt;b&amp;gt;Fix Deployment:&amp;lt;/b&amp;gt; 99%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| bitcoind&amp;lt;br&amp;gt;wxBitcoin || 0.4.0 - 0.4.1rc6 || 0.4.1&amp;lt;br&amp;gt;0.5.0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
* [https://bitcointalk.org/index.php?topic=51604.0 Announcement]&lt;br /&gt;
* [https://bitcointalk.org/index.php?topic=51474.0 Finding]&lt;br /&gt;
* [http://bitcoin.org/releases/2011/11/21/v0.5.0.html 0.5.0]&lt;br /&gt;
* [http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2011-4447 US-CERT/NIST]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== CVE-2012-1909 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2012-03-07&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; Transaction overwriting&lt;br /&gt;
 &amp;lt;b&amp;gt;Fix Deployment:&amp;lt;/b&amp;gt; 95%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| Bitcoin protocol || Before March 15th, 2012 || BIP 30&lt;br /&gt;
|-&lt;br /&gt;
| Bitcoin-Qt&amp;lt;br&amp;gt;bitcoind || * - 0.4.4rc2&amp;lt;br&amp;gt;0.5.0rc1 - 0.5.0.4rc2&amp;lt;br&amp;gt;0.5.1rc1 - 0.5.3rc2&amp;lt;br&amp;gt;0.6.0rc1 - 0.6.0rc2 || 0.4.4&amp;lt;br&amp;gt;0.5.0.4&amp;lt;br&amp;gt;0.5.3&amp;lt;br&amp;gt;0.6.0rc3&lt;br /&gt;
|-&lt;br /&gt;
| wxBitcoin || ALL || NONE&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
* [https://bitcointalk.org/index.php?topic=67738.0 Announcement]&lt;br /&gt;
* [https://en.bitcoin.it/wiki/BIP_0030 Fix]&lt;br /&gt;
* [https://bugs.gentoo.org/show_bug.cgi?id=407793 Gentoo bug tracker]&lt;br /&gt;
* [http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2012-1909 US-CERT/NIST]&lt;br /&gt;
&lt;br /&gt;
== CVE-2012-1910 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2012-03-17&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; MingW non-multithreading&lt;br /&gt;
 &amp;lt;b&amp;gt;Fix Deployment:&amp;lt;/b&amp;gt; 100%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| Bitcoin-Qt for Windows || 0.5.0rc1 - 0.5.0.4&amp;lt;br&amp;gt;0.5.1rc1 - 0.5.3.0&amp;lt;br&amp;gt;0.6.0rc1 - 0.6.0rc3 || 0.5.0.5&amp;lt;br&amp;gt;0.5.3.1&amp;lt;br&amp;gt;0.5.4&amp;lt;br&amp;gt;0.6.0rc4&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
* [https://bitcointalk.org/index.php?topic=69120.0 Announcement]&lt;br /&gt;
* [http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2012-1910 US-CERT/NIST]&lt;br /&gt;
&lt;br /&gt;
== BIP-0016 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2012-04-01&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; Mandatory P2SH protocol update&lt;br /&gt;
 &amp;lt;b&amp;gt;Deployment:&amp;lt;/b&amp;gt; 95%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| Bitcoin-Qt&amp;lt;br&amp;gt;bitcoind || * - 0.4.4&amp;lt;br&amp;gt;0.5.0rc1 - 0.5.0.5&amp;lt;br&amp;gt;0.5.1rc1 - 0.5.3&amp;lt;br&amp;gt;0.6.0rc1 || 0.4.5&amp;lt;br&amp;gt;0.5.0.6&amp;lt;br&amp;gt;0.5.4rc1&amp;lt;br&amp;gt;0.6.0rc2&lt;br /&gt;
|-&lt;br /&gt;
| wxBitcoin || ALL || NONE&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
* [[BIP 0016]]&lt;br /&gt;
&lt;br /&gt;
== CVE-2012-2459 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2012-05-14&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; Block hash collision (via merkle tree)&lt;br /&gt;
 &amp;lt;b&amp;gt;Fix Deployment:&amp;lt;/b&amp;gt; 95%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| Bitcoin-Qt&amp;lt;br&amp;gt;bitcoind || * - 0.4.6rc1&amp;lt;br&amp;gt;0.5.0rc1 - 0.5.5rc1&amp;lt;br&amp;gt;0.6.0rc1 - 0.6.0.7rc1&amp;lt;br&amp;gt;0.6.1rc1 - 0.6.1rc1 || 0.4.6&amp;lt;br&amp;gt;0.5.5&amp;lt;br&amp;gt;0.6.0.7&amp;lt;br&amp;gt;0.6.1rc2&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Block hash collisions can easily be made by duplicating transactions in the merkle tree.&lt;br /&gt;
Such a collision is invalid, but if recorded (as Bitcoin-Qt and bitcoind prior to 0.6.1 did) would prevent acceptance of the legitimate block with the same hash.&lt;br /&gt;
This could be used to fork the blockchain, including deep double-spend attacks.&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
* [https://bitcointalk.org/?topic=81749 Announcement]&lt;br /&gt;
* [https://bugs.gentoo.org/show_bug.cgi?id=415973 Gentoo bug tracker]&lt;br /&gt;
* [http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2012-2459 US-CERT/NIST]&lt;br /&gt;
* [https://bitcointalk.org/?topic=102395 Full Disclosure]&lt;br /&gt;
&lt;br /&gt;
== CVE-2012-3789 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2012-06-20&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; (Lack of) orphan txn resource limits&lt;br /&gt;
 &amp;lt;b&amp;gt;Fix Deployment:&amp;lt;/b&amp;gt; 90%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| Bitcoin-Qt&amp;lt;br&amp;gt;bitcoind || * - 0.4.7rc2&amp;lt;br&amp;gt;0.5.0rc1 - 0.5.6rc2&amp;lt;br&amp;gt;0.6.0rc1 - 0.6.0.8rc2&amp;lt;br&amp;gt;0.6.1rc1 - 0.6.2.2 || 0.4.7rc3&amp;lt;br&amp;gt;0.5.6rc3&amp;lt;br&amp;gt;0.6.0.9rc1&amp;lt;br&amp;gt;0.6.3rc1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
* [[CVE-2012-3789]]&lt;br /&gt;
* [https://bitcointalk.org/?topic=88734 0.6.3rc1 Announcement]&lt;br /&gt;
* [http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2012-3789 US-CERT/NIST]&lt;br /&gt;
&lt;br /&gt;
== CVE-2012-4682 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; &lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; &lt;br /&gt;
 &amp;lt;b&amp;gt;Fix Deployment:&amp;lt;/b&amp;gt; 80%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| Bitcoin-Qt&amp;lt;br&amp;gt;bitcoind || * - 0.4.7rc2&amp;lt;br&amp;gt;0.5.0rc1 - 0.5.6rc2&amp;lt;br&amp;gt;0.6.0rc1 - 0.6.0.8rc2&amp;lt;br&amp;gt;0.6.1rc1 - 0.6.2.2 || 0.4.7rc3&amp;lt;br&amp;gt;0.5.6rc3&amp;lt;br&amp;gt;0.6.0.9rc1&amp;lt;br&amp;gt;0.6.3rc1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
* [[CVE-2012-4682]]&lt;br /&gt;
&lt;br /&gt;
== CVE-2012-4683 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2012-08-23&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; Targeted DoS by CPU exhaustion using alerts&lt;br /&gt;
 &amp;lt;b&amp;gt;Fix Deployment:&amp;lt;/b&amp;gt; 80%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| Bitcoin-Qt&amp;lt;br&amp;gt;bitcoind || * - 0.4.7rc2&amp;lt;br&amp;gt;0.5.0rc1 - 0.5.6rc2&amp;lt;br&amp;gt;0.6.0rc1 - 0.6.0.8rc2&amp;lt;br&amp;gt;0.6.1rc1 - 0.6.2.2 || 0.7.0 &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
* [[CVE-2012-4683]]&lt;br /&gt;
* [https://bitcointalk.org/index.php?topic=148038.0 Announcement]&lt;br /&gt;
&lt;br /&gt;
== CVE-2012-4684 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2012-08-24&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; Network-wide DoS using malleable signatures in alerts&lt;br /&gt;
 &amp;lt;b&amp;gt;Fix Deployment:&amp;lt;/b&amp;gt; 80%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| Bitcoin-Qt&amp;lt;br&amp;gt;bitcoind || * - 0.4.7rc2&amp;lt;br&amp;gt;0.5.0rc1 - 0.5.6rc2&amp;lt;br&amp;gt;0.6.0rc1 - 0.6.0.8rc2&amp;lt;br&amp;gt;0.6.1rc1 - 0.6.2.2 - 0.6.3rc1 || 0.7.0 &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
* [[CVE-2012-4684]]&lt;br /&gt;
* [https://bitcointalk.org/index.php?topic=148109.0 Announcement]&lt;br /&gt;
&lt;br /&gt;
== CVE-2013-2272 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2013-01-11&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; Remote discovery of node&#039;s wallet addresses&lt;br /&gt;
 &amp;lt;b&amp;gt;Fix Deployment:&amp;lt;/b&amp;gt; 22%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| Bitcoin-Qt&amp;lt;br&amp;gt;bitcoind || * - 0.4.8rc4&amp;lt;br&amp;gt;0.5.0rc1 - 0.5.7&amp;lt;br&amp;gt;0.6.0rc1 - 0.6.0.10rc4&amp;lt;br&amp;gt;0.6.1rc1 - 0.6.4rc4&amp;lt;br&amp;gt;0.7.0rc1 - 0.7.2 || 0.4.9rc1&amp;lt;br&amp;gt;0.5.8rc1&amp;lt;br&amp;gt;0.6.0.11rc1&amp;lt;br&amp;gt;0.6.5rc1&amp;lt;br&amp;gt;0.7.3rc1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
&lt;br /&gt;
* [https://bitcointalk.org/?topic=135856 Announcement]&lt;br /&gt;
&lt;br /&gt;
== CVE-2013-2273 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2013-01-30&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; Predictable change output &lt;br /&gt;
 &amp;lt;b&amp;gt;Fix Deployment:&amp;lt;/b&amp;gt; 22%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| Bitcoin-Qt&amp;lt;br&amp;gt;bitcoind || * - 0.4.8rc4&amp;lt;br&amp;gt;0.5.0rc1 - 0.5.7&amp;lt;br&amp;gt;0.6.0rc1 - 0.6.0.10rc4&amp;lt;br&amp;gt;0.6.1rc1 - 0.6.4rc4&amp;lt;br&amp;gt;0.7.0rc1 - 0.7.2 || 0.4.9rc1&amp;lt;br&amp;gt;0.5.8rc1&amp;lt;br&amp;gt;0.6.0.11rc1&amp;lt;br&amp;gt;0.6.5rc1&amp;lt;br&amp;gt;0.7.3rc1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== CVE-2013-2292 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2013-01-30&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; A transaction that takes at least 3 minutes to verify&lt;br /&gt;
 &amp;lt;b&amp;gt;Fix Deployment:&amp;lt;/b&amp;gt; -&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| Bitcoin-Qt&amp;lt;br&amp;gt;bitcoind || All versions || No fix yet&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
* [[CVE-2013-2292]]&lt;br /&gt;
* [https://bitcointalk.org/?topic=140078 Announcement]&lt;br /&gt;
&lt;br /&gt;
== CVE-2013-2293 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2013-02-14&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; Continuous hard disk seek&lt;br /&gt;
 &amp;lt;b&amp;gt;Fix Deployment:&amp;lt;/b&amp;gt; 22%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| Bitcoin-Qt&amp;lt;br&amp;gt;bitcoind || * - 0.7.3rc1 || No fix yet (0.8.0 unaffected)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
&lt;br /&gt;
* [[CVE-2013-2293]]&lt;br /&gt;
* [https://bitcointalk.org/?topic=144122 Announcement]&lt;br /&gt;
&lt;br /&gt;
== BIP-0034 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; Future&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; Mandatory block protocol update&lt;br /&gt;
 &amp;lt;b&amp;gt;Deployment:&amp;lt;/b&amp;gt; 80%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| Bitcoin-Qt&amp;lt;br&amp;gt;bitcoind || * - 0.4.7&amp;lt;br&amp;gt;0.5.0rc1 - 0.5.7&amp;lt;br&amp;gt;0.6.0rc1 - 0.6.0.9&amp;lt;br&amp;gt;0.6.1rc1 - 0.6.3 || 0.4.8rc1&amp;lt;br&amp;gt;0.5.7rc1&amp;lt;br&amp;gt;0.6.0.10rc1&amp;lt;br&amp;gt;0.6.4rc1&lt;br /&gt;
|-&lt;br /&gt;
| wxBitcoin || ALL || NONE&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
* [[BIP 0034]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Definitions==&lt;br /&gt;
&lt;br /&gt;
A critical vulnerability is one that will have disastrous consequences if it is exploited.  A serious vulnerability is one that will have serious consequences if it is exploited&amp;lt;ref&amp;gt;[http://bitcointalk.org/index.php?topic=88892.0 http://bitcointalk.org/index.php?topic=88892.0]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
&lt;br /&gt;
* [[Changelog]]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Cateogory:Security]]&lt;/div&gt;</summary>
		<author><name>Sergio Demian Lerner</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Common_Vulnerabilities_and_Exposures&amp;diff=35882</id>
		<title>Common Vulnerabilities and Exposures</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Common_Vulnerabilities_and_Exposures&amp;diff=35882"/>
		<updated>2013-03-05T18:59:51Z</updated>

		<summary type="html">&lt;p&gt;Sergio Demian Lerner: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!style=&amp;quot;width:16ex&amp;quot;| CVE&lt;br /&gt;
! Announced !! Affects !! Severity !! Attack is... !! Flaw !! Net&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2010-5137|CVE-2010-5137]]&lt;br /&gt;
| 2010-07-28&lt;br /&gt;
| wxBitcoin and bitcoind&lt;br /&gt;
|bgcolor=yellow| DoS&amp;lt;ref name=&amp;quot;DoS&amp;quot;&amp;gt;Attacker can disable some functionality, for example by crashing clients&amp;lt;/ref&amp;gt;&lt;br /&gt;
|bgcolor=pink| Easy&lt;br /&gt;
| OP_LSHIFT crash&lt;br /&gt;
|bgcolor=lime| 100%&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2010-5141|CVE-2010-5141]]&lt;br /&gt;
| 2010-07-28&lt;br /&gt;
| wxBitcoin and bitcoind&lt;br /&gt;
|bgcolor=pink| Theft&amp;lt;ref name=&amp;quot;Theft&amp;quot;&amp;gt;Attacker can take or create money outside known network rules&amp;lt;/ref&amp;gt;&lt;br /&gt;
|bgcolor=pink| Easy&lt;br /&gt;
|&lt;br /&gt;
|bgcolor=lime| 100%&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2010-5138|CVE-2010-5138]]&lt;br /&gt;
| 2010-07-29&lt;br /&gt;
| wxBitcoin and bitcoind&lt;br /&gt;
|bgcolor=yellow| DoS&amp;lt;ref name=&amp;quot;DoS&amp;quot;/&amp;gt;&lt;br /&gt;
|bgcolor=pink| Easy&lt;br /&gt;
| Unlimited SigOp DoS&lt;br /&gt;
|bgcolor=lime| 100%&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2010-5139|CVE-2010-5139]]&lt;br /&gt;
| 2010-08-15&lt;br /&gt;
| wxBitcoin and bitcoind&lt;br /&gt;
|bgcolor=pink| Theft&amp;lt;ref name=&amp;quot;Theft&amp;quot;/&amp;gt;&lt;br /&gt;
|bgcolor=pink| Easy&lt;br /&gt;
| Combined output overflow&lt;br /&gt;
|bgcolor=lime| 100%&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2010-5140|CVE-2010-5140]]&lt;br /&gt;
| 2010-09-29&lt;br /&gt;
| wxBitcoin and bitcoind&lt;br /&gt;
|bgcolor=yellow| DoS&amp;lt;ref name=&amp;quot;DoS&amp;quot;/&amp;gt;&lt;br /&gt;
|bgcolor=pink| Easy&lt;br /&gt;
| Never confirming transactions&lt;br /&gt;
|bgcolor=lime| 100%&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2011-4447|CVE-2011-4447]]&lt;br /&gt;
| 2011-11-11&lt;br /&gt;
| wxBitcoin and bitcoind&lt;br /&gt;
|bgcolor=pink| Exposure&amp;lt;ref name=&amp;quot;Exposure&amp;quot;&amp;gt;Attacker can access user data outside known acceptable methods&amp;lt;/ref&amp;gt;&lt;br /&gt;
|bgcolor=lime| Hard&lt;br /&gt;
| Wallet non-encryption&lt;br /&gt;
|bgcolor=lime| [http://luke.dashjr.org/programs/bitcoin/files/charts/CVE-2011-4447.html 99%]&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2012-1909|CVE-2012-1909]]&lt;br /&gt;
| 2012-03-07&lt;br /&gt;
| Bitcoin protocol and all clients&lt;br /&gt;
|bgcolor=pink| Netsplit&amp;lt;ref name=&amp;quot;Netsplit&amp;quot;&amp;gt;Attacker can create multiple views of the network, enabling [[double-spending]] with over 1 confirmation&amp;lt;/ref&amp;gt;&lt;br /&gt;
|bgcolor=lime| Very hard&lt;br /&gt;
| Transaction overwriting&lt;br /&gt;
|bgcolor=lime| [http://luke.dashjr.org/programs/bitcoin/files/charts/CVE-2012-1909.html 95%]&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2012-1910|CVE-2012-1910]]&lt;br /&gt;
| 2012-03-17&lt;br /&gt;
| Bitcoin-Qt for Windows&lt;br /&gt;
|bgcolor=pink| Unknown&amp;lt;ref name=&amp;quot;Unknown&amp;quot;&amp;gt;Extent of possible abuse is unknown&amp;lt;/ref&amp;gt;&lt;br /&gt;
|bgcolor=lime| Hard&lt;br /&gt;
| MingW non-multithreading&lt;br /&gt;
|bgcolor=lime| [http://luke.dashjr.org/programs/bitcoin/files/charts/CVE-2012-1910.html 100%]&lt;br /&gt;
|-&lt;br /&gt;
| [[#BIP-0016|BIP 0016]]&lt;br /&gt;
| 2012-04-01&lt;br /&gt;
| All Bitcoin clients&lt;br /&gt;
|bgcolor=yellow| Fake Conf&amp;lt;ref name=&amp;quot;FakeConf&amp;quot;&amp;gt;Attacker can double-spend with 1 confirmation&amp;lt;/ref&amp;gt;&lt;br /&gt;
|bgcolor=yellow| Miners&amp;lt;ref name=&amp;quot;MinerEasy&amp;quot;&amp;gt;Attacking requires mining block(s)&amp;lt;/ref&amp;gt;&lt;br /&gt;
| Mandatory P2SH protocol update&lt;br /&gt;
|bgcolor=lime| [http://luke.dashjr.org/programs/bitcoin/files/charts/BIP-0016.html 95%]&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2012-2459|CVE-2012-2459]]&lt;br /&gt;
| 2012-05-14&lt;br /&gt;
| bitcoind and Bitcoin-Qt&lt;br /&gt;
|bgcolor=pink| Netsplit&amp;lt;ref name=&amp;quot;Netsplit&amp;quot;/&amp;gt;&lt;br /&gt;
|bgcolor=pink| Easy&lt;br /&gt;
| Block hash collision (via merkle root)&lt;br /&gt;
|bgcolor=lime| [http://luke.dashjr.org/programs/bitcoin/files/charts/CVE-2012-2459.html 95%]&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2012-3584|CVE-2012-3584]]&lt;br /&gt;
| 2012-06-16&lt;br /&gt;
| Bitcoin p2p protocol&lt;br /&gt;
|bgcolor=yellow| DoS&amp;lt;ref name=&amp;quot;DoS&amp;quot;/&amp;gt;&lt;br /&gt;
|bgcolor=yellow| Miners&amp;lt;ref name=&amp;quot;MinerEasy&amp;quot;/&amp;gt;&lt;br /&gt;
| Poor miner incentives&lt;br /&gt;
| (no fix)&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2012-3789|CVE-2012-3789]]&lt;br /&gt;
| 2012-06-20&lt;br /&gt;
| bitcoind and Bitcoin-Qt&lt;br /&gt;
|bgcolor=yellow| DoS&amp;lt;ref name=&amp;quot;DoS&amp;quot;/&amp;gt;&lt;br /&gt;
|bgcolor=pink| Easy&lt;br /&gt;
| (Lack of) orphan txn resource limits&lt;br /&gt;
|bgcolor=yellow| [http://luke.dashjr.org/programs/bitcoin/files/charts/CVE-2012-3789 90%]&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2012-4682|CVE-2012-4682]]&lt;br /&gt;
| &lt;br /&gt;
| bitcoind and Bitcoin-Qt&lt;br /&gt;
|bgcolor=yellow| DoS&amp;lt;ref name=&amp;quot;DoS&amp;quot;/&amp;gt;&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|bgcolor=yellow| [http://luke.dashjr.org/programs/bitcoin/files/charts/CVE-2012-4682.html 80%]&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2012-4683|CVE-2012-4683]]&lt;br /&gt;
| &lt;br /&gt;
| bitcoind and Bitcoin-Qt&lt;br /&gt;
|bgcolor=yellow| DoS&amp;lt;ref name=&amp;quot;DoS&amp;quot;/&amp;gt;&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|bgcolor=yellow| [http://luke.dashjr.org/programs/bitcoin/files/charts/CVE-2012-4683.html 80%]&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2012-4684|CVE-2012-4684]]&lt;br /&gt;
| &lt;br /&gt;
| bitcoind and Bitcoin-Qt&lt;br /&gt;
|&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|bgcolor=yellow| [http://luke.dashjr.org/programs/bitcoin/files/charts/security.html?20124683 80%]&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2013-2272|CVE-2013-2272]]&lt;br /&gt;
| 2013-01-11&lt;br /&gt;
| bitcoind and Bitcoin-Qt&lt;br /&gt;
|bgcolor=yellow| Exposure&amp;lt;ref name=&amp;quot;Exposure&amp;quot;/&amp;gt;&lt;br /&gt;
|bgcolor=pink| Easy&lt;br /&gt;
| Remote discovery of node&#039;s wallet addresses&lt;br /&gt;
|bgcolor=pink| [http://luke.dashjr.org/programs/bitcoin/files/charts/security.html?20132272 22%]&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2013-2273|CVE-2013-2273]]&lt;br /&gt;
| 2013-01-30&lt;br /&gt;
| bitcoind and Bitcoin-Qt&lt;br /&gt;
|bgcolor=lime| Exposure&amp;lt;ref name=&amp;quot;Exposure&amp;quot;/&amp;gt;&lt;br /&gt;
|bgcolor=yellow| Easy&lt;br /&gt;
| Predictable change output&lt;br /&gt;
|bgcolor=pink| [http://luke.dashjr.org/programs/bitcoin/files/charts/security.html?20132273 22%]&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2013-2292|CVE-2013-2292]]&lt;br /&gt;
| 2013-01-30&lt;br /&gt;
| bitcoind and Bitcoin-Qt&lt;br /&gt;
|bgcolor=yellow| DoS&amp;lt;ref name=&amp;quot;DoS&amp;quot;/&amp;gt;&lt;br /&gt;
|bgcolor=lime| Hard&lt;br /&gt;
| A transaction that takes at least 3 minutes to verify&lt;br /&gt;
|bgcolor=pink| [http://luke.dashjr.org/programs/bitcoin/files/charts/security.html?20132292 -]&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2013-2293|CVE-2013-2293]]&lt;br /&gt;
| 2013-02-14&lt;br /&gt;
| bitcoind and Bitcoin-Qt&lt;br /&gt;
|bgcolor=yellow| DoS&amp;lt;ref name=&amp;quot;DoS&amp;quot;/&amp;gt;&lt;br /&gt;
|bgcolor=pink| Easy&lt;br /&gt;
| Continuous hard disk seek&lt;br /&gt;
|bgcolor=pink| [http://luke.dashjr.org/programs/bitcoin/files/charts/security.html?20132293 22%]&lt;br /&gt;
|-&lt;br /&gt;
| [[#BIP-0034|BIP 0034]]&lt;br /&gt;
| Future&lt;br /&gt;
| All Bitcoin clients&lt;br /&gt;
|bgcolor=yellow| Fake Conf&amp;lt;ref name=&amp;quot;FakeConf&amp;quot;/&amp;gt;&lt;br /&gt;
|bgcolor=yellow| Miners&amp;lt;ref name=&amp;quot;MinerEasy&amp;quot;&amp;gt;Attacking requires mining block(s)&amp;lt;/ref&amp;gt;&lt;br /&gt;
| Mandatory block protocol update&lt;br /&gt;
|bgcolor=yellow| [http://luke.dashjr.org/programs/bitcoin/files/charts/BIP-0034.html 80%]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&lt;br /&gt;
== CVE-2010-5137 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2010-07-28&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; OP_LSHIFT crash&lt;br /&gt;
 &amp;lt;b&amp;gt;Fix Deployment:&amp;lt;/b&amp;gt; 100%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| bitcoind&amp;lt;br&amp;gt;wxBitcoin || * - 0.3.4 || 0.3.5&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
On July 28 2010, two bugs were discovered and demonstrated on the test network. One caused bitcoin to crash on some machines when processing a transaction containing an OP_LSHIFT. This was never exploited on the main network, and was fixed by Bitcoin version 0.3.5.&lt;br /&gt;
&lt;br /&gt;
After these bugs were discovered, many currently-unused script words were disabled for safety.&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
* [http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-5137 US-CERT/NIST]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== CVE-2010-5141 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2010-07-28&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; ?&lt;br /&gt;
 &amp;lt;b&amp;gt;Fix Deployment:&amp;lt;/b&amp;gt; 100%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| bitcoind&amp;lt;br&amp;gt;wxBitcoin || * - 0.3.4 || 0.3.5&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
On July 28 2010, two bugs were discovered and demonstrated on the test network. One exploited a bug in the transaction handling code and allowed an attacker to spend coins that they did not own. This was never exploited on the main network, and was fixed by Bitcoin version 0.3.5.&lt;br /&gt;
&lt;br /&gt;
After these bugs were discovered, many currently-unused script words were disabled for safety.&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
* [http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-5141 US-CERT/NIST]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== CVE-2010-5138 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2010-07-29&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; Unlimited SigOp DoS&lt;br /&gt;
 &amp;lt;b&amp;gt;Fix Deployment:&amp;lt;/b&amp;gt; 100%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| bitcoind&amp;lt;br&amp;gt;wxBitcoin || * - 0.3.? || 0.3.?&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
On July 29 2010, it was discovered that block [http://blockexplorer.com/block/00000000000997f9fd2fe1ee376293ef8c42ad09193a5d2086dddf8e5c426b56 71036] contained several transactions with a ton of OP_CHECKSIG commands. There should only ever be one such command. This caused every node to do extra unnecessary work, and it could have been used as a denial-of-service attack. A new version of Bitcoin was quickly released. The new version did not cause a fork on the main network, though it did cause one on the test network (where someone had played around with the attack more).&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
* [http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-5138 US-CERT/NIST]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== CVE-2010-5139 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2010-08-15&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; Combined output overflow&lt;br /&gt;
 &amp;lt;b&amp;gt;Fix Deployment:&amp;lt;/b&amp;gt; 100%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| bitcoind&amp;lt;br&amp;gt;wxBitcoin || * - 0.3.10 || 0.3.11&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
On August 15 2010, it was [http://bitcointalk.org/index.php?topic=822.0 discovered] that block 74638 contained a transaction that created over 184 billion bitcoins for two different addresses. This was possible because the code used for checking transactions before including them in a block didn&#039;t account for the case of outputs so large that they overflowed when summed. A new version was published within a few hours of the discovery. The block chain had to be forked. Although many unpatched nodes continued to build on the &amp;quot;bad&amp;quot; block chain, the &amp;quot;good&amp;quot; block chain overtook it at a block height of 74691. The bad transaction no longer exists for people using the longest chain.&lt;br /&gt;
&lt;br /&gt;
The block and transaction:&lt;br /&gt;
&amp;lt;pre&amp;gt;CBlock(hash=0000000000790ab3, ver=1, hashPrevBlock=0000000000606865, hashMerkleRoot=618eba,&lt;br /&gt;
nTime=1281891957, nBits=1c00800e, nNonce=28192719, vtx=2)&lt;br /&gt;
  CTransaction(hash=012cd8, ver=1, vin.size=1, vout.size=1, nLockTime=0)&lt;br /&gt;
    CTxIn(COutPoint(000000, -1), coinbase 040e80001c028f00)&lt;br /&gt;
    CTxOut(nValue=50.51000000, scriptPubKey=0x4F4BA55D1580F8C3A8A2C7)&lt;br /&gt;
  CTransaction(hash=1d5e51, ver=1, vin.size=1, vout.size=2, nLockTime=0)&lt;br /&gt;
    CTxIn(COutPoint(237fe8, 0), scriptSig=0xA87C02384E1F184B79C6AC)&lt;br /&gt;
    CTxOut(nValue=92233720368.54275808, scriptPubKey=OP_DUP OP_HASH160 0xB7A7)&lt;br /&gt;
    CTxOut(nValue=92233720368.54275808, scriptPubKey=OP_DUP OP_HASH160 0x1512)&lt;br /&gt;
  vMerkleTree: 012cd8 1d5e51 618eba&lt;br /&gt;
&lt;br /&gt;
Block hash: 0000000000790ab3f22ec756ad43b6ab569abf0bddeb97c67a6f7b1470a7ec1c&lt;br /&gt;
Transaction hash: 1d5e512a9723cbef373b970eb52f1e9598ad67e7408077a82fdac194b65333c9&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
* [https://bitcointalk.org/index.php?topic=822.0 Discovery]&lt;br /&gt;
* [http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-5139 US-CERT/NIST]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== CVE-2010-5140 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2010-09-29&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; Never confirming transactions&lt;br /&gt;
 &amp;lt;b&amp;gt;Fix Deployment:&amp;lt;/b&amp;gt; 100%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| bitcoind&amp;lt;br&amp;gt;wxBitcoin || * - 0.3.12 || 0.3.13&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Around September 29, 2010, people started [https://bitcointalk.org/index.php?topic=1306.0 reporting] that their sent transactions would not confirm. This happened because people modified Bitcoin to send sub-0.01 transactions without any fees. A 0.01 fee was at that time required by the network for such transactions (essentially prohibiting them), so the transactions remained at 0 confirmations forever. This became a more serious issue because Bitcoin would send transactions using bitcoins gotten from transactions with 0 confirmations, and these resulting transactions would also never confirm. Because Bitcoin tends to prefer sending smaller coins, these invalid transactions quickly multiplied, contaminating the wallets of everyone who received them.&lt;br /&gt;
&lt;br /&gt;
Bitcoin was changed to only select coins with at least 1 confirmation. The remaining sub-0.01 transactions were cleared by generators who modified their version of Bitcoin to not require the micropayment fee. It took a while for everything to get cleared, though, because many of the intermediate transactions had been forgotten by the network by this point and had to be rebroadcast by the original senders.&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
* [https://bitcointalk.org/index.php?topic=1306.0 Initial reports]&lt;br /&gt;
* [http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-5140 US-CERT/NIST]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== CVE-2011-4447 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2011-11-11&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; Wallet non-encryption&lt;br /&gt;
 &amp;lt;b&amp;gt;Fix Deployment:&amp;lt;/b&amp;gt; 99%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| bitcoind&amp;lt;br&amp;gt;wxBitcoin || 0.4.0 - 0.4.1rc6 || 0.4.1&amp;lt;br&amp;gt;0.5.0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
* [https://bitcointalk.org/index.php?topic=51604.0 Announcement]&lt;br /&gt;
* [https://bitcointalk.org/index.php?topic=51474.0 Finding]&lt;br /&gt;
* [http://bitcoin.org/releases/2011/11/21/v0.5.0.html 0.5.0]&lt;br /&gt;
* [http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2011-4447 US-CERT/NIST]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== CVE-2012-1909 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2012-03-07&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; Transaction overwriting&lt;br /&gt;
 &amp;lt;b&amp;gt;Fix Deployment:&amp;lt;/b&amp;gt; 95%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| Bitcoin protocol || Before March 15th, 2012 || BIP 30&lt;br /&gt;
|-&lt;br /&gt;
| Bitcoin-Qt&amp;lt;br&amp;gt;bitcoind || * - 0.4.4rc2&amp;lt;br&amp;gt;0.5.0rc1 - 0.5.0.4rc2&amp;lt;br&amp;gt;0.5.1rc1 - 0.5.3rc2&amp;lt;br&amp;gt;0.6.0rc1 - 0.6.0rc2 || 0.4.4&amp;lt;br&amp;gt;0.5.0.4&amp;lt;br&amp;gt;0.5.3&amp;lt;br&amp;gt;0.6.0rc3&lt;br /&gt;
|-&lt;br /&gt;
| wxBitcoin || ALL || NONE&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
* [https://bitcointalk.org/index.php?topic=67738.0 Announcement]&lt;br /&gt;
* [https://en.bitcoin.it/wiki/BIP_0030 Fix]&lt;br /&gt;
* [https://bugs.gentoo.org/show_bug.cgi?id=407793 Gentoo bug tracker]&lt;br /&gt;
* [http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2012-1909 US-CERT/NIST]&lt;br /&gt;
&lt;br /&gt;
== CVE-2012-1910 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2012-03-17&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; MingW non-multithreading&lt;br /&gt;
 &amp;lt;b&amp;gt;Fix Deployment:&amp;lt;/b&amp;gt; 100%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| Bitcoin-Qt for Windows || 0.5.0rc1 - 0.5.0.4&amp;lt;br&amp;gt;0.5.1rc1 - 0.5.3.0&amp;lt;br&amp;gt;0.6.0rc1 - 0.6.0rc3 || 0.5.0.5&amp;lt;br&amp;gt;0.5.3.1&amp;lt;br&amp;gt;0.5.4&amp;lt;br&amp;gt;0.6.0rc4&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
* [https://bitcointalk.org/index.php?topic=69120.0 Announcement]&lt;br /&gt;
* [http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2012-1910 US-CERT/NIST]&lt;br /&gt;
&lt;br /&gt;
== BIP-0016 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2012-04-01&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; Mandatory P2SH protocol update&lt;br /&gt;
 &amp;lt;b&amp;gt;Deployment:&amp;lt;/b&amp;gt; 95%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| Bitcoin-Qt&amp;lt;br&amp;gt;bitcoind || * - 0.4.4&amp;lt;br&amp;gt;0.5.0rc1 - 0.5.0.5&amp;lt;br&amp;gt;0.5.1rc1 - 0.5.3&amp;lt;br&amp;gt;0.6.0rc1 || 0.4.5&amp;lt;br&amp;gt;0.5.0.6&amp;lt;br&amp;gt;0.5.4rc1&amp;lt;br&amp;gt;0.6.0rc2&lt;br /&gt;
|-&lt;br /&gt;
| wxBitcoin || ALL || NONE&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
* [[BIP 0016]]&lt;br /&gt;
&lt;br /&gt;
== CVE-2012-2459 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2012-05-14&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; Block hash collision (via merkle tree)&lt;br /&gt;
 &amp;lt;b&amp;gt;Fix Deployment:&amp;lt;/b&amp;gt; 95%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| Bitcoin-Qt&amp;lt;br&amp;gt;bitcoind || * - 0.4.6rc1&amp;lt;br&amp;gt;0.5.0rc1 - 0.5.5rc1&amp;lt;br&amp;gt;0.6.0rc1 - 0.6.0.7rc1&amp;lt;br&amp;gt;0.6.1rc1 - 0.6.1rc1 || 0.4.6&amp;lt;br&amp;gt;0.5.5&amp;lt;br&amp;gt;0.6.0.7&amp;lt;br&amp;gt;0.6.1rc2&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Block hash collisions can easily be made by duplicating transactions in the merkle tree.&lt;br /&gt;
Such a collision is invalid, but if recorded (as Bitcoin-Qt and bitcoind prior to 0.6.1 did) would prevent acceptance of the legitimate block with the same hash.&lt;br /&gt;
This could be used to fork the blockchain, including deep double-spend attacks.&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
* [https://bitcointalk.org/?topic=81749 Announcement]&lt;br /&gt;
* [https://bugs.gentoo.org/show_bug.cgi?id=415973 Gentoo bug tracker]&lt;br /&gt;
* [http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2012-2459 US-CERT/NIST]&lt;br /&gt;
* [https://bitcointalk.org/?topic=102395 Full Disclosure]&lt;br /&gt;
&lt;br /&gt;
== CVE-2012-3789 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2012-06-20&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; (Lack of) orphan txn resource limits&lt;br /&gt;
 &amp;lt;b&amp;gt;Fix Deployment:&amp;lt;/b&amp;gt; 90%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| Bitcoin-Qt&amp;lt;br&amp;gt;bitcoind || * - 0.4.7rc2&amp;lt;br&amp;gt;0.5.0rc1 - 0.5.6rc2&amp;lt;br&amp;gt;0.6.0rc1 - 0.6.0.8rc2&amp;lt;br&amp;gt;0.6.1rc1 - 0.6.2.2 || 0.4.7rc3&amp;lt;br&amp;gt;0.5.6rc3&amp;lt;br&amp;gt;0.6.0.9rc1&amp;lt;br&amp;gt;0.6.3rc1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
* [[CVE-2012-3789]]&lt;br /&gt;
* [https://bitcointalk.org/?topic=88734 0.6.3rc1 Announcement]&lt;br /&gt;
* [http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2012-3789 US-CERT/NIST]&lt;br /&gt;
&lt;br /&gt;
== CVE-2013-2272 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2013-01-11&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; Remote discovery of node&#039;s wallet addresses&lt;br /&gt;
 &amp;lt;b&amp;gt;Fix Deployment:&amp;lt;/b&amp;gt; 22%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| Bitcoin-Qt&amp;lt;br&amp;gt;bitcoind || * - 0.4.8rc4&amp;lt;br&amp;gt;0.5.0rc1 - 0.5.7&amp;lt;br&amp;gt;0.6.0rc1 - 0.6.0.10rc4&amp;lt;br&amp;gt;0.6.1rc1 - 0.6.4rc4&amp;lt;br&amp;gt;0.7.0rc1 - 0.7.2 || 0.4.9rc1&amp;lt;br&amp;gt;0.5.8rc1&amp;lt;br&amp;gt;0.6.0.11rc1&amp;lt;br&amp;gt;0.6.5rc1&amp;lt;br&amp;gt;0.7.3rc1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
&lt;br /&gt;
* [https://bitcointalk.org/?topic=135856 Announcement]&lt;br /&gt;
&lt;br /&gt;
== CVE-2013-2273 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2013-01-30&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; Predictable change output &lt;br /&gt;
 &amp;lt;b&amp;gt;Fix Deployment:&amp;lt;/b&amp;gt; 22%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| Bitcoin-Qt&amp;lt;br&amp;gt;bitcoind || * - 0.4.8rc4&amp;lt;br&amp;gt;0.5.0rc1 - 0.5.7&amp;lt;br&amp;gt;0.6.0rc1 - 0.6.0.10rc4&amp;lt;br&amp;gt;0.6.1rc1 - 0.6.4rc4&amp;lt;br&amp;gt;0.7.0rc1 - 0.7.2 || 0.4.9rc1&amp;lt;br&amp;gt;0.5.8rc1&amp;lt;br&amp;gt;0.6.0.11rc1&amp;lt;br&amp;gt;0.6.5rc1&amp;lt;br&amp;gt;0.7.3rc1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== CVE-2013-2292 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2013-01-30&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; A transaction that takes at least 3 minutes to verify&lt;br /&gt;
 &amp;lt;b&amp;gt;Fix Deployment:&amp;lt;/b&amp;gt; -&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| Bitcoin-Qt&amp;lt;br&amp;gt;bitcoind || All versions || No fix yet&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
* [[CVE-2013-2292]]&lt;br /&gt;
* [https://bitcointalk.org/?topic=140078 Announcement]&lt;br /&gt;
&lt;br /&gt;
== CVE-2013-2293 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2013-02-14&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; Continuous hard disk seek&lt;br /&gt;
 &amp;lt;b&amp;gt;Fix Deployment:&amp;lt;/b&amp;gt; 22%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| Bitcoin-Qt&amp;lt;br&amp;gt;bitcoind || * - 0.7.3rc1 || No fix yet (0.8.0 unaffected)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
&lt;br /&gt;
* [[CVE-2013-2293]]&lt;br /&gt;
* [https://bitcointalk.org/?topic=144122 Announcement]&lt;br /&gt;
&lt;br /&gt;
== BIP-0034 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; Future&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; Mandatory block protocol update&lt;br /&gt;
 &amp;lt;b&amp;gt;Deployment:&amp;lt;/b&amp;gt; 80%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| Bitcoin-Qt&amp;lt;br&amp;gt;bitcoind || * - 0.4.7&amp;lt;br&amp;gt;0.5.0rc1 - 0.5.7&amp;lt;br&amp;gt;0.6.0rc1 - 0.6.0.9&amp;lt;br&amp;gt;0.6.1rc1 - 0.6.3 || 0.4.8rc1&amp;lt;br&amp;gt;0.5.7rc1&amp;lt;br&amp;gt;0.6.0.10rc1&amp;lt;br&amp;gt;0.6.4rc1&lt;br /&gt;
|-&lt;br /&gt;
| wxBitcoin || ALL || NONE&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
* [[BIP 0034]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Definitions==&lt;br /&gt;
&lt;br /&gt;
A critical vulnerability is one that will have disastrous consequences if it is exploited.  A serious vulnerability is one that will have serious consequences if it is exploited&amp;lt;ref&amp;gt;[http://bitcointalk.org/index.php?topic=88892.0 http://bitcointalk.org/index.php?topic=88892.0]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
&lt;br /&gt;
* [[Changelog]]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Cateogory:Security]]&lt;/div&gt;</summary>
		<author><name>Sergio Demian Lerner</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=CVE-2013-2293&amp;diff=35881</id>
		<title>CVE-2013-2293</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=CVE-2013-2293&amp;diff=35881"/>
		<updated>2013-03-05T18:58:44Z</updated>

		<summary type="html">&lt;p&gt;Sergio Demian Lerner: Created page with &amp;quot;&amp;#039;&amp;#039;&amp;#039;New DoS vulnerability by Forcing Continuous Hard Disk Seek/Read Activity&amp;#039;&amp;#039;&amp;#039;  Private Release Date: 08-JAN-2013&amp;lt;br /&amp;gt; Public Release Date: 14-FEB-2013&amp;lt;br /&amp;gt;   &amp;#039;&amp;#039;&amp;#039;Systems Aff...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;New DoS vulnerability by Forcing Continuous Hard Disk Seek/Read Activity&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Private Release Date: 08-JAN-2013&amp;lt;br /&amp;gt;&lt;br /&gt;
Public Release Date: 14-FEB-2013&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Systems Affected&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Satoshi Bitcoin Client (Bitcoin-Qt, bitcoind)&lt;br /&gt;
* All Bitcoin clients that mimic the behavior related to transaction validation of Satoshi client versions prior 0.8.0&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Affected Versions&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Bitcoin version 0.7.2 released 2012-12-14&lt;br /&gt;
* Bitcoin version 0.7.1 released 2012-10-19&lt;br /&gt;
* Bitcoin version 0.7.0 released 2012-09-17&lt;br /&gt;
* Bitcoin version 0.6.3 released 2012-06-25&lt;br /&gt;
* Bitcoin version 0.6.2 released 2012-05-08&lt;br /&gt;
* Bitcoin version 0.6.1 released 2012-05-04&lt;br /&gt;
* Bitcoin version 0.6.0 released 2012-03-30&lt;br /&gt;
* Bitcoin version 0.5.3.1 released 2012-03-16&lt;br /&gt;
* Bitcoin version 0.5.3 released 2012-03-14&lt;br /&gt;
* Bitcoin version 0.5.2 released 2012-01-09&lt;br /&gt;
* Bitcoin version 0.5.1 released 2011-12-15&lt;br /&gt;
* Bitcoin version 0.5.0 released 2011-11-21&lt;br /&gt;
* Bitcoin version 0.4.0 released 2011-09-23&lt;br /&gt;
* Bitcoin version 0.3.24 released 2011-07-08&lt;br /&gt;
* Bitcoin version 0.3.23 released 2011-06-14&lt;br /&gt;
* Bitcoin version 0.3.22 released 2011-06-05&lt;br /&gt;
* Bitcoin version 0.3.21 released 2011-04-27&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Overview&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Transaction processing has two stages in Satoshi Bitcoin client. In the first stage, transaction inputs are fetched.&lt;br /&gt;
This is done by bringing to RAM the transactions that contains the outputs referred by the inputs.&lt;br /&gt;
In the second stage, previous outputs are verified to be unspent and the related scripts are evaluated.&lt;br /&gt;
Since double spends are not considered to be a DoS attempt by the protocol rules, a transaction that refers to previous spent outputs will pass the first processing stage without being discarded. An attacker can therefore construct transactions that, before being discarded in the second stage of processing, require the victim application to seek and read too many parts of the block chain that could be scattered thought the storage files, delaying any other processing.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Details&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
We assume that the whole block chain does not fit in RAM, so each transaction fetch requires a HD seek and read. An average 7200 rpm hard drive&lt;br /&gt;
can random seek/read a 1Kb block in a non-cached 2 Gb file in 12 msec. Each prevout of a transaction consumes 44 bytes, with empty sigscripts.&lt;br /&gt;
The attacker creates transaction with many inputs an one output. In this way, the other sections of the transaction (output scripts, headers) are amortized and become irrelevant to this analysis.&lt;br /&gt;
For an Internet connection of 50 Kbytes/sec bandwidth, sending 45 bytes requires less than 1 msec.&lt;br /&gt;
By continuously sending this specially crafted transactions an attacker can block any Bitcoin peer from performing other tasks.&lt;br /&gt;
Also the attacker may be able to block 10 peers at the same time, since the relation of 1:10 in required resources.&lt;br /&gt;
Note that the attacker does not need to sign the inputs nor to have the full block-chain to perform the attack. He only requires the hashes of all previous transactions, which currently requires only 10876856*32=332 Mbytes of storage.&lt;br /&gt;
&lt;br /&gt;
Version 0.8.0 of the Satoshi client stores only unspent prevouts in memory and can abort processing right after a spent prevout is referred by a transaction.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Possible Attack Scenarios&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
1. Because of the small resources required to mount the attack, it could be performed by botnets to massively attack the Bitcoin network.&lt;br /&gt;
&lt;br /&gt;
2. The attack can be used against miners to prevent them from sending blocks. Nevertheless, currently big miners are only connected  to there own front-line of Bitcoin nodes to preven such attacks.&lt;br /&gt;
&lt;br /&gt;
3. By using many nodes at once, an attacker may try to create a barrier that splits the network in unconnected components, in order to carry another kind of attack.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Not-a-problem variations&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
1. A valid 1M transaction could be constructed to reference more than 22K unique input transactions. In theory that transaction would take more than 5 minutes to be verified. Nevertheless the attack is unpractical for two reasons:&amp;lt;br /&amp;gt;&lt;br /&gt;
a. The attacker should have to own those 22K transactions.&amp;lt;br /&amp;gt;&lt;br /&gt;
b. Those 22K transactions should have to be  scattered thought the blockchain to force HD seeking activity. If they were created in a limited period of time, they would end up confined in a limited portion of the block chain file. The result would be that the hard disk cache will help to reduce the read latency and so attack effectiveness will be reduced. Nevertheless version 0.8.0 of the Satoshi client considers transactions greater that 100K to be non-standard, so the vulnerability is further reduced.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Suggested Solution for 0.6/0.7 versions&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The client application could verify that prevouts are not spent each time they are fetched, and abort if a spent prevout is found.&lt;br /&gt;
&lt;br /&gt;
 bool CTransaction::FetchInputs(CTxDB&amp;amp; txdb, const map&amp;lt;uint256, CTxIndex&amp;gt;&amp;amp; mapTestPool,&lt;br /&gt;
                               bool fBlock, bool fMiner, MapPrevTx&amp;amp; inputsRet, bool&amp;amp; fInvalid)&lt;br /&gt;
 {&lt;br /&gt;
  ..&lt;br /&gt;
 for (unsigned int i = 0; i &amp;lt; vin.size(); i++)&lt;br /&gt;
    {&lt;br /&gt;
    // Read txPrev&lt;br /&gt;
    CTransaction&amp;amp; txPrev = inputsRet[prevout.hash].second;&lt;br /&gt;
    ....&lt;br /&gt;
   // NEW CODE BEGINS&lt;br /&gt;
    if (prevout.n &amp;gt;= txPrev.vout.size() || prevout.n &amp;gt;= txindex.vSpent.size())&lt;br /&gt;
        {&lt;br /&gt;
        fInvalid = true;&lt;br /&gt;
                return DoS(100, error(&amp;quot; .....&lt;br /&gt;
      }&lt;br /&gt;
    if (!txindex.vSpent[prevout.n].IsNull())&lt;br /&gt;
     return false;&lt;br /&gt;
   // NEW CODE ENDS&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Disclosure Timeline&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
2013-01-09 - Vulnerability reported to Gavin Andressen and other core devs.&amp;lt;br /&amp;gt;&lt;br /&gt;
2013-01-09 - Gavin Andressen acknowledges report and confirms version 0.8 will not be vulnerable, permits disclosure after 0.8.0 release candidate 1 is available.&amp;lt;br /&amp;gt;&lt;br /&gt;
2013-02-09 - Bitcoin version 0.8.0 release candidate 1 is available, fixing the vulnerability&amp;lt;br /&amp;gt;&lt;br /&gt;
2013-02-14 - Vulnerability disclosure&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Credit&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This vulnerability was discovered by Sergio Demian Lerner, from Certimix.com.&lt;br /&gt;
This report was written by SDL.&lt;/div&gt;</summary>
		<author><name>Sergio Demian Lerner</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Common_Vulnerabilities_and_Exposures&amp;diff=35880</id>
		<title>Common Vulnerabilities and Exposures</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Common_Vulnerabilities_and_Exposures&amp;diff=35880"/>
		<updated>2013-03-05T18:51:14Z</updated>

		<summary type="html">&lt;p&gt;Sergio Demian Lerner: /* CVE-2013-2293 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!style=&amp;quot;width:16ex&amp;quot;| CVE&lt;br /&gt;
! Announced !! Affects !! Severity !! Attack is... !! Flaw !! Net&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2010-5137|CVE-2010-5137]]&lt;br /&gt;
| 2010-07-28&lt;br /&gt;
| wxBitcoin and bitcoind&lt;br /&gt;
|bgcolor=yellow| DoS&amp;lt;ref name=&amp;quot;DoS&amp;quot;&amp;gt;Attacker can disable some functionality, for example by crashing clients&amp;lt;/ref&amp;gt;&lt;br /&gt;
|bgcolor=pink| Easy&lt;br /&gt;
| OP_LSHIFT crash&lt;br /&gt;
|bgcolor=lime| 100%&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2010-5141|CVE-2010-5141]]&lt;br /&gt;
| 2010-07-28&lt;br /&gt;
| wxBitcoin and bitcoind&lt;br /&gt;
|bgcolor=pink| Theft&amp;lt;ref name=&amp;quot;Theft&amp;quot;&amp;gt;Attacker can take or create money outside known network rules&amp;lt;/ref&amp;gt;&lt;br /&gt;
|bgcolor=pink| Easy&lt;br /&gt;
|&lt;br /&gt;
|bgcolor=lime| 100%&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2010-5138|CVE-2010-5138]]&lt;br /&gt;
| 2010-07-29&lt;br /&gt;
| wxBitcoin and bitcoind&lt;br /&gt;
|bgcolor=yellow| DoS&amp;lt;ref name=&amp;quot;DoS&amp;quot;/&amp;gt;&lt;br /&gt;
|bgcolor=pink| Easy&lt;br /&gt;
| Unlimited SigOp DoS&lt;br /&gt;
|bgcolor=lime| 100%&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2010-5139|CVE-2010-5139]]&lt;br /&gt;
| 2010-08-15&lt;br /&gt;
| wxBitcoin and bitcoind&lt;br /&gt;
|bgcolor=pink| Theft&amp;lt;ref name=&amp;quot;Theft&amp;quot;/&amp;gt;&lt;br /&gt;
|bgcolor=pink| Easy&lt;br /&gt;
| Combined output overflow&lt;br /&gt;
|bgcolor=lime| 100%&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2010-5140|CVE-2010-5140]]&lt;br /&gt;
| 2010-09-29&lt;br /&gt;
| wxBitcoin and bitcoind&lt;br /&gt;
|bgcolor=yellow| DoS&amp;lt;ref name=&amp;quot;DoS&amp;quot;/&amp;gt;&lt;br /&gt;
|bgcolor=pink| Easy&lt;br /&gt;
| Never confirming transactions&lt;br /&gt;
|bgcolor=lime| 100%&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2011-4447|CVE-2011-4447]]&lt;br /&gt;
| 2011-11-11&lt;br /&gt;
| wxBitcoin and bitcoind&lt;br /&gt;
|bgcolor=pink| Exposure&amp;lt;ref name=&amp;quot;Exposure&amp;quot;&amp;gt;Attacker can access user data outside known acceptable methods&amp;lt;/ref&amp;gt;&lt;br /&gt;
|bgcolor=lime| Hard&lt;br /&gt;
| Wallet non-encryption&lt;br /&gt;
|bgcolor=lime| [http://luke.dashjr.org/programs/bitcoin/files/charts/CVE-2011-4447.html 99%]&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2012-1909|CVE-2012-1909]]&lt;br /&gt;
| 2012-03-07&lt;br /&gt;
| Bitcoin protocol and all clients&lt;br /&gt;
|bgcolor=pink| Netsplit&amp;lt;ref name=&amp;quot;Netsplit&amp;quot;&amp;gt;Attacker can create multiple views of the network, enabling [[double-spending]] with over 1 confirmation&amp;lt;/ref&amp;gt;&lt;br /&gt;
|bgcolor=lime| Very hard&lt;br /&gt;
| Transaction overwriting&lt;br /&gt;
|bgcolor=lime| [http://luke.dashjr.org/programs/bitcoin/files/charts/CVE-2012-1909.html 95%]&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2012-1910|CVE-2012-1910]]&lt;br /&gt;
| 2012-03-17&lt;br /&gt;
| Bitcoin-Qt for Windows&lt;br /&gt;
|bgcolor=pink| Unknown&amp;lt;ref name=&amp;quot;Unknown&amp;quot;&amp;gt;Extent of possible abuse is unknown&amp;lt;/ref&amp;gt;&lt;br /&gt;
|bgcolor=lime| Hard&lt;br /&gt;
| MingW non-multithreading&lt;br /&gt;
|bgcolor=lime| [http://luke.dashjr.org/programs/bitcoin/files/charts/CVE-2012-1910.html 100%]&lt;br /&gt;
|-&lt;br /&gt;
| [[#BIP-0016|BIP 0016]]&lt;br /&gt;
| 2012-04-01&lt;br /&gt;
| All Bitcoin clients&lt;br /&gt;
|bgcolor=yellow| Fake Conf&amp;lt;ref name=&amp;quot;FakeConf&amp;quot;&amp;gt;Attacker can double-spend with 1 confirmation&amp;lt;/ref&amp;gt;&lt;br /&gt;
|bgcolor=yellow| Miners&amp;lt;ref name=&amp;quot;MinerEasy&amp;quot;&amp;gt;Attacking requires mining block(s)&amp;lt;/ref&amp;gt;&lt;br /&gt;
| Mandatory P2SH protocol update&lt;br /&gt;
|bgcolor=lime| [http://luke.dashjr.org/programs/bitcoin/files/charts/BIP-0016.html 95%]&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2012-2459|CVE-2012-2459]]&lt;br /&gt;
| 2012-05-14&lt;br /&gt;
| bitcoind and Bitcoin-Qt&lt;br /&gt;
|bgcolor=pink| Netsplit&amp;lt;ref name=&amp;quot;Netsplit&amp;quot;/&amp;gt;&lt;br /&gt;
|bgcolor=pink| Easy&lt;br /&gt;
| Block hash collision (via merkle root)&lt;br /&gt;
|bgcolor=lime| [http://luke.dashjr.org/programs/bitcoin/files/charts/CVE-2012-2459.html 95%]&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2012-3584|CVE-2012-3584]]&lt;br /&gt;
| 2012-06-16&lt;br /&gt;
| Bitcoin p2p protocol&lt;br /&gt;
|bgcolor=yellow| DoS&amp;lt;ref name=&amp;quot;DoS&amp;quot;/&amp;gt;&lt;br /&gt;
|bgcolor=yellow| Miners&amp;lt;ref name=&amp;quot;MinerEasy&amp;quot;/&amp;gt;&lt;br /&gt;
| Poor miner incentives&lt;br /&gt;
| (no fix)&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2012-3789|CVE-2012-3789]]&lt;br /&gt;
| 2012-06-20&lt;br /&gt;
| bitcoind and Bitcoin-Qt&lt;br /&gt;
|bgcolor=yellow| DoS&amp;lt;ref name=&amp;quot;DoS&amp;quot;/&amp;gt;&lt;br /&gt;
|bgcolor=pink| Easy&lt;br /&gt;
| (Lack of) orphan txn resource limits&lt;br /&gt;
|bgcolor=yellow| [http://luke.dashjr.org/programs/bitcoin/files/charts/CVE-2012-3789 90%]&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2012-4682|CVE-2012-4682]]&lt;br /&gt;
| &lt;br /&gt;
| bitcoind and Bitcoin-Qt&lt;br /&gt;
|bgcolor=yellow| DoS&amp;lt;ref name=&amp;quot;DoS&amp;quot;/&amp;gt;&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|bgcolor=yellow| [http://luke.dashjr.org/programs/bitcoin/files/charts/CVE-2012-4682.html 80%]&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2012-4683|CVE-2012-4683]]&lt;br /&gt;
| &lt;br /&gt;
| bitcoind and Bitcoin-Qt&lt;br /&gt;
|bgcolor=yellow| DoS&amp;lt;ref name=&amp;quot;DoS&amp;quot;/&amp;gt;&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|bgcolor=yellow| [http://luke.dashjr.org/programs/bitcoin/files/charts/CVE-2012-4683.html 80%]&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2012-4684|CVE-2012-4684]]&lt;br /&gt;
| &lt;br /&gt;
| bitcoind and Bitcoin-Qt&lt;br /&gt;
|&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|bgcolor=yellow| [http://luke.dashjr.org/programs/bitcoin/files/charts/security.html?20124683 80%]&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2013-2272|CVE-2013-2272]]&lt;br /&gt;
| 2013-01-11&lt;br /&gt;
| bitcoind and Bitcoin-Qt&lt;br /&gt;
|bgcolor=yellow| Exposure&amp;lt;ref name=&amp;quot;Exposure&amp;quot;/&amp;gt;&lt;br /&gt;
|bgcolor=pink| Easy&lt;br /&gt;
| Remote discovery of node&#039;s wallet addresses&lt;br /&gt;
|bgcolor=pink| [http://luke.dashjr.org/programs/bitcoin/files/charts/security.html?20132272 22%]&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2013-2273|CVE-2013-2273]]&lt;br /&gt;
| 2013-01-30&lt;br /&gt;
| bitcoind and Bitcoin-Qt&lt;br /&gt;
|bgcolor=lime| Exposure&amp;lt;ref name=&amp;quot;Exposure&amp;quot;/&amp;gt;&lt;br /&gt;
|bgcolor=yellow| Easy&lt;br /&gt;
| Predictable change output&lt;br /&gt;
|bgcolor=pink| [http://luke.dashjr.org/programs/bitcoin/files/charts/security.html?20132273 22%]&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2013-2292|CVE-2013-2292]]&lt;br /&gt;
| 2013-01-30&lt;br /&gt;
| bitcoind and Bitcoin-Qt&lt;br /&gt;
|bgcolor=yellow| DoS&amp;lt;ref name=&amp;quot;DoS&amp;quot;/&amp;gt;&lt;br /&gt;
|bgcolor=lime| Hard&lt;br /&gt;
| A transaction that takes at least 3 minutes to verify&lt;br /&gt;
|bgcolor=pink| [http://luke.dashjr.org/programs/bitcoin/files/charts/security.html?20132292 -]&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2013-2293|CVE-2013-2293]]&lt;br /&gt;
| 2013-02-14&lt;br /&gt;
| bitcoind and Bitcoin-Qt&lt;br /&gt;
|bgcolor=yellow| DoS&amp;lt;ref name=&amp;quot;DoS&amp;quot;/&amp;gt;&lt;br /&gt;
|bgcolor=pink| Easy&lt;br /&gt;
| Continuous hard disk seek&lt;br /&gt;
|bgcolor=pink| [http://luke.dashjr.org/programs/bitcoin/files/charts/security.html?20132293 22%]&lt;br /&gt;
|-&lt;br /&gt;
| [[#BIP-0034|BIP 0034]]&lt;br /&gt;
| Future&lt;br /&gt;
| All Bitcoin clients&lt;br /&gt;
|bgcolor=yellow| Fake Conf&amp;lt;ref name=&amp;quot;FakeConf&amp;quot;/&amp;gt;&lt;br /&gt;
|bgcolor=yellow| Miners&amp;lt;ref name=&amp;quot;MinerEasy&amp;quot;&amp;gt;Attacking requires mining block(s)&amp;lt;/ref&amp;gt;&lt;br /&gt;
| Mandatory block protocol update&lt;br /&gt;
|bgcolor=yellow| [http://luke.dashjr.org/programs/bitcoin/files/charts/BIP-0034.html 80%]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&lt;br /&gt;
== CVE-2010-5137 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2010-07-28&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; OP_LSHIFT crash&lt;br /&gt;
 &amp;lt;b&amp;gt;Fix Deployment:&amp;lt;/b&amp;gt; 100%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| bitcoind&amp;lt;br&amp;gt;wxBitcoin || * - 0.3.4 || 0.3.5&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
On July 28 2010, two bugs were discovered and demonstrated on the test network. One caused bitcoin to crash on some machines when processing a transaction containing an OP_LSHIFT. This was never exploited on the main network, and was fixed by Bitcoin version 0.3.5.&lt;br /&gt;
&lt;br /&gt;
After these bugs were discovered, many currently-unused script words were disabled for safety.&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
* [http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-5137 US-CERT/NIST]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== CVE-2010-5141 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2010-07-28&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; ?&lt;br /&gt;
 &amp;lt;b&amp;gt;Fix Deployment:&amp;lt;/b&amp;gt; 100%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| bitcoind&amp;lt;br&amp;gt;wxBitcoin || * - 0.3.4 || 0.3.5&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
On July 28 2010, two bugs were discovered and demonstrated on the test network. One exploited a bug in the transaction handling code and allowed an attacker to spend coins that they did not own. This was never exploited on the main network, and was fixed by Bitcoin version 0.3.5.&lt;br /&gt;
&lt;br /&gt;
After these bugs were discovered, many currently-unused script words were disabled for safety.&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
* [http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-5141 US-CERT/NIST]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== CVE-2010-5138 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2010-07-29&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; Unlimited SigOp DoS&lt;br /&gt;
 &amp;lt;b&amp;gt;Fix Deployment:&amp;lt;/b&amp;gt; 100%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| bitcoind&amp;lt;br&amp;gt;wxBitcoin || * - 0.3.? || 0.3.?&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
On July 29 2010, it was discovered that block [http://blockexplorer.com/block/00000000000997f9fd2fe1ee376293ef8c42ad09193a5d2086dddf8e5c426b56 71036] contained several transactions with a ton of OP_CHECKSIG commands. There should only ever be one such command. This caused every node to do extra unnecessary work, and it could have been used as a denial-of-service attack. A new version of Bitcoin was quickly released. The new version did not cause a fork on the main network, though it did cause one on the test network (where someone had played around with the attack more).&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
* [http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-5138 US-CERT/NIST]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== CVE-2010-5139 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2010-08-15&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; Combined output overflow&lt;br /&gt;
 &amp;lt;b&amp;gt;Fix Deployment:&amp;lt;/b&amp;gt; 100%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| bitcoind&amp;lt;br&amp;gt;wxBitcoin || * - 0.3.10 || 0.3.11&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
On August 15 2010, it was [http://bitcointalk.org/index.php?topic=822.0 discovered] that block 74638 contained a transaction that created over 184 billion bitcoins for two different addresses. This was possible because the code used for checking transactions before including them in a block didn&#039;t account for the case of outputs so large that they overflowed when summed. A new version was published within a few hours of the discovery. The block chain had to be forked. Although many unpatched nodes continued to build on the &amp;quot;bad&amp;quot; block chain, the &amp;quot;good&amp;quot; block chain overtook it at a block height of 74691. The bad transaction no longer exists for people using the longest chain.&lt;br /&gt;
&lt;br /&gt;
The block and transaction:&lt;br /&gt;
&amp;lt;pre&amp;gt;CBlock(hash=0000000000790ab3, ver=1, hashPrevBlock=0000000000606865, hashMerkleRoot=618eba,&lt;br /&gt;
nTime=1281891957, nBits=1c00800e, nNonce=28192719, vtx=2)&lt;br /&gt;
  CTransaction(hash=012cd8, ver=1, vin.size=1, vout.size=1, nLockTime=0)&lt;br /&gt;
    CTxIn(COutPoint(000000, -1), coinbase 040e80001c028f00)&lt;br /&gt;
    CTxOut(nValue=50.51000000, scriptPubKey=0x4F4BA55D1580F8C3A8A2C7)&lt;br /&gt;
  CTransaction(hash=1d5e51, ver=1, vin.size=1, vout.size=2, nLockTime=0)&lt;br /&gt;
    CTxIn(COutPoint(237fe8, 0), scriptSig=0xA87C02384E1F184B79C6AC)&lt;br /&gt;
    CTxOut(nValue=92233720368.54275808, scriptPubKey=OP_DUP OP_HASH160 0xB7A7)&lt;br /&gt;
    CTxOut(nValue=92233720368.54275808, scriptPubKey=OP_DUP OP_HASH160 0x1512)&lt;br /&gt;
  vMerkleTree: 012cd8 1d5e51 618eba&lt;br /&gt;
&lt;br /&gt;
Block hash: 0000000000790ab3f22ec756ad43b6ab569abf0bddeb97c67a6f7b1470a7ec1c&lt;br /&gt;
Transaction hash: 1d5e512a9723cbef373b970eb52f1e9598ad67e7408077a82fdac194b65333c9&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
* [https://bitcointalk.org/index.php?topic=822.0 Discovery]&lt;br /&gt;
* [http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-5139 US-CERT/NIST]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== CVE-2010-5140 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2010-09-29&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; Never confirming transactions&lt;br /&gt;
 &amp;lt;b&amp;gt;Fix Deployment:&amp;lt;/b&amp;gt; 100%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| bitcoind&amp;lt;br&amp;gt;wxBitcoin || * - 0.3.12 || 0.3.13&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Around September 29, 2010, people started [https://bitcointalk.org/index.php?topic=1306.0 reporting] that their sent transactions would not confirm. This happened because people modified Bitcoin to send sub-0.01 transactions without any fees. A 0.01 fee was at that time required by the network for such transactions (essentially prohibiting them), so the transactions remained at 0 confirmations forever. This became a more serious issue because Bitcoin would send transactions using bitcoins gotten from transactions with 0 confirmations, and these resulting transactions would also never confirm. Because Bitcoin tends to prefer sending smaller coins, these invalid transactions quickly multiplied, contaminating the wallets of everyone who received them.&lt;br /&gt;
&lt;br /&gt;
Bitcoin was changed to only select coins with at least 1 confirmation. The remaining sub-0.01 transactions were cleared by generators who modified their version of Bitcoin to not require the micropayment fee. It took a while for everything to get cleared, though, because many of the intermediate transactions had been forgotten by the network by this point and had to be rebroadcast by the original senders.&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
* [https://bitcointalk.org/index.php?topic=1306.0 Initial reports]&lt;br /&gt;
* [http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-5140 US-CERT/NIST]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== CVE-2011-4447 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2011-11-11&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; Wallet non-encryption&lt;br /&gt;
 &amp;lt;b&amp;gt;Fix Deployment:&amp;lt;/b&amp;gt; 99%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| bitcoind&amp;lt;br&amp;gt;wxBitcoin || 0.4.0 - 0.4.1rc6 || 0.4.1&amp;lt;br&amp;gt;0.5.0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
* [https://bitcointalk.org/index.php?topic=51604.0 Announcement]&lt;br /&gt;
* [https://bitcointalk.org/index.php?topic=51474.0 Finding]&lt;br /&gt;
* [http://bitcoin.org/releases/2011/11/21/v0.5.0.html 0.5.0]&lt;br /&gt;
* [http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2011-4447 US-CERT/NIST]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== CVE-2012-1909 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2012-03-07&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; Transaction overwriting&lt;br /&gt;
 &amp;lt;b&amp;gt;Fix Deployment:&amp;lt;/b&amp;gt; 95%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| Bitcoin protocol || Before March 15th, 2012 || BIP 30&lt;br /&gt;
|-&lt;br /&gt;
| Bitcoin-Qt&amp;lt;br&amp;gt;bitcoind || * - 0.4.4rc2&amp;lt;br&amp;gt;0.5.0rc1 - 0.5.0.4rc2&amp;lt;br&amp;gt;0.5.1rc1 - 0.5.3rc2&amp;lt;br&amp;gt;0.6.0rc1 - 0.6.0rc2 || 0.4.4&amp;lt;br&amp;gt;0.5.0.4&amp;lt;br&amp;gt;0.5.3&amp;lt;br&amp;gt;0.6.0rc3&lt;br /&gt;
|-&lt;br /&gt;
| wxBitcoin || ALL || NONE&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
* [https://bitcointalk.org/index.php?topic=67738.0 Announcement]&lt;br /&gt;
* [https://en.bitcoin.it/wiki/BIP_0030 Fix]&lt;br /&gt;
* [https://bugs.gentoo.org/show_bug.cgi?id=407793 Gentoo bug tracker]&lt;br /&gt;
* [http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2012-1909 US-CERT/NIST]&lt;br /&gt;
&lt;br /&gt;
== CVE-2012-1910 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2012-03-17&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; MingW non-multithreading&lt;br /&gt;
 &amp;lt;b&amp;gt;Fix Deployment:&amp;lt;/b&amp;gt; 100%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| Bitcoin-Qt for Windows || 0.5.0rc1 - 0.5.0.4&amp;lt;br&amp;gt;0.5.1rc1 - 0.5.3.0&amp;lt;br&amp;gt;0.6.0rc1 - 0.6.0rc3 || 0.5.0.5&amp;lt;br&amp;gt;0.5.3.1&amp;lt;br&amp;gt;0.5.4&amp;lt;br&amp;gt;0.6.0rc4&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
* [https://bitcointalk.org/index.php?topic=69120.0 Announcement]&lt;br /&gt;
* [http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2012-1910 US-CERT/NIST]&lt;br /&gt;
&lt;br /&gt;
== BIP-0016 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2012-04-01&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; Mandatory P2SH protocol update&lt;br /&gt;
 &amp;lt;b&amp;gt;Deployment:&amp;lt;/b&amp;gt; 95%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| Bitcoin-Qt&amp;lt;br&amp;gt;bitcoind || * - 0.4.4&amp;lt;br&amp;gt;0.5.0rc1 - 0.5.0.5&amp;lt;br&amp;gt;0.5.1rc1 - 0.5.3&amp;lt;br&amp;gt;0.6.0rc1 || 0.4.5&amp;lt;br&amp;gt;0.5.0.6&amp;lt;br&amp;gt;0.5.4rc1&amp;lt;br&amp;gt;0.6.0rc2&lt;br /&gt;
|-&lt;br /&gt;
| wxBitcoin || ALL || NONE&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
* [[BIP 0016]]&lt;br /&gt;
&lt;br /&gt;
== CVE-2012-2459 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2012-05-14&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; Block hash collision (via merkle tree)&lt;br /&gt;
 &amp;lt;b&amp;gt;Fix Deployment:&amp;lt;/b&amp;gt; 95%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| Bitcoin-Qt&amp;lt;br&amp;gt;bitcoind || * - 0.4.6rc1&amp;lt;br&amp;gt;0.5.0rc1 - 0.5.5rc1&amp;lt;br&amp;gt;0.6.0rc1 - 0.6.0.7rc1&amp;lt;br&amp;gt;0.6.1rc1 - 0.6.1rc1 || 0.4.6&amp;lt;br&amp;gt;0.5.5&amp;lt;br&amp;gt;0.6.0.7&amp;lt;br&amp;gt;0.6.1rc2&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Block hash collisions can easily be made by duplicating transactions in the merkle tree.&lt;br /&gt;
Such a collision is invalid, but if recorded (as Bitcoin-Qt and bitcoind prior to 0.6.1 did) would prevent acceptance of the legitimate block with the same hash.&lt;br /&gt;
This could be used to fork the blockchain, including deep double-spend attacks.&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
* [https://bitcointalk.org/?topic=81749 Announcement]&lt;br /&gt;
* [https://bugs.gentoo.org/show_bug.cgi?id=415973 Gentoo bug tracker]&lt;br /&gt;
* [http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2012-2459 US-CERT/NIST]&lt;br /&gt;
* [https://bitcointalk.org/?topic=102395 Full Disclosure]&lt;br /&gt;
&lt;br /&gt;
== CVE-2012-3789 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2012-06-20&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; (Lack of) orphan txn resource limits&lt;br /&gt;
 &amp;lt;b&amp;gt;Fix Deployment:&amp;lt;/b&amp;gt; 90%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| Bitcoin-Qt&amp;lt;br&amp;gt;bitcoind || * - 0.4.7rc2&amp;lt;br&amp;gt;0.5.0rc1 - 0.5.6rc2&amp;lt;br&amp;gt;0.6.0rc1 - 0.6.0.8rc2&amp;lt;br&amp;gt;0.6.1rc1 - 0.6.2.2 || 0.4.7rc3&amp;lt;br&amp;gt;0.5.6rc3&amp;lt;br&amp;gt;0.6.0.9rc1&amp;lt;br&amp;gt;0.6.3rc1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
* [[CVE-2012-3789]]&lt;br /&gt;
* [https://bitcointalk.org/?topic=88734 0.6.3rc1 Announcement]&lt;br /&gt;
* [http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2012-3789 US-CERT/NIST]&lt;br /&gt;
&lt;br /&gt;
== CVE-2013-2272 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2013-01-11&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; Remote discovery of node&#039;s wallet addresses&lt;br /&gt;
 &amp;lt;b&amp;gt;Fix Deployment:&amp;lt;/b&amp;gt; 22%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| Bitcoin-Qt&amp;lt;br&amp;gt;bitcoind || * - 0.4.8rc4&amp;lt;br&amp;gt;0.5.0rc1 - 0.5.7&amp;lt;br&amp;gt;0.6.0rc1 - 0.6.0.10rc4&amp;lt;br&amp;gt;0.6.1rc1 - 0.6.4rc4&amp;lt;br&amp;gt;0.7.0rc1 - 0.7.2 || 0.4.9rc1&amp;lt;br&amp;gt;0.5.8rc1&amp;lt;br&amp;gt;0.6.0.11rc1&amp;lt;br&amp;gt;0.6.5rc1&amp;lt;br&amp;gt;0.7.3rc1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
&lt;br /&gt;
* [https://bitcointalk.org/?topic=135856 Announcement]&lt;br /&gt;
&lt;br /&gt;
== CVE-2013-2273 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2013-01-30&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; Predictable change output &lt;br /&gt;
 &amp;lt;b&amp;gt;Fix Deployment:&amp;lt;/b&amp;gt; 22%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| Bitcoin-Qt&amp;lt;br&amp;gt;bitcoind || * - 0.4.8rc4&amp;lt;br&amp;gt;0.5.0rc1 - 0.5.7&amp;lt;br&amp;gt;0.6.0rc1 - 0.6.0.10rc4&amp;lt;br&amp;gt;0.6.1rc1 - 0.6.4rc4&amp;lt;br&amp;gt;0.7.0rc1 - 0.7.2 || 0.4.9rc1&amp;lt;br&amp;gt;0.5.8rc1&amp;lt;br&amp;gt;0.6.0.11rc1&amp;lt;br&amp;gt;0.6.5rc1&amp;lt;br&amp;gt;0.7.3rc1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== CVE-2013-2292 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2013-01-30&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; A transaction that takes at least 3 minutes to verify&lt;br /&gt;
 &amp;lt;b&amp;gt;Fix Deployment:&amp;lt;/b&amp;gt; -&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| Bitcoin-Qt&amp;lt;br&amp;gt;bitcoind || All versions || No fix yet&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
&lt;br /&gt;
* [https://bitcointalk.org/?topic=140078 Announcement]&lt;br /&gt;
&lt;br /&gt;
== CVE-2013-2293 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2013-02-14&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; Continuous hard disk seek&lt;br /&gt;
 &amp;lt;b&amp;gt;Fix Deployment:&amp;lt;/b&amp;gt; 22%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| Bitcoin-Qt&amp;lt;br&amp;gt;bitcoind || * - 0.7.3rc1 || No fix yet (0.8.0 unaffected)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
&lt;br /&gt;
* [[CVE-2013-2293]]&lt;br /&gt;
* [https://bitcointalk.org/?topic=144122 Announcement]&lt;br /&gt;
&lt;br /&gt;
== BIP-0034 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; Future&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; Mandatory block protocol update&lt;br /&gt;
 &amp;lt;b&amp;gt;Deployment:&amp;lt;/b&amp;gt; 80%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| Bitcoin-Qt&amp;lt;br&amp;gt;bitcoind || * - 0.4.7&amp;lt;br&amp;gt;0.5.0rc1 - 0.5.7&amp;lt;br&amp;gt;0.6.0rc1 - 0.6.0.9&amp;lt;br&amp;gt;0.6.1rc1 - 0.6.3 || 0.4.8rc1&amp;lt;br&amp;gt;0.5.7rc1&amp;lt;br&amp;gt;0.6.0.10rc1&amp;lt;br&amp;gt;0.6.4rc1&lt;br /&gt;
|-&lt;br /&gt;
| wxBitcoin || ALL || NONE&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
* [[BIP 0034]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Definitions==&lt;br /&gt;
&lt;br /&gt;
A critical vulnerability is one that will have disastrous consequences if it is exploited.  A serious vulnerability is one that will have serious consequences if it is exploited&amp;lt;ref&amp;gt;[http://bitcointalk.org/index.php?topic=88892.0 http://bitcointalk.org/index.php?topic=88892.0]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
&lt;br /&gt;
* [[Changelog]]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Cateogory:Security]]&lt;/div&gt;</summary>
		<author><name>Sergio Demian Lerner</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=User:Sergio_Demian_Lerner&amp;diff=35879</id>
		<title>User:Sergio Demian Lerner</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=User:Sergio_Demian_Lerner&amp;diff=35879"/>
		<updated>2013-03-05T14:07:55Z</updated>

		<summary type="html">&lt;p&gt;Sergio Demian Lerner: Created page with &amp;quot;==Who am I?== Sergio Demian Lerner  * Bitcoin security researcher  * Master in Computer Science * Reporter of Bitcoin vulnerabilities [[Common_Vulnerabilities_and_Exposures|CV...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Who am I?==&lt;br /&gt;
Sergio Demian Lerner&lt;br /&gt;
&lt;br /&gt;
* Bitcoin security researcher &lt;br /&gt;
* Master in Computer Science&lt;br /&gt;
* Reporter of Bitcoin vulnerabilities [[Common_Vulnerabilities_and_Exposures|CVE-2012-3789, CVE-2012-4682, CVE-2012-4683, CVE-2012-4684, CVE-2013-2272, CVE-2013-2292 and CVE-2013-2293]]&lt;br /&gt;
* Designer of Mental Poker protocol MPF.&lt;br /&gt;
* My Blog: bitslog.wordpress.com&lt;br /&gt;
* My Tweets: @SDLerner&lt;br /&gt;
* My company: http://www.certimix.com/&lt;br /&gt;
&lt;br /&gt;
==Bitcoin related publications==&lt;br /&gt;
&lt;br /&gt;
* [http://www.dc.uba.ar/inv/tesis/licenciatura/2010/lerner MPF: A new family of practical and secure Mental Poker protocols]&lt;br /&gt;
Tesis de Licenciatura en Ciencias de la Computación, Facultad de Ciencias Exactas y Naturales, Universidad de Buenos Aires&lt;br /&gt;
November 15, 2010&lt;br /&gt;
&lt;br /&gt;
In this thesis we propose a new family of practical and secure mental poker protocols, which are efficient enough to achieve real-time performance to security play Texas Hold-em over the Internet, for up to ten players, using personal computers.&lt;br /&gt;
&lt;br /&gt;
* [http://bitslog.wordpress.com/2012/04/09/mave-digital-signature-protocol-for-massive-bulk-verifications/ MAVE: Digital Signature Protocol for Massive bulk verifications]&lt;br /&gt;
April 9, 2012&lt;br /&gt;
&lt;br /&gt;
In this paper we propose new decentralized digital signature protocols&lt;br /&gt;
to allow massive bulk verifications (MAVE). The protocols satisfies very&lt;br /&gt;
tight requirements of performance and storage. MAVE requires a third party&lt;br /&gt;
with no special trust and a broadcast medium. MAVE can be used for groups&lt;br /&gt;
of millions of users or autonomous agents that generate thousands of signatures&lt;br /&gt;
per second that must...more&lt;br /&gt;
&lt;br /&gt;
* [http://bitslog.wordpress.com/2012/04/16/mavepay-a-new-lightweight-payment-scheme-for-peer-to-peer-currency-networks/ MAVEPAY: a new lightweight payment scheme for peer to peer currency networks]&lt;br /&gt;
April 16, 2012&lt;br /&gt;
&lt;br /&gt;
In this paper we propose a new payment scheme based on the&lt;br /&gt;
MAVE digital signature protocol, for use in peer to peer currency networks&lt;br /&gt;
based on a block chain. The proposed payment scheme requires less resources&lt;br /&gt;
for the users than Bitcoin and can be used to create a truly lightweight peer&lt;br /&gt;
to peer currency network that stands 700 payments/second, and 5 million new&lt;br /&gt;
user accounts/year, on an...more&lt;br /&gt;
&lt;br /&gt;
* [http://bitslog.wordpress.com/2012/08/06/destination-address-anonymization-in-bitcoin/ Destination Address Anonymization in Bitcoin]&lt;br /&gt;
August 6, 2012&lt;br /&gt;
&lt;br /&gt;
Protocol proposal for anonymous customer-merchant relations in Bitcoin.&lt;br /&gt;
&lt;br /&gt;
* [http://bitslog.wordpress.com/2012/11/30/bitmessage-completely-broken-crypto/ Bitmessage v1.0: completely broken crypto]&lt;br /&gt;
November 30, 2012&lt;br /&gt;
&lt;br /&gt;
Description of security vulnerabilities of the Bitmessage protocol 1.0&lt;br /&gt;
&lt;br /&gt;
* [http://bitslog.wordpress.com/2013/01/23/the-bitcoin-trasaction-fetch-memory-exhaustion-attack-tfmea/ The Bitcoin transaction fetch memory exhaustion attack (TFMEA)]&lt;br /&gt;
January 23, 2013&lt;br /&gt;
&lt;br /&gt;
Disclosure of a DoS vulnerability in Bitcoin clients.&lt;br /&gt;
&lt;br /&gt;
* [http://bitslog.wordpress.com/2013/01/23/new-bitcoin-vulnerability-get-your-peer-public-addresses/ Get your peer public addresses]&lt;br /&gt;
January 23, 2013&lt;br /&gt;
&lt;br /&gt;
Disclosure of a vulnerability in Bitcoin that breaks its pseudo - anonymization.&lt;br /&gt;
&lt;br /&gt;
* [http://bitslog.wordpress.com/2013/01/08/cve-2012-3789-disclosure/ CVE-2012-3789 disclosure]&lt;br /&gt;
January 8, 2013&lt;br /&gt;
&lt;br /&gt;
Disclosure of 3 DoS vulnerabilities I found in Bitcoin.&lt;br /&gt;
&lt;br /&gt;
* [http://www.bouncycastle.org/jira/browse/BJB-22 Vulnerability in BouncyCastle ECDSA signature verification]&lt;br /&gt;
February 19, 2013&lt;br /&gt;
&lt;br /&gt;
Disclosure of a security vulnerability found in BouncyCastle ECDSA signature verification code that, in applications that must verify other people&#039;s signatures, can result in remote application terminations and DoS attack. If affects Bitcoin nodes coded in Java/C# that uses the Bouncycastle cryptographic library.&lt;br /&gt;
&lt;br /&gt;
==My Patents==&lt;br /&gt;
&lt;br /&gt;
* METHOD AND APPARATUS FOR EFFICIENT AND SECURE CREATING, TRANSFERRING, AND REVEALING OF MESSAGES OVER A NETWORK&lt;br /&gt;
United States 12/904,033&lt;br /&gt;
Filed October 13, 2009&lt;br /&gt;
&lt;br /&gt;
The patent describes a new realtime peer to peer method for playing with cards over a network with cryptographic security (a &#039;&#039;&#039;Mental Poker protocol&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
* METHOD AND APPARATUS FOR EFFICIENT AND SECURE CREATING, TRANSFERRING, AND REVEALING OF MESSAGES OVER A NETWORK&lt;br /&gt;
Europe PCT/US10/52550&lt;br /&gt;
Filed October 13, 2009&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
*[[Research]]&lt;/div&gt;</summary>
		<author><name>Sergio Demian Lerner</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Weaknesses&amp;diff=35691</id>
		<title>Weaknesses</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Weaknesses&amp;diff=35691"/>
		<updated>2013-02-22T19:16:33Z</updated>

		<summary type="html">&lt;p&gt;Sergio Demian Lerner: /* Denial of Service (DoS) attacks */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Might be a problem ==&lt;br /&gt;
=== Wallet Vulnerable To Theft ===&lt;br /&gt;
&lt;br /&gt;
The [[wallet]] is stored unencrypted, by default, and thus becomes a valuable target for theft.  Recent releases of the Bitcoin client now supports encryption to protect the wallet data, though the user must opt-in.&lt;br /&gt;
&lt;br /&gt;
=== Tracing a coin&#039;s history ===&lt;br /&gt;
Tracing a coin&#039;s history can be used to connect identities to addresses. [[Anonymity|More info]].&lt;br /&gt;
&lt;br /&gt;
=== Cancer nodes ===&lt;br /&gt;
It&#039;s trivial for an attacker to fill the network with clients controlled by him. This might be helpful in the execution of other attacks.&lt;br /&gt;
&lt;br /&gt;
For example, an attacker might connect 100,000 IP addresses to the IRC bootstrap channel. You would then be very likely to connect only to attacker nodes. This state can be exploited in (at least) the following ways:&lt;br /&gt;
* The attacker can refuse to relay blocks and transactions from everyone, disconnecting you from the network.&lt;br /&gt;
* The attacker can relay only blocks that he creates, putting you on a separate network. You&#039;re then open to [[double-spending]] attacks.&lt;br /&gt;
* If you rely on transactions with 0 confirmations, the attacker can just filter out certain transactions to execute a double-spending attack.&lt;br /&gt;
* Low-latency encryption/anonymization of Bitcoin&#039;s transmissions (With Tor, JAP, etc.) can be defeated relatively easy with a timing attack if you&#039;re connected to several of the attacker&#039;s nodes and the attacker is watching your transmissions at your ISP.&lt;br /&gt;
&lt;br /&gt;
Bitcoin makes these attacks more difficult by only making an outbound connection to one IP address per /16 (x.y.0.0). Incoming connections are unlimited and unregulated, but this is generally only a problem in the anonymity case, where you&#039;re probably already unable to accept incoming connections.&lt;br /&gt;
&lt;br /&gt;
Looking for suspiciously low network hash-rates may help prevent the second one.&lt;br /&gt;
&lt;br /&gt;
=== No authentication for IP transfers ===&lt;br /&gt;
Since there&#039;s no authentication when sending to an [[IP address]] (as opposed to a [[Address|Bitcoin address]]), executing a man-in-the-middle attack and stealing the sent BitCoins is trivial. This attack is downright &#039;&#039;likely&#039;&#039; if you&#039;re using Tor. For this reason, IP transfers are disabled by default in modern Bitcoin clients, though the feature can be enabled with a command line argument if desired.&lt;br /&gt;
&lt;br /&gt;
=== Packet sniffing ===&lt;br /&gt;
Someone who can see all of your Internet traffic can easily see when you send a transaction that you didn&#039;t receive (which means that it&#039;s yours). This would be made more difficult (but not impossible) if node-to-node encryption was used.&lt;br /&gt;
&lt;br /&gt;
=== Denial of Service (DoS) attacks ===&lt;br /&gt;
Sending lots of data to a node may make it so busy it cannot process normal Bitcoin transactions.  Bitcoin has some denial-of-service prevention built-in, but is likely still vulnerable to more sophisticated denial-of-service attacks.&lt;br /&gt;
&lt;br /&gt;
These are the current Bitcoin Satoshi client protections to deter DoS attacks, as of version 0.7.0:&lt;br /&gt;
&lt;br /&gt;
# Does not forward orphan transactions/blocks&lt;br /&gt;
# Does not forward double-spend transactions&lt;br /&gt;
# Does not forward the same block, transaction or alert twice to the same peer.&lt;br /&gt;
# Restricts the maximum number of signature checks a transaction input may request&lt;br /&gt;
# Continuous rate-limit of free transactions to mitigate &#039;penny-flooding&#039;&lt;br /&gt;
# Keeps a DoS score of each connected peer and disconnects from a peer that send messages that fail to comply with the rules.&lt;br /&gt;
# Bans IP addresses that misbehave for a time lapse (24 hours default)&lt;br /&gt;
# Limits the number of stored orphan transactions (10000 by default)&lt;br /&gt;
# Uses a signature cache to prevent attacks that try to continuously trigger the re-verification of stored orphan transactions (protects from https://bitcointalk.org/index.php?topic=136422.0 attack)&lt;br /&gt;
# Limits the number of stored signatures in the signature cache (50000 signatures by default)&lt;br /&gt;
# Tries to catch all possible errors in transactions before the signature verifications take place, to avoid DoS attacks on CPU usage.&lt;br /&gt;
# Penalizes peers that send lots of duplicate/expired/invalid-signature/whatever alerts, so they eventually get banned.&lt;br /&gt;
# In orphan/signature caches, when removing an item, evicts a random entry.&lt;br /&gt;
# Data structures are specially chosen to avoid loops in which the number of iterations can be controller by an attacker that result in exponential complexity.&lt;br /&gt;
# Ignores big orphan transactions, to avoid a send-big-orphans memory exhaustion attack.&lt;br /&gt;
# In RPC: Only sends a HTTP 403 response if it&#039;s not using SSL to prevent a DoS during the SSL handshake.&lt;br /&gt;
# In RPC: Sleeps some time if authorization fails to deter brute-forcing short passwords.&lt;br /&gt;
# In GUI: Limits URI length to prevent a DoS against the QR-Code dialog&lt;br /&gt;
&lt;br /&gt;
These are the Satoshi client protections added in version 0.8.0: &lt;br /&gt;
&lt;br /&gt;
# Transactions greater than 100 Kbytes are considered non-standard (protects from variations of the https://bitcointalk.org/index.php?topic=140078.0 attack).&lt;br /&gt;
# Only the UXTO (Unspent Transaction Output Set) is stored in memory, the remaining data is stored on disk.&lt;br /&gt;
# When processing a transaction, before fetching transaction inputs from disk to memory, the client checks that all the inputs are unspent (protects from the Continuous Hard Disk Seek/Read Activity (https://bitcointalk.org/index.php?topic=144122.0) DoS attack)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Satoshi client does not directly limit peer bandwidth nor CPU usage.&lt;br /&gt;
&lt;br /&gt;
=== Forcing clock drift against a target node ===&lt;br /&gt;
&lt;br /&gt;
See [http://culubas.blogspot.com/2011/05/timejacking-bitcoin_802.html Timejacking] for a description of this attack. It can be fixed by changing how nodes calculate the current time.&lt;br /&gt;
&lt;br /&gt;
=== Illegal content in the block chain ===&lt;br /&gt;
It is illegal in some countries to possess/distribute certain kinds of data. Since arbitrary data can be included in Bitcoin transactions, and clients must normally have a copy of all unspent transactions, this could cause legal problems.&lt;br /&gt;
&lt;br /&gt;
=== Security Vulnerabilities and bugs  ===&lt;br /&gt;
It&#039;s possible but unlikely that a newly discovered bug or security vulnerability in the standard client could lead to a block chain split, or the need for every node to upgrade in a short time period. For example, a single malformed message tailored to exploit a specific vulnerability, when spread from node to node, could cause the whole network to shutdown in a few hours. Bugs that break user anonymity, on the contrary, have been found, since the pseudo-anonymity property of Bitcoin has been analyzed less.&lt;br /&gt;
Starting from version 0.7.0, Bitcoin client can be considered a mature project. The security critical sections of the source code are updated less and less frequently and those parts have been reviewed by many computer security experts. Also Bitcoin Satoshi client has passed the test of being on-line for more than 3 years, without a single vulnerability being exploited &#039;&#039;in the wild&#039;&#039;. &lt;br /&gt;
See [[Common_Vulnerabilities_and_Exposures]] for a detailed list of vulnerabilities detected and fixed.&lt;br /&gt;
&lt;br /&gt;
== Probably not a problem ==&lt;br /&gt;
&lt;br /&gt;
===Breaking the cryptography===&lt;br /&gt;
SHA-256 and ECDSA are considered very strong currently, but they might be broken in the far future. If that happens, BitCoin can shift to a stronger algorithm. [https://bitcointalk.org/index.php?topic=191.msg1585#msg1585 More info].&lt;br /&gt;
&lt;br /&gt;
===Scalability===&lt;br /&gt;
BitCoin can easily scale beyond the level of traffic VISA sees globally today. See the discussion on the [[scalability]] page for more information.&lt;br /&gt;
&lt;br /&gt;
===Segmentation===&lt;br /&gt;
If there is even a &amp;quot;trickle&amp;quot; of a connection between two sides of a segmented network, things should still work perfectly. When block chains are combined, all of the non-generation transactions in the shorter chain are re-added to the transaction pool -- they&#039;ll start over at 0/unconfirmed, but they&#039;ll still be valid. No mature transactions will be lost unless the segmentation persists for longer than ~120 blocks. Then generations will start to mature, and any transactions based on those generations will become invalid when recombined with the longer chain. [https://bitcointalk.org/index.php?topic=241.msg2071#msg2071 More info].&lt;br /&gt;
&lt;br /&gt;
=== Attacking all users ===&lt;br /&gt;
The IP addresses of most users are totally public. You can use Tor to hide this, but the network won&#039;t work if everyone does this. BitCoin requires that &#039;&#039;some&#039;&#039; country is still free.&lt;br /&gt;
&lt;br /&gt;
=== Dropping transactions ===&lt;br /&gt;
Nodes that generate blocks can choose not to include a transaction in their blocks. When this happens, the transaction remains &amp;quot;active&amp;quot; and can be included in a later block. Two things discourage this:&lt;br /&gt;
* Nodes only hash a fixed-size &#039;&#039;header&#039;&#039;, so there is no speed advantage to dropping transactions.&lt;br /&gt;
* [[Satoshi]] has [https://bitcointalk.org/index.php?topic=165.msg1595#msg1595 communicated] that he will write code to stop this kind of thing if it becomes a problem.&lt;br /&gt;
&lt;br /&gt;
=== Attacker has a lot of computing power ===&lt;br /&gt;
An attacker that controls more than 50% of the network&#039;s computing power can, for the time that he is in control, exclude and modify the ordering of transactions. This allows him to:&lt;br /&gt;
* Reverse transactions that he sends while he&#039;s in control.  This has the potential to [[Double-spending#51.25_attack|double-spend transactions]] that previously had already been seen in the block chain.&lt;br /&gt;
* Prevent some or all transactions from gaining any confirmations&lt;br /&gt;
* Prevent some or all other miners from mining any valid blocks&lt;br /&gt;
The attacker &#039;&#039;can&#039;t&#039;&#039;:&lt;br /&gt;
* Reverse other people&#039;s transactions&lt;br /&gt;
* Prevent transactions from being sent at all (they&#039;ll show as 0/unconfirmed)&lt;br /&gt;
* Change the number of coins generated per block&lt;br /&gt;
* Create coins out of thin air&lt;br /&gt;
* Send coins that never belonged to him&lt;br /&gt;
&lt;br /&gt;
It&#039;s much more difficult to change historical blocks, and it becomes exponentially more difficult the further back you go. As above, changing historical blocks only allows you to exclude and change the ordering of transactions. It&#039;s impossible to change blocks created before the last checkpoint.&lt;br /&gt;
&lt;br /&gt;
Since this attack doesn&#039;t permit all that much power over the network, it is expected that no one will attempt it. A profit-seeking person will always gain more by just following the rules, and even someone trying to destroy the system will probably find other attacks more attractive. However, if this attack is successfully executed, it will be difficult or impossible to &amp;quot;untangle&amp;quot; the mess created -- any changes the attacker makes might become permanent.&lt;br /&gt;
&lt;br /&gt;
=== Spamming transactions ===&lt;br /&gt;
&lt;br /&gt;
It is easy to send transactions to yourself repeatedly. If these transactions fill blocks to the maximum size (1MB), other transactions would be delayed until the next block.&lt;br /&gt;
&lt;br /&gt;
This is made expensive by the [[transaction fee|fees]] that would be required after the 50KB of free transactions per block are exhausted. An attacker will eventually eliminate free transactions, but Bitcoin fees will always be low because raising fees above 0.01 BTC per KB would require spending transaction fees. An attacker will eventually run out of money. Even if an attacker wants to waste money, transactions are further prioritized by the time since the coins were last spent, so attacks spending the same coins repeatedly are less effective.&lt;br /&gt;
&lt;br /&gt;
=== The [[Double-spending#Finney_attack|Finney attack]] ===&lt;br /&gt;
Named for Hal Finney, who first described this variation of a double-spend attack involving accepting [http://www.bitcointalk.org/index.php?topic=3441.msg48384#msg48384 0-confirmation transactions].  Accepting 0-confirmation large-value transactions is problematic; accepting them for low-value transactions (after waiting several seconds to detect an ordinary double-spend attempt) is probably safe.&lt;br /&gt;
&lt;br /&gt;
===Rival/malicious client code===&lt;br /&gt;
Any rival client must follow Bitcoin&#039;s rules or else all current BitCoin clients will ignore it. You&#039;d have to actually get people to &#039;&#039;use&#039;&#039; your client. A better client that pretends to follow the same rules, but with an exception known only to the author (possibly by making it closed source), might conceivably be able to gain widespread adoption. At that point, its author could use his exception and go largely unnoticed.&lt;br /&gt;
&lt;br /&gt;
== Definitely not a problem ==&lt;br /&gt;
&lt;br /&gt;
===Coin destruction===&lt;br /&gt;
Bitcoin has 2.1 quadrillion raw units, making up 8 decimals of BTC precision, so the entire network could potentially operate on much less than the full quantity of Bitcoins. If deflation gets to the point where transactions of more than 10 BTC are unheard of, clients can just switch to another unit so that, for example, it shows 10 mBTC rather than 0.01 BTC.&lt;br /&gt;
&lt;br /&gt;
The maximum number of raw units might not be enough if the &#039;&#039;entire world&#039;&#039; starts using BTC, but it would not be too difficult to increase precision in that case. The transaction format and version number would be scheduled to change at some particular block number after a year or two, and everyone would have to update by then.&lt;br /&gt;
&lt;br /&gt;
===Generating tons of addresses===&lt;br /&gt;
Generating an address doesn&#039;t touch the network at all. You&#039;d only be wasting your CPU resources and disk space.&lt;br /&gt;
&lt;br /&gt;
Also, a collision is highly unlikely.&lt;br /&gt;
&lt;br /&gt;
Keys are 256 bit in length and are hashed in a 160 bit address.(2^160th power)&lt;br /&gt;
Divide it by the world population and you have about 215,000,000,000,000,000,000,000,000,000,000,000,000 addresses per capita.(2.15 x 10^38)[http://www.wolframalpha.com/input/?i=2^160+%2F+world+population]&lt;br /&gt;
&lt;br /&gt;
===Everyone calculates at the same rate===&lt;br /&gt;
If everyone began with identical blocks and started their nonce at 1 and incremented, the fastest machine would always win. However, each block contains a new, random public key known only to you in the list of transactions.  The 256-bit &amp;quot;Merkle tree&amp;quot; hash of this is part of the block header.&lt;br /&gt;
&lt;br /&gt;
So everyone begins with slightly different blocks and everyone truly has a random chance of winning (modified by CPU power).&lt;br /&gt;
&lt;br /&gt;
===Generate &amp;quot;valid&amp;quot; blocks with a lower difficulty than normal===&lt;br /&gt;
Using unmodified Bitcoin code, an attacker could segment himself from the main network and generate a long block chain with a lower difficulty than the real network. These blocks would be totally valid for his network. However, it would be impossible to combine the two networks (and the &amp;quot;false&amp;quot; chain would be destroyed in the process).&lt;br /&gt;
&lt;br /&gt;
* Even though your network&#039;s difficulty can be less than the real difficulty, this doesn&#039;t give you any advantage over the real network. You&#039;ll gain ground when the real network is taking more than 10 minutes to generate a block, but you&#039;ll lose ground when the network takes less than 10 minutes.&lt;br /&gt;
* Every few releases of Bitcoin, a recent block hash is hardcoded into the source code. Any blocks before that point can&#039;t be changed. An attacker starting at that point would have to reduce the difficulty, but this would require him to generate blocks at a much slower rate than once per 10 minutes. By the time he finally gets to a difficulty of 1, a new version of Bitcoin with an updated hardcoded block will probably have been released.&lt;br /&gt;
* &amp;quot;Block chain length&amp;quot; is calculated from the combined difficulty of all the blocks, not just the number of blocks in the chain. The one that represents the most CPU usage will win.&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
&lt;br /&gt;
* [[Double-spending]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Technical]]&lt;/div&gt;</summary>
		<author><name>Sergio Demian Lerner</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Common_Vulnerabilities_and_Exposures&amp;diff=34824</id>
		<title>Common Vulnerabilities and Exposures</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Common_Vulnerabilities_and_Exposures&amp;diff=34824"/>
		<updated>2013-01-08T17:56:13Z</updated>

		<summary type="html">&lt;p&gt;Sergio Demian Lerner: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!style=&amp;quot;width:14ex&amp;quot;| CVE&lt;br /&gt;
! Announced !! Affects !! Severity !! Attack is... !! Flaw !! Net&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2010-5137|CVE-2010-5137]]&lt;br /&gt;
| 2010-07-28&lt;br /&gt;
| wxBitcoin and bitcoind&lt;br /&gt;
|bgcolor=yellow| DoS&amp;lt;ref name=&amp;quot;DoS&amp;quot;&amp;gt;Attacker can disable some functionality, for example by crashing clients&amp;lt;/ref&amp;gt;&lt;br /&gt;
|bgcolor=pink| Easy&lt;br /&gt;
| OP_LSHIFT crash&lt;br /&gt;
|bgcolor=lime| 100%&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2010-5141|CVE-2010-5141]]&lt;br /&gt;
| 2010-07-28&lt;br /&gt;
| wxBitcoin and bitcoind&lt;br /&gt;
|bgcolor=pink| Theft&amp;lt;ref name=&amp;quot;Theft&amp;quot;&amp;gt;Attacker can take or create money outside known network rules&amp;lt;/ref&amp;gt;&lt;br /&gt;
|bgcolor=pink| Easy&lt;br /&gt;
|&lt;br /&gt;
|bgcolor=lime| 100%&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2010-5138|CVE-2010-5138]]&lt;br /&gt;
| 2010-07-29&lt;br /&gt;
| wxBitcoin and bitcoind&lt;br /&gt;
|bgcolor=yellow| DoS&amp;lt;ref name=&amp;quot;DoS&amp;quot;/&amp;gt;&lt;br /&gt;
|bgcolor=pink| Easy&lt;br /&gt;
| Unlimited SigOp DoS&lt;br /&gt;
|bgcolor=lime| 100%&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2010-5139|CVE-2010-5139]]&lt;br /&gt;
| 2010-08-15&lt;br /&gt;
| wxBitcoin and bitcoind&lt;br /&gt;
|bgcolor=pink| Theft&amp;lt;ref name=&amp;quot;Theft&amp;quot;/&amp;gt;&lt;br /&gt;
|bgcolor=pink| Easy&lt;br /&gt;
| Combined output overflow&lt;br /&gt;
|bgcolor=lime| 100%&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2010-5140|CVE-2010-5140]]&lt;br /&gt;
| 2010-09-29&lt;br /&gt;
| wxBitcoin and bitcoind&lt;br /&gt;
|bgcolor=yellow| DoS&amp;lt;ref name=&amp;quot;DoS&amp;quot;/&amp;gt;&lt;br /&gt;
|bgcolor=pink| Easy&lt;br /&gt;
| Never confirming transactions&lt;br /&gt;
|bgcolor=lime| 100%&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2011-4447|CVE-2011-4447]]&lt;br /&gt;
| 2011-11-11&lt;br /&gt;
| wxBitcoin and bitcoind&lt;br /&gt;
|bgcolor=pink| Exposure&amp;lt;ref name=&amp;quot;Exposure&amp;quot;&amp;gt;Attacker can access user data outside known acceptable methods&amp;lt;/ref&amp;gt;&lt;br /&gt;
|bgcolor=lime| Hard&lt;br /&gt;
| Wallet non-encryption&lt;br /&gt;
|bgcolor=lime| [http://luke.dashjr.org/programs/bitcoin/files/charts/CVE-2011-4447.html 97%]&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2012-1909|CVE-2012-1909]]&lt;br /&gt;
| 2012-03-07&lt;br /&gt;
| Bitcoin protocol and all clients&lt;br /&gt;
|bgcolor=pink| Netsplit&amp;lt;ref name=&amp;quot;Netsplit&amp;quot;&amp;gt;Attacker can create multiple views of the network, enabling [[double-spending]] with over 1 confirmation&amp;lt;/ref&amp;gt;&lt;br /&gt;
|bgcolor=lime| Very hard&lt;br /&gt;
| Transaction overwriting&lt;br /&gt;
|bgcolor=yellow| [http://luke.dashjr.org/programs/bitcoin/files/charts/CVE-2012-1909.html 88%]&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2012-1910|CVE-2012-1910]]&lt;br /&gt;
| 2012-03-17&lt;br /&gt;
| Bitcoin-Qt for Windows&lt;br /&gt;
|bgcolor=pink| Unknown&amp;lt;ref name=&amp;quot;Unknown&amp;quot;&amp;gt;Extent of possible abuse is unknown&amp;lt;/ref&amp;gt;&lt;br /&gt;
|bgcolor=lime| Hard&lt;br /&gt;
| MingW non-multithreading&lt;br /&gt;
|bgcolor=lime| [http://luke.dashjr.org/programs/bitcoin/files/charts/CVE-2012-1910.html 99%]&lt;br /&gt;
|-&lt;br /&gt;
| [[#BIP-0016|BIP 0016]]&lt;br /&gt;
| 2012-04-01&lt;br /&gt;
| All Bitcoin clients&lt;br /&gt;
|bgcolor=yellow| Fake Conf&amp;lt;ref name=&amp;quot;FakeConf&amp;quot;&amp;gt;Attacker can double-spend with 1 confirmation&amp;lt;/ref&amp;gt;&lt;br /&gt;
|bgcolor=yellow| Miners&amp;lt;ref name=&amp;quot;MinerEasy&amp;quot;&amp;gt;Attacking requires mining block(s)&amp;lt;/ref&amp;gt;&lt;br /&gt;
| Mandatory P2SH protocol update&lt;br /&gt;
|bgcolor=yellow| [http://luke.dashjr.org/programs/bitcoin/files/charts/BIP-0016.html 88%]&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2012-2459|CVE-2012-2459]]&lt;br /&gt;
| 2012-05-14&lt;br /&gt;
| bitcoind and Bitcoin-Qt&lt;br /&gt;
|bgcolor=pink| Netsplit&amp;lt;ref name=&amp;quot;Netsplit&amp;quot;/&amp;gt;&lt;br /&gt;
|bgcolor=pink| Easy&lt;br /&gt;
| Block hash collision (via merkle root)&lt;br /&gt;
|bgcolor=yellow| [http://luke.dashjr.org/programs/bitcoin/files/charts/CVE-2012-2459.html 88%]&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2012-3584|CVE-2012-3584]]&lt;br /&gt;
| 2012-06-16&lt;br /&gt;
| Bitcoin p2p protocol&lt;br /&gt;
|bgcolor=yellow| DoS&amp;lt;ref name=&amp;quot;DoS&amp;quot;/&amp;gt;&lt;br /&gt;
|bgcolor=yellow| Miners&amp;lt;ref name=&amp;quot;MinerEasy&amp;quot;/&amp;gt;&lt;br /&gt;
| Poor miner incentives&lt;br /&gt;
| (no fix)&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2012-3789|CVE-2012-3789]]&lt;br /&gt;
| 2012-06-20&lt;br /&gt;
| bitcoind and Bitcoin-Qt&lt;br /&gt;
|bgcolor=yellow| DoS&amp;lt;ref name=&amp;quot;DoS&amp;quot;/&amp;gt;&lt;br /&gt;
| Easy&lt;br /&gt;
| Multiple DoS Vulnerabilties in Satoshi Bitcoin client&lt;br /&gt;
|bgcolor=pink| [http://luke.dashjr.org/programs/bitcoin/files/charts/CVE-2012-3789 &amp;gt;74%]&lt;br /&gt;
|-&lt;br /&gt;
| [[#BIP-0034|BIP 0034]]&lt;br /&gt;
| Future&lt;br /&gt;
| All Bitcoin clients&lt;br /&gt;
|bgcolor=yellow| Fake Conf&amp;lt;ref name=&amp;quot;FakeConf&amp;quot;/&amp;gt;&lt;br /&gt;
|bgcolor=yellow| Miners&amp;lt;ref name=&amp;quot;MinerEasy&amp;quot;&amp;gt;Attacking requires mining block(s)&amp;lt;/ref&amp;gt;&lt;br /&gt;
| Mandatory block protocol update&lt;br /&gt;
|bgcolor=pink| [http://luke.dashjr.org/programs/bitcoin/files/charts/BIP-0034.html 47%]&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2012-4682|CVE-2012-4682]]&lt;br /&gt;
| &lt;br /&gt;
| bitcoind and Bitcoin-Qt&lt;br /&gt;
|bgcolor=yellow| DoS&amp;lt;ref name=&amp;quot;DoS&amp;quot;/&amp;gt;&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|bgcolor=pink| [http://luke.dashjr.org/programs/bitcoin/files/charts/CVE-2012-4682.html 47%]&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2012-4683|CVE-2012-4683]]&lt;br /&gt;
| &lt;br /&gt;
| bitcoind and Bitcoin-Qt&lt;br /&gt;
|bgcolor=yellow| DoS&amp;lt;ref name=&amp;quot;DoS&amp;quot;/&amp;gt;&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|bgcolor=pink| [http://luke.dashjr.org/programs/bitcoin/files/charts/CVE-2012-4683.html 47%]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&lt;br /&gt;
== CVE-2010-5137 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2010-07-28&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; OP_LSHIFT crash&lt;br /&gt;
 &amp;lt;b&amp;gt;Fix Deployment:&amp;lt;/b&amp;gt; 100%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| bitcoind&amp;lt;br&amp;gt;wxBitcoin || * - 0.3.4 || 0.3.5&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
On July 28 2010, two bugs were discovered and demonstrated on the test network. One caused bitcoin to crash on some machines when processing a transaction containing an OP_LSHIFT. This was never exploited on the main network, and was fixed by Bitcoin version 0.3.5.&lt;br /&gt;
&lt;br /&gt;
After these bugs were discovered, many currently-unused script words were disabled for safety.&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
* [http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-5137 US-CERT/NIST]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== CVE-2010-5141 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2010-07-28&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; ?&lt;br /&gt;
 &amp;lt;b&amp;gt;Fix Deployment:&amp;lt;/b&amp;gt; 100%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| bitcoind&amp;lt;br&amp;gt;wxBitcoin || * - 0.3.4 || 0.3.5&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
On July 28 2010, two bugs were discovered and demonstrated on the test network. One exploited a bug in the transaction handling code and allowed an attacker to spend coins that they did not own. This was never exploited on the main network, and was fixed by Bitcoin version 0.3.5.&lt;br /&gt;
&lt;br /&gt;
After these bugs were discovered, many currently-unused script words were disabled for safety.&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
* [http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-5141 US-CERT/NIST]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== CVE-2010-5138 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2010-07-29&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; Unlimited SigOp DoS&lt;br /&gt;
 &amp;lt;b&amp;gt;Fix Deployment:&amp;lt;/b&amp;gt; 100%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| bitcoind&amp;lt;br&amp;gt;wxBitcoin || * - 0.3.? || 0.3.?&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
On July 29 2010, it was discovered that block [http://blockexplorer.com/block/00000000000997f9fd2fe1ee376293ef8c42ad09193a5d2086dddf8e5c426b56 71036] contained several transactions with a ton of OP_CHECKSIG commands. There should only ever be one such command. This caused every node to do extra unnecessary work, and it could have been used as a denial-of-service attack. A new version of Bitcoin was quickly released. The new version did not cause a fork on the main network, though it did cause one on the test network (where someone had played around with the attack more).&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
* [http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-5138 US-CERT/NIST]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== CVE-2010-5139 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2010-08-15&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; Combined output overflow&lt;br /&gt;
 &amp;lt;b&amp;gt;Fix Deployment:&amp;lt;/b&amp;gt; 100%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| bitcoind&amp;lt;br&amp;gt;wxBitcoin || * - 0.3.10 || 0.3.11&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
On August 15 2010, it was [http://bitcointalk.org/index.php?topic=822.0 discovered] that block 74638 contained a transaction that created over 184 billion bitcoins for two different addresses. This was possible because the code used for checking transactions before including them in a block didn&#039;t account for the case of outputs so large that they overflowed when summed. A new version was published within a few hours of the discovery. The block chain had to be forked. Although many unpatched nodes continued to build on the &amp;quot;bad&amp;quot; block chain, the &amp;quot;good&amp;quot; block chain overtook it at a block height of 74691. The bad transaction no longer exists for people using the longest chain.&lt;br /&gt;
&lt;br /&gt;
The block and transaction:&lt;br /&gt;
&amp;lt;pre&amp;gt;CBlock(hash=0000000000790ab3, ver=1, hashPrevBlock=0000000000606865, hashMerkleRoot=618eba,&lt;br /&gt;
nTime=1281891957, nBits=1c00800e, nNonce=28192719, vtx=2)&lt;br /&gt;
  CTransaction(hash=012cd8, ver=1, vin.size=1, vout.size=1, nLockTime=0)&lt;br /&gt;
    CTxIn(COutPoint(000000, -1), coinbase 040e80001c028f00)&lt;br /&gt;
    CTxOut(nValue=50.51000000, scriptPubKey=0x4F4BA55D1580F8C3A8A2C7)&lt;br /&gt;
  CTransaction(hash=1d5e51, ver=1, vin.size=1, vout.size=2, nLockTime=0)&lt;br /&gt;
    CTxIn(COutPoint(237fe8, 0), scriptSig=0xA87C02384E1F184B79C6AC)&lt;br /&gt;
    CTxOut(nValue=92233720368.54275808, scriptPubKey=OP_DUP OP_HASH160 0xB7A7)&lt;br /&gt;
    CTxOut(nValue=92233720368.54275808, scriptPubKey=OP_DUP OP_HASH160 0x1512)&lt;br /&gt;
  vMerkleTree: 012cd8 1d5e51 618eba&lt;br /&gt;
&lt;br /&gt;
Block hash: 0000000000790ab3f22ec756ad43b6ab569abf0bddeb97c67a6f7b1470a7ec1c&lt;br /&gt;
Transaction hash: 1d5e512a9723cbef373b970eb52f1e9598ad67e7408077a82fdac194b65333c9&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
* [https://bitcointalk.org/index.php?topic=822.0 Discovery]&lt;br /&gt;
* [http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-5139 US-CERT/NIST]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== CVE-2010-5140 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2010-09-29&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; Never confirming transactions&lt;br /&gt;
 &amp;lt;b&amp;gt;Fix Deployment:&amp;lt;/b&amp;gt; 100%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| bitcoind&amp;lt;br&amp;gt;wxBitcoin || * - 0.3.12 || 0.3.13&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Around September 29, 2010, people started [http://www.bitcoin.org/smf/index.php?topic=1306.0 reporting] that their sent transactions would not confirm. This happened because people modified Bitcoin to send sub-0.01 transactions without any fees. A 0.01 fee was at that time required by the network for such transactions (essentially prohibiting them), so the transactions remained at 0 confirmations forever. This became a more serious issue because Bitcoin would send transactions using bitcoins gotten from transactions with 0 confirmations, and these resulting transactions would also never confirm. Because Bitcoin tends to prefer sending smaller coins, these invalid transactions quickly multiplied, contaminating the wallets of everyone who received them.&lt;br /&gt;
&lt;br /&gt;
Bitcoin was changed to only select coins with at least 1 confirmation. The remaining sub-0.01 transactions were cleared by generators who modified their version of Bitcoin to not require the micropayment fee. It took a while for everything to get cleared, though, because many of the intermediate transactions had been forgotten by the network by this point and had to be rebroadcast by the original senders.&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
* [http://www.bitcoin.org/smf/index.php?topic=1306.0 Initial reports]&lt;br /&gt;
* [http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-5140 US-CERT/NIST]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== CVE-2011-4447 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2011-11-11&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; Wallet non-encryption&lt;br /&gt;
 &amp;lt;b&amp;gt;Fix Deployment:&amp;lt;/b&amp;gt; 97%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| bitcoind&amp;lt;br&amp;gt;wxBitcoin || 0.4.0 - 0.4.1rc6 || 0.4.1&amp;lt;br&amp;gt;0.5.0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
* [https://bitcointalk.org/index.php?topic=51604.0 Announcement]&lt;br /&gt;
* [https://bitcointalk.org/index.php?topic=51474.0 Finding]&lt;br /&gt;
* [http://bitcoin.org/releases/2011/11/21/v0.5.0.html 0.5.0]&lt;br /&gt;
* [http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2011-4447 US-CERT/NIST]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== CVE-2012-1909 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2012-03-07&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; Transaction overwriting&lt;br /&gt;
 &amp;lt;b&amp;gt;Fix Deployment:&amp;lt;/b&amp;gt; 88%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| Bitcoin protocol || Before March 15th, 2012 || BIP 30&lt;br /&gt;
|-&lt;br /&gt;
| Bitcoin-Qt&amp;lt;br&amp;gt;bitcoind || * - 0.4.4rc2&amp;lt;br&amp;gt;0.5.0rc1 - 0.5.0.4rc2&amp;lt;br&amp;gt;0.5.1rc1 - 0.5.3rc2&amp;lt;br&amp;gt;0.6.0rc1 - 0.6.0rc2 || 0.4.4&amp;lt;br&amp;gt;0.5.0.4&amp;lt;br&amp;gt;0.5.3&amp;lt;br&amp;gt;0.6.0rc3&lt;br /&gt;
|-&lt;br /&gt;
| wxBitcoin || ALL || NONE&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
* [https://bitcointalk.org/index.php?topic=67738.0 Announcement]&lt;br /&gt;
* [https://en.bitcoin.it/wiki/BIP_0030 Fix]&lt;br /&gt;
* [https://bugs.gentoo.org/show_bug.cgi?id=407793 Gentoo bug tracker]&lt;br /&gt;
* [http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2012-1909 US-CERT/NIST]&lt;br /&gt;
&lt;br /&gt;
== CVE-2012-1910 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2012-03-17&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; MingW non-multithreading&lt;br /&gt;
 &amp;lt;b&amp;gt;Fix Deployment:&amp;lt;/b&amp;gt; 99%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| Bitcoin-Qt for Windows || 0.5.0rc1 - 0.5.0.4&amp;lt;br&amp;gt;0.5.1rc1 - 0.5.3.0&amp;lt;br&amp;gt;0.6.0rc1 - 0.6.0rc3 || 0.5.0.5&amp;lt;br&amp;gt;0.5.3.1&amp;lt;br&amp;gt;0.5.4&amp;lt;br&amp;gt;0.6.0rc4&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
* [https://bitcointalk.org/index.php?topic=69120.0 Announcement]&lt;br /&gt;
* [http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2012-1910 US-CERT/NIST]&lt;br /&gt;
&lt;br /&gt;
== BIP-0016 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2012-04-01&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; Mandatory P2SH protocol update&lt;br /&gt;
 &amp;lt;b&amp;gt;Deployment:&amp;lt;/b&amp;gt; 88%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| Bitcoin-Qt&amp;lt;br&amp;gt;bitcoind || * - 0.4.4&amp;lt;br&amp;gt;0.5.0rc1 - 0.5.0.5&amp;lt;br&amp;gt;0.5.1rc1 - 0.5.3&amp;lt;br&amp;gt;0.6.0rc1 || 0.4.5&amp;lt;br&amp;gt;0.5.0.6&amp;lt;br&amp;gt;0.5.4rc1&amp;lt;br&amp;gt;0.6.0rc2&lt;br /&gt;
|-&lt;br /&gt;
| wxBitcoin || ALL || NONE&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
* [[BIP 0016]]&lt;br /&gt;
&lt;br /&gt;
== CVE-2012-2459 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2012-05-14&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; Block hash collision (via merkle tree)&lt;br /&gt;
 &amp;lt;b&amp;gt;Fix Deployment:&amp;lt;/b&amp;gt; 88%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| Bitcoin-Qt&amp;lt;br&amp;gt;bitcoind || * - 0.4.6rc1&amp;lt;br&amp;gt;0.5.0rc1 - 0.5.5rc1&amp;lt;br&amp;gt;0.6.0rc1 - 0.6.0.7rc1&amp;lt;br&amp;gt;0.6.1rc1 - 0.6.1rc1 || 0.4.6&amp;lt;br&amp;gt;0.5.5&amp;lt;br&amp;gt;0.6.0.7&amp;lt;br&amp;gt;0.6.1rc2&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Block hash collisions can easily be made by duplicating transactions in the merkle tree.&lt;br /&gt;
Such a collision is invalid, but if recorded (as Bitcoin-Qt and bitcoind prior to 0.6.1 did) would prevent acceptance of the legitimate block with the same hash.&lt;br /&gt;
This could be used to fork the blockchain, including deep double-spend attacks.&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
* [https://bitcointalk.org/?topic=81749 Announcement]&lt;br /&gt;
* [https://bugs.gentoo.org/show_bug.cgi?id=415973 Gentoo bug tracker]&lt;br /&gt;
* [http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2012-2459 US-CERT/NIST]&lt;br /&gt;
* [https://bitcointalk.org/?topic=102395 Full Disclosure]&lt;br /&gt;
&lt;br /&gt;
== CVE-2012-3789 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2012-06-20&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; Multiple DoS Vulnerabilties in Satoshi Bitcoin client&lt;br /&gt;
 &amp;lt;b&amp;gt;Fix Deployment:&amp;lt;/b&amp;gt; &amp;gt;74%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| Bitcoin-Qt&amp;lt;br&amp;gt;bitcoind || * - 0.4.7rc2&amp;lt;br&amp;gt;0.5.0rc1 - 0.5.6rc2&amp;lt;br&amp;gt;0.6.0rc1 - 0.6.0.8rc2&amp;lt;br&amp;gt;0.6.1rc1 - 0.6.2.2 || 0.4.7rc3&amp;lt;br&amp;gt;0.5.6rc3&amp;lt;br&amp;gt;0.6.0.9rc1&amp;lt;br&amp;gt;0.6.3rc1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
* [[CVE-2012-3789]]&lt;br /&gt;
* [https://bitcointalk.org/?topic=88734 0.6.3rc1 Announcement]&lt;br /&gt;
* [http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2012-3789 US-CERT/NIST]&lt;br /&gt;
&lt;br /&gt;
== BIP-0034 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; Future&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; Mandatory block protocol update&lt;br /&gt;
 &amp;lt;b&amp;gt;Deployment:&amp;lt;/b&amp;gt; 47%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| Bitcoin-Qt&amp;lt;br&amp;gt;bitcoind || * - 0.4.7&amp;lt;br&amp;gt;0.5.0rc1 - 0.5.7&amp;lt;br&amp;gt;0.6.0rc1 - 0.6.0.9&amp;lt;br&amp;gt;0.6.1rc1 - 0.6.3 || 0.4.8rc1&amp;lt;br&amp;gt;0.5.7rc1&amp;lt;br&amp;gt;0.6.0.10rc1&amp;lt;br&amp;gt;0.6.4rc1&amp;lt;br&amp;gt;0.7.0rc1&lt;br /&gt;
|-&lt;br /&gt;
| wxBitcoin || ALL || NONE&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
* [[BIP 0034]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Definitions==&lt;br /&gt;
&lt;br /&gt;
A critical vulnerability is one that will have disastrous consequences if it is exploited.  A serious vulnerability is one that will have serious consequences if it is exploited&amp;lt;ref&amp;gt;[http://bitcointalk.org/index.php?topic=88892.0 http://bitcointalk.org/index.php?topic=88892.0]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
&lt;br /&gt;
* [[Changelog]]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Cateogory:Security]]&lt;/div&gt;</summary>
		<author><name>Sergio Demian Lerner</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=CVE-2012-3789&amp;diff=34823</id>
		<title>CVE-2012-3789</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=CVE-2012-3789&amp;diff=34823"/>
		<updated>2013-01-08T17:53:10Z</updated>

		<summary type="html">&lt;p&gt;Sergio Demian Lerner: Created page with &amp;quot;== Multiple DoS Vulnerabilties in Satoshi Bitcoin client ==  Private Release Date: 12-MAY-2012&amp;lt;br /&amp;gt; Public Release Date: 08-JAN-2013&amp;lt;br /&amp;gt;  === Systems Affected === ---------...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Multiple DoS Vulnerabilties in Satoshi Bitcoin client ==&lt;br /&gt;
&lt;br /&gt;
Private Release Date: 12-MAY-2012&amp;lt;br /&amp;gt;&lt;br /&gt;
Public Release Date: 08-JAN-2013&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Systems Affected ===&lt;br /&gt;
----------------&lt;br /&gt;
&lt;br /&gt;
- Satoshi Bitcoin Client (Bitcoin-Qt, bitcoind)&amp;lt;br /&amp;gt;&lt;br /&gt;
- All Bitcoin clients that mimic Satoshi client behaviour related to orphan transactions&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Affected Versions ===&lt;br /&gt;
-----------------&lt;br /&gt;
&lt;br /&gt;
- Bitcoin version 0.5.3, released 14 March 2012&amp;lt;br /&amp;gt;&lt;br /&gt;
- Bitcoin version 0.5.3.1 released 16 March 2012&amp;lt;br /&amp;gt;&lt;br /&gt;
- Bitcoin version 0.6.0 released 30 March 2012&amp;lt;br /&amp;gt;&lt;br /&gt;
- Bitcoin version 0.6.1 released 4 May 2012&amp;lt;br /&amp;gt;&lt;br /&gt;
- Bitcoin version 0.6.2 released 8 May 2012&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Overview ===&lt;br /&gt;
--------&lt;br /&gt;
&lt;br /&gt;
This report contains information regarding two new vulnerabilities discovered in May-2012. The more severe one allows a &lt;br /&gt;
connected peer to hang the victim&#039;s client application in less than 20 minutes by sending a stream of specially &lt;br /&gt;
crafted transactions, as a denial-of-service attack.&lt;br /&gt;
&lt;br /&gt;
=== Background ===&lt;br /&gt;
----------&lt;br /&gt;
&lt;br /&gt;
Each peer defines a transaction as &amp;quot;Orhpan&amp;quot; if the transaction references a parent transaction (previous output) which is&lt;br /&gt;
neither part of a block in the current best chain, nor it is  in the in-memory transaction pool.&lt;br /&gt;
Before version 0.5.3 of Satoshi Bitcoin client, orphan transactions were stored in a temporary table in memory until the parent transactions could be located in a block or the parent transaction was forwarded by a peer.&lt;br /&gt;
The storage for ophan transaction was unlimited. This feature allowed an attacker to perform a DoS attack by sending transactions continuously until the victim&#039;s virtual memory was filled and the victim&#039;s operating system began trashing. This situation probably leads to the victim&#039;s computer or application to hang. &lt;br /&gt;
The time needed for this DoS attack varies depending on the link bandwidth between the attacker and the victim, and the victim&#039;s RAM size. For an average computer and Internet connection it takes approximately 12 hours.&lt;br /&gt;
&lt;br /&gt;
The vulnerability was discovered by Sergio Demian Lerner and communicated to the Bitcoin.org development team, who developed and applied a patch (https://github.com/bitcoin/bitcoin/pull/911) that was incorporated in version 0.5.3. &lt;br /&gt;
The patch limits the number of orphan transactions that are stored in memory and randomly erases a previous stored transaction on the arrival of a new one, if the memory table becomes full.&lt;br /&gt;
&lt;br /&gt;
Unfortunately the patch is ineffective and allows two new vectors of attack that are more severe than the original attack. The patched version still allows an attacker to fill the victim&#039;s memory with orphan transactions (see vulnerability 1) and it also allows an attacker to hang the victim&#039;s client application (see vulnerability 2) in less than 20 minutes. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Vulnerability 1 Details ===&lt;br /&gt;
-----------------------&lt;br /&gt;
&lt;br /&gt;
Orphan transactions are stored in the table mapOrphanTransactions. The patch limits the number of entries to 10000 (constant MAX_ORPHAN_TRANSACTIONS). This number is arbitrary, and the criteria for the selection of the constant is unknown. Because transactions are not limited in size, is easy to create an orphan transaction whose size reaches &lt;br /&gt;
1 magabyte. If the transaction is built with thousands of random inputs (prevouts which are unknown to the victim app) then also the table mapOrphanTransactionsByPrev can fill the entire RAM. Prevouts whose hash is chosen at random would make trashing worse since virtual memory page faults will become inevitable. &lt;br /&gt;
&lt;br /&gt;
Suppose the attacker wants the victim to store 4 Gigabytes of data in virtual memory. Assume a 50 Kb/sec connection bandwidth.&lt;br /&gt;
Then the attack takes approximately 11 hours.&lt;br /&gt;
&lt;br /&gt;
=== Patching vulnerability 1 ===&lt;br /&gt;
------------------------&lt;br /&gt;
&lt;br /&gt;
The application must limit the amount of memory used by tables mapOrphanTransactions and mapOrphanTransactionsByPrev, either by counting the number of bytes used or by limiting the maximum size of each orphan transaction.&lt;br /&gt;
&lt;br /&gt;
Added note: Bitcoin version 0.6.3 and later only store orphan transactions whose size is less than 5000 byles. This limits the amount of memory that mapOrphanTransactions can consume, totalling no more than 50 Mbytes. Since the &amp;quot;map&amp;quot; data structure has a significant overhead when storing a single element, 5000 transactions that link to many random missing previns can force mapOrphanTransactionsByPrev to consume as high as 200 additional megabytes.&lt;br /&gt;
&lt;br /&gt;
Some extra security provisions may be implemented:&lt;br /&gt;
&lt;br /&gt;
* Prioritize orphan transactions that provide a proof of work per input (network protocol must be changed).&lt;br /&gt;
* Limit the amount of transactions that each peer can send depending on the peer connection time  (older peers get more bandwidth)&lt;br /&gt;
&lt;br /&gt;
=== Vulnerability 2 Details ===&lt;br /&gt;
-----------------------&lt;br /&gt;
&lt;br /&gt;
Each time a transaction must be erased from mapOrphanTransactions, all references to parent transactions must be erased from the table mapOrphanTransactionsByPrev too (see EraseOrphanTx()). The method wrongly assumes that the number of &lt;br /&gt;
associations between a parent transaction and its potential childs is low, and so the code iterates through all pairs parent/child until the transaction to be erased is found. Code excerpt:&lt;br /&gt;
&lt;br /&gt;
 BOOST_FOREACH(const CTxIn&amp;amp; txin, tx.vin)&lt;br /&gt;
    {&lt;br /&gt;
        for (multimap&amp;lt;uint256, CDataStream*&amp;gt;::iterator mi = mapOrphanTransactionsByPrev.lower_bound(txin.prevout.hash);&lt;br /&gt;
             mi != mapOrphanTransactionsByPrev.upper_bound(txin.prevout.hash);)&lt;br /&gt;
        {&lt;br /&gt;
            if ((*mi).second == pvMsg)&lt;br /&gt;
                mapOrphanTransactionsByPrev.erase(mi++);&lt;br /&gt;
            else&lt;br /&gt;
                mi++;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Each reference to a previous transaction is specified by a prevout, which is a hash of the transaction and an index of the outpoint referred. An attacker can send 10000 transactions that whose inputs refer to the same parent transaction (same hash), but specifying different indexes. Index numbers can be chosen incrementally (from 1 to 1M) since indexes cannot be verified to be out of range for a (still unknown) parent transaction.&lt;br /&gt;
&lt;br /&gt;
The attack is strengthened by the fact that client applications do not check for empty scripts in inputs, so each input size can be as low as 41 bytes. 11K transaction containing 100 fake inputs each is enough to hang a Satoshi client in an Intel Core 2 CPU 4300 running on a local testnet in less than a minute. If a connection of 50 Kb/sec is assumed, then the attack takes less than 20 minutes. Note that only one core of the CPU gets 100% of usage, because the client runs a single thread to process all messages from peers. Simulations were carried on on a local testnet, so the outcome of the attack on a real node (with plenty of peer connections) was not evaluated.&lt;br /&gt;
&lt;br /&gt;
=== Patching vulnerability 2 ===&lt;br /&gt;
------------------------&lt;br /&gt;
&lt;br /&gt;
One possible change is to modify the mapOrphanTransactionsByPrev data structure from:&lt;br /&gt;
&lt;br /&gt;
 multimap&amp;lt;uint256, CDataStream*&amp;gt; mapOrphanTransactionsByPrev;&lt;br /&gt;
&lt;br /&gt;
to:&lt;br /&gt;
&lt;br /&gt;
 map&amp;lt;uint256, map&amp;lt;uint256,CDataStream*&amp;gt; &amp;gt; mapOrphanTransactionsByPrev;&lt;br /&gt;
&lt;br /&gt;
Example new EraseOrphanTx() method (not tested): &lt;br /&gt;
&lt;br /&gt;
 void static EraseOrphanTx(uint256 hash)&lt;br /&gt;
 {&lt;br /&gt;
    if (!mapOrphanTransactions.count(hash))&lt;br /&gt;
        return;&lt;br /&gt;
    const CDataStream* pvMsg = mapOrphanTransactions[hash];&lt;br /&gt;
    CTransaction tx;&lt;br /&gt;
    BOOST_FOREACH(const CTxIn&amp;amp; txin, tx.vin)&lt;br /&gt;
    {&lt;br /&gt;
       mapOrphanTransactionsByPrev[txin.prevout.hash].erase(hash);&lt;br /&gt;
    }&lt;br /&gt;
    mapOrphanTransactions.erase(hash);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Added note: Bitcoin version 0.6.3 and later includes this modification.&lt;br /&gt;
&lt;br /&gt;
=== Disclosure Timeline ===&lt;br /&gt;
-------------------&lt;br /&gt;
&lt;br /&gt;
* 2012-05-12 - Vulnerability reported to Gavin Andressen&lt;br /&gt;
* 2012-05-17 - Gavin Andressen patches ready for review&lt;br /&gt;
* 2012-06-20 - 0.6.3rc1 available for testing&lt;br /&gt;
* 2012-06-25 - Bitcoin version 0.6.3 released, fixing the vulnerabilities.&lt;br /&gt;
* 2013-01-08 - Vulnerability disclosure&lt;br /&gt;
&lt;br /&gt;
=== Credit ===&lt;br /&gt;
------&lt;br /&gt;
&lt;br /&gt;
This vulnerability was discovered by Sergio Demian Lerner, from Certimix.com, who also did&lt;br /&gt;
the vulnerability research and report editing for the public good.&lt;/div&gt;</summary>
		<author><name>Sergio Demian Lerner</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Common_Vulnerabilities_and_Exposures&amp;diff=34819</id>
		<title>Common Vulnerabilities and Exposures</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Common_Vulnerabilities_and_Exposures&amp;diff=34819"/>
		<updated>2013-01-08T17:41:01Z</updated>

		<summary type="html">&lt;p&gt;Sergio Demian Lerner: /* CVE-2012-3789 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!style=&amp;quot;width:14ex&amp;quot;| CVE&lt;br /&gt;
! Announced !! Affects !! Severity !! Attack is... !! Flaw !! Net&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2010-5137|CVE-2010-5137]]&lt;br /&gt;
| 2010-07-28&lt;br /&gt;
| wxBitcoin and bitcoind&lt;br /&gt;
|bgcolor=yellow| DoS&amp;lt;ref name=&amp;quot;DoS&amp;quot;&amp;gt;Attacker can disable some functionality, for example by crashing clients&amp;lt;/ref&amp;gt;&lt;br /&gt;
|bgcolor=pink| Easy&lt;br /&gt;
| OP_LSHIFT crash&lt;br /&gt;
|bgcolor=lime| 100%&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2010-5141|CVE-2010-5141]]&lt;br /&gt;
| 2010-07-28&lt;br /&gt;
| wxBitcoin and bitcoind&lt;br /&gt;
|bgcolor=pink| Theft&amp;lt;ref name=&amp;quot;Theft&amp;quot;&amp;gt;Attacker can take or create money outside known network rules&amp;lt;/ref&amp;gt;&lt;br /&gt;
|bgcolor=pink| Easy&lt;br /&gt;
|&lt;br /&gt;
|bgcolor=lime| 100%&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2010-5138|CVE-2010-5138]]&lt;br /&gt;
| 2010-07-29&lt;br /&gt;
| wxBitcoin and bitcoind&lt;br /&gt;
|bgcolor=yellow| DoS&amp;lt;ref name=&amp;quot;DoS&amp;quot;/&amp;gt;&lt;br /&gt;
|bgcolor=pink| Easy&lt;br /&gt;
| Unlimited SigOp DoS&lt;br /&gt;
|bgcolor=lime| 100%&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2010-5139|CVE-2010-5139]]&lt;br /&gt;
| 2010-08-15&lt;br /&gt;
| wxBitcoin and bitcoind&lt;br /&gt;
|bgcolor=pink| Theft&amp;lt;ref name=&amp;quot;Theft&amp;quot;/&amp;gt;&lt;br /&gt;
|bgcolor=pink| Easy&lt;br /&gt;
| Combined output overflow&lt;br /&gt;
|bgcolor=lime| 100%&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2010-5140|CVE-2010-5140]]&lt;br /&gt;
| 2010-09-29&lt;br /&gt;
| wxBitcoin and bitcoind&lt;br /&gt;
|bgcolor=yellow| DoS&amp;lt;ref name=&amp;quot;DoS&amp;quot;/&amp;gt;&lt;br /&gt;
|bgcolor=pink| Easy&lt;br /&gt;
| Never confirming transactions&lt;br /&gt;
|bgcolor=lime| 100%&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2011-4447|CVE-2011-4447]]&lt;br /&gt;
| 2011-11-11&lt;br /&gt;
| wxBitcoin and bitcoind&lt;br /&gt;
|bgcolor=pink| Exposure&amp;lt;ref name=&amp;quot;Exposure&amp;quot;&amp;gt;Attacker can access user data outside known acceptable methods&amp;lt;/ref&amp;gt;&lt;br /&gt;
|bgcolor=lime| Hard&lt;br /&gt;
| Wallet non-encryption&lt;br /&gt;
|bgcolor=lime| [http://luke.dashjr.org/programs/bitcoin/files/charts/CVE-2011-4447.html 97%]&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2012-1909|CVE-2012-1909]]&lt;br /&gt;
| 2012-03-07&lt;br /&gt;
| Bitcoin protocol and all clients&lt;br /&gt;
|bgcolor=pink| Netsplit&amp;lt;ref name=&amp;quot;Netsplit&amp;quot;&amp;gt;Attacker can create multiple views of the network, enabling [[double-spending]] with over 1 confirmation&amp;lt;/ref&amp;gt;&lt;br /&gt;
|bgcolor=lime| Very hard&lt;br /&gt;
| Transaction overwriting&lt;br /&gt;
|bgcolor=yellow| [http://luke.dashjr.org/programs/bitcoin/files/charts/CVE-2012-1909.html 88%]&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2012-1910|CVE-2012-1910]]&lt;br /&gt;
| 2012-03-17&lt;br /&gt;
| Bitcoin-Qt for Windows&lt;br /&gt;
|bgcolor=pink| Unknown&amp;lt;ref name=&amp;quot;Unknown&amp;quot;&amp;gt;Extent of possible abuse is unknown&amp;lt;/ref&amp;gt;&lt;br /&gt;
|bgcolor=lime| Hard&lt;br /&gt;
| MingW non-multithreading&lt;br /&gt;
|bgcolor=lime| [http://luke.dashjr.org/programs/bitcoin/files/charts/CVE-2012-1910.html 99%]&lt;br /&gt;
|-&lt;br /&gt;
| [[#BIP-0016|BIP 0016]]&lt;br /&gt;
| 2012-04-01&lt;br /&gt;
| All Bitcoin clients&lt;br /&gt;
|bgcolor=yellow| Fake Conf&amp;lt;ref name=&amp;quot;FakeConf&amp;quot;&amp;gt;Attacker can double-spend with 1 confirmation&amp;lt;/ref&amp;gt;&lt;br /&gt;
|bgcolor=yellow| Miners&amp;lt;ref name=&amp;quot;MinerEasy&amp;quot;&amp;gt;Attacking requires mining block(s)&amp;lt;/ref&amp;gt;&lt;br /&gt;
| Mandatory P2SH protocol update&lt;br /&gt;
|bgcolor=yellow| [http://luke.dashjr.org/programs/bitcoin/files/charts/BIP-0016.html 88%]&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2012-2459|CVE-2012-2459]]&lt;br /&gt;
| 2012-05-14&lt;br /&gt;
| bitcoind and Bitcoin-Qt&lt;br /&gt;
|bgcolor=pink| Netsplit&amp;lt;ref name=&amp;quot;Netsplit&amp;quot;/&amp;gt;&lt;br /&gt;
|bgcolor=pink| Easy&lt;br /&gt;
| Block hash collision (via merkle root)&lt;br /&gt;
|bgcolor=yellow| [http://luke.dashjr.org/programs/bitcoin/files/charts/CVE-2012-2459.html 88%]&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2012-3584|CVE-2012-3584]]&lt;br /&gt;
| 2012-06-16&lt;br /&gt;
| Bitcoin p2p protocol&lt;br /&gt;
|bgcolor=yellow| DoS&amp;lt;ref name=&amp;quot;DoS&amp;quot;/&amp;gt;&lt;br /&gt;
|bgcolor=yellow| Miners&amp;lt;ref name=&amp;quot;MinerEasy&amp;quot;/&amp;gt;&lt;br /&gt;
| Poor miner incentives&lt;br /&gt;
| (no fix)&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2012-3789|CVE-2012-3789]]&lt;br /&gt;
| 2012-06-20&lt;br /&gt;
| bitcoind and Bitcoin-Qt&lt;br /&gt;
|bgcolor=yellow| DoS&amp;lt;ref name=&amp;quot;DoS&amp;quot;/&amp;gt;&lt;br /&gt;
| TBD&lt;br /&gt;
| TBD&lt;br /&gt;
|bgcolor=pink| [http://luke.dashjr.org/programs/bitcoin/files/charts/CVE-2012-3789 74%]&lt;br /&gt;
|-&lt;br /&gt;
| [[#BIP-0034|BIP 0034]]&lt;br /&gt;
| Future&lt;br /&gt;
| All Bitcoin clients&lt;br /&gt;
|bgcolor=yellow| Fake Conf&amp;lt;ref name=&amp;quot;FakeConf&amp;quot;/&amp;gt;&lt;br /&gt;
|bgcolor=yellow| Miners&amp;lt;ref name=&amp;quot;MinerEasy&amp;quot;&amp;gt;Attacking requires mining block(s)&amp;lt;/ref&amp;gt;&lt;br /&gt;
| Mandatory block protocol update&lt;br /&gt;
|bgcolor=pink| [http://luke.dashjr.org/programs/bitcoin/files/charts/BIP-0034.html 47%]&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2012-4682|CVE-2012-4682]]&lt;br /&gt;
| &lt;br /&gt;
| bitcoind and Bitcoin-Qt&lt;br /&gt;
|bgcolor=yellow| DoS&amp;lt;ref name=&amp;quot;DoS&amp;quot;/&amp;gt;&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|bgcolor=pink| [http://luke.dashjr.org/programs/bitcoin/files/charts/CVE-2012-4682.html 47%]&lt;br /&gt;
|-&lt;br /&gt;
| [[#CVE-2012-4683|CVE-2012-4683]]&lt;br /&gt;
| &lt;br /&gt;
| bitcoind and Bitcoin-Qt&lt;br /&gt;
|bgcolor=yellow| DoS&amp;lt;ref name=&amp;quot;DoS&amp;quot;/&amp;gt;&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|bgcolor=pink| [http://luke.dashjr.org/programs/bitcoin/files/charts/CVE-2012-4683.html 47%]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&lt;br /&gt;
== CVE-2010-5137 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2010-07-28&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; OP_LSHIFT crash&lt;br /&gt;
 &amp;lt;b&amp;gt;Fix Deployment:&amp;lt;/b&amp;gt; 100%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| bitcoind&amp;lt;br&amp;gt;wxBitcoin || * - 0.3.4 || 0.3.5&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
On July 28 2010, two bugs were discovered and demonstrated on the test network. One caused bitcoin to crash on some machines when processing a transaction containing an OP_LSHIFT. This was never exploited on the main network, and was fixed by Bitcoin version 0.3.5.&lt;br /&gt;
&lt;br /&gt;
After these bugs were discovered, many currently-unused script words were disabled for safety.&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
* [http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-5137 US-CERT/NIST]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== CVE-2010-5141 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2010-07-28&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; ?&lt;br /&gt;
 &amp;lt;b&amp;gt;Fix Deployment:&amp;lt;/b&amp;gt; 100%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| bitcoind&amp;lt;br&amp;gt;wxBitcoin || * - 0.3.4 || 0.3.5&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
On July 28 2010, two bugs were discovered and demonstrated on the test network. One exploited a bug in the transaction handling code and allowed an attacker to spend coins that they did not own. This was never exploited on the main network, and was fixed by Bitcoin version 0.3.5.&lt;br /&gt;
&lt;br /&gt;
After these bugs were discovered, many currently-unused script words were disabled for safety.&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
* [http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-5141 US-CERT/NIST]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== CVE-2010-5138 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2010-07-29&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; Unlimited SigOp DoS&lt;br /&gt;
 &amp;lt;b&amp;gt;Fix Deployment:&amp;lt;/b&amp;gt; 100%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| bitcoind&amp;lt;br&amp;gt;wxBitcoin || * - 0.3.? || 0.3.?&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
On July 29 2010, it was discovered that block [http://blockexplorer.com/block/00000000000997f9fd2fe1ee376293ef8c42ad09193a5d2086dddf8e5c426b56 71036] contained several transactions with a ton of OP_CHECKSIG commands. There should only ever be one such command. This caused every node to do extra unnecessary work, and it could have been used as a denial-of-service attack. A new version of Bitcoin was quickly released. The new version did not cause a fork on the main network, though it did cause one on the test network (where someone had played around with the attack more).&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
* [http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-5138 US-CERT/NIST]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== CVE-2010-5139 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2010-08-15&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; Combined output overflow&lt;br /&gt;
 &amp;lt;b&amp;gt;Fix Deployment:&amp;lt;/b&amp;gt; 100%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| bitcoind&amp;lt;br&amp;gt;wxBitcoin || * - 0.3.10 || 0.3.11&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
On August 15 2010, it was [http://bitcointalk.org/index.php?topic=822.0 discovered] that block 74638 contained a transaction that created over 184 billion bitcoins for two different addresses. This was possible because the code used for checking transactions before including them in a block didn&#039;t account for the case of outputs so large that they overflowed when summed. A new version was published within a few hours of the discovery. The block chain had to be forked. Although many unpatched nodes continued to build on the &amp;quot;bad&amp;quot; block chain, the &amp;quot;good&amp;quot; block chain overtook it at a block height of 74691. The bad transaction no longer exists for people using the longest chain.&lt;br /&gt;
&lt;br /&gt;
The block and transaction:&lt;br /&gt;
&amp;lt;pre&amp;gt;CBlock(hash=0000000000790ab3, ver=1, hashPrevBlock=0000000000606865, hashMerkleRoot=618eba,&lt;br /&gt;
nTime=1281891957, nBits=1c00800e, nNonce=28192719, vtx=2)&lt;br /&gt;
  CTransaction(hash=012cd8, ver=1, vin.size=1, vout.size=1, nLockTime=0)&lt;br /&gt;
    CTxIn(COutPoint(000000, -1), coinbase 040e80001c028f00)&lt;br /&gt;
    CTxOut(nValue=50.51000000, scriptPubKey=0x4F4BA55D1580F8C3A8A2C7)&lt;br /&gt;
  CTransaction(hash=1d5e51, ver=1, vin.size=1, vout.size=2, nLockTime=0)&lt;br /&gt;
    CTxIn(COutPoint(237fe8, 0), scriptSig=0xA87C02384E1F184B79C6AC)&lt;br /&gt;
    CTxOut(nValue=92233720368.54275808, scriptPubKey=OP_DUP OP_HASH160 0xB7A7)&lt;br /&gt;
    CTxOut(nValue=92233720368.54275808, scriptPubKey=OP_DUP OP_HASH160 0x1512)&lt;br /&gt;
  vMerkleTree: 012cd8 1d5e51 618eba&lt;br /&gt;
&lt;br /&gt;
Block hash: 0000000000790ab3f22ec756ad43b6ab569abf0bddeb97c67a6f7b1470a7ec1c&lt;br /&gt;
Transaction hash: 1d5e512a9723cbef373b970eb52f1e9598ad67e7408077a82fdac194b65333c9&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
* [https://bitcointalk.org/index.php?topic=822.0 Discovery]&lt;br /&gt;
* [http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-5139 US-CERT/NIST]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== CVE-2010-5140 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2010-09-29&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; Never confirming transactions&lt;br /&gt;
 &amp;lt;b&amp;gt;Fix Deployment:&amp;lt;/b&amp;gt; 100%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| bitcoind&amp;lt;br&amp;gt;wxBitcoin || * - 0.3.12 || 0.3.13&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Around September 29, 2010, people started [http://www.bitcoin.org/smf/index.php?topic=1306.0 reporting] that their sent transactions would not confirm. This happened because people modified Bitcoin to send sub-0.01 transactions without any fees. A 0.01 fee was at that time required by the network for such transactions (essentially prohibiting them), so the transactions remained at 0 confirmations forever. This became a more serious issue because Bitcoin would send transactions using bitcoins gotten from transactions with 0 confirmations, and these resulting transactions would also never confirm. Because Bitcoin tends to prefer sending smaller coins, these invalid transactions quickly multiplied, contaminating the wallets of everyone who received them.&lt;br /&gt;
&lt;br /&gt;
Bitcoin was changed to only select coins with at least 1 confirmation. The remaining sub-0.01 transactions were cleared by generators who modified their version of Bitcoin to not require the micropayment fee. It took a while for everything to get cleared, though, because many of the intermediate transactions had been forgotten by the network by this point and had to be rebroadcast by the original senders.&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
* [http://www.bitcoin.org/smf/index.php?topic=1306.0 Initial reports]&lt;br /&gt;
* [http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-5140 US-CERT/NIST]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== CVE-2011-4447 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2011-11-11&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; Wallet non-encryption&lt;br /&gt;
 &amp;lt;b&amp;gt;Fix Deployment:&amp;lt;/b&amp;gt; 97%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| bitcoind&amp;lt;br&amp;gt;wxBitcoin || 0.4.0 - 0.4.1rc6 || 0.4.1&amp;lt;br&amp;gt;0.5.0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
* [https://bitcointalk.org/index.php?topic=51604.0 Announcement]&lt;br /&gt;
* [https://bitcointalk.org/index.php?topic=51474.0 Finding]&lt;br /&gt;
* [http://bitcoin.org/releases/2011/11/21/v0.5.0.html 0.5.0]&lt;br /&gt;
* [http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2011-4447 US-CERT/NIST]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== CVE-2012-1909 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2012-03-07&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; Transaction overwriting&lt;br /&gt;
 &amp;lt;b&amp;gt;Fix Deployment:&amp;lt;/b&amp;gt; 88%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| Bitcoin protocol || Before March 15th, 2012 || BIP 30&lt;br /&gt;
|-&lt;br /&gt;
| Bitcoin-Qt&amp;lt;br&amp;gt;bitcoind || * - 0.4.4rc2&amp;lt;br&amp;gt;0.5.0rc1 - 0.5.0.4rc2&amp;lt;br&amp;gt;0.5.1rc1 - 0.5.3rc2&amp;lt;br&amp;gt;0.6.0rc1 - 0.6.0rc2 || 0.4.4&amp;lt;br&amp;gt;0.5.0.4&amp;lt;br&amp;gt;0.5.3&amp;lt;br&amp;gt;0.6.0rc3&lt;br /&gt;
|-&lt;br /&gt;
| wxBitcoin || ALL || NONE&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
* [https://bitcointalk.org/index.php?topic=67738.0 Announcement]&lt;br /&gt;
* [https://en.bitcoin.it/wiki/BIP_0030 Fix]&lt;br /&gt;
* [https://bugs.gentoo.org/show_bug.cgi?id=407793 Gentoo bug tracker]&lt;br /&gt;
* [http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2012-1909 US-CERT/NIST]&lt;br /&gt;
&lt;br /&gt;
== CVE-2012-1910 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2012-03-17&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; MingW non-multithreading&lt;br /&gt;
 &amp;lt;b&amp;gt;Fix Deployment:&amp;lt;/b&amp;gt; 99%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| Bitcoin-Qt for Windows || 0.5.0rc1 - 0.5.0.4&amp;lt;br&amp;gt;0.5.1rc1 - 0.5.3.0&amp;lt;br&amp;gt;0.6.0rc1 - 0.6.0rc3 || 0.5.0.5&amp;lt;br&amp;gt;0.5.3.1&amp;lt;br&amp;gt;0.5.4&amp;lt;br&amp;gt;0.6.0rc4&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
* [https://bitcointalk.org/index.php?topic=69120.0 Announcement]&lt;br /&gt;
* [http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2012-1910 US-CERT/NIST]&lt;br /&gt;
&lt;br /&gt;
== BIP-0016 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2012-04-01&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; Mandatory P2SH protocol update&lt;br /&gt;
 &amp;lt;b&amp;gt;Deployment:&amp;lt;/b&amp;gt; 88%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| Bitcoin-Qt&amp;lt;br&amp;gt;bitcoind || * - 0.4.4&amp;lt;br&amp;gt;0.5.0rc1 - 0.5.0.5&amp;lt;br&amp;gt;0.5.1rc1 - 0.5.3&amp;lt;br&amp;gt;0.6.0rc1 || 0.4.5&amp;lt;br&amp;gt;0.5.0.6&amp;lt;br&amp;gt;0.5.4rc1&amp;lt;br&amp;gt;0.6.0rc2&lt;br /&gt;
|-&lt;br /&gt;
| wxBitcoin || ALL || NONE&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
* [[BIP 0016]]&lt;br /&gt;
&lt;br /&gt;
== CVE-2012-2459 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2012-05-14&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; Block hash collision (via merkle tree)&lt;br /&gt;
 &amp;lt;b&amp;gt;Fix Deployment:&amp;lt;/b&amp;gt; 88%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| Bitcoin-Qt&amp;lt;br&amp;gt;bitcoind || * - 0.4.6rc1&amp;lt;br&amp;gt;0.5.0rc1 - 0.5.5rc1&amp;lt;br&amp;gt;0.6.0rc1 - 0.6.0.7rc1&amp;lt;br&amp;gt;0.6.1rc1 - 0.6.1rc1 || 0.4.6&amp;lt;br&amp;gt;0.5.5&amp;lt;br&amp;gt;0.6.0.7&amp;lt;br&amp;gt;0.6.1rc2&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Block hash collisions can easily be made by duplicating transactions in the merkle tree.&lt;br /&gt;
Such a collision is invalid, but if recorded (as Bitcoin-Qt and bitcoind prior to 0.6.1 did) would prevent acceptance of the legitimate block with the same hash.&lt;br /&gt;
This could be used to fork the blockchain, including deep double-spend attacks.&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
* [https://bitcointalk.org/?topic=81749 Announcement]&lt;br /&gt;
* [https://bugs.gentoo.org/show_bug.cgi?id=415973 Gentoo bug tracker]&lt;br /&gt;
* [http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2012-2459 US-CERT/NIST]&lt;br /&gt;
* [https://bitcointalk.org/?topic=102395 Full Disclosure]&lt;br /&gt;
&lt;br /&gt;
== CVE-2012-3789 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; 2012-06-20&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; Multiple DoS Vulnerabilties in Satoshi Bitcoin client&lt;br /&gt;
 &amp;lt;b&amp;gt;Fix Deployment:&amp;lt;/b&amp;gt; &amp;gt;74%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| Bitcoin-Qt&amp;lt;br&amp;gt;bitcoind || * - 0.4.7rc2&amp;lt;br&amp;gt;0.5.0rc1 - 0.5.6rc2&amp;lt;br&amp;gt;0.6.0rc1 - 0.6.0.8rc2&amp;lt;br&amp;gt;0.6.1rc1 - 0.6.2.2 || 0.4.7rc3&amp;lt;br&amp;gt;0.5.6rc3&amp;lt;br&amp;gt;0.6.0.9rc1&amp;lt;br&amp;gt;0.6.3rc1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
* [[CVE-2012-3789]]&lt;br /&gt;
* [https://bitcointalk.org/?topic=88734 0.6.3rc1 Announcement]&lt;br /&gt;
* [http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2012-3789 US-CERT/NIST]&lt;br /&gt;
&lt;br /&gt;
== BIP-0034 ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;Date:&amp;lt;/b&amp;gt; Future&lt;br /&gt;
 &amp;lt;b&amp;gt;Summary:&amp;lt;/b&amp;gt; Mandatory block protocol update&lt;br /&gt;
 &amp;lt;b&amp;gt;Deployment:&amp;lt;/b&amp;gt; 47%&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
!colspan=&#039;2&#039;| Affected !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| Bitcoin-Qt&amp;lt;br&amp;gt;bitcoind || * - 0.4.7&amp;lt;br&amp;gt;0.5.0rc1 - 0.5.7&amp;lt;br&amp;gt;0.6.0rc1 - 0.6.0.9&amp;lt;br&amp;gt;0.6.1rc1 - 0.6.3 || 0.4.8rc1&amp;lt;br&amp;gt;0.5.7rc1&amp;lt;br&amp;gt;0.6.0.10rc1&amp;lt;br&amp;gt;0.6.4rc1&amp;lt;br&amp;gt;0.7.0rc1&lt;br /&gt;
|-&lt;br /&gt;
| wxBitcoin || ALL || NONE&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
* [[BIP 0034]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Definitions==&lt;br /&gt;
&lt;br /&gt;
A critical vulnerability is one that will have disastrous consequences if it is exploited.  A serious vulnerability is one that will have serious consequences if it is exploited&amp;lt;ref&amp;gt;[http://bitcointalk.org/index.php?topic=88892.0 http://bitcointalk.org/index.php?topic=88892.0]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
&lt;br /&gt;
* [[Changelog]]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Cateogory:Security]]&lt;/div&gt;</summary>
		<author><name>Sergio Demian Lerner</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Weaknesses&amp;diff=33752</id>
		<title>Weaknesses</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Weaknesses&amp;diff=33752"/>
		<updated>2012-12-14T13:46:05Z</updated>

		<summary type="html">&lt;p&gt;Sergio Demian Lerner: /* Security Vulnerabilities and bugs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Might be a problem ==&lt;br /&gt;
=== Wallet Vulnerable To Theft ===&lt;br /&gt;
&lt;br /&gt;
The [[wallet]] is stored unencrypted, by default, and thus becomes a valuable target for theft.  Recent releases of the Bitcoin client now supports encryption to protect the wallet data, though the user must opt-in.&lt;br /&gt;
&lt;br /&gt;
=== Tracing a coin&#039;s history ===&lt;br /&gt;
Tracing a coin&#039;s history can be used to connect identities to addresses. [[Anonymity|More info]].&lt;br /&gt;
&lt;br /&gt;
=== Cancer nodes ===&lt;br /&gt;
It&#039;s trivial for an attacker to fill the network with clients controlled by him. This might be helpful in the execution of other attacks.&lt;br /&gt;
&lt;br /&gt;
For example, an attacker might connect 100,000 IP addresses to the IRC bootstrap channel. You would then be very likely to connect only to attacker nodes. This state can be exploited in (at least) the following ways:&lt;br /&gt;
* The attacker can refuse to relay blocks and transactions from everyone, disconnecting you from the network.&lt;br /&gt;
* The attacker can relay only blocks that he creates, putting you on a separate network. You&#039;re then open to [[double-spending]] attacks.&lt;br /&gt;
* If you rely on transactions with 0 confirmations, the attacker can just filter out certain transactions to execute a double-spending attack.&lt;br /&gt;
* Low-latency encryption/anonymization of Bitcoin&#039;s transmissions (With Tor, JAP, etc.) can be defeated relatively easy with a timing attack if you&#039;re connected to several of the attacker&#039;s nodes and the attacker is watching your transmissions at your ISP.&lt;br /&gt;
&lt;br /&gt;
Bitcoin makes these attacks more difficult by only making an outbound connection to one IP address per /16 (x.y.0.0). Incoming connections are unlimited and unregulated, but this is generally only a problem in the anonymity case, where you&#039;re probably already unable to accept incoming connections.&lt;br /&gt;
&lt;br /&gt;
Looking for suspiciously low network hash-rates may help prevent the second one.&lt;br /&gt;
&lt;br /&gt;
=== No authentication for IP transfers ===&lt;br /&gt;
Since there&#039;s no authentication when sending to an [[IP address]] (as opposed to a [[Address|Bitcoin address]]), executing a man-in-the-middle attack and stealing the sent BitCoins is trivial. This attack is downright &#039;&#039;likely&#039;&#039; if you&#039;re using Tor. For this reason, IP transfers are disabled by default in modern Bitcoin clients, though the feature can be enabled with a command line argument if desired.&lt;br /&gt;
&lt;br /&gt;
=== Packet sniffing ===&lt;br /&gt;
Someone who can see all of your Internet traffic can easily see when you send a transaction that you didn&#039;t receive (which means that it&#039;s yours). This would be made more difficult (but not impossible) if node-to-node encryption was used.&lt;br /&gt;
&lt;br /&gt;
=== Denial of Service (DoS) attacks ===&lt;br /&gt;
Sending lots of data to a node may make it so busy it cannot process normal bitcoin transactions.  Bitcoin has some denial-of-service prevention built-in, but is likely still vulnerable to more sophisticated denial-of-service attacks.&lt;br /&gt;
&lt;br /&gt;
These are the current Bitcoin Satoshi client protections to deter DoS attacks, as of version 0.7.0:&lt;br /&gt;
&lt;br /&gt;
# Does not forward orphan transactions/blocks&lt;br /&gt;
# Does not forward double-spend transactions&lt;br /&gt;
# Does not forward the same block, transaction or alert twice to the same peer.&lt;br /&gt;
# Restricts the maximum number of signature checks a transaction input may request&lt;br /&gt;
# Continuous rate-limit of free transactions to mitigate &#039;penny-flooding&#039;&lt;br /&gt;
# Keeps a DoS score of each connected peer and disconnects from a peer that send messages that fail to comply with the rules.&lt;br /&gt;
# Bans IP addresses that misbehave for a time lapse (24 hours default)&lt;br /&gt;
# Limits the number of stored orphan transactions (10000 by default)&lt;br /&gt;
# Uses a signature cache to prevent attacks that try to continuously trigger the re-verification of stored orphan transactions&lt;br /&gt;
# Limits the number of stored signatures in the signature cache (50000 signatures by default)&lt;br /&gt;
# Tries to catch all possible errors in transactions before the signature verifications take place, to avoid DoS attacks on CPU usage.&lt;br /&gt;
# Penalizes peers that send lots of duplicate/expired/invalid-signature/whatever alerts, so they eventually get banned.&lt;br /&gt;
# In orphan/signature caches, when removing an item, evicts a random entry.&lt;br /&gt;
# Data structures are specially chosen to avoid loops in which the number of iterations can be controller by an attacker that result in exponential complexity.&lt;br /&gt;
# Ignores big orphan transactions, to avoid a send-big-orphans memory exhaustion attack.&lt;br /&gt;
# In RPC: Only sends a HTTP 403 response if it&#039;s not using SSL to prevent a DoS during the SSL handshake.&lt;br /&gt;
# In RPC: Sleeps some time if authorization fails to deter brute-forcing short passwords.&lt;br /&gt;
# In GUI: Limits URI length to prevent a DoS against the QR-Code dialog&lt;br /&gt;
&lt;br /&gt;
Satoshi client does not directly limit peer bandwidth nor CPU usage.&lt;br /&gt;
&lt;br /&gt;
=== Forcing clock drift against a target node ===&lt;br /&gt;
&lt;br /&gt;
See [http://culubas.blogspot.com/2011/05/timejacking-bitcoin_802.html Timejacking] for a description of this attack. It can be fixed by changing how nodes calculate the current time.&lt;br /&gt;
&lt;br /&gt;
=== Illegal content in the block chain ===&lt;br /&gt;
It is illegal in some countries to possess/distribute certain kinds of data. Since arbitrary data can be included in Bitcoin transactions, and clients must normally have a copy of all unspent transactions, this could cause legal problems.&lt;br /&gt;
&lt;br /&gt;
=== Security Vulnerabilities and bugs  ===&lt;br /&gt;
It&#039;s possible but unlikely that a newly discovered bug or security vulnerability in the standard client could lead to a block chain split, or the need for every node to upgrade in a short time period. For example, a single malformed message tailored to exploit a specific vulnerability, when spread from node to node, could cause the whole network to shutdown in a few hours. Bugs that break user anonymity, on the contrary, have been found, since the pseudo-anonymity property of Bitcoin has been analyzed less.&lt;br /&gt;
Starting from version 0.7.0, Bitcoin client can be considered a mature project. The security critical sections of the source code are updated less and less frequently and those parts have been reviewed by many computer security experts. Also Bitcoin Satoshi client has passed the test of being on-line for more than 3 years, without a single vulnerability being exploited &#039;&#039;in the wild&#039;&#039;. &lt;br /&gt;
See [[Common_Vulnerabilities_and_Exposures]] for a detailed list of vulnerabilities detected and fixed.&lt;br /&gt;
&lt;br /&gt;
== Probably not a problem ==&lt;br /&gt;
&lt;br /&gt;
===Breaking the cryptography===&lt;br /&gt;
SHA-256 and ECDSA are considered very strong currently, but they might be broken in the far future. If that happens, BitCoin can shift to a stronger algorithm. [https://bitcointalk.org/index.php?topic=191.msg1585#msg1585 More info].&lt;br /&gt;
&lt;br /&gt;
===Scalability===&lt;br /&gt;
BitCoin can easily scale beyond the level of traffic VISA sees globally today. See the discussion on the [[scalability]] page for more information.&lt;br /&gt;
&lt;br /&gt;
===Segmentation===&lt;br /&gt;
If there is even a &amp;quot;trickle&amp;quot; of a connection between two sides of a segmented network, things should still work perfectly. When block chains are combined, all of the non-generation transactions in the shorter chain are re-added to the transaction pool -- they&#039;ll start over at 0/unconfirmed, but they&#039;ll still be valid. No mature transactions will be lost unless the segmentation persists for longer than ~120 blocks. Then generations will start to mature, and any transactions based on those generations will become invalid when recombined with the longer chain. [https://bitcointalk.org/index.php?topic=241.msg2071#msg2071 More info].&lt;br /&gt;
&lt;br /&gt;
=== Attacking all users ===&lt;br /&gt;
The IP addresses of most users are totally public. You can use Tor to hide this, but the network won&#039;t work if everyone does this. BitCoin requires that &#039;&#039;some&#039;&#039; country is still free.&lt;br /&gt;
&lt;br /&gt;
=== Dropping transactions ===&lt;br /&gt;
Nodes that generate blocks can choose not to include a transaction in their blocks. When this happens, the transaction remains &amp;quot;active&amp;quot; and can be included in a later block. Two things discourage this:&lt;br /&gt;
* Nodes only hash a fixed-size &#039;&#039;header&#039;&#039;, so there is no speed advantage to dropping transactions.&lt;br /&gt;
* [[Satoshi]] has [https://bitcointalk.org/index.php?topic=165.msg1595#msg1595 communicated] that he will write code to stop this kind of thing if it becomes a problem.&lt;br /&gt;
&lt;br /&gt;
=== Attacker has a lot of computing power ===&lt;br /&gt;
An attacker that controls more than 50% of the network&#039;s computing power can, for the time that he is in control, exclude and modify the ordering of transactions. This allows him to:&lt;br /&gt;
* Reverse transactions that he sends while he&#039;s in control.  This has the potential to [[Double-spending#51.25_attack|double-spend transactions]] that previously had already been seen in the block chain.&lt;br /&gt;
* Prevent some or all transactions from gaining any confirmations&lt;br /&gt;
* Prevent some or all other miners from mining any valid blocks&lt;br /&gt;
The attacker &#039;&#039;can&#039;t&#039;&#039;:&lt;br /&gt;
* Reverse other people&#039;s transactions&lt;br /&gt;
* Prevent transactions from being sent at all (they&#039;ll show as 0/unconfirmed)&lt;br /&gt;
* Change the number of coins generated per block&lt;br /&gt;
* Create coins out of thin air&lt;br /&gt;
* Send coins that never belonged to him&lt;br /&gt;
&lt;br /&gt;
It&#039;s much more difficult to change historical blocks, and it becomes exponentially more difficult the further back you go. As above, changing historical blocks only allows you to exclude and change the ordering of transactions. It&#039;s impossible to change blocks created before the last checkpoint.&lt;br /&gt;
&lt;br /&gt;
Since this attack doesn&#039;t permit all that much power over the network, it is expected that no one will attempt it. A profit-seeking person will always gain more by just following the rules, and even someone trying to destroy the system will probably find other attacks more attractive. However, if this attack is successfully executed, it will be difficult or impossible to &amp;quot;untangle&amp;quot; the mess created -- any changes the attacker makes might become permanent.&lt;br /&gt;
&lt;br /&gt;
=== Spamming transactions ===&lt;br /&gt;
&lt;br /&gt;
It is easy to send transactions to yourself repeatedly. If these transactions fill blocks to the maximum size (1MB), other transactions would be delayed until the next block.&lt;br /&gt;
&lt;br /&gt;
This is made expensive by the [[transaction fee|fees]] that would be required after the 50KB of free transactions per block are exhausted. An attacker will eventually eliminate free transactions, but Bitcoin fees will always be low because raising fees above 0.01 BTC per KB would require spending transaction fees. An attacker will eventually run out of money. Even if an attacker wants to waste money, transactions are further prioritized by the time since the coins were last spent, so attacks spending the same coins repeatedly are less effective.&lt;br /&gt;
&lt;br /&gt;
=== The [[Double-spending#Finney_attack|Finney attack]] ===&lt;br /&gt;
Named for Hal Finney, who first described this variation of a double-spend attack involving accepting [http://www.bitcointalk.org/index.php?topic=3441.msg48384#msg48384 0-confirmation transactions].  Accepting 0-confirmation large-value transactions is problematic; accepting them for low-value transactions (after waiting several seconds to detect an ordinary double-spend attempt) is probably safe.&lt;br /&gt;
&lt;br /&gt;
===Rival/malicious client code===&lt;br /&gt;
Any rival client must follow Bitcoin&#039;s rules or else all current BitCoin clients will ignore it. You&#039;d have to actually get people to &#039;&#039;use&#039;&#039; your client. A better client that pretends to follow the same rules, but with an exception known only to the author (possibly by making it closed source), might conceivably be able to gain widespread adoption. At that point, its author could use his exception and go largely unnoticed.&lt;br /&gt;
&lt;br /&gt;
== Definitely not a problem ==&lt;br /&gt;
&lt;br /&gt;
===Coin destruction===&lt;br /&gt;
Bitcoin has 2.1 quadrillion raw units, making up 8 decimals of BTC precision, so the entire network could potentially operate on much less than the full quantity of Bitcoins. If deflation gets to the point where transactions of more than 10 BTC are unheard of, clients can just switch to another unit so that, for example, it shows 10 mBTC rather than 0.01 BTC.&lt;br /&gt;
&lt;br /&gt;
The maximum number of raw units might not be enough if the &#039;&#039;entire world&#039;&#039; starts using BTC, but it would not be too difficult to increase precision in that case. The transaction format and version number would be scheduled to change at some particular block number after a year or two, and everyone would have to update by then.&lt;br /&gt;
&lt;br /&gt;
===Generating tons of addresses===&lt;br /&gt;
Generating an address doesn&#039;t touch the network at all. You&#039;d only be wasting your CPU resources and disk space.&lt;br /&gt;
&lt;br /&gt;
Also, a collision is highly unlikely.&lt;br /&gt;
&lt;br /&gt;
Keys are 256 bit in length and are hashed in a 160 bit address.(2^160th power)&lt;br /&gt;
Divide it by the world population and you have about 215,000,000,000,000,000,000,000,000,000,000,000,000 addresses per capita.(2.15 x 10^38)[http://www.wolframalpha.com/input/?i=2^160+%2F+world+population]&lt;br /&gt;
&lt;br /&gt;
===Everyone calculates at the same rate===&lt;br /&gt;
If everyone began with identical blocks and started their nonce at 1 and incremented, the fastest machine would always win. However, each block contains a new, random public key known only to you in the list of transactions.  The 256-bit &amp;quot;Merkle tree&amp;quot; hash of this is part of the block header.&lt;br /&gt;
&lt;br /&gt;
So everyone begins with slightly different blocks and everyone truly has a random chance of winning (modified by CPU power).&lt;br /&gt;
&lt;br /&gt;
===Generate &amp;quot;valid&amp;quot; blocks with a lower difficulty than normal===&lt;br /&gt;
Using unmodified Bitcoin code, an attacker could segment himself from the main network and generate a long block chain with a lower difficulty than the real network. These blocks would be totally valid for his network. However, it would be impossible to combine the two networks (and the &amp;quot;false&amp;quot; chain would be destroyed in the process).&lt;br /&gt;
&lt;br /&gt;
* Even though your network&#039;s difficulty can be less than the real difficulty, this doesn&#039;t give you any advantage over the real network. You&#039;ll gain ground when the real network is taking more than 10 minutes to generate a block, but you&#039;ll lose ground when the network takes less than 10 minutes.&lt;br /&gt;
* Every few releases of Bitcoin, a recent block hash is hardcoded into the source code. Any blocks before that point can&#039;t be changed. An attacker starting at that point would have to reduce the difficulty, but this would require him to generate blocks at a much slower rate than once per 10 minutes. By the time he finally gets to a difficulty of 1, a new version of Bitcoin with an updated hardcoded block will probably have been released.&lt;br /&gt;
* &amp;quot;Block chain length&amp;quot; is calculated from the combined difficulty of all the blocks, not just the number of blocks in the chain. The one that represents the most CPU usage will win.&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
&lt;br /&gt;
* [[Double-spending]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Technical]]&lt;/div&gt;</summary>
		<author><name>Sergio Demian Lerner</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Weaknesses&amp;diff=32600</id>
		<title>Weaknesses</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Weaknesses&amp;diff=32600"/>
		<updated>2012-11-13T19:09:35Z</updated>

		<summary type="html">&lt;p&gt;Sergio Demian Lerner: /* Security Vulnerabilities and bugs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Might be a problem ==&lt;br /&gt;
=== Wallet Vulnerable To Theft ===&lt;br /&gt;
&lt;br /&gt;
The [[wallet]] is stored unencrypted, by default, and thus becomes a valuable target for theft.  Recent releases of the Bitcoin client now supports encryption to protect the wallet data, though the user must opt-in.&lt;br /&gt;
&lt;br /&gt;
=== Tracing a coin&#039;s history ===&lt;br /&gt;
Tracing a coin&#039;s history can be used to connect identities to addresses. [[Anonymity|More info]].&lt;br /&gt;
&lt;br /&gt;
=== Cancer nodes ===&lt;br /&gt;
It&#039;s trivial for an attacker to fill the network with clients controlled by him. This might be helpful in the execution of other attacks.&lt;br /&gt;
&lt;br /&gt;
For example, an attacker might connect 100,000 IP addresses to the IRC bootstrap channel. You would then be very likely to connect only to attacker nodes. This state can be exploited in (at least) the following ways:&lt;br /&gt;
* The attacker can refuse to relay blocks and transactions from everyone, disconnecting you from the network.&lt;br /&gt;
* The attacker can relay only blocks that he creates, putting you on a separate network. You&#039;re then open to [[double-spending]] attacks.&lt;br /&gt;
* If you rely on transactions with 0 confirmations, the attacker can just filter out certain transactions to execute a double-spending attack.&lt;br /&gt;
* Low-latency encryption/anonymization of Bitcoin&#039;s transmissions (With Tor, JAP, etc.) can be defeated relatively easy with a timing attack if you&#039;re connected to several of the attacker&#039;s nodes and the attacker is watching your transmissions at your ISP.&lt;br /&gt;
&lt;br /&gt;
Bitcoin makes these attacks more difficult by only making an outbound connection to one IP address per /16 (x.y.0.0). Incoming connections are unlimited and unregulated, but this is generally only a problem in the anonymity case, where you&#039;re probably already unable to accept incoming connections.&lt;br /&gt;
&lt;br /&gt;
Looking for suspiciously low network hash-rates may help prevent the second one.&lt;br /&gt;
&lt;br /&gt;
=== No authentication for IP transfers ===&lt;br /&gt;
Since there&#039;s no authentication when sending to an [[IP address]] (as opposed to a [[Address|Bitcoin address]]), executing a man-in-the-middle attack and stealing the sent BitCoins is trivial. This attack is downright &#039;&#039;likely&#039;&#039; if you&#039;re using Tor. For this reason, IP transfers are disabled by default in modern Bitcoin clients, though the feature can be enabled with a command line argument if desired.&lt;br /&gt;
&lt;br /&gt;
=== Packet sniffing ===&lt;br /&gt;
Someone who can see all of your Internet traffic can easily see when you send a transaction that you didn&#039;t receive (which means that it&#039;s yours). This would be made more difficult (but not impossible) if node-to-node encryption was used.&lt;br /&gt;
&lt;br /&gt;
=== Denial of Service (DoS) attacks ===&lt;br /&gt;
Sending lots of data to a node may make it so busy it cannot process normal bitcoin transactions.  Bitcoin has some denial-of-service prevention built-in, but is likely still vulnerable to more sophisticated denial-of-service attacks.&lt;br /&gt;
&lt;br /&gt;
These are the current Bitcoin Satoshi client protections to deter DoS attacks, as of version 0.7.0:&lt;br /&gt;
&lt;br /&gt;
# Does not forward orphan transactions/blocks&lt;br /&gt;
# Does not forward double-spend transactions&lt;br /&gt;
# Does not forward the same block, transaction or alert twice to the same peer.&lt;br /&gt;
# Restricts the maximum number of signature checks a transaction input may request&lt;br /&gt;
# Continuous rate-limit of free transactions to mitigate &#039;penny-flooding&#039;&lt;br /&gt;
# Keeps a DoS score of each connected peer and disconnects from a peer that send messages that fail to comply with the rules.&lt;br /&gt;
# Bans IP addresses that misbehave for a time lapse (24 hours default)&lt;br /&gt;
# Limits the number of stored orphan transactions (10000 by default)&lt;br /&gt;
# Uses a signature cache to prevent attacks that try to continuously trigger the re-verification of stored orphan transactions&lt;br /&gt;
# Limits the number of stored signatures in the signature cache (50000 signatures by default)&lt;br /&gt;
# Tries to catch all possible errors in transactions before the signature verifications take place, to avoid DoS attacks on CPU usage.&lt;br /&gt;
# Penalizes peers that send lots of duplicate/expired/invalid-signature/whatever alerts, so they eventually get banned.&lt;br /&gt;
# In orphan/signature caches, when removing an item, evicts a random entry.&lt;br /&gt;
# Data structures are specially chosen to avoid loops in which the number of iterations can be controller by an attacker that result in exponential complexity.&lt;br /&gt;
# Ignores big orphan transactions, to avoid a send-big-orphans memory exhaustion attack.&lt;br /&gt;
# In RPC: Only sends a HTTP 403 response if it&#039;s not using SSL to prevent a DoS during the SSL handshake.&lt;br /&gt;
# In RPC: Sleeps some time if authorization fails to deter brute-forcing short passwords.&lt;br /&gt;
# In GUI: Limits URI length to prevent a DoS against the QR-Code dialog&lt;br /&gt;
&lt;br /&gt;
Satoshi client does not directly limit peer bandwidth nor CPU usage.&lt;br /&gt;
&lt;br /&gt;
=== Forcing clock drift against a target node ===&lt;br /&gt;
&lt;br /&gt;
See [http://culubas.blogspot.com/2011/05/timejacking-bitcoin_802.html Timejacking] for a description of this attack. It can be fixed by changing how nodes calculate the current time.&lt;br /&gt;
&lt;br /&gt;
=== Illegal content in the block chain ===&lt;br /&gt;
It is illegal in some countries to possess/distribute certain kinds of data. Since arbitrary data can be included in Bitcoin transactions, and clients must normally have a copy of all unspent transactions, this could cause legal problems.&lt;br /&gt;
&lt;br /&gt;
=== Security Vulnerabilities and bugs  ===&lt;br /&gt;
It&#039;s possible but unlikely that a newly discovered bug or security vulnerability in the standard client could lead to a block chain split, or the need for every node to upgrade in a short time period. For example, a single malformed message tailored to exploit a specific vulnerability, when spread from node to node, could cause the whole network to shutdown in a few hours. Starting from version 0.7.0, Bitcoin client can be considered a mature project. The security critical sections of the source code are updated less and less frequently and those parts have been reviewed by many computer security experts. Also Bitcoin Satoshi client has passed the test of being on-line for more than 3 years, without a single vulnerability being exploited &#039;&#039;in the wild&#039;&#039;. &lt;br /&gt;
See [[Common_Vulnerabilities_and_Exposures]] for a detailed list of vulnerabilities detected and fixed.&lt;br /&gt;
&lt;br /&gt;
== Probably not a problem ==&lt;br /&gt;
&lt;br /&gt;
===Breaking the cryptography===&lt;br /&gt;
SHA-256 and ECDSA are considered very strong currently, but they might be broken in the far future. If that happens, BitCoin can shift to a stronger algorithm. [https://bitcointalk.org/index.php?topic=191.msg1585#msg1585 More info].&lt;br /&gt;
&lt;br /&gt;
===Scalability===&lt;br /&gt;
BitCoin can easily scale beyond the level of traffic VISA sees globally today. See the discussion on the [[scalability]] page for more information.&lt;br /&gt;
&lt;br /&gt;
===Segmentation===&lt;br /&gt;
If there is even a &amp;quot;trickle&amp;quot; of a connection between two sides of a segmented network, things should still work perfectly. When block chains are combined, all of the non-generation transactions in the shorter chain are re-added to the transaction pool -- they&#039;ll start over at 0/unconfirmed, but they&#039;ll still be valid. No mature transactions will be lost unless the segmentation persists for longer than ~120 blocks. Then generations will start to mature, and any transactions based on those generations will become invalid when recombined with the longer chain. [https://bitcointalk.org/index.php?topic=241.msg2071#msg2071 More info].&lt;br /&gt;
&lt;br /&gt;
=== Attacking all users ===&lt;br /&gt;
The IP addresses of most users are totally public. You can use Tor to hide this, but the network won&#039;t work if everyone does this. BitCoin requires that &#039;&#039;some&#039;&#039; country is still free.&lt;br /&gt;
&lt;br /&gt;
=== Dropping transactions ===&lt;br /&gt;
Nodes that generate blocks can choose not to include a transaction in their blocks. When this happens, the transaction remains &amp;quot;active&amp;quot; and can be included in a later block. Two things discourage this:&lt;br /&gt;
* Nodes only hash a fixed-size &#039;&#039;header&#039;&#039;, so there is no speed advantage to dropping transactions.&lt;br /&gt;
* [[Satoshi]] has [https://bitcointalk.org/index.php?topic=165.msg1595#msg1595 communicated] that he will write code to stop this kind of thing if it becomes a problem.&lt;br /&gt;
&lt;br /&gt;
=== Attacker has a lot of computing power ===&lt;br /&gt;
An attacker that controls more than 50% of the network&#039;s computing power can, for the time that he is in control, exclude and modify the ordering of transactions. This allows him to:&lt;br /&gt;
* Reverse transactions that he sends while he&#039;s in control.  This has the potential to [[Double-spending#51.25_attack|double-spend transactions]] that previously had already been seen in the block chain.&lt;br /&gt;
* Prevent some or all transactions from gaining any confirmations&lt;br /&gt;
* Prevent some or all other miners from mining any valid blocks&lt;br /&gt;
The attacker &#039;&#039;can&#039;t&#039;&#039;:&lt;br /&gt;
* Reverse other people&#039;s transactions&lt;br /&gt;
* Prevent transactions from being sent at all (they&#039;ll show as 0/unconfirmed)&lt;br /&gt;
* Change the number of coins generated per block&lt;br /&gt;
* Create coins out of thin air&lt;br /&gt;
* Send coins that never belonged to him&lt;br /&gt;
&lt;br /&gt;
It&#039;s much more difficult to change historical blocks, and it becomes exponentially more difficult the further back you go. As above, changing historical blocks only allows you to exclude and change the ordering of transactions. It&#039;s impossible to change blocks created before the last checkpoint.&lt;br /&gt;
&lt;br /&gt;
Since this attack doesn&#039;t permit all that much power over the network, it is expected that no one will attempt it. A profit-seeking person will always gain more by just following the rules, and even someone trying to destroy the system will probably find other attacks more attractive. However, if this attack is successfully executed, it will be difficult or impossible to &amp;quot;untangle&amp;quot; the mess created -- any changes the attacker makes might become permanent.&lt;br /&gt;
&lt;br /&gt;
=== Spamming transactions ===&lt;br /&gt;
&lt;br /&gt;
It is easy to send transactions to yourself repeatedly. If these transactions fill blocks to the maximum size (1MB), other transactions would be delayed until the next block.&lt;br /&gt;
&lt;br /&gt;
This is made expensive by the [[transaction fee|fees]] that would be required after the 50KB of free transactions per block are exhausted. An attacker will eventually eliminate free transactions, but Bitcoin fees will always be low because raising fees above 0.01 BTC per KB would require spending transaction fees. An attacker will eventually run out of money. Even if an attacker wants to waste money, transactions are further prioritized by the time since the coins were last spent, so attacks spending the same coins repeatedly are less effective.&lt;br /&gt;
&lt;br /&gt;
=== The [[Double-spending#Finney_attack|Finney attack]] ===&lt;br /&gt;
Named for Hal Finney, who first described this variation of a double-spend attack involving accepting [http://www.bitcointalk.org/index.php?topic=3441.msg48384#msg48384 0-confirmation transactions].  Accepting 0-confirmation large-value transactions is problematic; accepting them for low-value transactions (after waiting several seconds to detect an ordinary double-spend attempt) is probably safe.&lt;br /&gt;
&lt;br /&gt;
===Rival/malicious client code===&lt;br /&gt;
Any rival client must follow Bitcoin&#039;s rules or else all current BitCoin clients will ignore it. You&#039;d have to actually get people to &#039;&#039;use&#039;&#039; your client. A better client that pretends to follow the same rules, but with an exception known only to the author (possibly by making it closed source), might conceivably be able to gain widespread adoption. At that point, its author could use his exception and go largely unnoticed.&lt;br /&gt;
&lt;br /&gt;
== Definitely not a problem ==&lt;br /&gt;
&lt;br /&gt;
===Coin destruction===&lt;br /&gt;
Bitcoin has 2.1 quadrillion raw units, making up 8 decimals of BTC precision, so the entire network could potentially operate on much less than the full quantity of Bitcoins. If deflation gets to the point where transactions of more than 10 BTC are unheard of, clients can just switch to another unit so that, for example, it shows 10 mBTC rather than 0.01 BTC.&lt;br /&gt;
&lt;br /&gt;
The maximum number of raw units might not be enough if the &#039;&#039;entire world&#039;&#039; starts using BTC, but it would not be too difficult to increase precision in that case. The transaction format and version number would be scheduled to change at some particular block number after a year or two, and everyone would have to update by then.&lt;br /&gt;
&lt;br /&gt;
===Generating tons of addresses===&lt;br /&gt;
Generating an address doesn&#039;t touch the network at all. You&#039;d only be wasting your CPU resources and disk space.&lt;br /&gt;
&lt;br /&gt;
Also, a collision is highly unlikely.&lt;br /&gt;
&lt;br /&gt;
Keys are 256 bit in length and are hashed in a 160 bit address.(2^160th power)&lt;br /&gt;
Divide it by the world population and you have about 215,000,000,000,000,000,000,000,000,000,000,000,000 addresses per capita.(2.15 x 10^38)[http://www.wolframalpha.com/input/?i=2^160+%2F+world+population]&lt;br /&gt;
&lt;br /&gt;
===Everyone calculates at the same rate===&lt;br /&gt;
If everyone began with identical blocks and started their nonce at 1 and incremented, the fastest machine would always win. However, each block contains a new, random public key known only to you in the list of transactions.  The 256-bit &amp;quot;Merkle tree&amp;quot; hash of this is part of the block header.&lt;br /&gt;
&lt;br /&gt;
So everyone begins with slightly different blocks and everyone truly has a random chance of winning (modified by CPU power).&lt;br /&gt;
&lt;br /&gt;
===Generate &amp;quot;valid&amp;quot; blocks with a lower difficulty than normal===&lt;br /&gt;
Using unmodified Bitcoin code, an attacker could segment himself from the main network and generate a long block chain with a lower difficulty than the real network. These blocks would be totally valid for his network. However, it would be impossible to combine the two networks (and the &amp;quot;false&amp;quot; chain would be destroyed in the process).&lt;br /&gt;
&lt;br /&gt;
* Even though your network&#039;s difficulty can be less than the real difficulty, this doesn&#039;t give you any advantage over the real network. You&#039;ll gain ground when the real network is taking more than 10 minutes to generate a block, but you&#039;ll lose ground when the network takes less than 10 minutes.&lt;br /&gt;
* Every few releases of Bitcoin, a recent block hash is hardcoded into the source code. Any blocks before that point can&#039;t be changed. An attacker starting at that point would have to reduce the difficulty, but this would require him to generate blocks at a much slower rate than once per 10 minutes. By the time he finally gets to a difficulty of 1, a new version of Bitcoin with an updated hardcoded block will probably have been released.&lt;br /&gt;
* &amp;quot;Block chain length&amp;quot; is calculated from the combined difficulty of all the blocks, not just the number of blocks in the chain. The one that represents the most CPU usage will win.&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
&lt;br /&gt;
* [[Double-spending]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Technical]]&lt;/div&gt;</summary>
		<author><name>Sergio Demian Lerner</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Weaknesses&amp;diff=32591</id>
		<title>Weaknesses</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Weaknesses&amp;diff=32591"/>
		<updated>2012-11-13T15:00:55Z</updated>

		<summary type="html">&lt;p&gt;Sergio Demian Lerner: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Might be a problem ==&lt;br /&gt;
=== Wallet Vulnerable To Theft ===&lt;br /&gt;
&lt;br /&gt;
The [[wallet]] is stored unencrypted, by default, and thus becomes a valuable target for theft.  Recent releases of the Bitcoin client now supports encryption to protect the wallet data, though the user must opt-in.&lt;br /&gt;
&lt;br /&gt;
=== Tracing a coin&#039;s history ===&lt;br /&gt;
Tracing a coin&#039;s history can be used to connect identities to addresses. [[Anonymity|More info]].&lt;br /&gt;
&lt;br /&gt;
=== Cancer nodes ===&lt;br /&gt;
It&#039;s trivial for an attacker to fill the network with clients controlled by him. This might be helpful in the execution of other attacks.&lt;br /&gt;
&lt;br /&gt;
For example, an attacker might connect 100,000 IP addresses to the IRC bootstrap channel. You would then be very likely to connect only to attacker nodes. This state can be exploited in (at least) the following ways:&lt;br /&gt;
* The attacker can refuse to relay blocks and transactions from everyone, disconnecting you from the network.&lt;br /&gt;
* The attacker can relay only blocks that he creates, putting you on a separate network. You&#039;re then open to [[double-spending]] attacks.&lt;br /&gt;
* If you rely on transactions with 0 confirmations, the attacker can just filter out certain transactions to execute a double-spending attack.&lt;br /&gt;
* Low-latency encryption/anonymization of Bitcoin&#039;s transmissions (With Tor, JAP, etc.) can be defeated relatively easy with a timing attack if you&#039;re connected to several of the attacker&#039;s nodes and the attacker is watching your transmissions at your ISP.&lt;br /&gt;
&lt;br /&gt;
Bitcoin makes these attacks more difficult by only making an outbound connection to one IP address per /16 (x.y.0.0). Incoming connections are unlimited and unregulated, but this is generally only a problem in the anonymity case, where you&#039;re probably already unable to accept incoming connections.&lt;br /&gt;
&lt;br /&gt;
Looking for suspiciously low network hash-rates may help prevent the second one.&lt;br /&gt;
&lt;br /&gt;
=== No authentication for IP transfers ===&lt;br /&gt;
Since there&#039;s no authentication when sending to an [[IP address]] (as opposed to a [[Address|Bitcoin address]]), executing a man-in-the-middle attack and stealing the sent BitCoins is trivial. This attack is downright &#039;&#039;likely&#039;&#039; if you&#039;re using Tor. For this reason, IP transfers are disabled by default in modern Bitcoin clients, though the feature can be enabled with a command line argument if desired.&lt;br /&gt;
&lt;br /&gt;
=== Packet sniffing ===&lt;br /&gt;
Someone who can see all of your Internet traffic can easily see when you send a transaction that you didn&#039;t receive (which means that it&#039;s yours). This would be made more difficult (but not impossible) if node-to-node encryption was used.&lt;br /&gt;
&lt;br /&gt;
=== Denial of Service (DoS) attacks ===&lt;br /&gt;
Sending lots of data to a node may make it so busy it cannot process normal bitcoin transactions.  Bitcoin has some denial-of-service prevention built-in, but is likely still vulnerable to more sophisticated denial-of-service attacks.&lt;br /&gt;
&lt;br /&gt;
These are the current Bitcoin Satoshi client protections to deter DoS attacks, as of version 0.7.0:&lt;br /&gt;
&lt;br /&gt;
# Does not forward orphan transactions/blocks&lt;br /&gt;
# Does not forward double-spend transactions&lt;br /&gt;
# Does not forward the same block, transaction or alert twice to the same peer.&lt;br /&gt;
# Restricts the maximum number of signature checks a transaction input may request&lt;br /&gt;
# Continuous rate-limit of free transactions to mitigate &#039;penny-flooding&#039;&lt;br /&gt;
# Keeps a DoS score of each connected peer and disconnects from a peer that send messages that fail to comply with the rules.&lt;br /&gt;
# Bans IP addresses that misbehave for a time lapse (24 hours default)&lt;br /&gt;
# Limits the number of stored orphan transactions (10000 by default)&lt;br /&gt;
# Uses a signature cache to prevent attacks that try to continuously trigger the re-verification of stored orphan transactions&lt;br /&gt;
# Limits the number of stored signatures in the signature cache (50000 signatures by default)&lt;br /&gt;
# Tries to catch all possible errors in transactions before the signature verifications take place, to avoid DoS attacks on CPU usage.&lt;br /&gt;
# Penalizes peers that send lots of duplicate/expired/invalid-signature/whatever alerts, so they eventually get banned.&lt;br /&gt;
# In orphan/signature caches, when removing an item, evicts a random entry.&lt;br /&gt;
# Data structures are specially chosen to avoid loops in which the number of iterations can be controller by an attacker that result in exponential complexity.&lt;br /&gt;
# Ignores big orphan transactions, to avoid a send-big-orphans memory exhaustion attack.&lt;br /&gt;
# In RPC: Only sends a HTTP 403 response if it&#039;s not using SSL to prevent a DoS during the SSL handshake.&lt;br /&gt;
# In RPC: Sleeps some time if authorization fails to deter brute-forcing short passwords.&lt;br /&gt;
# In GUI: Limits URI length to prevent a DoS against the QR-Code dialog&lt;br /&gt;
&lt;br /&gt;
Satoshi client does not directly limit peer bandwidth nor CPU usage.&lt;br /&gt;
&lt;br /&gt;
=== Forcing clock drift against a target node ===&lt;br /&gt;
&lt;br /&gt;
See [http://culubas.blogspot.com/2011/05/timejacking-bitcoin_802.html Timejacking] for a description of this attack. It can be fixed by changing how nodes calculate the current time.&lt;br /&gt;
&lt;br /&gt;
=== Illegal content in the block chain ===&lt;br /&gt;
It is illegal in some countries to possess/distribute certain kinds of data. Since arbitrary data can be included in Bitcoin transactions, and clients must normally have a copy of all unspent transactions, this could cause legal problems.&lt;br /&gt;
&lt;br /&gt;
=== Security Vulnerabilities and bugs  ===&lt;br /&gt;
It&#039;s possible but unlikely that a newly discovered bug or security vulnerability in the standard client could lead to a block chain split, or the need for every node to upgrade in a short time period. For example, a single malformed message tailored to exploit a specific vulnerability, when spread from node to node, could cause the whole network to shutdown in a few hours. Starting from version 0.7.0, Bitcoin client can be considered a mature project. The security critical sections of the source code are updated less and less frequently and those parts have been reviewed by many computer security experts. Also Bitcoin Satoshi client has passed the test of being on-line for more than 3 year, without a single vulnerability being exploited &#039;&#039;in the wild&#039;&#039;. &lt;br /&gt;
See [[Common_Vulnerabilities_and_Exposures]] for a detailed list of vulnerabilities detected and fixed.&lt;br /&gt;
&lt;br /&gt;
== Probably not a problem ==&lt;br /&gt;
&lt;br /&gt;
===Breaking the cryptography===&lt;br /&gt;
SHA-256 and ECDSA are considered very strong currently, but they might be broken in the far future. If that happens, BitCoin can shift to a stronger algorithm. [https://bitcointalk.org/index.php?topic=191.msg1585#msg1585 More info].&lt;br /&gt;
&lt;br /&gt;
===Scalability===&lt;br /&gt;
BitCoin can easily scale beyond the level of traffic VISA sees globally today. See the discussion on the [[scalability]] page for more information.&lt;br /&gt;
&lt;br /&gt;
===Segmentation===&lt;br /&gt;
If there is even a &amp;quot;trickle&amp;quot; of a connection between two sides of a segmented network, things should still work perfectly. When block chains are combined, all of the non-generation transactions in the shorter chain are re-added to the transaction pool -- they&#039;ll start over at 0/unconfirmed, but they&#039;ll still be valid. No mature transactions will be lost unless the segmentation persists for longer than ~120 blocks. Then generations will start to mature, and any transactions based on those generations will become invalid when recombined with the longer chain. [https://bitcointalk.org/index.php?topic=241.msg2071#msg2071 More info].&lt;br /&gt;
&lt;br /&gt;
=== Attacking all users ===&lt;br /&gt;
The IP addresses of most users are totally public. You can use Tor to hide this, but the network won&#039;t work if everyone does this. BitCoin requires that &#039;&#039;some&#039;&#039; country is still free.&lt;br /&gt;
&lt;br /&gt;
=== Dropping transactions ===&lt;br /&gt;
Nodes that generate blocks can choose not to include a transaction in their blocks. When this happens, the transaction remains &amp;quot;active&amp;quot; and can be included in a later block. Two things discourage this:&lt;br /&gt;
* Nodes only hash a fixed-size &#039;&#039;header&#039;&#039;, so there is no speed advantage to dropping transactions.&lt;br /&gt;
* [[Satoshi]] has [https://bitcointalk.org/index.php?topic=165.msg1595#msg1595 communicated] that he will write code to stop this kind of thing if it becomes a problem.&lt;br /&gt;
&lt;br /&gt;
=== Attacker has a lot of computing power ===&lt;br /&gt;
An attacker that controls more than 50% of the network&#039;s computing power can, for the time that he is in control, exclude and modify the ordering of transactions. This allows him to:&lt;br /&gt;
* Reverse transactions that he sends while he&#039;s in control.  This has the potential to [[Double-spending#51.25_attack|double-spend transactions]] that previously had already been seen in the block chain.&lt;br /&gt;
* Prevent some or all transactions from gaining any confirmations&lt;br /&gt;
* Prevent some or all other miners from mining any valid blocks&lt;br /&gt;
The attacker &#039;&#039;can&#039;t&#039;&#039;:&lt;br /&gt;
* Reverse other people&#039;s transactions&lt;br /&gt;
* Prevent transactions from being sent at all (they&#039;ll show as 0/unconfirmed)&lt;br /&gt;
* Change the number of coins generated per block&lt;br /&gt;
* Create coins out of thin air&lt;br /&gt;
* Send coins that never belonged to him&lt;br /&gt;
&lt;br /&gt;
It&#039;s much more difficult to change historical blocks, and it becomes exponentially more difficult the further back you go. As above, changing historical blocks only allows you to exclude and change the ordering of transactions. It&#039;s impossible to change blocks created before the last checkpoint.&lt;br /&gt;
&lt;br /&gt;
Since this attack doesn&#039;t permit all that much power over the network, it is expected that no one will attempt it. A profit-seeking person will always gain more by just following the rules, and even someone trying to destroy the system will probably find other attacks more attractive. However, if this attack is successfully executed, it will be difficult or impossible to &amp;quot;untangle&amp;quot; the mess created -- any changes the attacker makes might become permanent.&lt;br /&gt;
&lt;br /&gt;
=== Spamming transactions ===&lt;br /&gt;
&lt;br /&gt;
It is easy to send transactions to yourself repeatedly. If these transactions fill blocks to the maximum size (1MB), other transactions would be delayed until the next block.&lt;br /&gt;
&lt;br /&gt;
This is made expensive by the [[transaction fee|fees]] that would be required after the 50KB of free transactions per block are exhausted. An attacker will eventually eliminate free transactions, but Bitcoin fees will always be low because raising fees above 0.01 BTC per KB would require spending transaction fees. An attacker will eventually run out of money. Even if an attacker wants to waste money, transactions are further prioritized by the time since the coins were last spent, so attacks spending the same coins repeatedly are less effective.&lt;br /&gt;
&lt;br /&gt;
=== The [[Double-spending#Finney_attack|Finney attack]] ===&lt;br /&gt;
Named for Hal Finney, who first described this variation of a double-spend attack involving accepting [http://www.bitcointalk.org/index.php?topic=3441.msg48384#msg48384 0-confirmation transactions].  Accepting 0-confirmation large-value transactions is problematic; accepting them for low-value transactions (after waiting several seconds to detect an ordinary double-spend attempt) is probably safe.&lt;br /&gt;
&lt;br /&gt;
===Rival/malicious client code===&lt;br /&gt;
Any rival client must follow Bitcoin&#039;s rules or else all current BitCoin clients will ignore it. You&#039;d have to actually get people to &#039;&#039;use&#039;&#039; your client. A better client that pretends to follow the same rules, but with an exception known only to the author (possibly by making it closed source), might conceivably be able to gain widespread adoption. At that point, its author could use his exception and go largely unnoticed.&lt;br /&gt;
&lt;br /&gt;
== Definitely not a problem ==&lt;br /&gt;
&lt;br /&gt;
===Coin destruction===&lt;br /&gt;
Bitcoin has 2.1 quadrillion raw units, making up 8 decimals of BTC precision, so the entire network could potentially operate on much less than the full quantity of Bitcoins. If deflation gets to the point where transactions of more than 10 BTC are unheard of, clients can just switch to another unit so that, for example, it shows 10 mBTC rather than 0.01 BTC.&lt;br /&gt;
&lt;br /&gt;
The maximum number of raw units might not be enough if the &#039;&#039;entire world&#039;&#039; starts using BTC, but it would not be too difficult to increase precision in that case. The transaction format and version number would be scheduled to change at some particular block number after a year or two, and everyone would have to update by then.&lt;br /&gt;
&lt;br /&gt;
===Generating tons of addresses===&lt;br /&gt;
Generating an address doesn&#039;t touch the network at all. You&#039;d only be wasting your CPU resources and disk space.&lt;br /&gt;
&lt;br /&gt;
Also, a collision is highly unlikely.&lt;br /&gt;
&lt;br /&gt;
Keys are 256 bit in length and are hashed in a 160 bit address.(2^160th power)&lt;br /&gt;
Divide it by the world population and you have about 215,000,000,000,000,000,000,000,000,000,000,000,000 addresses per capita.(2.15 x 10^38)[http://www.wolframalpha.com/input/?i=2^160+%2F+world+population]&lt;br /&gt;
&lt;br /&gt;
===Everyone calculates at the same rate===&lt;br /&gt;
If everyone began with identical blocks and started their nonce at 1 and incremented, the fastest machine would always win. However, each block contains a new, random public key known only to you in the list of transactions.  The 256-bit &amp;quot;Merkle tree&amp;quot; hash of this is part of the block header.&lt;br /&gt;
&lt;br /&gt;
So everyone begins with slightly different blocks and everyone truly has a random chance of winning (modified by CPU power).&lt;br /&gt;
&lt;br /&gt;
===Generate &amp;quot;valid&amp;quot; blocks with a lower difficulty than normal===&lt;br /&gt;
Using unmodified Bitcoin code, an attacker could segment himself from the main network and generate a long block chain with a lower difficulty than the real network. These blocks would be totally valid for his network. However, it would be impossible to combine the two networks (and the &amp;quot;false&amp;quot; chain would be destroyed in the process).&lt;br /&gt;
&lt;br /&gt;
* Even though your network&#039;s difficulty can be less than the real difficulty, this doesn&#039;t give you any advantage over the real network. You&#039;ll gain ground when the real network is taking more than 10 minutes to generate a block, but you&#039;ll lose ground when the network takes less than 10 minutes.&lt;br /&gt;
* Every few releases of Bitcoin, a recent block hash is hardcoded into the source code. Any blocks before that point can&#039;t be changed. An attacker starting at that point would have to reduce the difficulty, but this would require him to generate blocks at a much slower rate than once per 10 minutes. By the time he finally gets to a difficulty of 1, a new version of Bitcoin with an updated hardcoded block will probably have been released.&lt;br /&gt;
* &amp;quot;Block chain length&amp;quot; is calculated from the combined difficulty of all the blocks, not just the number of blocks in the chain. The one that represents the most CPU usage will win.&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
&lt;br /&gt;
* [[Double-spending]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Technical]]&lt;/div&gt;</summary>
		<author><name>Sergio Demian Lerner</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Weaknesses&amp;diff=32328</id>
		<title>Weaknesses</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Weaknesses&amp;diff=32328"/>
		<updated>2012-11-04T03:41:26Z</updated>

		<summary type="html">&lt;p&gt;Sergio Demian Lerner: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Might be a problem ==&lt;br /&gt;
=== Wallet Vulnerable To Theft ===&lt;br /&gt;
&lt;br /&gt;
The [[wallet]] is stored unencrypted, by default, and thus becomes a valuable target for theft.  Recent releases of the Bitcoin client now supports encryption to protect the wallet data, though the user must opt-in.&lt;br /&gt;
&lt;br /&gt;
=== Tracing a coin&#039;s history ===&lt;br /&gt;
Tracing a coin&#039;s history can be used to connect identities to addresses. [[Anonymity|More info]].&lt;br /&gt;
&lt;br /&gt;
=== Cancer nodes ===&lt;br /&gt;
It&#039;s trivial for an attacker to fill the network with clients controlled by him. This might be helpful in the execution of other attacks.&lt;br /&gt;
&lt;br /&gt;
For example, an attacker might connect 100,000 IP addresses to the IRC bootstrap channel. You would then be very likely to connect only to attacker nodes. This state can be exploited in (at least) the following ways:&lt;br /&gt;
* The attacker can refuse to relay blocks and transactions from everyone, disconnecting you from the network.&lt;br /&gt;
* The attacker can relay only blocks that he creates, putting you on a separate network. You&#039;re then open to [[double-spending]] attacks.&lt;br /&gt;
* If you rely on transactions with 0 confirmations, the attacker can just filter out certain transactions to execute a double-spending attack.&lt;br /&gt;
* Low-latency encryption/anonymization of Bitcoin&#039;s transmissions (With Tor, JAP, etc.) can be defeated relatively easy with a timing attack if you&#039;re connected to several of the attacker&#039;s nodes and the attacker is watching your transmissions at your ISP.&lt;br /&gt;
&lt;br /&gt;
Bitcoin makes these attacks more difficult by only making an outbound connection to one IP address per /16 (x.y.0.0). Incoming connections are unlimited and unregulated, but this is generally only a problem in the anonymity case, where you&#039;re probably already unable to accept incoming connections.&lt;br /&gt;
&lt;br /&gt;
Looking for suspiciously low network hash-rates may help prevent the second one.&lt;br /&gt;
&lt;br /&gt;
=== No authentication for IP transfers ===&lt;br /&gt;
Since there&#039;s no authentication when sending to an [[IP address]] (as opposed to a [[Address|Bitcoin address]]), executing a man-in-the-middle attack and stealing the sent BitCoins is trivial. This attack is downright &#039;&#039;likely&#039;&#039; if you&#039;re using Tor. For this reason, IP transfers are disabled by default in modern Bitcoin clients, though the feature can be enabled with a command line argument if desired.&lt;br /&gt;
&lt;br /&gt;
=== Packet sniffing ===&lt;br /&gt;
Someone who can see all of your Internet traffic can easily see when you send a transaction that you didn&#039;t receive (which means that it&#039;s yours). This would be made more difficult (but not impossible) if node-to-node encryption was used.&lt;br /&gt;
&lt;br /&gt;
=== Denial of Service (DoS) attacks ===&lt;br /&gt;
Sending lots of data to a node may make it so busy it cannot process normal bitcoin transactions.  Bitcoin has some denial-of-service prevention built-in, but is likely still vulnerable to more sophisticated denial-of-service attacks.&lt;br /&gt;
&lt;br /&gt;
These are the current Bitcoin Satoshi client protections to deter DoS attacks, as of version 0.7.0:&lt;br /&gt;
&lt;br /&gt;
# Does not forward orphan transactions/blocks&lt;br /&gt;
# Does not forward double-spend transactions&lt;br /&gt;
# Restrict the maximum number of signature checks a transaction input may request&lt;br /&gt;
# Continuous rate-limit of free transactions to mitigate &#039;penny-flooding&#039;&lt;br /&gt;
# Keeping a DoS score of each connected peer and disconnects from a peer that send messages that fail to comply with the rules.&lt;br /&gt;
# Permanently ban IP addresses that misbehave for a time lapse (24 hours default)&lt;br /&gt;
# Limit the number of stored orphan transactions (10000 by default)&lt;br /&gt;
# Use a signature cache to prevent attacks that try to continuously trigger the re-verification of stored orphan transactions&lt;br /&gt;
# Limit the number of stored signatures in the signature cache (50000 signatures by default)&lt;br /&gt;
# Tries to catch errors in transactions before the time consuming signature verifications.&lt;br /&gt;
# Penalize peers that send lots of duplicate/expired/invalid-signature/whatever alerts, so they eventually get banned.&lt;br /&gt;
# In orphan/signature caches: when removing an item, evict a random entry.&lt;br /&gt;
# Data structures are specially chosen to avoid loops in which the number of iterations can be controller by an attacker that result in exponential complexity.&lt;br /&gt;
# Ignore big orphan transactions, to avoid a send-big-orphans memory exhaustion attack.&lt;br /&gt;
# In RPC: Only send a HTTP 403 response if it&#039;s not using SSL to prevent a DoS during the SSL handshake.&lt;br /&gt;
# In RPC: Sleep some time if authorization fails to deter brute-forcing short passwords.&lt;br /&gt;
# In GUI: Limit URI length to prevent a DoS against the QR-Code dialog&lt;br /&gt;
&lt;br /&gt;
Satoshi client does not directly limit peer bandwidth nor CPU usage.&lt;br /&gt;
&lt;br /&gt;
=== Forcing clock drift against a target node ===&lt;br /&gt;
&lt;br /&gt;
See [http://culubas.blogspot.com/2011/05/timejacking-bitcoin_802.html Timejacking] for a description of this attack. It can be fixed by changing how nodes calculate the current time.&lt;br /&gt;
&lt;br /&gt;
=== Illegal content in the block chain ===&lt;br /&gt;
It is illegal in some countries to possess/distribute certain kinds of data. Since arbitrary data can be included in Bitcoin transactions, and clients must normally have a copy of all unspent transactions, this could cause legal problems.&lt;br /&gt;
&lt;br /&gt;
== Probably not a problem ==&lt;br /&gt;
&lt;br /&gt;
===Breaking the cryptography===&lt;br /&gt;
SHA-256 and ECDSA are considered very strong currently, but they might be broken in the far future. If that happens, BitCoin can shift to a stronger algorithm. [https://bitcointalk.org/index.php?topic=191.msg1585#msg1585 More info].&lt;br /&gt;
&lt;br /&gt;
===Scalability===&lt;br /&gt;
BitCoin can easily scale beyond the level of traffic VISA sees globally today. See the discussion on the [[scalability]] page for more information.&lt;br /&gt;
&lt;br /&gt;
===Segmentation===&lt;br /&gt;
If there is even a &amp;quot;trickle&amp;quot; of a connection between two sides of a segmented network, things should still work perfectly. When block chains are combined, all of the non-generation transactions in the shorter chain are re-added to the transaction pool -- they&#039;ll start over at 0/unconfirmed, but they&#039;ll still be valid. No mature transactions will be lost unless the segmentation persists for longer than ~120 blocks. Then generations will start to mature, and any transactions based on those generations will become invalid when recombined with the longer chain. [https://bitcointalk.org/index.php?topic=241.msg2071#msg2071 More info].&lt;br /&gt;
&lt;br /&gt;
=== Attacking all users ===&lt;br /&gt;
The IP addresses of most users are totally public. You can use Tor to hide this, but the network won&#039;t work if everyone does this. BitCoin requires that &#039;&#039;some&#039;&#039; country is still free.&lt;br /&gt;
&lt;br /&gt;
=== Dropping transactions ===&lt;br /&gt;
Nodes that generate blocks can choose not to include a transaction in their blocks. When this happens, the transaction remains &amp;quot;active&amp;quot; and can be included in a later block. Two things discourage this:&lt;br /&gt;
* Nodes only hash a fixed-size &#039;&#039;header&#039;&#039;, so there is no speed advantage to dropping transactions.&lt;br /&gt;
* [[Satoshi]] has [https://bitcointalk.org/index.php?topic=165.msg1595#msg1595 communicated] that he will write code to stop this kind of thing if it becomes a problem.&lt;br /&gt;
&lt;br /&gt;
=== Attacker has a lot of computing power ===&lt;br /&gt;
An attacker that controls more than 50% of the network&#039;s computing power can, for the time that he is in control, exclude and modify the ordering of transactions. This allows him to:&lt;br /&gt;
* Reverse transactions that he sends while he&#039;s in control.  This has the potential to [[Double-spending#51.25_attack|double-spend transactions]] that previously had already been seen in the block chain.&lt;br /&gt;
* Prevent some or all transactions from gaining any confirmations&lt;br /&gt;
* Prevent some or all other miners from mining any valid blocks&lt;br /&gt;
The attacker &#039;&#039;can&#039;t&#039;&#039;:&lt;br /&gt;
* Reverse other people&#039;s transactions&lt;br /&gt;
* Prevent transactions from being sent at all (they&#039;ll show as 0/unconfirmed)&lt;br /&gt;
* Change the number of coins generated per block&lt;br /&gt;
* Create coins out of thin air&lt;br /&gt;
* Send coins that never belonged to him&lt;br /&gt;
&lt;br /&gt;
It&#039;s much more difficult to change historical blocks, and it becomes exponentially more difficult the further back you go. As above, changing historical blocks only allows you to exclude and change the ordering of transactions. It&#039;s impossible to change blocks created before the last checkpoint.&lt;br /&gt;
&lt;br /&gt;
Since this attack doesn&#039;t permit all that much power over the network, it is expected that no one will attempt it. A profit-seeking person will always gain more by just following the rules, and even someone trying to destroy the system will probably find other attacks more attractive. However, if this attack is successfully executed, it will be difficult or impossible to &amp;quot;untangle&amp;quot; the mess created -- any changes the attacker makes might become permanent.&lt;br /&gt;
&lt;br /&gt;
=== Spamming transactions ===&lt;br /&gt;
&lt;br /&gt;
It is easy to send transactions to yourself repeatedly. If these transactions fill blocks to the maximum size (1MB), other transactions would be delayed until the next block.&lt;br /&gt;
&lt;br /&gt;
This is made expensive by the [[transaction fee|fees]] that would be required after the 50KB of free transactions per block are exhausted. An attacker will eventually eliminate free transactions, but Bitcoin fees will always be low because raising fees above 0.01 BTC per KB would require spending transaction fees. An attacker will eventually run out of money. Even if an attacker wants to waste money, transactions are further prioritized by the time since the coins were last spent, so attacks spending the same coins repeatedly are less effective.&lt;br /&gt;
&lt;br /&gt;
=== The [[Double-spending#Finney_attack|Finney attack]] ===&lt;br /&gt;
Named for Hal Finney, who first described this variation of a double-spend attack involving accepting [http://www.bitcointalk.org/index.php?topic=3441.msg48384#msg48384 0-confirmation transactions].  Accepting 0-confirmation large-value transactions is problematic; accepting them for low-value transactions (after waiting several seconds to detect an ordinary double-spend attempt) is probably safe.&lt;br /&gt;
&lt;br /&gt;
===Rival/malicious client code===&lt;br /&gt;
Any rival client must follow Bitcoin&#039;s rules or else all current BitCoin clients will ignore it. You&#039;d have to actually get people to &#039;&#039;use&#039;&#039; your client. A better client that pretends to follow the same rules, but with an exception known only to the author (possibly by making it closed source), might conceivably be able to gain widespread adoption. At that point, its author could use his exception and go largely unnoticed.&lt;br /&gt;
&lt;br /&gt;
== Definitely not a problem ==&lt;br /&gt;
&lt;br /&gt;
===Coin destruction===&lt;br /&gt;
Bitcoin has 2.1 quadrillion raw units, making up 8 decimals of BTC precision, so the entire network could potentially operate on much less than the full quantity of Bitcoins. If deflation gets to the point where transactions of more than 10 BTC are unheard of, clients can just switch to another unit so that, for example, it shows 10 mBTC rather than 0.01 BTC.&lt;br /&gt;
&lt;br /&gt;
The maximum number of raw units might not be enough if the &#039;&#039;entire world&#039;&#039; starts using BTC, but it would not be too difficult to increase precision in that case. The transaction format and version number would be scheduled to change at some particular block number after a year or two, and everyone would have to update by then.&lt;br /&gt;
&lt;br /&gt;
===Generating tons of addresses===&lt;br /&gt;
Generating an address doesn&#039;t touch the network at all. You&#039;d only be wasting your CPU resources and disk space.&lt;br /&gt;
&lt;br /&gt;
Also, a collision is highly unlikely.&lt;br /&gt;
&lt;br /&gt;
Keys are 256 bit in length and are hashed in a 160 bit address.(2^160th power)&lt;br /&gt;
Divide it by the world population and you have about 215,000,000,000,000,000,000,000,000,000,000,000,000 addresses per capita.(2.15 x 10^38)[http://www.wolframalpha.com/input/?i=2^160+%2F+world+population]&lt;br /&gt;
&lt;br /&gt;
===Everyone calculates at the same rate===&lt;br /&gt;
If everyone began with identical blocks and started their nonce at 1 and incremented, the fastest machine would always win. However, each block contains a new, random public key known only to you in the list of transactions.  The 256-bit &amp;quot;Merkle tree&amp;quot; hash of this is part of the block header.&lt;br /&gt;
&lt;br /&gt;
So everyone begins with slightly different blocks and everyone truly has a random chance of winning (modified by CPU power).&lt;br /&gt;
&lt;br /&gt;
===Generate &amp;quot;valid&amp;quot; blocks with a lower difficulty than normal===&lt;br /&gt;
Using unmodified Bitcoin code, an attacker could segment himself from the main network and generate a long block chain with a lower difficulty than the real network. These blocks would be totally valid for his network. However, it would be impossible to combine the two networks (and the &amp;quot;false&amp;quot; chain would be destroyed in the process).&lt;br /&gt;
&lt;br /&gt;
* Even though your network&#039;s difficulty can be less than the real difficulty, this doesn&#039;t give you any advantage over the real network. You&#039;ll gain ground when the real network is taking more than 10 minutes to generate a block, but you&#039;ll lose ground when the network takes less than 10 minutes.&lt;br /&gt;
* Every few releases of Bitcoin, a recent block hash is hardcoded into the source code. Any blocks before that point can&#039;t be changed. An attacker starting at that point would have to reduce the difficulty, but this would require him to generate blocks at a much slower rate than once per 10 minutes. By the time he finally gets to a difficulty of 1, a new version of Bitcoin with an updated hardcoded block will probably have been released.&lt;br /&gt;
* &amp;quot;Block chain length&amp;quot; is calculated from the combined difficulty of all the blocks, not just the number of blocks in the chain. The one that represents the most CPU usage will win.&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
&lt;br /&gt;
* [[Double-spending]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Technical]]&lt;/div&gt;</summary>
		<author><name>Sergio Demian Lerner</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Weaknesses&amp;diff=32327</id>
		<title>Weaknesses</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Weaknesses&amp;diff=32327"/>
		<updated>2012-11-04T03:40:33Z</updated>

		<summary type="html">&lt;p&gt;Sergio Demian Lerner: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Might be a problem ==&lt;br /&gt;
=== Wallet Vulnerable To Theft ===&lt;br /&gt;
&lt;br /&gt;
The [[wallet]] is stored unencrypted, by default, and thus becomes a valuable target for theft.  Recent releases of the Bitcoin client now supports encryption to protect the wallet data, though the user must opt-in.&lt;br /&gt;
&lt;br /&gt;
=== Tracing a coin&#039;s history ===&lt;br /&gt;
Tracing a coin&#039;s history can be used to connect identities to addresses. [[Anonymity|More info]].&lt;br /&gt;
&lt;br /&gt;
=== Cancer nodes ===&lt;br /&gt;
It&#039;s trivial for an attacker to fill the network with clients controlled by him. This might be helpful in the execution of other attacks.&lt;br /&gt;
&lt;br /&gt;
For example, an attacker might connect 100,000 IP addresses to the IRC bootstrap channel. You would then be very likely to connect only to attacker nodes. This state can be exploited in (at least) the following ways:&lt;br /&gt;
* The attacker can refuse to relay blocks and transactions from everyone, disconnecting you from the network.&lt;br /&gt;
* The attacker can relay only blocks that he creates, putting you on a separate network. You&#039;re then open to [[double-spending]] attacks.&lt;br /&gt;
* If you rely on transactions with 0 confirmations, the attacker can just filter out certain transactions to execute a double-spending attack.&lt;br /&gt;
* Low-latency encryption/anonymization of Bitcoin&#039;s transmissions (With Tor, JAP, etc.) can be defeated relatively easy with a timing attack if you&#039;re connected to several of the attacker&#039;s nodes and the attacker is watching your transmissions at your ISP.&lt;br /&gt;
&lt;br /&gt;
Bitcoin makes these attacks more difficult by only making an outbound connection to one IP address per /16 (x.y.0.0). Incoming connections are unlimited and unregulated, but this is generally only a problem in the anonymity case, where you&#039;re probably already unable to accept incoming connections.&lt;br /&gt;
&lt;br /&gt;
Looking for suspiciously low network hash-rates may help prevent the second one.&lt;br /&gt;
&lt;br /&gt;
=== No authentication for IP transfers ===&lt;br /&gt;
Since there&#039;s no authentication when sending to an [[IP address]] (as opposed to a [[Address|Bitcoin address]]), executing a man-in-the-middle attack and stealing the sent BitCoins is trivial. This attack is downright &#039;&#039;likely&#039;&#039; if you&#039;re using Tor. For this reason, IP transfers are disabled by default in modern Bitcoin clients, though the feature can be enabled with a command line argument if desired.&lt;br /&gt;
&lt;br /&gt;
=== Packet sniffing ===&lt;br /&gt;
Someone who can see all of your Internet traffic can easily see when you send a transaction that you didn&#039;t receive (which means that it&#039;s yours). This would be made more difficult (but not impossible) if node-to-node encryption was used.&lt;br /&gt;
&lt;br /&gt;
=== Denial of Service (DoS) attacks ===&lt;br /&gt;
Sending lots of data to a node may make it so busy it cannot process normal bitcoin transactions.  Bitcoin has some denial-of-service prevention built-in, but is likely still vulnerable to more sophisticated denial-of-service attacks.&lt;br /&gt;
&lt;br /&gt;
These are the current Bitcoin Satoshi client protections to deter DoS attacks, as of version 0.7.0:&lt;br /&gt;
&lt;br /&gt;
# Does not forward orphan transactions/blocks&lt;br /&gt;
# Does not forward double-spend transactions&lt;br /&gt;
# Restrict the maximum number of signature checks a transaction input may request&lt;br /&gt;
# Continuous rate-limit of free transactions to mitigate &#039;penny-flooding&#039;&lt;br /&gt;
# Keeping a DoS score of each connected peer and disconnects from a peer that send messages that fail to comply with the rules.&lt;br /&gt;
# Permanently ban IP addresses that misbehave for a time lapse (24 hours default)&lt;br /&gt;
# Limit the number of stored orphan transactions (10000 by default)&lt;br /&gt;
# Use a signature cache to prevent attacks that try to continuously trigger the re-verification of stored orphan transactions&lt;br /&gt;
# Limit the number of stored signatures in the signature cache (50000 signatures by default)&lt;br /&gt;
# Tries to catch errors in transactions before the time consuming signature verifications.&lt;br /&gt;
# Penalize peers that send us lots of duplicate/expired/invalid-signature/whatever alerts, so they eventually get banned.&lt;br /&gt;
# In orphan/signature caches: when removing an item, evict a random entry.&lt;br /&gt;
# Data structures are specially chosen to avoid loops in which the number of iterations can be controller by an attacker that result in exponential complexity.&lt;br /&gt;
# Ignore big orphan transactions, to avoid a send-big-orphans memory exhaustion attack.&lt;br /&gt;
# In RPC: Only send a HTTP 403 response if it&#039;s not using SSL to prevent a DoS during the SSL handshake.&lt;br /&gt;
# In RPC: Sleep some time if authorization fails to deter brute-forcing short passwords.&lt;br /&gt;
# In GUI: Limit URI length to prevent a DoS against the QR-Code dialog&lt;br /&gt;
&lt;br /&gt;
Satoshi client does not directly limit peer bandwidth nor CPU usage.&lt;br /&gt;
&lt;br /&gt;
=== Forcing clock drift against a target node ===&lt;br /&gt;
&lt;br /&gt;
See [http://culubas.blogspot.com/2011/05/timejacking-bitcoin_802.html Timejacking] for a description of this attack. It can be fixed by changing how nodes calculate the current time.&lt;br /&gt;
&lt;br /&gt;
=== Illegal content in the block chain ===&lt;br /&gt;
It is illegal in some countries to possess/distribute certain kinds of data. Since arbitrary data can be included in Bitcoin transactions, and clients must normally have a copy of all unspent transactions, this could cause legal problems.&lt;br /&gt;
&lt;br /&gt;
== Probably not a problem ==&lt;br /&gt;
&lt;br /&gt;
===Breaking the cryptography===&lt;br /&gt;
SHA-256 and ECDSA are considered very strong currently, but they might be broken in the far future. If that happens, BitCoin can shift to a stronger algorithm. [https://bitcointalk.org/index.php?topic=191.msg1585#msg1585 More info].&lt;br /&gt;
&lt;br /&gt;
===Scalability===&lt;br /&gt;
BitCoin can easily scale beyond the level of traffic VISA sees globally today. See the discussion on the [[scalability]] page for more information.&lt;br /&gt;
&lt;br /&gt;
===Segmentation===&lt;br /&gt;
If there is even a &amp;quot;trickle&amp;quot; of a connection between two sides of a segmented network, things should still work perfectly. When block chains are combined, all of the non-generation transactions in the shorter chain are re-added to the transaction pool -- they&#039;ll start over at 0/unconfirmed, but they&#039;ll still be valid. No mature transactions will be lost unless the segmentation persists for longer than ~120 blocks. Then generations will start to mature, and any transactions based on those generations will become invalid when recombined with the longer chain. [https://bitcointalk.org/index.php?topic=241.msg2071#msg2071 More info].&lt;br /&gt;
&lt;br /&gt;
=== Attacking all users ===&lt;br /&gt;
The IP addresses of most users are totally public. You can use Tor to hide this, but the network won&#039;t work if everyone does this. BitCoin requires that &#039;&#039;some&#039;&#039; country is still free.&lt;br /&gt;
&lt;br /&gt;
=== Dropping transactions ===&lt;br /&gt;
Nodes that generate blocks can choose not to include a transaction in their blocks. When this happens, the transaction remains &amp;quot;active&amp;quot; and can be included in a later block. Two things discourage this:&lt;br /&gt;
* Nodes only hash a fixed-size &#039;&#039;header&#039;&#039;, so there is no speed advantage to dropping transactions.&lt;br /&gt;
* [[Satoshi]] has [https://bitcointalk.org/index.php?topic=165.msg1595#msg1595 communicated] that he will write code to stop this kind of thing if it becomes a problem.&lt;br /&gt;
&lt;br /&gt;
=== Attacker has a lot of computing power ===&lt;br /&gt;
An attacker that controls more than 50% of the network&#039;s computing power can, for the time that he is in control, exclude and modify the ordering of transactions. This allows him to:&lt;br /&gt;
* Reverse transactions that he sends while he&#039;s in control.  This has the potential to [[Double-spending#51.25_attack|double-spend transactions]] that previously had already been seen in the block chain.&lt;br /&gt;
* Prevent some or all transactions from gaining any confirmations&lt;br /&gt;
* Prevent some or all other miners from mining any valid blocks&lt;br /&gt;
The attacker &#039;&#039;can&#039;t&#039;&#039;:&lt;br /&gt;
* Reverse other people&#039;s transactions&lt;br /&gt;
* Prevent transactions from being sent at all (they&#039;ll show as 0/unconfirmed)&lt;br /&gt;
* Change the number of coins generated per block&lt;br /&gt;
* Create coins out of thin air&lt;br /&gt;
* Send coins that never belonged to him&lt;br /&gt;
&lt;br /&gt;
It&#039;s much more difficult to change historical blocks, and it becomes exponentially more difficult the further back you go. As above, changing historical blocks only allows you to exclude and change the ordering of transactions. It&#039;s impossible to change blocks created before the last checkpoint.&lt;br /&gt;
&lt;br /&gt;
Since this attack doesn&#039;t permit all that much power over the network, it is expected that no one will attempt it. A profit-seeking person will always gain more by just following the rules, and even someone trying to destroy the system will probably find other attacks more attractive. However, if this attack is successfully executed, it will be difficult or impossible to &amp;quot;untangle&amp;quot; the mess created -- any changes the attacker makes might become permanent.&lt;br /&gt;
&lt;br /&gt;
=== Spamming transactions ===&lt;br /&gt;
&lt;br /&gt;
It is easy to send transactions to yourself repeatedly. If these transactions fill blocks to the maximum size (1MB), other transactions would be delayed until the next block.&lt;br /&gt;
&lt;br /&gt;
This is made expensive by the [[transaction fee|fees]] that would be required after the 50KB of free transactions per block are exhausted. An attacker will eventually eliminate free transactions, but Bitcoin fees will always be low because raising fees above 0.01 BTC per KB would require spending transaction fees. An attacker will eventually run out of money. Even if an attacker wants to waste money, transactions are further prioritized by the time since the coins were last spent, so attacks spending the same coins repeatedly are less effective.&lt;br /&gt;
&lt;br /&gt;
=== The [[Double-spending#Finney_attack|Finney attack]] ===&lt;br /&gt;
Named for Hal Finney, who first described this variation of a double-spend attack involving accepting [http://www.bitcointalk.org/index.php?topic=3441.msg48384#msg48384 0-confirmation transactions].  Accepting 0-confirmation large-value transactions is problematic; accepting them for low-value transactions (after waiting several seconds to detect an ordinary double-spend attempt) is probably safe.&lt;br /&gt;
&lt;br /&gt;
===Rival/malicious client code===&lt;br /&gt;
Any rival client must follow Bitcoin&#039;s rules or else all current BitCoin clients will ignore it. You&#039;d have to actually get people to &#039;&#039;use&#039;&#039; your client. A better client that pretends to follow the same rules, but with an exception known only to the author (possibly by making it closed source), might conceivably be able to gain widespread adoption. At that point, its author could use his exception and go largely unnoticed.&lt;br /&gt;
&lt;br /&gt;
== Definitely not a problem ==&lt;br /&gt;
&lt;br /&gt;
===Coin destruction===&lt;br /&gt;
Bitcoin has 2.1 quadrillion raw units, making up 8 decimals of BTC precision, so the entire network could potentially operate on much less than the full quantity of Bitcoins. If deflation gets to the point where transactions of more than 10 BTC are unheard of, clients can just switch to another unit so that, for example, it shows 10 mBTC rather than 0.01 BTC.&lt;br /&gt;
&lt;br /&gt;
The maximum number of raw units might not be enough if the &#039;&#039;entire world&#039;&#039; starts using BTC, but it would not be too difficult to increase precision in that case. The transaction format and version number would be scheduled to change at some particular block number after a year or two, and everyone would have to update by then.&lt;br /&gt;
&lt;br /&gt;
===Generating tons of addresses===&lt;br /&gt;
Generating an address doesn&#039;t touch the network at all. You&#039;d only be wasting your CPU resources and disk space.&lt;br /&gt;
&lt;br /&gt;
Also, a collision is highly unlikely.&lt;br /&gt;
&lt;br /&gt;
Keys are 256 bit in length and are hashed in a 160 bit address.(2^160th power)&lt;br /&gt;
Divide it by the world population and you have about 215,000,000,000,000,000,000,000,000,000,000,000,000 addresses per capita.(2.15 x 10^38)[http://www.wolframalpha.com/input/?i=2^160+%2F+world+population]&lt;br /&gt;
&lt;br /&gt;
===Everyone calculates at the same rate===&lt;br /&gt;
If everyone began with identical blocks and started their nonce at 1 and incremented, the fastest machine would always win. However, each block contains a new, random public key known only to you in the list of transactions.  The 256-bit &amp;quot;Merkle tree&amp;quot; hash of this is part of the block header.&lt;br /&gt;
&lt;br /&gt;
So everyone begins with slightly different blocks and everyone truly has a random chance of winning (modified by CPU power).&lt;br /&gt;
&lt;br /&gt;
===Generate &amp;quot;valid&amp;quot; blocks with a lower difficulty than normal===&lt;br /&gt;
Using unmodified Bitcoin code, an attacker could segment himself from the main network and generate a long block chain with a lower difficulty than the real network. These blocks would be totally valid for his network. However, it would be impossible to combine the two networks (and the &amp;quot;false&amp;quot; chain would be destroyed in the process).&lt;br /&gt;
&lt;br /&gt;
* Even though your network&#039;s difficulty can be less than the real difficulty, this doesn&#039;t give you any advantage over the real network. You&#039;ll gain ground when the real network is taking more than 10 minutes to generate a block, but you&#039;ll lose ground when the network takes less than 10 minutes.&lt;br /&gt;
* Every few releases of Bitcoin, a recent block hash is hardcoded into the source code. Any blocks before that point can&#039;t be changed. An attacker starting at that point would have to reduce the difficulty, but this would require him to generate blocks at a much slower rate than once per 10 minutes. By the time he finally gets to a difficulty of 1, a new version of Bitcoin with an updated hardcoded block will probably have been released.&lt;br /&gt;
* &amp;quot;Block chain length&amp;quot; is calculated from the combined difficulty of all the blocks, not just the number of blocks in the chain. The one that represents the most CPU usage will win.&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
&lt;br /&gt;
* [[Double-spending]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Technical]]&lt;/div&gt;</summary>
		<author><name>Sergio Demian Lerner</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Weaknesses&amp;diff=32326</id>
		<title>Weaknesses</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Weaknesses&amp;diff=32326"/>
		<updated>2012-11-04T03:39:23Z</updated>

		<summary type="html">&lt;p&gt;Sergio Demian Lerner: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Might be a problem ==&lt;br /&gt;
=== Wallet Vulnerable To Theft ===&lt;br /&gt;
&lt;br /&gt;
The [[wallet]] is stored unencrypted, by default, and thus becomes a valuable target for theft.  Recent releases of the Bitcoin client now supports encryption to protect the wallet data, though the user must opt-in.&lt;br /&gt;
&lt;br /&gt;
=== Tracing a coin&#039;s history ===&lt;br /&gt;
Tracing a coin&#039;s history can be used to connect identities to addresses. [[Anonymity|More info]].&lt;br /&gt;
&lt;br /&gt;
=== Cancer nodes ===&lt;br /&gt;
It&#039;s trivial for an attacker to fill the network with clients controlled by him. This might be helpful in the execution of other attacks.&lt;br /&gt;
&lt;br /&gt;
For example, an attacker might connect 100,000 IP addresses to the IRC bootstrap channel. You would then be very likely to connect only to attacker nodes. This state can be exploited in (at least) the following ways:&lt;br /&gt;
* The attacker can refuse to relay blocks and transactions from everyone, disconnecting you from the network.&lt;br /&gt;
* The attacker can relay only blocks that he creates, putting you on a separate network. You&#039;re then open to [[double-spending]] attacks.&lt;br /&gt;
* If you rely on transactions with 0 confirmations, the attacker can just filter out certain transactions to execute a double-spending attack.&lt;br /&gt;
* Low-latency encryption/anonymization of Bitcoin&#039;s transmissions (With Tor, JAP, etc.) can be defeated relatively easy with a timing attack if you&#039;re connected to several of the attacker&#039;s nodes and the attacker is watching your transmissions at your ISP.&lt;br /&gt;
&lt;br /&gt;
Bitcoin makes these attacks more difficult by only making an outbound connection to one IP address per /16 (x.y.0.0). Incoming connections are unlimited and unregulated, but this is generally only a problem in the anonymity case, where you&#039;re probably already unable to accept incoming connections.&lt;br /&gt;
&lt;br /&gt;
Looking for suspiciously low network hash-rates may help prevent the second one.&lt;br /&gt;
&lt;br /&gt;
=== No authentication for IP transfers ===&lt;br /&gt;
Since there&#039;s no authentication when sending to an [[IP address]] (as opposed to a [[Address|Bitcoin address]]), executing a man-in-the-middle attack and stealing the sent BitCoins is trivial. This attack is downright &#039;&#039;likely&#039;&#039; if you&#039;re using Tor. For this reason, IP transfers are disabled by default in modern Bitcoin clients, though the feature can be enabled with a command line argument if desired.&lt;br /&gt;
&lt;br /&gt;
=== Packet sniffing ===&lt;br /&gt;
Someone who can see all of your Internet traffic can easily see when you send a transaction that you didn&#039;t receive (which means that it&#039;s yours). This would be made more difficult (but not impossible) if node-to-node encryption was used.&lt;br /&gt;
&lt;br /&gt;
=== Denial of Service (DoS) attacks ===&lt;br /&gt;
Sending lots of data to a node may make it so busy it cannot process normal bitcoin transactions.  Bitcoin has some denial-of-service prevention built-in, but is likely still vulnerable to more sophisticated denial-of-service attacks.&lt;br /&gt;
&lt;br /&gt;
These are the current Bitcoin Satoshi client protections to deter DoS attacks, as of version 0.7.0:&lt;br /&gt;
&lt;br /&gt;
# Does not forward orphan transactions/blocks&lt;br /&gt;
# Does not forward double-spend transactions&lt;br /&gt;
# Restrict the maximum number of signature checks a transaction input may request&lt;br /&gt;
# Continuous rate-limit of free transactions to mitigate &#039;penny-flooding&#039;&lt;br /&gt;
# Keeping a DoS score of each connected peer and disconnects from a peer that send messages that fail to comply with the rules.&lt;br /&gt;
# Permanently ban IP addresses that misbehave for a time lapse (24 hours default)&lt;br /&gt;
# Limit the number of stored orphan transactions (10000 by default)&lt;br /&gt;
# Use a signature cache to prevent attacks that try to continuously trigger the re-verification of stored orphan transactions&lt;br /&gt;
# Limit the number of stored signature in the signature cache (50000 signatures by default)&lt;br /&gt;
# Tries to catch errors in transactions before the time consuming signature verifications.&lt;br /&gt;
# Penalize peers that send us lots of duplicate/expired/invalid-signature/whatever alerts, so they eventually get banned.&lt;br /&gt;
# In orphan/signature caches: when removing an item, evict a random entry.&lt;br /&gt;
# Data structures are specially chosen to avoid loops in which the number of iterations can be controller by an attacker that result in exponential complexity.&lt;br /&gt;
# Ignore big orphan transactions, to avoid a send-big-orphans memory exhaustion attack.&lt;br /&gt;
# In RPC: Only send a HTTP 403 response if it&#039;s not using SSL to prevent a DoS during the SSL handshake.&lt;br /&gt;
# In RPC: Sleep some time if authorization fails to deter brute-forcing short passwords.&lt;br /&gt;
# In GUI: Limit URI length to prevent a DoS against the QR-Code dialog&lt;br /&gt;
&lt;br /&gt;
Satoshi client does not directly limit peer bandwidth nor CPU usage.&lt;br /&gt;
&lt;br /&gt;
=== Forcing clock drift against a target node ===&lt;br /&gt;
&lt;br /&gt;
See [http://culubas.blogspot.com/2011/05/timejacking-bitcoin_802.html Timejacking] for a description of this attack. It can be fixed by changing how nodes calculate the current time.&lt;br /&gt;
&lt;br /&gt;
=== Illegal content in the block chain ===&lt;br /&gt;
It is illegal in some countries to possess/distribute certain kinds of data. Since arbitrary data can be included in Bitcoin transactions, and clients must normally have a copy of all unspent transactions, this could cause legal problems.&lt;br /&gt;
&lt;br /&gt;
== Probably not a problem ==&lt;br /&gt;
&lt;br /&gt;
===Breaking the cryptography===&lt;br /&gt;
SHA-256 and ECDSA are considered very strong currently, but they might be broken in the far future. If that happens, BitCoin can shift to a stronger algorithm. [https://bitcointalk.org/index.php?topic=191.msg1585#msg1585 More info].&lt;br /&gt;
&lt;br /&gt;
===Scalability===&lt;br /&gt;
BitCoin can easily scale beyond the level of traffic VISA sees globally today. See the discussion on the [[scalability]] page for more information.&lt;br /&gt;
&lt;br /&gt;
===Segmentation===&lt;br /&gt;
If there is even a &amp;quot;trickle&amp;quot; of a connection between two sides of a segmented network, things should still work perfectly. When block chains are combined, all of the non-generation transactions in the shorter chain are re-added to the transaction pool -- they&#039;ll start over at 0/unconfirmed, but they&#039;ll still be valid. No mature transactions will be lost unless the segmentation persists for longer than ~120 blocks. Then generations will start to mature, and any transactions based on those generations will become invalid when recombined with the longer chain. [https://bitcointalk.org/index.php?topic=241.msg2071#msg2071 More info].&lt;br /&gt;
&lt;br /&gt;
=== Attacking all users ===&lt;br /&gt;
The IP addresses of most users are totally public. You can use Tor to hide this, but the network won&#039;t work if everyone does this. BitCoin requires that &#039;&#039;some&#039;&#039; country is still free.&lt;br /&gt;
&lt;br /&gt;
=== Dropping transactions ===&lt;br /&gt;
Nodes that generate blocks can choose not to include a transaction in their blocks. When this happens, the transaction remains &amp;quot;active&amp;quot; and can be included in a later block. Two things discourage this:&lt;br /&gt;
* Nodes only hash a fixed-size &#039;&#039;header&#039;&#039;, so there is no speed advantage to dropping transactions.&lt;br /&gt;
* [[Satoshi]] has [https://bitcointalk.org/index.php?topic=165.msg1595#msg1595 communicated] that he will write code to stop this kind of thing if it becomes a problem.&lt;br /&gt;
&lt;br /&gt;
=== Attacker has a lot of computing power ===&lt;br /&gt;
An attacker that controls more than 50% of the network&#039;s computing power can, for the time that he is in control, exclude and modify the ordering of transactions. This allows him to:&lt;br /&gt;
* Reverse transactions that he sends while he&#039;s in control.  This has the potential to [[Double-spending#51.25_attack|double-spend transactions]] that previously had already been seen in the block chain.&lt;br /&gt;
* Prevent some or all transactions from gaining any confirmations&lt;br /&gt;
* Prevent some or all other miners from mining any valid blocks&lt;br /&gt;
The attacker &#039;&#039;can&#039;t&#039;&#039;:&lt;br /&gt;
* Reverse other people&#039;s transactions&lt;br /&gt;
* Prevent transactions from being sent at all (they&#039;ll show as 0/unconfirmed)&lt;br /&gt;
* Change the number of coins generated per block&lt;br /&gt;
* Create coins out of thin air&lt;br /&gt;
* Send coins that never belonged to him&lt;br /&gt;
&lt;br /&gt;
It&#039;s much more difficult to change historical blocks, and it becomes exponentially more difficult the further back you go. As above, changing historical blocks only allows you to exclude and change the ordering of transactions. It&#039;s impossible to change blocks created before the last checkpoint.&lt;br /&gt;
&lt;br /&gt;
Since this attack doesn&#039;t permit all that much power over the network, it is expected that no one will attempt it. A profit-seeking person will always gain more by just following the rules, and even someone trying to destroy the system will probably find other attacks more attractive. However, if this attack is successfully executed, it will be difficult or impossible to &amp;quot;untangle&amp;quot; the mess created -- any changes the attacker makes might become permanent.&lt;br /&gt;
&lt;br /&gt;
=== Spamming transactions ===&lt;br /&gt;
&lt;br /&gt;
It is easy to send transactions to yourself repeatedly. If these transactions fill blocks to the maximum size (1MB), other transactions would be delayed until the next block.&lt;br /&gt;
&lt;br /&gt;
This is made expensive by the [[transaction fee|fees]] that would be required after the 50KB of free transactions per block are exhausted. An attacker will eventually eliminate free transactions, but Bitcoin fees will always be low because raising fees above 0.01 BTC per KB would require spending transaction fees. An attacker will eventually run out of money. Even if an attacker wants to waste money, transactions are further prioritized by the time since the coins were last spent, so attacks spending the same coins repeatedly are less effective.&lt;br /&gt;
&lt;br /&gt;
=== The [[Double-spending#Finney_attack|Finney attack]] ===&lt;br /&gt;
Named for Hal Finney, who first described this variation of a double-spend attack involving accepting [http://www.bitcointalk.org/index.php?topic=3441.msg48384#msg48384 0-confirmation transactions].  Accepting 0-confirmation large-value transactions is problematic; accepting them for low-value transactions (after waiting several seconds to detect an ordinary double-spend attempt) is probably safe.&lt;br /&gt;
&lt;br /&gt;
===Rival/malicious client code===&lt;br /&gt;
Any rival client must follow Bitcoin&#039;s rules or else all current BitCoin clients will ignore it. You&#039;d have to actually get people to &#039;&#039;use&#039;&#039; your client. A better client that pretends to follow the same rules, but with an exception known only to the author (possibly by making it closed source), might conceivably be able to gain widespread adoption. At that point, its author could use his exception and go largely unnoticed.&lt;br /&gt;
&lt;br /&gt;
== Definitely not a problem ==&lt;br /&gt;
&lt;br /&gt;
===Coin destruction===&lt;br /&gt;
Bitcoin has 2.1 quadrillion raw units, making up 8 decimals of BTC precision, so the entire network could potentially operate on much less than the full quantity of Bitcoins. If deflation gets to the point where transactions of more than 10 BTC are unheard of, clients can just switch to another unit so that, for example, it shows 10 mBTC rather than 0.01 BTC.&lt;br /&gt;
&lt;br /&gt;
The maximum number of raw units might not be enough if the &#039;&#039;entire world&#039;&#039; starts using BTC, but it would not be too difficult to increase precision in that case. The transaction format and version number would be scheduled to change at some particular block number after a year or two, and everyone would have to update by then.&lt;br /&gt;
&lt;br /&gt;
===Generating tons of addresses===&lt;br /&gt;
Generating an address doesn&#039;t touch the network at all. You&#039;d only be wasting your CPU resources and disk space.&lt;br /&gt;
&lt;br /&gt;
Also, a collision is highly unlikely.&lt;br /&gt;
&lt;br /&gt;
Keys are 256 bit in length and are hashed in a 160 bit address.(2^160th power)&lt;br /&gt;
Divide it by the world population and you have about 215,000,000,000,000,000,000,000,000,000,000,000,000 addresses per capita.(2.15 x 10^38)[http://www.wolframalpha.com/input/?i=2^160+%2F+world+population]&lt;br /&gt;
&lt;br /&gt;
===Everyone calculates at the same rate===&lt;br /&gt;
If everyone began with identical blocks and started their nonce at 1 and incremented, the fastest machine would always win. However, each block contains a new, random public key known only to you in the list of transactions.  The 256-bit &amp;quot;Merkle tree&amp;quot; hash of this is part of the block header.&lt;br /&gt;
&lt;br /&gt;
So everyone begins with slightly different blocks and everyone truly has a random chance of winning (modified by CPU power).&lt;br /&gt;
&lt;br /&gt;
===Generate &amp;quot;valid&amp;quot; blocks with a lower difficulty than normal===&lt;br /&gt;
Using unmodified Bitcoin code, an attacker could segment himself from the main network and generate a long block chain with a lower difficulty than the real network. These blocks would be totally valid for his network. However, it would be impossible to combine the two networks (and the &amp;quot;false&amp;quot; chain would be destroyed in the process).&lt;br /&gt;
&lt;br /&gt;
* Even though your network&#039;s difficulty can be less than the real difficulty, this doesn&#039;t give you any advantage over the real network. You&#039;ll gain ground when the real network is taking more than 10 minutes to generate a block, but you&#039;ll lose ground when the network takes less than 10 minutes.&lt;br /&gt;
* Every few releases of Bitcoin, a recent block hash is hardcoded into the source code. Any blocks before that point can&#039;t be changed. An attacker starting at that point would have to reduce the difficulty, but this would require him to generate blocks at a much slower rate than once per 10 minutes. By the time he finally gets to a difficulty of 1, a new version of Bitcoin with an updated hardcoded block will probably have been released.&lt;br /&gt;
* &amp;quot;Block chain length&amp;quot; is calculated from the combined difficulty of all the blocks, not just the number of blocks in the chain. The one that represents the most CPU usage will win.&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
&lt;br /&gt;
* [[Double-spending]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Technical]]&lt;/div&gt;</summary>
		<author><name>Sergio Demian Lerner</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Weaknesses&amp;diff=32324</id>
		<title>Weaknesses</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Weaknesses&amp;diff=32324"/>
		<updated>2012-11-04T02:57:40Z</updated>

		<summary type="html">&lt;p&gt;Sergio Demian Lerner: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Might be a problem ==&lt;br /&gt;
=== Wallet Vulnerable To Theft ===&lt;br /&gt;
&lt;br /&gt;
The [[wallet]] is stored unencrypted, by default, and thus becomes a valuable target for theft.  Recent releases of the Bitcoin client now supports encryption to protect the wallet data, though the user must opt-in.&lt;br /&gt;
&lt;br /&gt;
=== Tracing a coin&#039;s history ===&lt;br /&gt;
Tracing a coin&#039;s history can be used to connect identities to addresses. [[Anonymity|More info]].&lt;br /&gt;
&lt;br /&gt;
=== Cancer nodes ===&lt;br /&gt;
It&#039;s trivial for an attacker to fill the network with clients controlled by him. This might be helpful in the execution of other attacks.&lt;br /&gt;
&lt;br /&gt;
For example, an attacker might connect 100,000 IP addresses to the IRC bootstrap channel. You would then be very likely to connect only to attacker nodes. This state can be exploited in (at least) the following ways:&lt;br /&gt;
* The attacker can refuse to relay blocks and transactions from everyone, disconnecting you from the network.&lt;br /&gt;
* The attacker can relay only blocks that he creates, putting you on a separate network. You&#039;re then open to [[double-spending]] attacks.&lt;br /&gt;
* If you rely on transactions with 0 confirmations, the attacker can just filter out certain transactions to execute a double-spending attack.&lt;br /&gt;
* Low-latency encryption/anonymization of Bitcoin&#039;s transmissions (With Tor, JAP, etc.) can be defeated relatively easy with a timing attack if you&#039;re connected to several of the attacker&#039;s nodes and the attacker is watching your transmissions at your ISP.&lt;br /&gt;
&lt;br /&gt;
Bitcoin makes these attacks more difficult by only making an outbound connection to one IP address per /16 (x.y.0.0). Incoming connections are unlimited and unregulated, but this is generally only a problem in the anonymity case, where you&#039;re probably already unable to accept incoming connections.&lt;br /&gt;
&lt;br /&gt;
Looking for suspiciously low network hash-rates may help prevent the second one.&lt;br /&gt;
&lt;br /&gt;
=== No authentication for IP transfers ===&lt;br /&gt;
Since there&#039;s no authentication when sending to an [[IP address]] (as opposed to a [[Address|Bitcoin address]]), executing a man-in-the-middle attack and stealing the sent BitCoins is trivial. This attack is downright &#039;&#039;likely&#039;&#039; if you&#039;re using Tor. For this reason, IP transfers are disabled by default in modern Bitcoin clients, though the feature can be enabled with a command line argument if desired.&lt;br /&gt;
&lt;br /&gt;
=== Packet sniffing ===&lt;br /&gt;
Someone who can see all of your Internet traffic can easily see when you send a transaction that you didn&#039;t receive (which means that it&#039;s yours). This would be made more difficult (but not impossible) if node-to-node encryption was used.&lt;br /&gt;
&lt;br /&gt;
=== Denial of Service (DoS) attacks ===&lt;br /&gt;
Sending lots of data to a node may make it so busy it cannot process normal bitcoin transactions.  Bitcoin has some denial-of-service prevention built-in, but is likely still vulnerable to more sophisticated denial-of-service attacks.&lt;br /&gt;
&lt;br /&gt;
These are the current Bitcoin Satoshi client protections to deter DoS attacks, as of version 0.7.0:&lt;br /&gt;
&lt;br /&gt;
# Does not forward orphan transactions/blocks&lt;br /&gt;
# Does not forward double-spend transactions&lt;br /&gt;
# Restrict the maximum number of signature checks a transaction input may request&lt;br /&gt;
# Continuous rate-limit of free transactions to mitigate &#039;penny-flooding&#039;&lt;br /&gt;
# Keeping a DoS score of each connected peer and disconnects from a peer that send messages that fail to comply with the rules.&lt;br /&gt;
# Permanently ban IP addresses that misbehave for a time lapse (24 hours default)&lt;br /&gt;
# Limit the number of stored orphan transactions (10000 by default)&lt;br /&gt;
# Limit the number of stored signature in the signature cache (50000 signatures by default)&lt;br /&gt;
# Tries to catch errors in transactions before the time consuming signature verifications.&lt;br /&gt;
# Penalize peers that send us lots of duplicate/expired/invalid-signature/whatever alerts, so they eventually get banned.&lt;br /&gt;
# In orphan/signature caches: when removing an item, evict a random entry.&lt;br /&gt;
# Data structures are specially chosen to avoid loops in which the number of iterations can be controller by an attacker that result in exponential complexity.&lt;br /&gt;
# Ignore big orphan transactions, to avoid a send-big-orphans memory exhaustion attack.&lt;br /&gt;
# In RPC: Only send a HTTP 403 response if it&#039;s not using SSL to prevent a DoS during the SSL handshake.&lt;br /&gt;
# In RPC: Sleep some time if authorization fails to deter brute-forcing short passwords.&lt;br /&gt;
# In GUI: Limit URI length to prevent a DoS against the QR-Code dialog&lt;br /&gt;
&lt;br /&gt;
Satoshi client does not directly limit peer bandwidth nor CPU usage.&lt;br /&gt;
&lt;br /&gt;
=== Forcing clock drift against a target node ===&lt;br /&gt;
&lt;br /&gt;
See [http://culubas.blogspot.com/2011/05/timejacking-bitcoin_802.html Timejacking] for a description of this attack. It can be fixed by changing how nodes calculate the current time.&lt;br /&gt;
&lt;br /&gt;
=== Illegal content in the block chain ===&lt;br /&gt;
It is illegal in some countries to possess/distribute certain kinds of data. Since arbitrary data can be included in Bitcoin transactions, and clients must normally have a copy of all unspent transactions, this could cause legal problems.&lt;br /&gt;
&lt;br /&gt;
== Probably not a problem ==&lt;br /&gt;
&lt;br /&gt;
===Breaking the cryptography===&lt;br /&gt;
SHA-256 and ECDSA are considered very strong currently, but they might be broken in the far future. If that happens, BitCoin can shift to a stronger algorithm. [https://bitcointalk.org/index.php?topic=191.msg1585#msg1585 More info].&lt;br /&gt;
&lt;br /&gt;
===Scalability===&lt;br /&gt;
BitCoin can easily scale beyond the level of traffic VISA sees globally today. See the discussion on the [[scalability]] page for more information.&lt;br /&gt;
&lt;br /&gt;
===Segmentation===&lt;br /&gt;
If there is even a &amp;quot;trickle&amp;quot; of a connection between two sides of a segmented network, things should still work perfectly. When block chains are combined, all of the non-generation transactions in the shorter chain are re-added to the transaction pool -- they&#039;ll start over at 0/unconfirmed, but they&#039;ll still be valid. No mature transactions will be lost unless the segmentation persists for longer than ~120 blocks. Then generations will start to mature, and any transactions based on those generations will become invalid when recombined with the longer chain. [https://bitcointalk.org/index.php?topic=241.msg2071#msg2071 More info].&lt;br /&gt;
&lt;br /&gt;
=== Attacking all users ===&lt;br /&gt;
The IP addresses of most users are totally public. You can use Tor to hide this, but the network won&#039;t work if everyone does this. BitCoin requires that &#039;&#039;some&#039;&#039; country is still free.&lt;br /&gt;
&lt;br /&gt;
=== Dropping transactions ===&lt;br /&gt;
Nodes that generate blocks can choose not to include a transaction in their blocks. When this happens, the transaction remains &amp;quot;active&amp;quot; and can be included in a later block. Two things discourage this:&lt;br /&gt;
* Nodes only hash a fixed-size &#039;&#039;header&#039;&#039;, so there is no speed advantage to dropping transactions.&lt;br /&gt;
* [[Satoshi]] has [https://bitcointalk.org/index.php?topic=165.msg1595#msg1595 communicated] that he will write code to stop this kind of thing if it becomes a problem.&lt;br /&gt;
&lt;br /&gt;
=== Attacker has a lot of computing power ===&lt;br /&gt;
An attacker that controls more than 50% of the network&#039;s computing power can, for the time that he is in control, exclude and modify the ordering of transactions. This allows him to:&lt;br /&gt;
* Reverse transactions that he sends while he&#039;s in control.  This has the potential to [[Double-spending#51.25_attack|double-spend transactions]] that previously had already been seen in the block chain.&lt;br /&gt;
* Prevent some or all transactions from gaining any confirmations&lt;br /&gt;
* Prevent some or all other miners from mining any valid blocks&lt;br /&gt;
The attacker &#039;&#039;can&#039;t&#039;&#039;:&lt;br /&gt;
* Reverse other people&#039;s transactions&lt;br /&gt;
* Prevent transactions from being sent at all (they&#039;ll show as 0/unconfirmed)&lt;br /&gt;
* Change the number of coins generated per block&lt;br /&gt;
* Create coins out of thin air&lt;br /&gt;
* Send coins that never belonged to him&lt;br /&gt;
&lt;br /&gt;
It&#039;s much more difficult to change historical blocks, and it becomes exponentially more difficult the further back you go. As above, changing historical blocks only allows you to exclude and change the ordering of transactions. It&#039;s impossible to change blocks created before the last checkpoint.&lt;br /&gt;
&lt;br /&gt;
Since this attack doesn&#039;t permit all that much power over the network, it is expected that no one will attempt it. A profit-seeking person will always gain more by just following the rules, and even someone trying to destroy the system will probably find other attacks more attractive. However, if this attack is successfully executed, it will be difficult or impossible to &amp;quot;untangle&amp;quot; the mess created -- any changes the attacker makes might become permanent.&lt;br /&gt;
&lt;br /&gt;
=== Spamming transactions ===&lt;br /&gt;
&lt;br /&gt;
It is easy to send transactions to yourself repeatedly. If these transactions fill blocks to the maximum size (1MB), other transactions would be delayed until the next block.&lt;br /&gt;
&lt;br /&gt;
This is made expensive by the [[transaction fee|fees]] that would be required after the 50KB of free transactions per block are exhausted. An attacker will eventually eliminate free transactions, but Bitcoin fees will always be low because raising fees above 0.01 BTC per KB would require spending transaction fees. An attacker will eventually run out of money. Even if an attacker wants to waste money, transactions are further prioritized by the time since the coins were last spent, so attacks spending the same coins repeatedly are less effective.&lt;br /&gt;
&lt;br /&gt;
=== The [[Double-spending#Finney_attack|Finney attack]] ===&lt;br /&gt;
Named for Hal Finney, who first described this variation of a double-spend attack involving accepting [http://www.bitcointalk.org/index.php?topic=3441.msg48384#msg48384 0-confirmation transactions].  Accepting 0-confirmation large-value transactions is problematic; accepting them for low-value transactions (after waiting several seconds to detect an ordinary double-spend attempt) is probably safe.&lt;br /&gt;
&lt;br /&gt;
===Rival/malicious client code===&lt;br /&gt;
Any rival client must follow Bitcoin&#039;s rules or else all current BitCoin clients will ignore it. You&#039;d have to actually get people to &#039;&#039;use&#039;&#039; your client. A better client that pretends to follow the same rules, but with an exception known only to the author (possibly by making it closed source), might conceivably be able to gain widespread adoption. At that point, its author could use his exception and go largely unnoticed.&lt;br /&gt;
&lt;br /&gt;
== Definitely not a problem ==&lt;br /&gt;
&lt;br /&gt;
===Coin destruction===&lt;br /&gt;
Bitcoin has 2.1 quadrillion raw units, making up 8 decimals of BTC precision, so the entire network could potentially operate on much less than the full quantity of Bitcoins. If deflation gets to the point where transactions of more than 10 BTC are unheard of, clients can just switch to another unit so that, for example, it shows 10 mBTC rather than 0.01 BTC.&lt;br /&gt;
&lt;br /&gt;
The maximum number of raw units might not be enough if the &#039;&#039;entire world&#039;&#039; starts using BTC, but it would not be too difficult to increase precision in that case. The transaction format and version number would be scheduled to change at some particular block number after a year or two, and everyone would have to update by then.&lt;br /&gt;
&lt;br /&gt;
===Generating tons of addresses===&lt;br /&gt;
Generating an address doesn&#039;t touch the network at all. You&#039;d only be wasting your CPU resources and disk space.&lt;br /&gt;
&lt;br /&gt;
Also, a collision is highly unlikely.&lt;br /&gt;
&lt;br /&gt;
Keys are 256 bit in length and are hashed in a 160 bit address.(2^160th power)&lt;br /&gt;
Divide it by the world population and you have about 215,000,000,000,000,000,000,000,000,000,000,000,000 addresses per capita.(2.15 x 10^38)[http://www.wolframalpha.com/input/?i=2^160+%2F+world+population]&lt;br /&gt;
&lt;br /&gt;
===Everyone calculates at the same rate===&lt;br /&gt;
If everyone began with identical blocks and started their nonce at 1 and incremented, the fastest machine would always win. However, each block contains a new, random public key known only to you in the list of transactions.  The 256-bit &amp;quot;Merkle tree&amp;quot; hash of this is part of the block header.&lt;br /&gt;
&lt;br /&gt;
So everyone begins with slightly different blocks and everyone truly has a random chance of winning (modified by CPU power).&lt;br /&gt;
&lt;br /&gt;
===Generate &amp;quot;valid&amp;quot; blocks with a lower difficulty than normal===&lt;br /&gt;
Using unmodified Bitcoin code, an attacker could segment himself from the main network and generate a long block chain with a lower difficulty than the real network. These blocks would be totally valid for his network. However, it would be impossible to combine the two networks (and the &amp;quot;false&amp;quot; chain would be destroyed in the process).&lt;br /&gt;
&lt;br /&gt;
* Even though your network&#039;s difficulty can be less than the real difficulty, this doesn&#039;t give you any advantage over the real network. You&#039;ll gain ground when the real network is taking more than 10 minutes to generate a block, but you&#039;ll lose ground when the network takes less than 10 minutes.&lt;br /&gt;
* Every few releases of Bitcoin, a recent block hash is hardcoded into the source code. Any blocks before that point can&#039;t be changed. An attacker starting at that point would have to reduce the difficulty, but this would require him to generate blocks at a much slower rate than once per 10 minutes. By the time he finally gets to a difficulty of 1, a new version of Bitcoin with an updated hardcoded block will probably have been released.&lt;br /&gt;
* &amp;quot;Block chain length&amp;quot; is calculated from the combined difficulty of all the blocks, not just the number of blocks in the chain. The one that represents the most CPU usage will win.&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
&lt;br /&gt;
* [[Double-spending]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Technical]]&lt;/div&gt;</summary>
		<author><name>Sergio Demian Lerner</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Talk:Common_Vulnerabilities_and_Exposures&amp;diff=32323</id>
		<title>Talk:Common Vulnerabilities and Exposures</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Talk:Common_Vulnerabilities_and_Exposures&amp;diff=32323"/>
		<updated>2012-11-04T01:56:27Z</updated>

		<summary type="html">&lt;p&gt;Sergio Demian Lerner: Created page with &amp;quot;Who is updating the vulnerable percentages? Currently they are outdated.&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Who is updating the vulnerable percentages? Currently they are outdated.&lt;/div&gt;</summary>
		<author><name>Sergio Demian Lerner</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Protocol_documentation&amp;diff=31425</id>
		<title>Protocol documentation</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Protocol_documentation&amp;diff=31425"/>
		<updated>2012-10-02T16:34:52Z</updated>

		<summary type="html">&lt;p&gt;Sergio Demian Lerner: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Sources:&lt;br /&gt;
* [[Original Bitcoin client]] source&lt;br /&gt;
&lt;br /&gt;
Type names used in this documentation are from the C99 standard.&lt;br /&gt;
&lt;br /&gt;
For protocol used in mining, see [[Getwork]].&lt;br /&gt;
&lt;br /&gt;
==Common standards==&lt;br /&gt;
&lt;br /&gt;
=== Hashes ===&lt;br /&gt;
&lt;br /&gt;
Usually, when a hash is computed within bitcoin, it is computed twice. Most of the time [http://en.wikipedia.org/wiki/SHA-2 SHA-256] hashes are used, however [http://en.wikipedia.org/wiki/RIPEMD RIPEMD-160] is also used when a shorter hash is desirable (for example when creating a bitcoin address).&lt;br /&gt;
&lt;br /&gt;
Example of double-SHA-256 encoding of string &amp;quot;hello&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
 hello&lt;br /&gt;
 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824 (first round of sha-256)&lt;br /&gt;
 9595c9df90075148eb06860365df33584b75bff782a510c6cd4883a419833d50 (second round of sha-256)&lt;br /&gt;
&lt;br /&gt;
For bitcoin addresses (RIPEMD-160) this would give:&lt;br /&gt;
&lt;br /&gt;
 hello&lt;br /&gt;
 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824 (first round is sha-256)&lt;br /&gt;
 b6a9c8c230722b7c748331a8b450f05566dc7d0f (with ripemd-160)&lt;br /&gt;
&lt;br /&gt;
=== Merkle Trees ===&lt;br /&gt;
&lt;br /&gt;
Merkle trees are binary trees of hashes. Merkle trees in bitcoin use &#039;&#039;&#039;Double&#039;&#039;&#039; SHA-256, and are built up as so:&lt;br /&gt;
 &lt;br /&gt;
 hash(a) = sha256(sha256(a))&lt;br /&gt;
 &lt;br /&gt;
 hash(a) hash(b) hash(c)&lt;br /&gt;
 hash(hash(a)+hash(b)) hash(hash(c)+hash(c))&lt;br /&gt;
 hash(hash(hash(a)+hash(b))+hash(hash(c)+hash(c)))&lt;br /&gt;
&lt;br /&gt;
They are paired up, with the last element being _duplicated_.&lt;br /&gt;
&lt;br /&gt;
Note: Hashes in Merkle Tree displayed in the [[Block Explorer]] are of little-endian notation. For some implementations and [http://www.fileformat.info/tool/hash.htm calculations], the bits need to be reversed before they are hashed, and again after the hashing operation.&lt;br /&gt;
&lt;br /&gt;
=== Signatures ===&lt;br /&gt;
&lt;br /&gt;
Bitcoin uses [http://en.wikipedia.org/wiki/Elliptic_curve_cryptography Elliptic Curve] [http://en.wikipedia.org/wiki/Digital_Signature_Algorithm Digital Signature Algorithm] ([http://en.wikipedia.org/wiki/Elliptic_Curve_DSA ECDSA]) to sign transactions. &lt;br /&gt;
&lt;br /&gt;
For ECDSA the secp256k1 curve from http://www.secg.org/collateral/sec2_final.pdf is used.&lt;br /&gt;
&lt;br /&gt;
Public keys (in scripts) are given as 04 &amp;lt;x&amp;gt; &amp;lt;y&amp;gt; where &#039;&#039;x&#039;&#039; and &#039;&#039;y&#039;&#039; are 32 byte big-endian integers representing the coordinates of a point on the curve or in compressed form given as &amp;lt;sign&amp;gt; &amp;lt;x&amp;gt; where &amp;lt;sign&amp;gt; is 0x02 if &#039;&#039;y&#039;&#039; is even and 0x03 if &#039;&#039;y&#039;&#039; is odd. Signatures use [http://en.wikipedia.org/wiki/Distinguished_Encoding_Rules DER encoding] to pack the &#039;&#039;r&#039;&#039; and &#039;&#039;s&#039;&#039; components into a single byte stream (this is also what OpenSSL produces by default).&lt;br /&gt;
&lt;br /&gt;
=== Transaction Verification ===&lt;br /&gt;
Transactions are cryptographically signed records that reassign ownership of Bitcoins to new addresses.  Transactions have &#039;&#039;inputs&#039;&#039; - records which reference the funds from other previous transactions - and &#039;&#039;outputs&#039;&#039; - records which determine the new owner of the transferred Bitcoins, and which will be referenced as inputs in future transactions as those funds are respent.&lt;br /&gt;
&lt;br /&gt;
Each &#039;&#039;input&#039;&#039; must have a cryptographic digital signature that unlocks the funds from the prior transaction.  Only the person possessing the appropriate [[private key]] is able to create a satisfactory signature; this in effect ensures that funds can only be spent by their owners.&lt;br /&gt;
&lt;br /&gt;
Each &#039;&#039;output&#039;&#039; determines which Bitcoin address (or other criteria, see [[Scripting]]) is the recipient of the funds.&lt;br /&gt;
&lt;br /&gt;
In a transaction, the sum of all inputs must be equal to or greater than the sum of all outputs.  If the inputs exceed the outputs, the difference is considered a [[transaction fee]], and is redeemable by whoever first includes the transaction into the block chain.&lt;br /&gt;
&lt;br /&gt;
A special kind of transaction, called a [[coinbase transaction]], has no inputs.  It is created by [[miners]], and there is one coinbase transaction per block.  Because each block comes with a reward of newly created Bitcoins (e.g. 50 BTC for the first 210,000 blocks), the first transaction of a block is, with few exceptions, the transaction that grants those coins to their recipient (the miner).  In addition to the newly created Bitcoins, the coinbase transaction is also used for assigning the recipient of any transaction fees that were paid within the other transactions being included in the same block.  The coinbase transaction can assign the entire reward to a single Bitcoin address, or split it in portions among multiple addresses, just like any other transaction.  Coinbase transactions always contain outputs totaling the sum of the block reward plus all transaction fees collected from the other transactions in the same block.&lt;br /&gt;
&lt;br /&gt;
Most Bitcoin outputs encumber the newly transferred coins with a single ECDSA private key.  The actual record saved with inputs and outputs isn&#039;t necessarily a key, but a &#039;&#039;script&#039;&#039;.  Bitcoin uses an interpreted scripting system to determine whether an output&#039;s criteria have been satisfied, with which more complex operations are possible, such as outputs that require two ECDSA signatures, or two-of-three-signature schemes.  An output that references a single Bitcoin address is a &#039;&#039;typical&#039;&#039; output; an output actually contains this information in the form of a script that requires a single ECDSA signature (see [[OP_CHECKSIG]]).  The output script specifies what must be provided to unlock the funds later, and when the time comes in the future to spend the transaction in another input, that input must provide all of the thing(s) that satisfy the requirements defined by the original output script.&lt;br /&gt;
&lt;br /&gt;
=== Addresses ===&lt;br /&gt;
&lt;br /&gt;
A bitcoin address is in fact the hash of a ECDSA public key, computed this way:&lt;br /&gt;
&lt;br /&gt;
 Version = 1 byte of 0 (zero); on the test network, this is 1 byte of 111&lt;br /&gt;
 Key hash = Version concatenated with RIPEMD-160(SHA-256(public key))&lt;br /&gt;
 Checksum = 1st 4 bytes of SHA-256(SHA-256(Key hash))&lt;br /&gt;
 Bitcoin Address = Base58Encode(Key hash concatenated with Checksum)&lt;br /&gt;
&lt;br /&gt;
The Base58 encoding used is home made, and has some differences. Especially, leading zeroes are kept as single zeroes when conversion happens.&lt;br /&gt;
&lt;br /&gt;
== Common structures ==&lt;br /&gt;
&lt;br /&gt;
Almost all integers are encoded in little endian. Only IP or port number are encoded big endian.&lt;br /&gt;
&lt;br /&gt;
=== Message structure ===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field Size !! Description !! Data type !! Comments&lt;br /&gt;
|-&lt;br /&gt;
| 4 || magic || uint32_t || Magic value indicating message origin network, and used to seek to next message when stream state is unknown&lt;br /&gt;
|-&lt;br /&gt;
| 12 || command || char[12] || ASCII string identifying the packet content, NULL padded (non-NULL padding results in packet rejected)&lt;br /&gt;
|-&lt;br /&gt;
| 4 || length || uint32_t || Length of payload in number of bytes&lt;br /&gt;
|-&lt;br /&gt;
| 4 || checksum || uint32_t || First 4 bytes of sha256(sha256(payload))&lt;br /&gt;
|-&lt;br /&gt;
| ? || payload || uchar[] || The actual data&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Known magic values:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Network !! Magic value !! Sent over wire as&lt;br /&gt;
|-&lt;br /&gt;
| main || 0xD9B4BEF9 || F9 BE B4 D9&lt;br /&gt;
|-&lt;br /&gt;
| testnet || 0xDAB5BFFA || FA BF B5 DA&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Variable length integer ===&lt;br /&gt;
&lt;br /&gt;
Integer can be encoded depending on the represented value to save space.  Variable length integers always precede an array/vector of a type of data that may vary in length.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Value !! Storage length !! Format&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt; 0xfd || 1 || uint8_t&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;= 0xffff || 3 || 0xfd followed by the length as uint16_t&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;= 0xffffffff || 5 || 0xfe followed by the length as uint32_t&lt;br /&gt;
|-&lt;br /&gt;
| - || 9 || 0xff followed by the length as uint64_t&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Variable length string ===&lt;br /&gt;
&lt;br /&gt;
Variable length string can be stored using a variable length integer followed by the string itself.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field Size !! Description !! Data type !! Comments&lt;br /&gt;
|-&lt;br /&gt;
| ? || length || [[Protocol_specification#Variable_length_integer|var_int]] || Length of the string&lt;br /&gt;
|-&lt;br /&gt;
| ? || string || char[] || The string itself (can be empty)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Network address ===&lt;br /&gt;
&lt;br /&gt;
When a network address is needed somewhere, this structure is used.  This protocol and structure supports IPv6, &#039;&#039;&#039;but note that the original client currently only supports IPv4 networking&#039;&#039;&#039;. Network addresses are not prefixed with a timestamp in the version message.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field Size !! Description !! Data type !! Comments&lt;br /&gt;
|-&lt;br /&gt;
| 4 || time || uint32 || the Time (version &amp;gt;= 31402)&lt;br /&gt;
|-&lt;br /&gt;
| 8 || services || uint64_t || same service(s) listed in [[#version|version]]&lt;br /&gt;
|-&lt;br /&gt;
| 16 || IPv6/4 || char[16] || IPv6 address. Network byte order. The original client only supports IPv4 and only reads the last 4 bytes to get the IPv4 address. However, the IPv4 address is written into the message as a 16 byte [http://en.wikipedia.org/wiki/IPv6#IPv4-mapped_IPv6_addresses IPv4-mapped IPv6 address]&lt;br /&gt;
(12 bytes &#039;&#039;00 00 00 00  00 00 00 00  00 00 FF FF&#039;&#039;, followed by the 4 bytes of the IPv4 address).&lt;br /&gt;
|-&lt;br /&gt;
| 2 || port || uint16_t || port number, network byte order&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Hexdump example of Network address structure&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
0000   01 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................&lt;br /&gt;
0010   00 00 FF FF 0A 00 00 01  20 8D                    ........ .&lt;br /&gt;
&lt;br /&gt;
Network address:&lt;br /&gt;
 01 00 00 00 00 00 00 00                         - 1 (NODE_NETWORK: see services listed under version command)&lt;br /&gt;
 00 00 00 00 00 00 00 00 00 00 FF FF 0A 00 00 01 - IPv6: ::ffff:10.0.0.1 or IPv4: 10.0.0.1&lt;br /&gt;
 20 8D                                           - Port 8333&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Inventory Vectors ===&lt;br /&gt;
&lt;br /&gt;
Inventory vectors are used for notifying other nodes about objects they have or data which is being requested.&lt;br /&gt;
&lt;br /&gt;
Inventory vectors consist of the following data format:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field Size !! Description !! Data type !! Comments&lt;br /&gt;
|-&lt;br /&gt;
| 4 || type || uint32_t || Identifies the object type linked to this inventory&lt;br /&gt;
|-&lt;br /&gt;
| 32 || hash || char[32] || Hash of the object&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The object type is currently defined as one of the following possibilities:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || ERROR || Any data of with this number may be ignored&lt;br /&gt;
|-&lt;br /&gt;
| 1 || MSG_TX || Hash is related to a transaction&lt;br /&gt;
|-&lt;br /&gt;
| 2 || MSG_BLOCK || Hash is related to a data block&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Other Data Type values are considered reserved for future implementations.&lt;br /&gt;
&lt;br /&gt;
=== Block Headers ===&lt;br /&gt;
&lt;br /&gt;
Block headers are sent in a headers packet in response to a getheaders message.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field Size !! Description !! Data type !! Comments&lt;br /&gt;
|-&lt;br /&gt;
| 4 || version || uint32_t || Block version information, based upon the software version creating this block&lt;br /&gt;
|-&lt;br /&gt;
| 32 || prev_block || char[32] || The hash value of the previous block this particular block references&lt;br /&gt;
|-&lt;br /&gt;
| 32 || merkle_root || char[32] || The reference to a Merkle tree collection which is a hash of all transactions related to this block&lt;br /&gt;
|-&lt;br /&gt;
| 4 || timestamp || uint32_t || A timestamp recording when this block was created (Limited to 2106!)&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bits || uint32_t || The calculated difficulty target being used for this block&lt;br /&gt;
|-&lt;br /&gt;
| 4 || nonce || uint32_t || The nonce used to generate this block… to allow variations of the header and compute different hashes&lt;br /&gt;
|-&lt;br /&gt;
| 1 || txn_count || uint8_t || Number of transaction entries, this value is always 0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Message types ==&lt;br /&gt;
&lt;br /&gt;
=== version ===&lt;br /&gt;
&lt;br /&gt;
When a node creates an outgoing connection, it will immediately advertise its version. The remote node will respond with its version. No futher communication is possible until both peers have exchanged their version.&lt;br /&gt;
&lt;br /&gt;
Payload:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field Size !! Description !! Data type !! Comments&lt;br /&gt;
|-&lt;br /&gt;
| 4 || version || int32_t || Identifies protocol version being used by the node&lt;br /&gt;
|-&lt;br /&gt;
| 8 || services || uint64_t || bitfield of features to be enabled for this connection&lt;br /&gt;
|-&lt;br /&gt;
| 8 || timestamp || int64_t || standard UNIX timestamp in seconds&lt;br /&gt;
|-&lt;br /&gt;
| 26 || addr_recv || net_addr || The network address of the node receiving this message&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;4&amp;quot;| version &amp;gt;= 106&lt;br /&gt;
|-&lt;br /&gt;
| 26 || addr_from || net_addr || The network address of the node emitting this message&lt;br /&gt;
|-&lt;br /&gt;
| 8 || nonce || uint64_t || Node random nonce, randomly generated every time a version packet is sent. This nonce is used to detect connections to self.&lt;br /&gt;
|-&lt;br /&gt;
| ? || user_agent || [[#Variable length string|var_str]] || [[BIP_0014|User Agent]] (0x00 if string is 0 bytes long)&lt;br /&gt;
|-&lt;br /&gt;
| 4 || start_height || int32_t || The last block received by the emitting node&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
A &amp;quot;verack&amp;quot; packet shall be sent if the version packet was accepted.&lt;br /&gt;
&lt;br /&gt;
The following services are currently assigned:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 1 || NODE_NETWORK || This node can be asked for full blocks instead of just headers.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Hexdump example of version message (OBSOLETE EXAMPLE. This example lacks a checksum and user-agent):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
0000   F9 BE B4 D9 76 65 72 73  69 6F 6E 00 00 00 00 00   ....version.....&lt;br /&gt;
0010   55 00 00 00 9C 7C 00 00  01 00 00 00 00 00 00 00   U....|..........&lt;br /&gt;
0020   E6 15 10 4D 00 00 00 00  01 00 00 00 00 00 00 00   ...M............&lt;br /&gt;
0030   00 00 00 00 00 00 00 00  00 00 FF FF 0A 00 00 01   ................&lt;br /&gt;
0040   20 8D 01 00 00 00 00 00  00 00 00 00 00 00 00 00   ................&lt;br /&gt;
0050   00 00 00 00 FF FF 0A 00  00 02 20 8D DD 9D 20 2C   .......... ... ,&lt;br /&gt;
0060   3A B4 57 13 00 55 81 01  00                        :.W..U...&lt;br /&gt;
&lt;br /&gt;
Message header:&lt;br /&gt;
 F9 BE B4 D9                                                                   - Main network magic bytes&lt;br /&gt;
 76 65 72 73 69 6F 6E 00 00 00 00 00                                           - &amp;quot;version&amp;quot; command&lt;br /&gt;
 55 00 00 00                                                                   - Payload is 85 bytes long&lt;br /&gt;
                                                                               - No checksum in version message until 20 February 2012. See https://bitcointalk.org/index.php?topic=55852.0&lt;br /&gt;
Version message:&lt;br /&gt;
 9C 7C 00 00                                                                   - 31900 (version 0.3.19)&lt;br /&gt;
 01 00 00 00 00 00 00 00                                                       - 1 (NODE_NETWORK services)&lt;br /&gt;
 E6 15 10 4D 00 00 00 00                                                       - Mon Dec 20 21:50:14 EST 2010&lt;br /&gt;
 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF 0A 00 00 01 20 8D - Recipient address info - see Network Address&lt;br /&gt;
 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF 0A 00 00 02 20 8D - Sender address info - see Network Address&lt;br /&gt;
 DD 9D 20 2C 3A B4 57 13                                                       - Node random unique ID&lt;br /&gt;
 00                                                                            - &amp;quot;&amp;quot; sub-version string (string is 0 bytes long)&lt;br /&gt;
 55 81 01 00                                                                   - Last block sending node has is block #98645&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== verack ===&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;verack&#039;&#039; message is sent in reply to &#039;&#039;version&#039;&#039;.  This message consists of only a [[#Message structure|message header]] with the command string &amp;quot;verack&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Hexdump of the verack message:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
0000   F9 BE B4 D9 76 65 72 61  63 6B 00 00 00 00 00 00   ....verack......&lt;br /&gt;
0010   00 00 00 00 5D F6 E0 E2                            ........&lt;br /&gt;
&lt;br /&gt;
Message header:&lt;br /&gt;
 F9 BE B4 D9                          - Main network magic bytes&lt;br /&gt;
 76 65 72 61  63 6B 00 00 00 00 00 00 - &amp;quot;verack&amp;quot; command&lt;br /&gt;
 00 00 00 00                          - Payload is 0 bytes long&lt;br /&gt;
 5D F6 E0 E2                          - Checksum&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== addr ===&lt;br /&gt;
&lt;br /&gt;
Provide information on known nodes of the network. Non-advertised nodes should be forgotten after typically 3 hours&lt;br /&gt;
&lt;br /&gt;
Payload:&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field Size !! Description !! Data type !! Comments&lt;br /&gt;
|-&lt;br /&gt;
| 1+ || count || [[Protocol_specification#Variable_length_integer|var_int]] || Number of address entries (max: 1000)&lt;br /&gt;
|-&lt;br /&gt;
| 30x? || addr_list || (uint32_t + net_addr)[] || Address of other nodes on the network. version &amp;lt; 209 will only read the first one. The uint32_t is a timestamp (see note below).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: Starting version 31402, addresses are prefixed with a timestamp. If no timestamp is present, the addresses should not be relayed to other peers, unless it is indeed confirmed they are up.&lt;br /&gt;
&lt;br /&gt;
Hexdump example of &#039;&#039;addr&#039;&#039; message:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
0000   F9 BE B4 D9 61 64 64 72  00 00 00 00 00 00 00 00   ....addr........&lt;br /&gt;
0010   1F 00 00 00 ED 52 39 9B  01 E2 15 10 4D 01 00 00   .....R9.....M...&lt;br /&gt;
0020   00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 FF   ................&lt;br /&gt;
0030   FF 0A 00 00 01 20 8D                               ..... .&lt;br /&gt;
&lt;br /&gt;
Message Header:&lt;br /&gt;
 F9 BE B4 D9                                     - Main network magic bytes&lt;br /&gt;
 61 64 64 72  00 00 00 00 00 00 00 00            - &amp;quot;addr&amp;quot;&lt;br /&gt;
 1F 00 00 00                                     - payload is 31 bytes long&lt;br /&gt;
 ED 52 39 9B                                     - checksum of payload&lt;br /&gt;
&lt;br /&gt;
Payload:&lt;br /&gt;
 01                                              - 1 address in this message&lt;br /&gt;
&lt;br /&gt;
Address:&lt;br /&gt;
 E2 15 10 4D                                     - Mon Dec 20 21:50:10 EST 2010 (only when version is &amp;gt;= 31402)&lt;br /&gt;
 01 00 00 00 00 00 00 00                         - 1 (NODE_NETWORK service - see version message)&lt;br /&gt;
 00 00 00 00 00 00 00 00 00 00 FF FF 0A 00 00 01 - IPv4: 10.0.0.1, IPv6: ::ffff:10.0.0.1 (IPv4-mapped IPv6 address)&lt;br /&gt;
 20 8D                                           - port 8333&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== inv ===&lt;br /&gt;
&lt;br /&gt;
Allows a node to advertise its knowledge of one or more objects. It can be received unsolicited, or in reply to &#039;&#039;getblocks&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Payload (maximum payload length: 1.8 Megabytes or 50000 entries):&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field Size !! Description !! Data type !! Comments&lt;br /&gt;
|-&lt;br /&gt;
| ? || count || [[Protocol_specification#Variable_length_integer|var_int]] || Number of inventory entries&lt;br /&gt;
|-&lt;br /&gt;
| 36x? || inventory || [[Protocol specification#Inventory Vectors|inv_vect]][] || Inventory vectors&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== getdata ===&lt;br /&gt;
&lt;br /&gt;
getdata is used in response to inv, to retrieve the content of a specific object, and is usually sent after receiving an &#039;&#039;inv&#039;&#039; packet, after filtering known elements.&lt;br /&gt;
&lt;br /&gt;
Payload (maximum payload length: 1.8 Megabytes or 50000 entries):&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field Size !! Description !! Data type !! Comments&lt;br /&gt;
|-&lt;br /&gt;
| ? || count || [[Protocol_specification#Variable_length_integer|var_int]] || Number of inventory entries&lt;br /&gt;
|-&lt;br /&gt;
| 36x? || inventory || [[Protocol specification#Inventory Vectors|inv_vect]][] || Inventory vectors&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== getblocks ===&lt;br /&gt;
&lt;br /&gt;
Return an &#039;&#039;inv&#039;&#039; packet containing the list of blocks starting right after the last known hash in the block locator object, up to hash_stop or 500 blocks, whichever comes first. To receive the next blocks hashes, one needs to issue getblocks again with a new block locator object. Keep in mind that some clients (specifically the Satoshi client) will gladly provide blocks which are invalid if the block locator object contains a hash on the invalid branch.&lt;br /&gt;
&lt;br /&gt;
Payload:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field Size !! Description !! Data type !! Comments&lt;br /&gt;
|-&lt;br /&gt;
| 4 || version || uint32_t || the protocol version&lt;br /&gt;
|-&lt;br /&gt;
| 1+ || hash count || [[Protocol_specification#Variable_length_integer|var_int]] || number of block locator hash entries&lt;br /&gt;
|-&lt;br /&gt;
| 32+ || block locator hashes || char[32] || block locator object; newest back to genesis block (dense to start, but then sparse)&lt;br /&gt;
|-&lt;br /&gt;
| 32 || hash_stop || char[32] || hash of the last desired block; set to zero to get as many blocks as possible (500)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To create the block locator hashes, keep pushing hashes until you go back to the genesis block. After pushing 10 hashes back, the step backwards doubles every loop:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// From libbitcoin which is under AGPL&lt;br /&gt;
std::vector&amp;lt;size_t&amp;gt; block_locator_indices(int top_depth)&lt;br /&gt;
{&lt;br /&gt;
    // Start at max_depth&lt;br /&gt;
    std::vector&amp;lt;size_t&amp;gt; indices;&lt;br /&gt;
    // Push last 10 indices first&lt;br /&gt;
    size_t step = 1, start = 0;&lt;br /&gt;
    for (int i = top_depth; i &amp;gt; 0; i -= step, ++start)&lt;br /&gt;
    {&lt;br /&gt;
        if (start &amp;gt;= 10)&lt;br /&gt;
            step *= 2;&lt;br /&gt;
        indices.push_back(i);&lt;br /&gt;
    }&lt;br /&gt;
    indices.push_back(0);&lt;br /&gt;
    return indices;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that it is allowed to send in fewer known hashes down to a minimum of just one hash. However, the purpose of the block locator object is to detect a wrong branch in the caller&#039;s main chain. If the peer detects that you are off the main chain, it will send in block hashes which are earlier than your last known block. So if you just send in your last known hash and it is off the main chain, the peer starts over at block #1.&lt;br /&gt;
&lt;br /&gt;
=== getheaders ===&lt;br /&gt;
&lt;br /&gt;
Return a &#039;&#039;headers&#039;&#039; packet containing the headers of blocks starting right after the last known hash in the block locator object, up to hash_stop or 2000 blocks, whichever comes first. To receive the next block headers, one needs to issue getheaders again with a new block locator object. The &#039;&#039;getheaders&#039;&#039; command is used by thin clients to quickly download the blockchain where the contents of the transactions would be irrelevant (because they are not ours). Keep in mind that some clients (specifically the Satoshi client) will gladly provide headers of blocks which are invalid if the block locator object contains a hash on the invalid branch.&lt;br /&gt;
&lt;br /&gt;
Payload:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field Size !! Description !! Data type !! Comments&lt;br /&gt;
|-&lt;br /&gt;
| 4 || version || uint32_t || the protocol version&lt;br /&gt;
|-&lt;br /&gt;
| 1+ || hash count || [[Protocol_specification#Variable_length_integer|var_int]] || number of block locator hash entries&lt;br /&gt;
|-&lt;br /&gt;
| 32+ || block locator hashes || char[32] || block locator object; newest back to genesis block (dense to start, but then sparse)&lt;br /&gt;
|-&lt;br /&gt;
| 32 || hash_stop || char[32] || hash of the last desired block header; set to zero to get as many blocks as possible (2000)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
For the block locator object in this packet, the same rules apply as for the [[Protocol_specification#Variable_length_integer|getblocks]] packet.&lt;br /&gt;
&lt;br /&gt;
=== tx ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;tx&#039;&#039; describes a bitcoin transaction, in reply to &#039;&#039;getdata&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field Size !! Description !! Data type !! Comments&lt;br /&gt;
|-&lt;br /&gt;
| 4 || version || uint32_t || Transaction data format version&lt;br /&gt;
|-&lt;br /&gt;
| 1+ || tx_in count || [[Protocol_specification#Variable_length_integer|var_int]] || Number of Transaction inputs&lt;br /&gt;
|-&lt;br /&gt;
| 41+ || tx_in || tx_in[] || A list of 1 or more transaction inputs or sources for coins&lt;br /&gt;
|-&lt;br /&gt;
| 1+ || tx_out count || [[Protocol_specification#Variable_length_integer|var_int]] || Number of Transaction outputs&lt;br /&gt;
|-&lt;br /&gt;
| 8+ || tx_out || tx_out[] || A list of 1 or more transaction outputs or destinations for coins&lt;br /&gt;
|-&lt;br /&gt;
| 4 || lock_time || uint32_t || The block number or timestamp at which this transaction is locked:&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Value !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Always locked&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt; 500000000  || Block number at which this transaction is locked&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 500000000 || UNIX timestamp at which this transaction is locked&lt;br /&gt;
|}&lt;br /&gt;
A non-locked transaction must not be included in blocks, and it can be modified by broadcasting a new version before the time has expired (replacement is currently disabled in Bitcoin, however, so this is useless).&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
TxIn consists of the following fields:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field Size !! Description !! Data type !! Comments&lt;br /&gt;
|-&lt;br /&gt;
| 36 || previous_output || outpoint || The previous output transaction reference, as an OutPoint structure&lt;br /&gt;
|-&lt;br /&gt;
| 1+ || script length || [[Protocol_specification#Variable_length_integer|var_int]] || The length of the signature script&lt;br /&gt;
|-&lt;br /&gt;
| ? || signature script || uchar[] || Computational Script for confirming transaction authorization&lt;br /&gt;
|-&lt;br /&gt;
| 4 || [http://bitcoin.stackexchange.com/q/2025/323 sequence] || uint32_t || Transaction version as defined by the sender. Intended for &amp;quot;replacement&amp;quot; of transactions when information is updated before inclusion into a block.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The OutPoint structure consists of the following fields:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field Size !! Description !! Data type !! Comments&lt;br /&gt;
|-&lt;br /&gt;
| 32 || hash || char[32] || The hash of the referenced transaction.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || index || uint32_t || The index of the specific output in the transaction. The first output is 0, etc.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The Script structure consists of a series of pieces of information and operations related to the value of the transaction.&lt;br /&gt;
&lt;br /&gt;
(Structure to be expanded in the future… see script.h and script.cpp and [[Script]] for more information)&lt;br /&gt;
&lt;br /&gt;
The TxOut structure consists of the following fields:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field Size !! Description !! Data type !! Comments&lt;br /&gt;
|-&lt;br /&gt;
| 8 || value || int64_t || Transaction Value&lt;br /&gt;
|-&lt;br /&gt;
| 1+ || pk_script length || [[Protocol_specification#Variable_length_integer|var_int]] || Length of the pk_script&lt;br /&gt;
|-&lt;br /&gt;
| ? || pk_script || uchar[] || Usually contains the public key as a Bitcoin script setting up conditions to claim this output.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example &#039;&#039;tx&#039;&#039; message:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
000000	F9 BE B4 D9 74 78 00 00  00 00 00 00 00 00 00 00   ....tx..........&lt;br /&gt;
000010	02 01 00 00 E2 93 CD BE  01 00 00 00 01 6D BD DB   .............m..&lt;br /&gt;
000020	08 5B 1D 8A F7 51 84 F0  BC 01 FA D5 8D 12 66 E9   .[...Q........f.&lt;br /&gt;
000030	B6 3B 50 88 19 90 E4 B4  0D 6A EE 36 29 00 00 00   .;P......j.6)...&lt;br /&gt;
000040	00 8B 48 30 45 02 21 00  F3 58 1E 19 72 AE 8A C7   ..H0E.!..X..r...&lt;br /&gt;
000050	C7 36 7A 7A 25 3B C1 13  52 23 AD B9 A4 68 BB 3A   .6zz%;..R#...h.:&lt;br /&gt;
000060	59 23 3F 45 BC 57 83 80  02 20 59 AF 01 CA 17 D0   Y#?E.W... Y.....&lt;br /&gt;
000070	0E 41 83 7A 1D 58 E9 7A  A3 1B AE 58 4E DE C2 8D   .A.z.X.z...XN...&lt;br /&gt;
000080	35 BD 96 92 36 90 91 3B  AE 9A 01 41 04 9C 02 BF   5...6..;...A....&lt;br /&gt;
000090	C9 7E F2 36 CE 6D 8F E5  D9 40 13 C7 21 E9 15 98   .~.6.m...@..!...&lt;br /&gt;
0000A0	2A CD 2B 12 B6 5D 9B 7D  59 E2 0A 84 20 05 F8 FC   *.+..].}Y... ...&lt;br /&gt;
0000B0	4E 02 53 2E 87 3D 37 B9  6F 09 D6 D4 51 1A DA 8F   N.S..=7.o...Q...&lt;br /&gt;
0000C0	14 04 2F 46 61 4A 4C 70  C0 F1 4B EF F5 FF FF FF   ../FaJLp..K.....&lt;br /&gt;
0000D0	FF 02 40 4B 4C 00 00 00  00 00 19 76 A9 14 1A A0   ..@KL......v....&lt;br /&gt;
0000E0	CD 1C BE A6 E7 45 8A 7A  BA D5 12 A9 D9 EA 1A FB   .....E.z........&lt;br /&gt;
0000F0	22 5E 88 AC 80 FA E9 C7  00 00 00 00 19 76 A9 14   &amp;quot;^...........v..&lt;br /&gt;
000100	0E AB 5B EA 43 6A 04 84  CF AB 12 48 5E FD A0 B7   ..[.Cj.....H^...&lt;br /&gt;
000110	8B 4E CC 52 88 AC 00 00  00 00                     .N.R......&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Message header:&lt;br /&gt;
 F9 BE B4 D9                                       - main network magic bytes&lt;br /&gt;
 74 78 00 00 00 00 00 00 00 00 00 00               - &amp;quot;tx&amp;quot; command&lt;br /&gt;
 02 01 00 00                                       - payload is 258 bytes long&lt;br /&gt;
 E2 93 CD BE                                       - checksum of payload&lt;br /&gt;
&lt;br /&gt;
Transaction:&lt;br /&gt;
 01 00 00 00                                       - version&lt;br /&gt;
&lt;br /&gt;
Inputs:&lt;br /&gt;
 01                                                - number of transaction inputs&lt;br /&gt;
&lt;br /&gt;
Input 1:&lt;br /&gt;
 6D BD DB 08 5B 1D 8A F7  51 84 F0 BC 01 FA D5 8D  - previous output (outpoint)&lt;br /&gt;
 12 66 E9 B6 3B 50 88 19  90 E4 B4 0D 6A EE 36 29&lt;br /&gt;
 00 00 00 00&lt;br /&gt;
&lt;br /&gt;
 8B                                                - script is 139 bytes long&lt;br /&gt;
&lt;br /&gt;
 48 30 45 02 21 00 F3 58  1E 19 72 AE 8A C7 C7 36  - signature script (scriptSig)&lt;br /&gt;
 7A 7A 25 3B C1 13 52 23  AD B9 A4 68 BB 3A 59 23&lt;br /&gt;
 3F 45 BC 57 83 80 02 20  59 AF 01 CA 17 D0 0E 41&lt;br /&gt;
 83 7A 1D 58 E9 7A A3 1B  AE 58 4E DE C2 8D 35 BD&lt;br /&gt;
 96 92 36 90 91 3B AE 9A  01 41 04 9C 02 BF C9 7E&lt;br /&gt;
 F2 36 CE 6D 8F E5 D9 40  13 C7 21 E9 15 98 2A CD&lt;br /&gt;
 2B 12 B6 5D 9B 7D 59 E2  0A 84 20 05 F8 FC 4E 02&lt;br /&gt;
 53 2E 87 3D 37 B9 6F 09  D6 D4 51 1A DA 8F 14 04&lt;br /&gt;
 2F 46 61 4A 4C 70 C0 F1  4B EF F5&lt;br /&gt;
&lt;br /&gt;
 FF FF FF FF                                       - sequence&lt;br /&gt;
&lt;br /&gt;
Outputs:&lt;br /&gt;
 02                                                - 2 Output Transactions&lt;br /&gt;
&lt;br /&gt;
Output 1:&lt;br /&gt;
 40 4B 4C 00 00 00 00 00                           - 0.05 BTC (5000000)&lt;br /&gt;
 19                                                - pk_script is 25 bytes long&lt;br /&gt;
&lt;br /&gt;
 76 A9 14 1A A0 CD 1C BE  A6 E7 45 8A 7A BA D5 12  - pk_script&lt;br /&gt;
 A9 D9 EA 1A FB 22 5E 88  AC&lt;br /&gt;
&lt;br /&gt;
Output 2:&lt;br /&gt;
 80 FA E9 C7 00 00 00 00                           - 33.54 BTC (3354000000)&lt;br /&gt;
 19                                                - pk_script is 25 bytes long&lt;br /&gt;
&lt;br /&gt;
 76 A9 14 0E AB 5B EA 43  6A 04 84 CF AB 12 48 5E  - pk_script&lt;br /&gt;
 FD A0 B7 8B 4E CC 52 88  AC&lt;br /&gt;
&lt;br /&gt;
Locktime:&lt;br /&gt;
 00 00 00 00                                       - lock time&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== block ===&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;block&#039;&#039;&#039; message is sent in response to a getdata message which requests transaction information from a block hash.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field Size !! Description !! Data type !! Comments&lt;br /&gt;
|-&lt;br /&gt;
| 4 || version || uint32_t || Block version information, based upon the software version creating this block&lt;br /&gt;
|-&lt;br /&gt;
| 32 || prev_block || char[32] || The hash value of the previous block this particular block references&lt;br /&gt;
|-&lt;br /&gt;
| 32 || merkle_root || char[32] || The reference to a Merkle tree collection which is a hash of all transactions related to this block&lt;br /&gt;
|-&lt;br /&gt;
| 4 || timestamp || uint32_t || A unix timestamp recording when this block was created (Currently limited to dates before the year 2106!)&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bits || uint32_t || The calculated [[Difficulty|difficulty target]] being used for this block&lt;br /&gt;
|-&lt;br /&gt;
| 4 || nonce || uint32_t || The nonce used to generate this block… to allow variations of the header and compute different hashes&lt;br /&gt;
|-&lt;br /&gt;
| ? || txn_count || [[Protocol_specification#Variable_length_integer|var_int]] || Number of transaction entries&lt;br /&gt;
|-&lt;br /&gt;
| ? || txns || tx[] || Block transactions, in format of &amp;quot;tx&amp;quot; command&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The SHA256 hash that identifies each block (and which must have a run of 0 bits) is calculated from the first 6 fields of this structure (version, prev_block, merkle_root, timestamp, bits, nonce, and standard SHA256 padding, making two 64-byte chunks in all) and &#039;&#039;not&#039;&#039; from the complete block. To calculate the hash, only two chunks need to be processed by the SHA256 algorithm. Since the &#039;&#039;nonce&#039;&#039; field is in the second chunk, the first chunk stays constant during mining and therefore only the second chunk needs to be processed. However, a Bitcoin hash is the hash of the hash, so two SHA256 rounds are needed for each mining iteration.&lt;br /&gt;
See [[Block hashing algorithm]] for details and an example.&lt;br /&gt;
&lt;br /&gt;
=== headers ===&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;headers&#039;&#039; packet returns block headers in response to a &#039;&#039;getheaders&#039;&#039; packet. &lt;br /&gt;
&lt;br /&gt;
Payload:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field Size !! Description !! Data type !! Comments&lt;br /&gt;
|-&lt;br /&gt;
| ? || count || [[Protocol_specification#Variable_length_integer|var_int]] || Number of block headers&lt;br /&gt;
|-&lt;br /&gt;
| 81x? || headers || [[Protocol_specification#Block_Headers|block_header]][] || [[Protocol_specification#Block_Headers|Block headers]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note that the block headers in this packet include a transaction count (a var_int, so there can be more than 81 bytes per header) as opposed to the block headers which are sent to miners.&lt;br /&gt;
&lt;br /&gt;
=== getaddr ===&lt;br /&gt;
&lt;br /&gt;
The getaddr message sends a request to a node asking for information about known active peers to help with identifying potential nodes in the network. The response to receiving this message is to transmit an addr message with one or more peers from a database of known active peers. The typical presumption is that a node is likely to be active if it has been sending a message within the last three hours.&lt;br /&gt;
&lt;br /&gt;
No additional data is transmitted with this message.&lt;br /&gt;
&lt;br /&gt;
=== checkorder ===&lt;br /&gt;
&lt;br /&gt;
This message is used for [[IP Transactions]], to ask the peer if it accepts such transactions and allow it to look at the content of the order.&lt;br /&gt;
&lt;br /&gt;
It contains a CWalletTx object&lt;br /&gt;
&lt;br /&gt;
Payload:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field Size !! Description !! Data type !! Comments&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;4&amp;quot;| Fields from CMerkleTx&lt;br /&gt;
|-&lt;br /&gt;
| ? || hashBlock&lt;br /&gt;
|-&lt;br /&gt;
| ? || vMerkleBranch&lt;br /&gt;
|-&lt;br /&gt;
| ? || nIndex&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;4&amp;quot;| Fields from CWalletTx&lt;br /&gt;
|-&lt;br /&gt;
| ? || vtxPrev&lt;br /&gt;
|-&lt;br /&gt;
| ? || mapValue&lt;br /&gt;
|-&lt;br /&gt;
| ? || vOrderForm&lt;br /&gt;
|-&lt;br /&gt;
| ? || fTimeReceivedIsTxTime&lt;br /&gt;
|-&lt;br /&gt;
| ? || nTimeReceived&lt;br /&gt;
|-&lt;br /&gt;
| ? || fFromMe&lt;br /&gt;
|-&lt;br /&gt;
| ? || fSpent&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== submitorder ===&lt;br /&gt;
&lt;br /&gt;
Confirms an order has been submitted. &lt;br /&gt;
&lt;br /&gt;
Payload:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field Size !! Description !! Data type !! Comments&lt;br /&gt;
|-&lt;br /&gt;
| 32 || hash || char[32] || Hash of the transaction&lt;br /&gt;
|-&lt;br /&gt;
| ? || wallet_entry || CWalletTx || Same payload as checkorder&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== reply ===&lt;br /&gt;
&lt;br /&gt;
Generic reply for [[IP Transactions]]&lt;br /&gt;
&lt;br /&gt;
Payload:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field Size !! Description !! Data type !! Comments&lt;br /&gt;
|-&lt;br /&gt;
| 4 || reply || uint32_t || reply code&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Possible values:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || SUCCESS || The IP Transaction can proceed (&#039;&#039;checkorder&#039;&#039;), or has been accepted (&#039;&#039;submitorder&#039;&#039;)&lt;br /&gt;
|-&lt;br /&gt;
| 1 || WALLET_ERROR || AcceptWalletTransaction() failed&lt;br /&gt;
|-&lt;br /&gt;
| 2 || DENIED || IP Transactions are not accepted by this node&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ping ===&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;ping&#039;&#039; message is sent primarily to confirm that the TCP/IP connection is still valid. An error in transmission is presumed to be a closed connection and the address is removed as a current peer. No reply is expected as a result of this message being sent nor any sort of action expected on the part of a client when it is used.&lt;br /&gt;
&lt;br /&gt;
=== alert ===&lt;br /&gt;
&lt;br /&gt;
An &#039;&#039;&#039;alert&#039;&#039;&#039; is sent between nodes to send a general notification message throughout the network. If the alert can be confirmed with the signature as having come from the the core development group of the Bitcoin software, the message is suggested to be displayed for end-users. Attempts to perform transactions, particularly automated transactions through the client, are suggested to be halted. The text in the Message string should be relayed to log files and any user interfaces.&lt;br /&gt;
&lt;br /&gt;
Alert format:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field Size !! Description !! Data type !! Comments&lt;br /&gt;
|-&lt;br /&gt;
| ? || payload || var_str || Serialized alert payload&lt;br /&gt;
|-&lt;br /&gt;
| ? || signature || var_str || An ECDSA signature of the message&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The developers of Satoshi&#039;s client use this public key for signing alerts:&lt;br /&gt;
 04fc9702847840aaf195de8442ebecedf5b095cdbb9bc716bda9110971b28a49e0ead8564ff0db22209e0374782c093bb899692d524e9d6a6956e7c5ecbcd68284&lt;br /&gt;
 (hash) 1AGRxqDa5WjUKBwHB9XYEjmkv1ucoUUy1s&lt;br /&gt;
&lt;br /&gt;
The payload is serialized into a var_str to ensure that versions using incompatible alert formats can still relay alerts among one another. The current alert payload format is:&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field Size !! Description !! Data type !! Comments&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Version || int32_t || Alert format version&lt;br /&gt;
|-&lt;br /&gt;
| 8 || RelayUntil || int64_t || The timestamp beyond which nodes should stop relaying this alert&lt;br /&gt;
|-&lt;br /&gt;
| 8 || Expiration || int64_t || The timestamp beyond which this alert is no longer in effect and should be ignored&lt;br /&gt;
|-&lt;br /&gt;
| 4 || ID || int32_t || A unique ID number for this alert&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Cancel || int32_t || All alerts with an ID number less than or equal to this number should be canceled: deleted and not accepted in the future&lt;br /&gt;
|-&lt;br /&gt;
| ? || setCancel || set&amp;lt;int&amp;gt; || All alert IDs contained in this set should be canceled as above&lt;br /&gt;
|-&lt;br /&gt;
| 4 || MinVer || int32_t || This alert only applies to versions greater than or equal to this version. Other versions should still relay it.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || MaxVer || int32_t || This alert only applies to versions less than or equal to this version. Other versions should still relay it.&lt;br /&gt;
|-&lt;br /&gt;
| ? || setSubVer || set&amp;lt;string&amp;gt; || If this set contains any elements, then only nodes that have their subVer contained in this set are affected by the alert. Other versions should still relay it.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Priority || int32_t || Relative priority compared to other alerts&lt;br /&gt;
|-&lt;br /&gt;
| ? || Comment || string || A comment on the alert that is not displayed&lt;br /&gt;
|-&lt;br /&gt;
| ? || StatusBar || string || The alert message that is displayed to the user&lt;br /&gt;
|-&lt;br /&gt;
| ? || Reserved || string || Reserved&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Sample alert (no message header):&lt;br /&gt;
 73010000003766404f00000000b305434f00000000f2030000f1030000001027000048ee0000&lt;br /&gt;
 0064000000004653656520626974636f696e2e6f72672f666562323020696620796f75206861&lt;br /&gt;
 76652074726f75626c6520636f6e6e656374696e672061667465722032302046656272756172&lt;br /&gt;
 79004730450221008389df45f0703f39ec8c1cc42c13810ffcae14995bb648340219e353b63b&lt;br /&gt;
 53eb022009ec65e1c1aaeec1fd334c6b684bde2b3f573060d5b70c3a46723326e4e8a4f1&lt;br /&gt;
 &lt;br /&gt;
 Version: 1&lt;br /&gt;
 RelayUntil: 1329620535&lt;br /&gt;
 Expiration: 1329792435&lt;br /&gt;
 ID: 1010&lt;br /&gt;
 Cancel: 1009&lt;br /&gt;
 setCancel: &amp;lt;empty&amp;gt;&lt;br /&gt;
 MinVer: 10000&lt;br /&gt;
 MaxVer: 61000&lt;br /&gt;
 setSubVer: &amp;lt;empty&amp;gt;&lt;br /&gt;
 Priority: 100&lt;br /&gt;
 Comment: &amp;lt;empty&amp;gt;&lt;br /&gt;
 StatusBar: &amp;quot;See bitcoin.org/feb20 if you have trouble connecting after 20 February&amp;quot;&lt;br /&gt;
 Reserved: &amp;lt;empty&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Scripting ==&lt;br /&gt;
&lt;br /&gt;
See [[script]].&lt;br /&gt;
&lt;br /&gt;
== Wireshark dissector ==&lt;br /&gt;
A dissector for wireshark is being developed at https://github.com/blueCommand/bitcoin-dissector&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
&lt;br /&gt;
* [[Network]]&lt;br /&gt;
* [[Protocol rules]]&lt;br /&gt;
[[zh-cn:协议说明]]&lt;br /&gt;
[[Category:Technical]]&lt;br /&gt;
[[Category:Developer]]&lt;/div&gt;</summary>
		<author><name>Sergio Demian Lerner</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Protocol_documentation&amp;diff=31424</id>
		<title>Protocol documentation</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Protocol_documentation&amp;diff=31424"/>
		<updated>2012-10-02T16:31:05Z</updated>

		<summary type="html">&lt;p&gt;Sergio Demian Lerner: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Sources:&lt;br /&gt;
* [[Original Bitcoin client]] source&lt;br /&gt;
&lt;br /&gt;
Type names used in this documentation are from the C99 standard.&lt;br /&gt;
&lt;br /&gt;
For protocol used in mining, see [[Getwork]].&lt;br /&gt;
&lt;br /&gt;
==Common standards==&lt;br /&gt;
&lt;br /&gt;
=== Hashes ===&lt;br /&gt;
&lt;br /&gt;
Usually, when a hash is computed within bitcoin, it is computed twice. Most of the time [http://en.wikipedia.org/wiki/SHA-2 SHA-256] hashes are used, however [http://en.wikipedia.org/wiki/RIPEMD RIPEMD-160] is also used when a shorter hash is desirable (for example when creating a bitcoin address).&lt;br /&gt;
&lt;br /&gt;
Example of double-SHA-256 encoding of string &amp;quot;hello&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
 hello&lt;br /&gt;
 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824 (first round of sha-256)&lt;br /&gt;
 9595c9df90075148eb06860365df33584b75bff782a510c6cd4883a419833d50 (second round of sha-256)&lt;br /&gt;
&lt;br /&gt;
For bitcoin addresses (RIPEMD-160) this would give:&lt;br /&gt;
&lt;br /&gt;
 hello&lt;br /&gt;
 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824 (first round is sha-256)&lt;br /&gt;
 b6a9c8c230722b7c748331a8b450f05566dc7d0f (with ripemd-160)&lt;br /&gt;
&lt;br /&gt;
=== Merkle Trees ===&lt;br /&gt;
&lt;br /&gt;
Merkle trees are binary trees of hashes. Merkle trees in bitcoin use &#039;&#039;&#039;Double&#039;&#039;&#039; SHA-256, and are built up as so:&lt;br /&gt;
 &lt;br /&gt;
 hash(a) = sha256(sha256(a))&lt;br /&gt;
 &lt;br /&gt;
 hash(a) hash(b) hash(c)&lt;br /&gt;
 hash(hash(a)+hash(b)) hash(hash(c)+hash(c))&lt;br /&gt;
 hash(hash(hash(a)+hash(b))+hash(hash(c)+hash(c)))&lt;br /&gt;
&lt;br /&gt;
They are paired up, with the last element being _duplicated_.&lt;br /&gt;
&lt;br /&gt;
Note: Hashes in Merkle Tree displayed in the [[Block Explorer]] are of little-endian notation. For some implementations and [http://www.fileformat.info/tool/hash.htm calculations], the bits need to be reversed before they are hashed, and again after the hashing operation.&lt;br /&gt;
&lt;br /&gt;
=== Signatures ===&lt;br /&gt;
&lt;br /&gt;
Bitcoin uses [http://en.wikipedia.org/wiki/Elliptic_curve_cryptography Elliptic Curve] [http://en.wikipedia.org/wiki/Digital_Signature_Algorithm Digital Signature Algorithm] ([http://en.wikipedia.org/wiki/Elliptic_Curve_DSA ECDSA]) to sign transactions. &lt;br /&gt;
&lt;br /&gt;
For ECDSA the secp256k1 curve from http://www.secg.org/collateral/sec2_final.pdf is used.&lt;br /&gt;
&lt;br /&gt;
Public keys (in scripts) are given as 04 &amp;lt;x&amp;gt; &amp;lt;y&amp;gt; where &#039;&#039;x&#039;&#039; and &#039;&#039;y&#039;&#039; are 32 byte big-endian integers representing the coordinates of a point on the curve or in compressed form given as &amp;lt;sign&amp;gt; &amp;lt;x&amp;gt; where &amp;lt;sign&amp;gt; is 0x02 if &#039;&#039;y&#039;&#039; is even and 0x03 if &#039;&#039;y&#039;&#039; is odd. Signatures use [http://en.wikipedia.org/wiki/Distinguished_Encoding_Rules DER encoding] to pack the &#039;&#039;r&#039;&#039; and &#039;&#039;s&#039;&#039; components into a single byte stream (this is also what OpenSSL produces by default).&lt;br /&gt;
&lt;br /&gt;
=== Transaction Verification ===&lt;br /&gt;
Transactions are cryptographically signed records that reassign ownership of Bitcoins to new addresses.  Transactions have &#039;&#039;inputs&#039;&#039; - records which reference the funds from other previous transactions - and &#039;&#039;outputs&#039;&#039; - records which determine the new owner of the transferred Bitcoins, and which will be referenced as inputs in future transactions as those funds are respent.&lt;br /&gt;
&lt;br /&gt;
Each &#039;&#039;input&#039;&#039; must have a cryptographic digital signature that unlocks the funds from the prior transaction.  Only the person possessing the appropriate [[private key]] is able to create a satisfactory signature; this in effect ensures that funds can only be spent by their owners.&lt;br /&gt;
&lt;br /&gt;
Each &#039;&#039;output&#039;&#039; determines which Bitcoin address (or other criteria, see [[Scripting]]) is the recipient of the funds.&lt;br /&gt;
&lt;br /&gt;
In a transaction, the sum of all inputs must be equal to or greater than the sum of all outputs.  If the inputs exceed the outputs, the difference is considered a [[transaction fee]], and is redeemable by whoever first includes the transaction into the block chain.&lt;br /&gt;
&lt;br /&gt;
A special kind of transaction, called a [[coinbase transaction]], has no inputs.  It is created by [[miners]], and there is one coinbase transaction per block.  Because each block comes with a reward of newly created Bitcoins (e.g. 50 BTC for the first 210,000 blocks), the first transaction of a block is, with few exceptions, the transaction that grants those coins to their recipient (the miner).  In addition to the newly created Bitcoins, the coinbase transaction is also used for assigning the recipient of any transaction fees that were paid within the other transactions being included in the same block.  The coinbase transaction can assign the entire reward to a single Bitcoin address, or split it in portions among multiple addresses, just like any other transaction.  Coinbase transactions always contain outputs totaling the sum of the block reward plus all transaction fees collected from the other transactions in the same block.&lt;br /&gt;
&lt;br /&gt;
Most Bitcoin outputs encumber the newly transferred coins with a single ECDSA private key.  The actual record saved with inputs and outputs isn&#039;t necessarily a key, but a &#039;&#039;script&#039;&#039;.  Bitcoin uses an interpreted scripting system to determine whether an output&#039;s criteria have been satisfied, with which more complex operations are possible, such as outputs that require two ECDSA signatures, or two-of-three-signature schemes.  An output that references a single Bitcoin address is a &#039;&#039;typical&#039;&#039; output; an output actually contains this information in the form of a script that requires a single ECDSA signature (see [[OP_CHECKSIG]]).  The output script specifies what must be provided to unlock the funds later, and when the time comes in the future to spend the transaction in another input, that input must provide all of the thing(s) that satisfy the requirements defined by the original output script.&lt;br /&gt;
&lt;br /&gt;
=== Addresses ===&lt;br /&gt;
&lt;br /&gt;
A bitcoin address is in fact the hash of a ECDSA public key, computed this way:&lt;br /&gt;
&lt;br /&gt;
 Version = 1 byte of 0 (zero); on the test network, this is 1 byte of 111&lt;br /&gt;
 Key hash = Version concatenated with RIPEMD-160(SHA-256(public key))&lt;br /&gt;
 Checksum = 1st 4 bytes of SHA-256(SHA-256(Key hash))&lt;br /&gt;
 Bitcoin Address = Base58Encode(Key hash concatenated with Checksum)&lt;br /&gt;
&lt;br /&gt;
The Base58 encoding used is home made, and has some differences. Especially, leading zeroes are kept as single zeroes when conversion happens.&lt;br /&gt;
&lt;br /&gt;
== Common structures ==&lt;br /&gt;
&lt;br /&gt;
Almost all integers are encoded in little endian. Only IP or port number are encoded big endian.&lt;br /&gt;
&lt;br /&gt;
=== Message structure ===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field Size !! Description !! Data type !! Comments&lt;br /&gt;
|-&lt;br /&gt;
| 4 || magic || uint32_t || Magic value indicating message origin network, and used to seek to next message when stream state is unknown&lt;br /&gt;
|-&lt;br /&gt;
| 12 || command || char[12] || ASCII string identifying the packet content, NULL padded (non-NULL padding results in packet rejected)&lt;br /&gt;
|-&lt;br /&gt;
| 4 || length || uint32_t || Length of payload in number of bytes&lt;br /&gt;
|-&lt;br /&gt;
| 4 || checksum || uint32_t || First 4 bytes of sha256(sha256(payload))&lt;br /&gt;
|-&lt;br /&gt;
| ? || payload || uchar[] || The actual data&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Known magic values:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Network !! Magic value !! Sent over wire as&lt;br /&gt;
|-&lt;br /&gt;
| main || 0xD9B4BEF9 || F9 BE B4 D9&lt;br /&gt;
|-&lt;br /&gt;
| testnet || 0xDAB5BFFA || FA BF B5 DA&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Variable length integer ===&lt;br /&gt;
&lt;br /&gt;
Integer can be encoded depending on the represented value to save space.  Variable length integers always precede an array/vector of a type of data that may vary in length.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Value !! Storage length !! Format&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt; 0xfd || 1 || uint8_t&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;= 0xffff || 3 || 0xfd followed by the length as uint16_t&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;= 0xffffffff || 5 || 0xfe followed by the length as uint32_t&lt;br /&gt;
|-&lt;br /&gt;
| - || 9 || 0xff followed by the length as uint64_t&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Variable length string ===&lt;br /&gt;
&lt;br /&gt;
Variable length string can be stored using a variable length integer followed by the string itself.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field Size !! Description !! Data type !! Comments&lt;br /&gt;
|-&lt;br /&gt;
| ? || length || [[Protocol_specification#Variable_length_integer|var_int]] || Length of the string&lt;br /&gt;
|-&lt;br /&gt;
| ? || string || char[] || The string itself (can be empty)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Network address ===&lt;br /&gt;
&lt;br /&gt;
When a network address is needed somewhere, this structure is used.  This protocol and structure supports IPv6, &#039;&#039;&#039;but note that the original client currently only supports IPv4 networking&#039;&#039;&#039;. Network addresses are not prefixed with a timestamp in the version message.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field Size !! Description !! Data type !! Comments&lt;br /&gt;
|-&lt;br /&gt;
| 4 || time || uint32 || the Time (version &amp;gt;= 31402)&lt;br /&gt;
|-&lt;br /&gt;
| 8 || services || uint64_t || same service(s) listed in [[#version|version]]&lt;br /&gt;
|-&lt;br /&gt;
| 16 || IPv6/4 || char[16] || IPv6 address. Network byte order. The original client only supports IPv4 and only reads the last 4 bytes to get the IPv4 address. However, the IPv4 address is written into the message as a 16 byte [http://en.wikipedia.org/wiki/IPv6#IPv4-mapped_IPv6_addresses IPv4-mapped IPv6 address]&lt;br /&gt;
(12 bytes &#039;&#039;00 00 00 00  00 00 00 00  00 00 FF FF&#039;&#039;, followed by the 4 bytes of the IPv4 address).&lt;br /&gt;
|-&lt;br /&gt;
| 2 || port || uint16_t || port number, network byte order&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Hexdump example of Network address structure&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
0000   01 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................&lt;br /&gt;
0010   00 00 FF FF 0A 00 00 01  20 8D                    ........ .&lt;br /&gt;
&lt;br /&gt;
Network address:&lt;br /&gt;
 01 00 00 00 00 00 00 00                         - 1 (NODE_NETWORK: see services listed under version command)&lt;br /&gt;
 00 00 00 00 00 00 00 00 00 00 FF FF 0A 00 00 01 - IPv6: ::ffff:10.0.0.1 or IPv4: 10.0.0.1&lt;br /&gt;
 20 8D                                           - Port 8333&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Inventory Vectors ===&lt;br /&gt;
&lt;br /&gt;
Inventory vectors are used for notifying other nodes about objects they have or data which is being requested.&lt;br /&gt;
&lt;br /&gt;
Inventory vectors consist of the following data format:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field Size !! Description !! Data type !! Comments&lt;br /&gt;
|-&lt;br /&gt;
| 4 || type || uint32_t || Identifies the object type linked to this inventory&lt;br /&gt;
|-&lt;br /&gt;
| 32 || hash || char[32] || Hash of the object&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The object type is currently defined as one of the following possibilities:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || ERROR || Any data of with this number may be ignored&lt;br /&gt;
|-&lt;br /&gt;
| 1 || MSG_TX || Hash is related to a transaction&lt;br /&gt;
|-&lt;br /&gt;
| 2 || MSG_BLOCK || Hash is related to a data block&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Other Data Type values are considered reserved for future implementations.&lt;br /&gt;
&lt;br /&gt;
=== Block Headers ===&lt;br /&gt;
&lt;br /&gt;
Block headers are sent in a headers packet in response to a getheaders message.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field Size !! Description !! Data type !! Comments&lt;br /&gt;
|-&lt;br /&gt;
| 4 || version || uint32_t || Block version information, based upon the software version creating this block&lt;br /&gt;
|-&lt;br /&gt;
| 32 || prev_block || char[32] || The hash value of the previous block this particular block references&lt;br /&gt;
|-&lt;br /&gt;
| 32 || merkle_root || char[32] || The reference to a Merkle tree collection which is a hash of all transactions related to this block&lt;br /&gt;
|-&lt;br /&gt;
| 4 || timestamp || uint32_t || A timestamp recording when this block was created (Limited to 2106!)&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bits || uint32_t || The calculated difficulty target being used for this block&lt;br /&gt;
|-&lt;br /&gt;
| 4 || nonce || uint32_t || The nonce used to generate this block… to allow variations of the header and compute different hashes&lt;br /&gt;
|-&lt;br /&gt;
| 1 || txn_count || uint8_t || Number of transaction entries, this value is always 0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Message types ==&lt;br /&gt;
&lt;br /&gt;
=== version ===&lt;br /&gt;
&lt;br /&gt;
When a node creates an outgoing connection, it will immediately advertise its version. The remote node will respond with its version. No futher communication is possible until both peers have exchanged their version.&lt;br /&gt;
&lt;br /&gt;
Payload:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field Size !! Description !! Data type !! Comments&lt;br /&gt;
|-&lt;br /&gt;
| 4 || version || int32_t || Identifies protocol version being used by the node&lt;br /&gt;
|-&lt;br /&gt;
| 8 || services || uint64_t || bitfield of features to be enabled for this connection&lt;br /&gt;
|-&lt;br /&gt;
| 8 || timestamp || int64_t || standard UNIX timestamp in seconds&lt;br /&gt;
|-&lt;br /&gt;
| 26 || addr_recv || net_addr || The network address of the node receiving this message&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;4&amp;quot;| version &amp;gt;= 106&lt;br /&gt;
|-&lt;br /&gt;
| 26 || addr_from || net_addr || The network address of the node emitting this message&lt;br /&gt;
|-&lt;br /&gt;
| 8 || nonce || uint64_t || Node random nonce, randomly generated every time a version packet is sent. This nonce is used to detect connections to self.&lt;br /&gt;
|-&lt;br /&gt;
| ? || user_agent || [[#Variable length string|var_str]] || [[BIP_0014|User Agent]] (0x00 if string is 0 bytes long)&lt;br /&gt;
|-&lt;br /&gt;
| 4 || start_height || int32_t || The last block received by the emitting node&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
A &amp;quot;verack&amp;quot; packet shall be sent if the version packet was accepted.&lt;br /&gt;
&lt;br /&gt;
The following services are currently assigned:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 1 || NODE_NETWORK || This node can be asked for full blocks instead of just headers.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Hexdump example of version message (OBSOLETE EXAMPLE. This example lacks a checksum and user-agent):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
0000   F9 BE B4 D9 76 65 72 73  69 6F 6E 00 00 00 00 00   ....version.....&lt;br /&gt;
0010   55 00 00 00 9C 7C 00 00  01 00 00 00 00 00 00 00   U....|..........&lt;br /&gt;
0020   E6 15 10 4D 00 00 00 00  01 00 00 00 00 00 00 00   ...M............&lt;br /&gt;
0030   00 00 00 00 00 00 00 00  00 00 FF FF 0A 00 00 01   ................&lt;br /&gt;
0040   20 8D 01 00 00 00 00 00  00 00 00 00 00 00 00 00   ................&lt;br /&gt;
0050   00 00 00 00 FF FF 0A 00  00 02 20 8D DD 9D 20 2C   .......... ... ,&lt;br /&gt;
0060   3A B4 57 13 00 55 81 01  00                        :.W..U...&lt;br /&gt;
&lt;br /&gt;
Message header:&lt;br /&gt;
 F9 BE B4 D9                                                                   - Main network magic bytes&lt;br /&gt;
 76 65 72 73 69 6F 6E 00 00 00 00 00                                           - &amp;quot;version&amp;quot; command&lt;br /&gt;
 55 00 00 00                                                                   - Payload is 85 bytes long&lt;br /&gt;
                                                                               - No checksum in version message until 20 February 2012. See https://bitcointalk.org/index.php?topic=55852.0&lt;br /&gt;
Version message:&lt;br /&gt;
 9C 7C 00 00                                                                   - 31900 (version 0.3.19)&lt;br /&gt;
 01 00 00 00 00 00 00 00                                                       - 1 (NODE_NETWORK services)&lt;br /&gt;
 E6 15 10 4D 00 00 00 00                                                       - Mon Dec 20 21:50:14 EST 2010&lt;br /&gt;
 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF 0A 00 00 01 20 8D - Recipient address info - see Network Address&lt;br /&gt;
 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF 0A 00 00 02 20 8D - Sender address info - see Network Address&lt;br /&gt;
 DD 9D 20 2C 3A B4 57 13                                                       - Node random unique ID&lt;br /&gt;
 00                                                                            - &amp;quot;&amp;quot; sub-version string (string is 0 bytes long)&lt;br /&gt;
 55 81 01 00                                                                   - Last block sending node has is block #98645&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== verack ===&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;verack&#039;&#039; message is sent in reply to &#039;&#039;version&#039;&#039;.  This message consists of only a [[#Message structure|message header]] with the command string &amp;quot;verack&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Hexdump of the verack message:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
0000   F9 BE B4 D9 76 65 72 61  63 6B 00 00 00 00 00 00   ....verack......&lt;br /&gt;
0010   00 00 00 00 5D F6 E0 E2                            ........&lt;br /&gt;
&lt;br /&gt;
Message header:&lt;br /&gt;
 F9 BE B4 D9                          - Main network magic bytes&lt;br /&gt;
 76 65 72 61  63 6B 00 00 00 00 00 00 - &amp;quot;verack&amp;quot; command&lt;br /&gt;
 00 00 00 00                          - Payload is 0 bytes long&lt;br /&gt;
 5D F6 E0 E2                          - Checksum&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== addr ===&lt;br /&gt;
&lt;br /&gt;
Provide information on known nodes of the network. Non-advertised nodes should be forgotten after typically 3 hours&lt;br /&gt;
&lt;br /&gt;
Payload:&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field Size !! Description !! Data type !! Comments&lt;br /&gt;
|-&lt;br /&gt;
| 1+ || count || [[Protocol_specification#Variable_length_integer|var_int]] || Number of address entries (max: 1000)&lt;br /&gt;
|-&lt;br /&gt;
| 30x? || addr_list || (uint32_t + net_addr)[] || Address of other nodes on the network. version &amp;lt; 209 will only read the first one. The uint32_t is a timestamp (see note below).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: Starting version 31402, addresses are prefixed with a timestamp. If no timestamp is present, the addresses should not be relayed to other peers, unless it is indeed confirmed they are up.&lt;br /&gt;
&lt;br /&gt;
Hexdump example of &#039;&#039;addr&#039;&#039; message:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
0000   F9 BE B4 D9 61 64 64 72  00 00 00 00 00 00 00 00   ....addr........&lt;br /&gt;
0010   1F 00 00 00 ED 52 39 9B  01 E2 15 10 4D 01 00 00   .....R9.....M...&lt;br /&gt;
0020   00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 FF   ................&lt;br /&gt;
0030   FF 0A 00 00 01 20 8D                               ..... .&lt;br /&gt;
&lt;br /&gt;
Message Header:&lt;br /&gt;
 F9 BE B4 D9                                     - Main network magic bytes&lt;br /&gt;
 61 64 64 72  00 00 00 00 00 00 00 00            - &amp;quot;addr&amp;quot;&lt;br /&gt;
 1F 00 00 00                                     - payload is 31 bytes long&lt;br /&gt;
 ED 52 39 9B                                     - checksum of payload&lt;br /&gt;
&lt;br /&gt;
Payload:&lt;br /&gt;
 01                                              - 1 address in this message&lt;br /&gt;
&lt;br /&gt;
Address:&lt;br /&gt;
 E2 15 10 4D                                     - Mon Dec 20 21:50:10 EST 2010 (only when version is &amp;gt;= 31402)&lt;br /&gt;
 01 00 00 00 00 00 00 00                         - 1 (NODE_NETWORK service - see version message)&lt;br /&gt;
 00 00 00 00 00 00 00 00 00 00 FF FF 0A 00 00 01 - IPv4: 10.0.0.1, IPv6: ::ffff:10.0.0.1 (IPv4-mapped IPv6 address)&lt;br /&gt;
 20 8D                                           - port 8333&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== inv ===&lt;br /&gt;
&lt;br /&gt;
Allows a node to advertise its knowledge of one or more objects. It can be received unsolicited, or in reply to &#039;&#039;getblocks&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Payload (maximum payload length: 1.8 Megabytes or 50000 entries):&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field Size !! Description !! Data type !! Comments&lt;br /&gt;
|-&lt;br /&gt;
| ? || count || [[Protocol_specification#Variable_length_integer|var_int]] || Number of inventory entries&lt;br /&gt;
|-&lt;br /&gt;
| 36x? || inventory || [[Protocol specification#Inventory Vectors|inv_vect]][] || Inventory vectors&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== getdata ===&lt;br /&gt;
&lt;br /&gt;
getdata is used in response to inv, to retrieve the content of a specific object, and is usually sent after receiving an &#039;&#039;inv&#039;&#039; packet, after filtering known elements.&lt;br /&gt;
&lt;br /&gt;
Payload (maximum payload length: 50000 bytes):&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field Size !! Description !! Data type !! Comments&lt;br /&gt;
|-&lt;br /&gt;
| ? || count || [[Protocol_specification#Variable_length_integer|var_int]] || Number of inventory entries&lt;br /&gt;
|-&lt;br /&gt;
| 36x? || inventory || [[Protocol specification#Inventory Vectors|inv_vect]][] || Inventory vectors&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== getblocks ===&lt;br /&gt;
&lt;br /&gt;
Return an &#039;&#039;inv&#039;&#039; packet containing the list of blocks starting right after the last known hash in the block locator object, up to hash_stop or 500 blocks, whichever comes first. To receive the next blocks hashes, one needs to issue getblocks again with a new block locator object. Keep in mind that some clients (specifically the Satoshi client) will gladly provide blocks which are invalid if the block locator object contains a hash on the invalid branch.&lt;br /&gt;
&lt;br /&gt;
Payload:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field Size !! Description !! Data type !! Comments&lt;br /&gt;
|-&lt;br /&gt;
| 4 || version || uint32_t || the protocol version&lt;br /&gt;
|-&lt;br /&gt;
| 1+ || hash count || [[Protocol_specification#Variable_length_integer|var_int]] || number of block locator hash entries&lt;br /&gt;
|-&lt;br /&gt;
| 32+ || block locator hashes || char[32] || block locator object; newest back to genesis block (dense to start, but then sparse)&lt;br /&gt;
|-&lt;br /&gt;
| 32 || hash_stop || char[32] || hash of the last desired block; set to zero to get as many blocks as possible (500)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To create the block locator hashes, keep pushing hashes until you go back to the genesis block. After pushing 10 hashes back, the step backwards doubles every loop:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// From libbitcoin which is under AGPL&lt;br /&gt;
std::vector&amp;lt;size_t&amp;gt; block_locator_indices(int top_depth)&lt;br /&gt;
{&lt;br /&gt;
    // Start at max_depth&lt;br /&gt;
    std::vector&amp;lt;size_t&amp;gt; indices;&lt;br /&gt;
    // Push last 10 indices first&lt;br /&gt;
    size_t step = 1, start = 0;&lt;br /&gt;
    for (int i = top_depth; i &amp;gt; 0; i -= step, ++start)&lt;br /&gt;
    {&lt;br /&gt;
        if (start &amp;gt;= 10)&lt;br /&gt;
            step *= 2;&lt;br /&gt;
        indices.push_back(i);&lt;br /&gt;
    }&lt;br /&gt;
    indices.push_back(0);&lt;br /&gt;
    return indices;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that it is allowed to send in fewer known hashes down to a minimum of just one hash. However, the purpose of the block locator object is to detect a wrong branch in the caller&#039;s main chain. If the peer detects that you are off the main chain, it will send in block hashes which are earlier than your last known block. So if you just send in your last known hash and it is off the main chain, the peer starts over at block #1.&lt;br /&gt;
&lt;br /&gt;
=== getheaders ===&lt;br /&gt;
&lt;br /&gt;
Return a &#039;&#039;headers&#039;&#039; packet containing the headers of blocks starting right after the last known hash in the block locator object, up to hash_stop or 2000 blocks, whichever comes first. To receive the next block headers, one needs to issue getheaders again with a new block locator object. The &#039;&#039;getheaders&#039;&#039; command is used by thin clients to quickly download the blockchain where the contents of the transactions would be irrelevant (because they are not ours). Keep in mind that some clients (specifically the Satoshi client) will gladly provide headers of blocks which are invalid if the block locator object contains a hash on the invalid branch.&lt;br /&gt;
&lt;br /&gt;
Payload:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field Size !! Description !! Data type !! Comments&lt;br /&gt;
|-&lt;br /&gt;
| 4 || version || uint32_t || the protocol version&lt;br /&gt;
|-&lt;br /&gt;
| 1+ || hash count || [[Protocol_specification#Variable_length_integer|var_int]] || number of block locator hash entries&lt;br /&gt;
|-&lt;br /&gt;
| 32+ || block locator hashes || char[32] || block locator object; newest back to genesis block (dense to start, but then sparse)&lt;br /&gt;
|-&lt;br /&gt;
| 32 || hash_stop || char[32] || hash of the last desired block header; set to zero to get as many blocks as possible (2000)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
For the block locator object in this packet, the same rules apply as for the [[Protocol_specification#Variable_length_integer|getblocks]] packet.&lt;br /&gt;
&lt;br /&gt;
=== tx ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;tx&#039;&#039; describes a bitcoin transaction, in reply to &#039;&#039;getdata&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field Size !! Description !! Data type !! Comments&lt;br /&gt;
|-&lt;br /&gt;
| 4 || version || uint32_t || Transaction data format version&lt;br /&gt;
|-&lt;br /&gt;
| 1+ || tx_in count || [[Protocol_specification#Variable_length_integer|var_int]] || Number of Transaction inputs&lt;br /&gt;
|-&lt;br /&gt;
| 41+ || tx_in || tx_in[] || A list of 1 or more transaction inputs or sources for coins&lt;br /&gt;
|-&lt;br /&gt;
| 1+ || tx_out count || [[Protocol_specification#Variable_length_integer|var_int]] || Number of Transaction outputs&lt;br /&gt;
|-&lt;br /&gt;
| 8+ || tx_out || tx_out[] || A list of 1 or more transaction outputs or destinations for coins&lt;br /&gt;
|-&lt;br /&gt;
| 4 || lock_time || uint32_t || The block number or timestamp at which this transaction is locked:&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Value !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Always locked&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt; 500000000  || Block number at which this transaction is locked&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 500000000 || UNIX timestamp at which this transaction is locked&lt;br /&gt;
|}&lt;br /&gt;
A non-locked transaction must not be included in blocks, and it can be modified by broadcasting a new version before the time has expired (replacement is currently disabled in Bitcoin, however, so this is useless).&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
TxIn consists of the following fields:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field Size !! Description !! Data type !! Comments&lt;br /&gt;
|-&lt;br /&gt;
| 36 || previous_output || outpoint || The previous output transaction reference, as an OutPoint structure&lt;br /&gt;
|-&lt;br /&gt;
| 1+ || script length || [[Protocol_specification#Variable_length_integer|var_int]] || The length of the signature script&lt;br /&gt;
|-&lt;br /&gt;
| ? || signature script || uchar[] || Computational Script for confirming transaction authorization&lt;br /&gt;
|-&lt;br /&gt;
| 4 || [http://bitcoin.stackexchange.com/q/2025/323 sequence] || uint32_t || Transaction version as defined by the sender. Intended for &amp;quot;replacement&amp;quot; of transactions when information is updated before inclusion into a block.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The OutPoint structure consists of the following fields:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field Size !! Description !! Data type !! Comments&lt;br /&gt;
|-&lt;br /&gt;
| 32 || hash || char[32] || The hash of the referenced transaction.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || index || uint32_t || The index of the specific output in the transaction. The first output is 0, etc.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The Script structure consists of a series of pieces of information and operations related to the value of the transaction.&lt;br /&gt;
&lt;br /&gt;
(Structure to be expanded in the future… see script.h and script.cpp and [[Script]] for more information)&lt;br /&gt;
&lt;br /&gt;
The TxOut structure consists of the following fields:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field Size !! Description !! Data type !! Comments&lt;br /&gt;
|-&lt;br /&gt;
| 8 || value || int64_t || Transaction Value&lt;br /&gt;
|-&lt;br /&gt;
| 1+ || pk_script length || [[Protocol_specification#Variable_length_integer|var_int]] || Length of the pk_script&lt;br /&gt;
|-&lt;br /&gt;
| ? || pk_script || uchar[] || Usually contains the public key as a Bitcoin script setting up conditions to claim this output.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example &#039;&#039;tx&#039;&#039; message:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
000000	F9 BE B4 D9 74 78 00 00  00 00 00 00 00 00 00 00   ....tx..........&lt;br /&gt;
000010	02 01 00 00 E2 93 CD BE  01 00 00 00 01 6D BD DB   .............m..&lt;br /&gt;
000020	08 5B 1D 8A F7 51 84 F0  BC 01 FA D5 8D 12 66 E9   .[...Q........f.&lt;br /&gt;
000030	B6 3B 50 88 19 90 E4 B4  0D 6A EE 36 29 00 00 00   .;P......j.6)...&lt;br /&gt;
000040	00 8B 48 30 45 02 21 00  F3 58 1E 19 72 AE 8A C7   ..H0E.!..X..r...&lt;br /&gt;
000050	C7 36 7A 7A 25 3B C1 13  52 23 AD B9 A4 68 BB 3A   .6zz%;..R#...h.:&lt;br /&gt;
000060	59 23 3F 45 BC 57 83 80  02 20 59 AF 01 CA 17 D0   Y#?E.W... Y.....&lt;br /&gt;
000070	0E 41 83 7A 1D 58 E9 7A  A3 1B AE 58 4E DE C2 8D   .A.z.X.z...XN...&lt;br /&gt;
000080	35 BD 96 92 36 90 91 3B  AE 9A 01 41 04 9C 02 BF   5...6..;...A....&lt;br /&gt;
000090	C9 7E F2 36 CE 6D 8F E5  D9 40 13 C7 21 E9 15 98   .~.6.m...@..!...&lt;br /&gt;
0000A0	2A CD 2B 12 B6 5D 9B 7D  59 E2 0A 84 20 05 F8 FC   *.+..].}Y... ...&lt;br /&gt;
0000B0	4E 02 53 2E 87 3D 37 B9  6F 09 D6 D4 51 1A DA 8F   N.S..=7.o...Q...&lt;br /&gt;
0000C0	14 04 2F 46 61 4A 4C 70  C0 F1 4B EF F5 FF FF FF   ../FaJLp..K.....&lt;br /&gt;
0000D0	FF 02 40 4B 4C 00 00 00  00 00 19 76 A9 14 1A A0   ..@KL......v....&lt;br /&gt;
0000E0	CD 1C BE A6 E7 45 8A 7A  BA D5 12 A9 D9 EA 1A FB   .....E.z........&lt;br /&gt;
0000F0	22 5E 88 AC 80 FA E9 C7  00 00 00 00 19 76 A9 14   &amp;quot;^...........v..&lt;br /&gt;
000100	0E AB 5B EA 43 6A 04 84  CF AB 12 48 5E FD A0 B7   ..[.Cj.....H^...&lt;br /&gt;
000110	8B 4E CC 52 88 AC 00 00  00 00                     .N.R......&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Message header:&lt;br /&gt;
 F9 BE B4 D9                                       - main network magic bytes&lt;br /&gt;
 74 78 00 00 00 00 00 00 00 00 00 00               - &amp;quot;tx&amp;quot; command&lt;br /&gt;
 02 01 00 00                                       - payload is 258 bytes long&lt;br /&gt;
 E2 93 CD BE                                       - checksum of payload&lt;br /&gt;
&lt;br /&gt;
Transaction:&lt;br /&gt;
 01 00 00 00                                       - version&lt;br /&gt;
&lt;br /&gt;
Inputs:&lt;br /&gt;
 01                                                - number of transaction inputs&lt;br /&gt;
&lt;br /&gt;
Input 1:&lt;br /&gt;
 6D BD DB 08 5B 1D 8A F7  51 84 F0 BC 01 FA D5 8D  - previous output (outpoint)&lt;br /&gt;
 12 66 E9 B6 3B 50 88 19  90 E4 B4 0D 6A EE 36 29&lt;br /&gt;
 00 00 00 00&lt;br /&gt;
&lt;br /&gt;
 8B                                                - script is 139 bytes long&lt;br /&gt;
&lt;br /&gt;
 48 30 45 02 21 00 F3 58  1E 19 72 AE 8A C7 C7 36  - signature script (scriptSig)&lt;br /&gt;
 7A 7A 25 3B C1 13 52 23  AD B9 A4 68 BB 3A 59 23&lt;br /&gt;
 3F 45 BC 57 83 80 02 20  59 AF 01 CA 17 D0 0E 41&lt;br /&gt;
 83 7A 1D 58 E9 7A A3 1B  AE 58 4E DE C2 8D 35 BD&lt;br /&gt;
 96 92 36 90 91 3B AE 9A  01 41 04 9C 02 BF C9 7E&lt;br /&gt;
 F2 36 CE 6D 8F E5 D9 40  13 C7 21 E9 15 98 2A CD&lt;br /&gt;
 2B 12 B6 5D 9B 7D 59 E2  0A 84 20 05 F8 FC 4E 02&lt;br /&gt;
 53 2E 87 3D 37 B9 6F 09  D6 D4 51 1A DA 8F 14 04&lt;br /&gt;
 2F 46 61 4A 4C 70 C0 F1  4B EF F5&lt;br /&gt;
&lt;br /&gt;
 FF FF FF FF                                       - sequence&lt;br /&gt;
&lt;br /&gt;
Outputs:&lt;br /&gt;
 02                                                - 2 Output Transactions&lt;br /&gt;
&lt;br /&gt;
Output 1:&lt;br /&gt;
 40 4B 4C 00 00 00 00 00                           - 0.05 BTC (5000000)&lt;br /&gt;
 19                                                - pk_script is 25 bytes long&lt;br /&gt;
&lt;br /&gt;
 76 A9 14 1A A0 CD 1C BE  A6 E7 45 8A 7A BA D5 12  - pk_script&lt;br /&gt;
 A9 D9 EA 1A FB 22 5E 88  AC&lt;br /&gt;
&lt;br /&gt;
Output 2:&lt;br /&gt;
 80 FA E9 C7 00 00 00 00                           - 33.54 BTC (3354000000)&lt;br /&gt;
 19                                                - pk_script is 25 bytes long&lt;br /&gt;
&lt;br /&gt;
 76 A9 14 0E AB 5B EA 43  6A 04 84 CF AB 12 48 5E  - pk_script&lt;br /&gt;
 FD A0 B7 8B 4E CC 52 88  AC&lt;br /&gt;
&lt;br /&gt;
Locktime:&lt;br /&gt;
 00 00 00 00                                       - lock time&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== block ===&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;block&#039;&#039;&#039; message is sent in response to a getdata message which requests transaction information from a block hash.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field Size !! Description !! Data type !! Comments&lt;br /&gt;
|-&lt;br /&gt;
| 4 || version || uint32_t || Block version information, based upon the software version creating this block&lt;br /&gt;
|-&lt;br /&gt;
| 32 || prev_block || char[32] || The hash value of the previous block this particular block references&lt;br /&gt;
|-&lt;br /&gt;
| 32 || merkle_root || char[32] || The reference to a Merkle tree collection which is a hash of all transactions related to this block&lt;br /&gt;
|-&lt;br /&gt;
| 4 || timestamp || uint32_t || A unix timestamp recording when this block was created (Currently limited to dates before the year 2106!)&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bits || uint32_t || The calculated [[Difficulty|difficulty target]] being used for this block&lt;br /&gt;
|-&lt;br /&gt;
| 4 || nonce || uint32_t || The nonce used to generate this block… to allow variations of the header and compute different hashes&lt;br /&gt;
|-&lt;br /&gt;
| ? || txn_count || [[Protocol_specification#Variable_length_integer|var_int]] || Number of transaction entries&lt;br /&gt;
|-&lt;br /&gt;
| ? || txns || tx[] || Block transactions, in format of &amp;quot;tx&amp;quot; command&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The SHA256 hash that identifies each block (and which must have a run of 0 bits) is calculated from the first 6 fields of this structure (version, prev_block, merkle_root, timestamp, bits, nonce, and standard SHA256 padding, making two 64-byte chunks in all) and &#039;&#039;not&#039;&#039; from the complete block. To calculate the hash, only two chunks need to be processed by the SHA256 algorithm. Since the &#039;&#039;nonce&#039;&#039; field is in the second chunk, the first chunk stays constant during mining and therefore only the second chunk needs to be processed. However, a Bitcoin hash is the hash of the hash, so two SHA256 rounds are needed for each mining iteration.&lt;br /&gt;
See [[Block hashing algorithm]] for details and an example.&lt;br /&gt;
&lt;br /&gt;
=== headers ===&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;headers&#039;&#039; packet returns block headers in response to a &#039;&#039;getheaders&#039;&#039; packet. &lt;br /&gt;
&lt;br /&gt;
Payload:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field Size !! Description !! Data type !! Comments&lt;br /&gt;
|-&lt;br /&gt;
| ? || count || [[Protocol_specification#Variable_length_integer|var_int]] || Number of block headers&lt;br /&gt;
|-&lt;br /&gt;
| 81x? || headers || [[Protocol_specification#Block_Headers|block_header]][] || [[Protocol_specification#Block_Headers|Block headers]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note that the block headers in this packet include a transaction count (a var_int, so there can be more than 81 bytes per header) as opposed to the block headers which are sent to miners.&lt;br /&gt;
&lt;br /&gt;
=== getaddr ===&lt;br /&gt;
&lt;br /&gt;
The getaddr message sends a request to a node asking for information about known active peers to help with identifying potential nodes in the network. The response to receiving this message is to transmit an addr message with one or more peers from a database of known active peers. The typical presumption is that a node is likely to be active if it has been sending a message within the last three hours.&lt;br /&gt;
&lt;br /&gt;
No additional data is transmitted with this message.&lt;br /&gt;
&lt;br /&gt;
=== checkorder ===&lt;br /&gt;
&lt;br /&gt;
This message is used for [[IP Transactions]], to ask the peer if it accepts such transactions and allow it to look at the content of the order.&lt;br /&gt;
&lt;br /&gt;
It contains a CWalletTx object&lt;br /&gt;
&lt;br /&gt;
Payload:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field Size !! Description !! Data type !! Comments&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;4&amp;quot;| Fields from CMerkleTx&lt;br /&gt;
|-&lt;br /&gt;
| ? || hashBlock&lt;br /&gt;
|-&lt;br /&gt;
| ? || vMerkleBranch&lt;br /&gt;
|-&lt;br /&gt;
| ? || nIndex&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;4&amp;quot;| Fields from CWalletTx&lt;br /&gt;
|-&lt;br /&gt;
| ? || vtxPrev&lt;br /&gt;
|-&lt;br /&gt;
| ? || mapValue&lt;br /&gt;
|-&lt;br /&gt;
| ? || vOrderForm&lt;br /&gt;
|-&lt;br /&gt;
| ? || fTimeReceivedIsTxTime&lt;br /&gt;
|-&lt;br /&gt;
| ? || nTimeReceived&lt;br /&gt;
|-&lt;br /&gt;
| ? || fFromMe&lt;br /&gt;
|-&lt;br /&gt;
| ? || fSpent&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== submitorder ===&lt;br /&gt;
&lt;br /&gt;
Confirms an order has been submitted. &lt;br /&gt;
&lt;br /&gt;
Payload:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field Size !! Description !! Data type !! Comments&lt;br /&gt;
|-&lt;br /&gt;
| 32 || hash || char[32] || Hash of the transaction&lt;br /&gt;
|-&lt;br /&gt;
| ? || wallet_entry || CWalletTx || Same payload as checkorder&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== reply ===&lt;br /&gt;
&lt;br /&gt;
Generic reply for [[IP Transactions]]&lt;br /&gt;
&lt;br /&gt;
Payload:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field Size !! Description !! Data type !! Comments&lt;br /&gt;
|-&lt;br /&gt;
| 4 || reply || uint32_t || reply code&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Possible values:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || SUCCESS || The IP Transaction can proceed (&#039;&#039;checkorder&#039;&#039;), or has been accepted (&#039;&#039;submitorder&#039;&#039;)&lt;br /&gt;
|-&lt;br /&gt;
| 1 || WALLET_ERROR || AcceptWalletTransaction() failed&lt;br /&gt;
|-&lt;br /&gt;
| 2 || DENIED || IP Transactions are not accepted by this node&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ping ===&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;ping&#039;&#039; message is sent primarily to confirm that the TCP/IP connection is still valid. An error in transmission is presumed to be a closed connection and the address is removed as a current peer. No reply is expected as a result of this message being sent nor any sort of action expected on the part of a client when it is used.&lt;br /&gt;
&lt;br /&gt;
=== alert ===&lt;br /&gt;
&lt;br /&gt;
An &#039;&#039;&#039;alert&#039;&#039;&#039; is sent between nodes to send a general notification message throughout the network. If the alert can be confirmed with the signature as having come from the the core development group of the Bitcoin software, the message is suggested to be displayed for end-users. Attempts to perform transactions, particularly automated transactions through the client, are suggested to be halted. The text in the Message string should be relayed to log files and any user interfaces.&lt;br /&gt;
&lt;br /&gt;
Alert format:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field Size !! Description !! Data type !! Comments&lt;br /&gt;
|-&lt;br /&gt;
| ? || payload || var_str || Serialized alert payload&lt;br /&gt;
|-&lt;br /&gt;
| ? || signature || var_str || An ECDSA signature of the message&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The developers of Satoshi&#039;s client use this public key for signing alerts:&lt;br /&gt;
 04fc9702847840aaf195de8442ebecedf5b095cdbb9bc716bda9110971b28a49e0ead8564ff0db22209e0374782c093bb899692d524e9d6a6956e7c5ecbcd68284&lt;br /&gt;
 (hash) 1AGRxqDa5WjUKBwHB9XYEjmkv1ucoUUy1s&lt;br /&gt;
&lt;br /&gt;
The payload is serialized into a var_str to ensure that versions using incompatible alert formats can still relay alerts among one another. The current alert payload format is:&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field Size !! Description !! Data type !! Comments&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Version || int32_t || Alert format version&lt;br /&gt;
|-&lt;br /&gt;
| 8 || RelayUntil || int64_t || The timestamp beyond which nodes should stop relaying this alert&lt;br /&gt;
|-&lt;br /&gt;
| 8 || Expiration || int64_t || The timestamp beyond which this alert is no longer in effect and should be ignored&lt;br /&gt;
|-&lt;br /&gt;
| 4 || ID || int32_t || A unique ID number for this alert&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Cancel || int32_t || All alerts with an ID number less than or equal to this number should be canceled: deleted and not accepted in the future&lt;br /&gt;
|-&lt;br /&gt;
| ? || setCancel || set&amp;lt;int&amp;gt; || All alert IDs contained in this set should be canceled as above&lt;br /&gt;
|-&lt;br /&gt;
| 4 || MinVer || int32_t || This alert only applies to versions greater than or equal to this version. Other versions should still relay it.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || MaxVer || int32_t || This alert only applies to versions less than or equal to this version. Other versions should still relay it.&lt;br /&gt;
|-&lt;br /&gt;
| ? || setSubVer || set&amp;lt;string&amp;gt; || If this set contains any elements, then only nodes that have their subVer contained in this set are affected by the alert. Other versions should still relay it.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Priority || int32_t || Relative priority compared to other alerts&lt;br /&gt;
|-&lt;br /&gt;
| ? || Comment || string || A comment on the alert that is not displayed&lt;br /&gt;
|-&lt;br /&gt;
| ? || StatusBar || string || The alert message that is displayed to the user&lt;br /&gt;
|-&lt;br /&gt;
| ? || Reserved || string || Reserved&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Sample alert (no message header):&lt;br /&gt;
 73010000003766404f00000000b305434f00000000f2030000f1030000001027000048ee0000&lt;br /&gt;
 0064000000004653656520626974636f696e2e6f72672f666562323020696620796f75206861&lt;br /&gt;
 76652074726f75626c6520636f6e6e656374696e672061667465722032302046656272756172&lt;br /&gt;
 79004730450221008389df45f0703f39ec8c1cc42c13810ffcae14995bb648340219e353b63b&lt;br /&gt;
 53eb022009ec65e1c1aaeec1fd334c6b684bde2b3f573060d5b70c3a46723326e4e8a4f1&lt;br /&gt;
 &lt;br /&gt;
 Version: 1&lt;br /&gt;
 RelayUntil: 1329620535&lt;br /&gt;
 Expiration: 1329792435&lt;br /&gt;
 ID: 1010&lt;br /&gt;
 Cancel: 1009&lt;br /&gt;
 setCancel: &amp;lt;empty&amp;gt;&lt;br /&gt;
 MinVer: 10000&lt;br /&gt;
 MaxVer: 61000&lt;br /&gt;
 setSubVer: &amp;lt;empty&amp;gt;&lt;br /&gt;
 Priority: 100&lt;br /&gt;
 Comment: &amp;lt;empty&amp;gt;&lt;br /&gt;
 StatusBar: &amp;quot;See bitcoin.org/feb20 if you have trouble connecting after 20 February&amp;quot;&lt;br /&gt;
 Reserved: &amp;lt;empty&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Scripting ==&lt;br /&gt;
&lt;br /&gt;
See [[script]].&lt;br /&gt;
&lt;br /&gt;
== Wireshark dissector ==&lt;br /&gt;
A dissector for wireshark is being developed at https://github.com/blueCommand/bitcoin-dissector&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
&lt;br /&gt;
* [[Network]]&lt;br /&gt;
* [[Protocol rules]]&lt;br /&gt;
[[zh-cn:协议说明]]&lt;br /&gt;
[[Category:Technical]]&lt;br /&gt;
[[Category:Developer]]&lt;/div&gt;</summary>
		<author><name>Sergio Demian Lerner</name></author>
	</entry>
</feed>