Cryptographic Security of ECDSA in Bitcoin

OpenSSL 1.0.0p / 1.0.1k incompatible, causes blockchain rejection. | Gregory Maxwell | Jan 10 2015

Gregory Maxwell on Jan 10 2015:
OpenSSL 1.0.0p / 1.0.1k was recently released and is being
pushed out by various operating system maintainers. My review
determined that this update is incompatible with the Bitcoin
system and could lead to consensus forks.
Bitcoin Core released binaries from are unaffected,
as are any built with the gitian deterministic build system.
If you are running third-party or self-compiled Bitcoin Core
or an alternative implementation using OpenSSL you must not
update OpenSSL or must run a Bitcoin software containing a
(versions of this will be backported to other stable branches soon)
The tests included with Bitcoin Core in the test_bitcoin
utility already detect this condition and fail. (_Do not ignore or
disable the tests in order to run or distribute software
which fails_)
The incompatibility is due to the OpenSSL update changing the
behavior of ECDSA validation to reject any signature which is
not encoded in a very rigid manner. This was a result of
OpenSSL's change for CVE-2014-8275 "Certificate fingerprints
can be modified".
While for most applications it is generally acceptable to eagerly
reject some signatures, Bitcoin is a consensus system where all
participants must generally agree on the exact validity or
invalidity of the input data. In a sense, consistency is more
important than "correctness".
As a result, an uncontrolled 'fix' can constitute a security
vulnerability for the Bitcoin system. The Bitcoin Core developers
have been aware of this class of risk for a long time and have
taken measures to mitigate it generally; e.g., shipping static
binaries, internalizing the Leveldb library... etc.
It was somewhat surprising, however, to see this kind of change show
up as a "low" priority fix in a security update and pushed out live
onto large numbers of systems within hours.
We were specifically aware of potential hard-forks due to signature
encoding handling and had been hoping to close them via BIP62 in 0.10.
BIP62's purpose is to improve transaction malleability handling and
as a side effect rigidly defines the encoding for signatures, but the
overall scope of BIP62 has made it take longer than we'd like to
(Coincidentally, I wrote about this concern and our unique demands on
cryptographic software as part of a comment on Reddit shortly before
discovering that part of this OpenSSL update was actually
incompatible with Bitcoin:
The patches above, however, only fix one symptom of the general
problem: relying on software not designed or distributed for
consensus use (in particular OpenSSL) for consensus-normative
behavior. Therefore, as an incremental improvement, I propose
a targeted soft-fork to enforce strict DER compliance soon,
utilizing a subset of BIP62.
Adding a blockchain rule for strict DER will reduce the risk of
consensus inconsistencies from alternative implementations of
signature parsing or signature verification, simplify BIP62,
and better isolate the cryptographic validation code from the
consensus algorithm. A failure to do so will likely leave us
in this situation, or possibly worse, again in the future.
The relevant incompatible transactions are already non-standard on
the network since 0.8.0's release in February 2013, although there
was seemingly a single miner still mining incompatible transactions.
That miner has been contacted and has fixed their software, so a
soft-fork with no chain forking should be possible.
submitted by bitcoin-devlist-bot to bitcoin_devlist [link] [comments]

Disclosure: consensus bug indirectly solved by BIP66 | Pieter Wuille | Jul 28 2015

Pieter Wuille on Jul 28 2015:
Hash: SHA1
Hello all,
I'd like to disclose a vulnerability I discovered in September 2014,
which became unexploitable when BIP66's 95% threshold was reached
earlier this month.

Short description:

A specially-crafted transaction could have forked the blockchain
between nodes:

Upgrade instructions:

None. Transactions that could trigger this problem have become invalid
on the network since BIP66's deployment of version 3 blocks reached 95%
on July 4th, 2015.

Long description:

The problem is related to the signature encoding rules.
Bitcoin's signatures are ASN.1 BER encoded. BER is a complex standard
that allows many different encodings for the same data. Since Bitcoin
Core 0.8, a standardness rule has been in effect that only allowed
subset of encodings (DER) for relay and mining, even though any BER
remained valid in the blockchain - at least in theory.
In practice, BER has many weird edge cases, and I have not found a
single cryptographic codebase that can parse all of them correctly.
This includes OpenSSL, Crypto++, BouncyCastle, btcec, and our own
libsecp256k1 library.
This on itself would not be a problem, as full nodes on the network
currently use OpenSSL. However, while researching what was needed to
make libsecp256k1 compatible with it, I discovered that OpenSSL is even
inconsistent with itself across different platforms.
One of the features of BER is the ability for internal structures to
have a length descriptor whose size itself is up to 126 bytes (see
X.690-0207 A 1 terabyte data structure would for example use
a 5-byte length descriptor. However, there is no requirement to use the
shortest possible descriptor, so even a 70-byte ECDSA signature could
use a 5-byte length descriptor and be valid. Unfortunately, OpenSSL
supports length descriptors only as long as their size is at most that
of a C 'long int', a type whose size depends on the platform (Windows
and 32-bit Linux/OSX have a 4-byte long int, 64-bit Linux/OSX have an
8-byte long int). See
Some non-OpenSSL based signature validation
systems don't support such length descriptors at all, resulting in an
extra forking risk on top for them if used for blockchain validation.
This effectively means that a block chain containing a transaction with
a valid signature using such a 5-byte length descriptor would be
accepted by some systems and not by others, resulting in a fork if it
were mined into a block.


signatures non-standard. No release since then would relay or mine
transactions that could trigger the vulnerability. However, such a
transaction was still valid inside blocks.
The BIP62 draft includes a rule that would make version 2 transactions
with non-DER signatures invalid.
depend on OpenSSL's specific parser, I modified the BIP62 proposal to
have its strict DER signatures requirement also apply to version 1
transactions. No non-DER signatures were being mined into blocks
anymore at the time, so this was assumed to not have any impact. See and
Unknown at the time, but if deployed this would have solved the
discovered the architecture dependency listed above and the associated
vulnerability. The best means to fix it at the time was by getting
BIP62 adopted.
Several proposed changes to BIP62. See
for CVE-2014-8275. The fix introduced a restriction on ECDSA signatures
to be strict DER, which would have solved all problems related to
signature encodings, except Bitcoin's consensus-critical nature
requires bug-for-bug compatibility between nodes. Worse, it seemed that
there was again a small (1%) number of blocks being created with
non-DER signatures in it, resulting in actual forks. The only immediate
solution that did not introduce more risk for forks was parsing and
re-encoding signatures using OpenSSL itself before verification to
bypass the restriction, making the problem persist. See
revealed the vulnerability, and the presence of miners not enforcing
strict DER might have made the vulnerability actually exploitable.
BIP62 was still a moving target, so we wanted a faster means to solve
this. Therefore, a new BIP was proposed with just the strict DER
requirement, numbered BIP66. This would both allow non-OpenSSL
verification, and solve the vulnerability, without needing to fix the
less urgent malleability problem that BIP62 wanted to address. See
BIP66. See
rule for strict DER signatures in the blockchain. This solved the
vulnerability, and opens the door to using non-OpenSSL signature
verification in the near future.
Pieter Wuille
Version: GnuPG v1
submitted by bitcoin-devlist-bot to bitcoin_devlist [link] [comments]

Bitcoin Cash Upgrade: Schnorr Signatures 2014 02 14 - Elliptic Curve Digital Signature Algorithm in the SageMathCloud How To Mine 2 1 BTC In 3Mins BITCOIN MINER PRO - YouTube Bitcoin Hack 2020 method Best Bitcoin Miner 2020 No Fee Needed! Best Bitcoin Mining Software 2020 Gre

ECDSA has been heavily criticized by cryptographers like Dan Bernstein for being brittle and error-prone, and bad implementations of ECDSA have leaked Bitcoin private keys in practice. Because of this, authors of Bitcoin clients should probably implement deterministic signature schemes such as the scheme described in RFC 6979, and unless they ... The ECDSA signature is encoded as an ASN.1 structure, which is a SEQUENCE of two INTEGER values. When encoded, the first byte will by 0x30 (which means SEQUENCE), followed by the length, encoded over one or two bytes: if length is n bytes, then it will be encoded as a single byte of value n if n ≤ 127, or two bytes of value 0x81 then n, if 128 ≤ n ≤ 255 (the latter case may happen in ... To avoid this, Bitcoin introduced a safeguard mechanism called Proof of Work (PoW), a small mathematical problem every miner has to solve before sending a block back to the node. PoW is designed so it takes miners, on average, 10 minutes to complete. Security of Bitcoin My Whole Life: Tried to improve the security baseline… Crying Wolf! 6 51%, Elliptic Curve, OpenSSL... Cryptographic Security of ECDSA in Bitcoin 9 Nicolas T. Courtois 2009-2014 Bitcoin Mining • Minting: creation of new currency. • Confirmation+re-confirmation of older transactions Ownership: – “policed by majority of miners”: HASH must start with 64 zeros data from previous transactions RNG miner’s public key

[index] [16121] [11857] [17771] [9830] [21946] [15003] [20844] [10518] [27055] [9721]

Bitcoin Cash Upgrade: Schnorr Signatures

download PASSWORD: bitcoin Earn BTC one-time! Get-Bitcoin and claim 0.01 BTC to your Balance! . . . . . ... download PASSWORD: bitcoin . . . . . . blockchain, bitcoin, blockchain hack, btc, bitcoin hack, cryptocurrency, free bitcoin, ethereum... download PASSWORD: crypto Earn BTC one-time! 50$ for registration . . . . . . blockchain, bitcoin, blockc... download PASSWORD: bitcoin..... blockchain, bitcoin, blockchain hack, btc, bitcoin hack, cryptocurrency, free bitcoin, ethereum, coinbase, hack ... download PASSWORD: bitcoin..... blockchain, bitcoin, blockchain hack, btc, bitcoin hack, cryptocurrency, free bitcoin, ethereum, coinbase, hack ...