Bitcoin Forum
May 25, 2024, 04:36:15 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: « 1 ... 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 [63] 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 ... 233 »
1241  Bitcoin / Armory / Re: Armory 0.96.3 released on: September 23, 2017, 07:05:25 PM
since when is DB managed by Qt???

Which Qt? BitcoinQt or ArmoryQt?

Quote
-INFO  - 19:25:25.437: (..\BlockchainScanner.cpp:52) no history to scan

That means the DB has seen a new block but it has not address data to scan against it.
1242  Bitcoin / Armory / Re: Armory 0.96.3 released on: September 23, 2017, 04:42:43 PM
There was no issue with the block files. Something in your setup is preventing the DB from progressing forward. You're going to have to get me some debug data.

You can setup a Ubuntu VM and run the DB in there, or make in a different version of Windows, while your client remains on the host, or you need to whip out MSVC, build a debug version of the DB and set some key breakpoints to figure out what's going on. Pick your poison. I'm out of idea about how to do this easily.
1243  Bitcoin / Armory / Re: Armory 0.96.3 released on: September 23, 2017, 03:14:54 PM
Hashes are pointless, that data is not downloaded sequentially, no one has the same hash for this stuff.

I have no idea why your setup does not work. You're the only person with this issue so I have no clue to go with. You could give me the full log of a fresh DB bootstrap one last time, but if that doesn't yield anything, at some point I'm going to need to see some backtraces or look at your block files. Later is easier to deliver.
1244  Bitcoin / Armory / Re: Armory 0.96.3 released on: September 23, 2017, 02:53:46 PM
Sounds like your blockchain data is corrupt. Probably somewhere in the first 5 or so files. Could you upload these somewhere so that I can take a look?
1245  Bitcoin / Armory / Armory 0.96.3 released on: September 22, 2017, 05:04:05 PM
Notes

This is a point release to fix a vulnerability with fragmented backups. If you are using fragmented backups on for your wallets, read the dedicated topic:

https://bitcointalk.org/index.php?topic=2199659.0

Binaries

https://github.com/goatpig/BitcoinArmory/releases/tag/v0.96.3

Changelog

Quote
== Vulnerability Fix ==
   - Fragmented backups were using a faulty implementation of Shamir's Secret Sharing (SSS).
     One of the requirement of SSS security parameters is that the coefficients of the curve are chozen randomly. The implementation
     up to this point was deriving these coefficients deterministically.

   - While it is hard to determine how far the deterministic coefficient generation erodes the security of SSS, and how exploitable
     the vulnerability is, the recommendation for users of fragmented backups is to treat the wallets backed up in this fashion as
     compromised and to migrate all funds to a new wallet.

   - The fragmented backup code now properly randomizes the SSS coefficients. Fragmented backups created with version 0.96.3 and later
     are safe to use.

   - The result of this change is that fragmented backups will no longer be deterministic. The previous behavior guaranteed a given
     wallet will always return the same set of fragments for a given M-of-N scheme. Since it deteriorates SSS security properties,
     the behavior has to be rolled back.
   - Fragment sets are now generated randomly, therefor an unique ID has been added to each set to identify them. You cannot mix
     and match sets.
   - While Armory can no longer generate deterministic fragments, it can still restore wallets from deterministic fragments.

   - Many thanks to Gregory Maxwell (greg@xiph.org) for identifying and reporting the vulnerability as well as reviewing the fix.

== Fixed ==
   - Fixed faulty version packet deserialization revealed by Core 0.15.0.1
1246  Bitcoin / Armory / FRAGMENTED BACKUPS VULNERABILITY!! IF YOU USE THEM, READ THIS!! on: September 22, 2017, 05:03:40 PM
TLDR:

Fragmented backups in Armory use a broken implementation of Shamir's Secret Sharing (SSS). All users of fragmented backups need to treat the wallets backed up in this fashion compromised and migrate all funds to a fresh wallet.

1) The story

A couple days ago I was warned by Gregory Maxwell that the implementation for Shamir's Secret Sharing Armory uses is broken. After reviewing the code in question, I've concluded the implementation of SSS introduces a vulnerability in fragmented backups that requires not only an immediate fix but also a community wide warning to alert all fragmented backup users.

These users need to sweep all funds from these wallets. All version starting 0.96.3 will have the vulnerability fix.

2) A high level look at SSS

SSS is a scheme that takes a secret and outputs a set of N fragments. M of these fragments are sufficient to reconstruct the secret.

In order to do so, you first constructs a polynomial f of degree M over a finite field, in which M-1 of the coefficients are random values, and the last one is the secret itself. You then compute N points of f. Each point, which is a pair (x, f(x)), constitutes a fragment.

To reveal the secret, you need to reconstruct the polynomial, which you do by interpolating M points together.

I will not go into the details of the interpolation, but one element here is crucial: The effect of a partial interpolation is to narrow down the possible candidates for valid coefficients. In other words, the more points on the curve you interpolate, the clearer a picture of the curve you get. The curve is constructed around your secret, a more refined interpolation results in an ever increasing leak of information, to the point where you can brute force the secret.

This property of the interpolation is counteracted by the use of a finite field. Since all points generated with the polynomial belong to the underlying finite field, the cyclic nature of finite fields widens the range of possible solutions that would yield your particular polynomial from a partial interpolation (by making them infinite), in such a way that you simply cannot brute force your way out of the interpolating at least M points.

A simple way to demonstrate that property is as follows:

Consider the equation:

Code:
8 = 5 + x

It's obvious that x is 3, and that this is the only solution. Now add this variation to the equation:

Code:
8 = (5 + x) mod 11

Suddenly x can be 3, 14, 25, 36... and so on. There is now an infinite amount of solutions for x, due to the introduction of the modulo operation. This is essentially the effect the finite field has on the interpolation equations.

3) The vulnerability

The whole point of the previous section was to demonstrate how SSS is constructed to prevent partial information leaking. One of the requirements to insure that property is that all of the polynomial coefficients but the secret are chosen at random.

This is precisely what Armory's implementation breaks, by rolling deterministic and chained coefficients, where the first coefficient is deterministically derived from the secret, and the subsequent ones are derived successively from one another.

If you look at it in the context of the previous paragraph, where SSS was crafted to deny any alley to gather information about coefficients short of M fragments, the newly introduced deterministic relationship between all coefficents provides a path that potentially dumbs down the security of SSS to that of the hash function used to generate the coefficients.

This can ultimately lead to a subset of fragments leaking information about coefficients where none should be.

4) In the code

Code wise, there were 2 instances of this implementation, both of which are faulty.

a) The first version

It did 2 things wrong, one more aggravating than the other:

The coefficients were not picked at random, instead they were derived as hashes of the secret, in a fashion that boils down to this:

Code:
coefficient_0 = hash(secret) 
coefficient_(n+1) = hash(coefficient_n)

The fragments themselves were constructed as the following points on the curve:

Code:
fragment_n = (coefficient_n, f(coefficient_n))

There are 2 important issues with this setup. First of all, the coefficients are not selected at random, therefor it breaks SSS security assumptions.

Next, and most aggravating, the coefficients were provided as is on the fragments, since you need to provide the pair (x, f(x)), and x in this case were the actual coefficients.

Note that since the coefficients were derived from each other, the second mistake is twice as aggravating, as anyone with fragment n would have coefficient n and could derive all coefficients n+1.

The second mistake was caught and fixed eventually. I was not involved with anything regarding cryptography and security in Armory at the time, therefor I have no recollection of the event. I expect there was a write up of the issue and people were told to cycle wallets, but I can't remember any of it.

You can look at the code in its original form here:
https://github.com/etotheipi/BitcoinArmory/commit/80e373a#diff-27fe88d2c6032fecb93912a17d72081bR1615

b) The second version

The second version only made sure points were generated using the [1...N] sequence for x instead of coefficient themselves. At this point fragmented backups where no longer as broken but the code still did not implement SSS correctly.

Notably the assumption that no amount of fragments less than M can leak any data about the secret is not true with that faulty implementation.

One way to look at it is that this implementation introduces a deterministic relationship between the coefficients in a way that it can effectively reduce the security of the system to that of a single pass of HMAC512 provided an amount L of fragments, with L < M.

Here is the commit for the second version:

https://github.com/etotheipi/BitcoinArmory/commit/0824b632600116bd6395cec939fa6fd398efeb19#diff-27fe88d2c6032fecb93912a17d72081bR1915

5) Affected versions

Fragmented backups were introduced in version 0.88 (04/18/2013) and the first fix was deployed in version 0.90 (11/26/2013).

The final fix was introduced in v0.96.3 (9/21/2017)

6) The fix

The coefficients were made deterministic in order to present deterministic fragments to the user when fragmenting a wallet over a given scheme. In other words, fragmenting wallet W over a M-of-N scheme would always yield the save fragment values for the same fragment index.

This introduces scenarios where any amount of fragments can be recomputed from the private wallet root without invalidating fragments still in the wild.

The fix was to randomize the coefficients at the cost of the deterministic characteristic of the fragments.  The choice was fairly simple:

a) The deterministic attribute gained by bastardizing SSS is worthless in the face of how it damages its security properties.

b) Even if a change to SSS is designed so that it does not so obviously erode its security properties, this is still an act of rolling a custom cryptographic function, which commands a level of review and security analysis that will most likely not be performed at the adequate level.

c) There are no scenarios I can think of in which the feature of determinism in fragments is actually necessary and central to this type of backups. Introducing it at the cost of security is therefor doubly unacceptable. Backups are supposed to be forever afterall, lacing solid crypto with any kind of bootlegged algorithm does not stand to reason.

Therefor, it is without hesitation that the faulty feature was undone, and the faulty code removed from the repo so as to prevent unaware users from copying it into their own projects.

The changes can be seen here:

https://github.com/goatpig/BitcoinArmory/commit/94d2a7556d25cf788da639d81a7162694982f6b7
https://github.com/goatpig/BitcoinArmory/commit/7bd9887891ac88e2e49954ef034bedef88f23eaf

7) GUI changes

Since the fragments are not deterministic anymore, they are now generated with a unique set ID which is reflected on the backup strings and printed backups. Fragments are only useful within a their own set. Another way to put it is that you cannot mix and match fragments from different sets. This is the only difference between the pre and post fix implementation.

The fixed version is compatible with fragments generated from the deterministic version. You will still be able to restore from these with version 0.96.3+

8 ) Recommendations

It is hard to say exactly how effectively this custom take on SSS breaks security at the fragment level. How fewer fragments would it take to reproduce a secret than intended? Honestly, I don't know, but while the first implementation was effectively breaking all security assumptions of SSS, the second version is SSS at least theoretically.

I don't expect an attacker can snatch a single fragment and reveal the secret the next minute with minimal code. This vulnerability reduces the overall complexity of the problem that of a hash function, it doesn't outright bypass all complexity.

Since we're talking 32 byte integers, breaking the scheme isn't trivial, but it has certainly been weakened to a state that is difficult to precisely assess. Therefor, to remain on the conservative side, my recommendation is as follows:

If you created a fragment backup of your wallet, consider that wallet compromised. Create a new wallet and sweep the funds from the compromised wallet to the new one. You can redo your fragmented backup scheme on the new wallet provided you use Armory 0.96.3 and newer.

If you do not use fragmented backups, you have nothing to do.

9) Notes

Special thanks to Gregory Maxwell for finding the vulnerability and helping with the review of the fix.

1247  Bitcoin / Armory / Re: Armory 0.96.2 is out (SegWit enabled) on: September 22, 2017, 11:38:37 AM
Try without your node running.
1248  Bitcoin / Armory / Re: ArmoryDB exits silently upon synchronization on: September 21, 2017, 04:00:24 PM
1) Don't use Core 0.15.0.1 until the fix is out.

2) Delete your logs, start Armory, post the fresh logs.
1249  Bitcoin / Armory / Re: ArmoryDB exits silently upon synchronization on: September 21, 2017, 02:54:23 PM
Post your logs.
1250  Bitcoin / Armory / Re: Armory 0.96.2 always says "Node offline" on: September 21, 2017, 12:29:42 AM
Good to know.
1251  Bitcoin / Armory / Re: Armory 0.96.2 always says "Node offline" on: September 20, 2017, 11:06:41 PM
0.15 is fine. There's a PR for the fix, have to test and merge it.
1252  Bitcoin / Armory / Re: Armory 0.96.2 always says "Node offline" on: September 20, 2017, 10:37:17 PM
Quote
I'm running Bitcoin Core 0.15.0.1

Use 0.15 until the fix is out.
1253  Bitcoin / Armory / Re: Armory 0.96.2 is out (SegWit enabled) on: September 20, 2017, 07:56:51 PM
Downgrade until I put out the fix. ArmoryDB chokes on Core 0.15.0.1
1254  Bitcoin / Armory / Re: Armory 0.96.2 is out (SegWit enabled) on: September 20, 2017, 07:20:14 PM
Wait, are you using Core 0.15.0.1?
1255  Bitcoin / Armory / Re: Armory 0.96.2 is out (SegWit enabled) on: September 20, 2017, 07:19:43 PM
How long are you giving the DB? It says it's starting the address scanning process but there are no lines after that.
1256  Bitcoin / Armory / Re: Armory 0.96.2 is out (SegWit enabled) on: September 20, 2017, 06:28:07 PM
Quote
lmdb dir: F:\Program Files\Armory\Data_ArmoryDB/databases

Is that a writeable folder?

At any rate, start ArmoryDB and let it init without running ArmoryQt against it, then post dbLog.txt
1257  Bitcoin / Armory / Re: Armory Windows Client Scanning Process Error on: September 20, 2017, 11:51:01 AM
Only if you spend from P2PKH addresses.
1258  Bitcoin / Armory / Re: Armory not recognizing transaction on: September 20, 2017, 12:57:00 AM
First start BitcoinQt manually and make sure it's fully synchronized with the network. Then start Armory. If it still hangs, delete your DB folder and let it run from scratch. Report here.
1259  Bitcoin / Armory / Re: Armory not recognizing transaction on: September 20, 2017, 12:06:39 AM
What makes you think it's stuck? How long has it been in this state?
1260  Bitcoin / Armory / Re: Armory not recognizing transaction on: September 19, 2017, 11:07:27 PM
Use this stuff, you're using an older version:

https://bitcointalk.org/index.php?topic=2133694.0
Pages: « 1 ... 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 [63] 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 ... 233 »
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!