Bitcoin Forum
May 25, 2024, 03:26:45 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 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 ... 186 »
261  Bitcoin / Armory / Re: Lets support the Bitcoin Armory Bootstrap.torrent on: June 19, 2014, 08:24:56 PM
I don't have a direct link for you, but if you've run Armory for 5+ seconds since we updated it, your ARMORY_HOME_DIR/atisignedannounce directory will have something like "bootstrap.file".  Rename it to bootstrap.dat.torrent and you have the latest.
Cool! Just started downloading, will be seeding in 50 minutes Smiley

For reference, part of the motivation of the new announcement system was to be able to do stuff like this.  It will check our S3 folder on startup and every 60 minutes, and will only download/save files that are signed with our offline key.  This includes being able to periodically update the bootstrap file between Armory releases.    If someone compromises our AWS/S3 account, the best they can do is DoS these announcements, unless they also get our offline Bitcoin private key.

For that reason, you can always stay up to date on the latest torrent simply by watching the bootstrap.file in the atisignedannounce folder. 
262  Bitcoin / Armory / Re: Armory - Discussion Thread on: June 19, 2014, 02:25:26 AM
Hi

I upgraded from Armory 0.90 directly to 0.91.2, all went fine ( on a win 8.1 64bit OS )
When I realized that 0.91.2 is the "Armory Testing (unstable) 0.91.2" version
I simply installed  Armory 0.91.1 over 0.91.2, and it worked.

My question is, will I run into any issues because I installed an older version 0.91.1 over the newer one 0.91.2 ?

Thanks for clarification.


No unless wallet has a new version and you created a new one

You should use 912 tho it's not unstable as it says

Bummer!  When I updated the torrent and re-signed the installer hashes, I accidentally left the "Testing (Unstable)" on 0.91.2 which is what is shown in the secure downloader.  I'll have to fix that.

On the other hand, it's listed on our website as the latest stable version.  So there's that...
263  Bitcoin / Armory / Re: Lets support the Bitcoin Armory Bootstrap.torrent on: June 18, 2014, 08:14:13 PM
Funny you mention that.  We haven't updated it in a while and just prepared a new one to upload.  But I changed all my release/signing scripts, and gotta remember how to offline-sign it Smiley  Will do that today or tomorrow.

Would still love to seed a new version of the torrent Smiley


Whoops, forgot to post here after we updated.  I don't have a direct link for you, but if you've run Armory for 5+ seconds since we updated it, your ARMORY_HOME_DIR/atisignedannounce directory will have something like "bootstrap.file".  Rename it to bootstrap.dat.torrent and you have the latest.
264  Bitcoin / Armory / Re: Lets support the Bitcoin Armory Bootstrap.torrent on: June 18, 2014, 08:10:21 PM
Funny you mention that.  We haven't updated it in a while and just prepared a new one to upload.  But I changed all my release/signing scripts, and gotta remember how to offline-sign it Smiley  Will do that today or tomorrow.

Would still love to seed a new version of the torrent Smiley
265  Bitcoin / Armory / Re: Armory - Discussion Thread on: June 18, 2014, 06:03:51 PM
Sometimes it feels like you used the "time remaining" algorithm from Windows 95, such as when the database rebuild progress displays 1.5 minutes remaining for 10 minutes.

One thing I've learned over the course of building Armory is that those time-remaining bars are very difficult to get right.  Especially when it comes to things like downloading data that fluctuates in speed rapidly.   I have an extensive background in signal processing, yet I still can't get it right.

On the other hand ,there is a flaw in my algorithm -- it seems to use CPU-timings instead of wall-timings.  Typically this results in the system reporting that it took 2 sec to move 1% of the bar, instead of 3.2 or whatever.  This leads to very optimistic estimates.  I've been meaning to go in and figure out what is causing that, but I haven't had it on my priority list for a while.
266  Bitcoin / Armory / Re: Armory - Discussion Thread on: June 18, 2014, 05:04:04 PM
Wow, I missed out on some fun discussions.  Let me clarify how this works, and what Armory has done (and failed to do).

  • You can use openSSL to generate your own SSL certificate (offline if you want), and send just the [effective] public key to the CA for signing.  In this way, the private part of your certificate can be protected in exactly the same way as we do GPG.
  • The certificate provider/signer will verify your identity before they sign any certificate claiming "Joe's Fish Shop" is the provider of this software.
  • A single compromised CA cert could be used to impersonate just about anything.  Your system trusts any number of probably 100 certificate roots, and a signature from any one of them pretty much gives the green light, unless you are manually inspecting the certificate chain and know that certain certs are lower security and/or compromised.  It's the job of the OS and the browsers to track which CAs are still trustworthy and help update your CA lists to make sure that any compromised providers are no longer trusted.
  • The MS/authenticode system is not good for verifying specific certificates.  Ideally, for high-security apps, the publisher would publish their public cert and everyone would verify that the signatures from that cert, though it's a bit of work to do this.  Instead, they just check whether there's any valid certificate chain and shows you "Yes/No" that the signature is valid.
  • For this reason, I don't care much for Authenticode-signed certs.  They avoid the unsightly "Unknown Publisher" when you go to run the installer, but that can be a false sense of security.
  • I stand by the notion that the GPG signatures are the most secure.  Our offline GPG fingerprint is everywhere, and it's simple to check via command-line.  It's also easy to integrate into our release scripts.
Here's what Armory has done to this point:

  • I have a Class 2 object code signing certificate, signed by StartCom.  Though at this point it might be expired.  However, it is in my name ("Alan Reiner")
  • Getting a cert associated with the company requires quite a bit of ID verification work, including supplying tax returns.  We haven't been keen to do this, though I suspect we will at some point.  This would be needed for it to show "Armory Technologies, Inc." on the "Verified Publisher:" line.
  • Before version 0.90, Armory used my personally-verified cert.  I generated it on an offline windows machine, and integrated an three extra steps into my release process to make sure the windows installers made it to that machine for authenticode signing before going to the offline Linux box for GPG signing.  This is quite a pain ... you can't sign afterwords or else the GPG hashes/sigs break.
  • There is technically a way to do this in linux, but it didn't work with the type of .exe I was signing.  I was left with no choice but to use a dedicated offline Windows box
.
  • Before version 0.90, I did go through with all this.  You should be able to run the 0.88 installers and see my name as the verified publisher
  • Since version 0.90, we have been using NSIS to package up our installers.  The signing process that I previously used no longer works.  I believe it has to do with the chained installer architecture:  the outer shell of the installer is signed, but it's only purpose is to unpack the real installer and run it... which is not (easily) signed.  This means that if you take the .exe posted on the website (if it were signed this way), you could view its properties in Windows and see the signature is there.  But when you run it, you still see "Unknown Publisher."

With all this in mind, I hope you'll forgive me that I wasn't excited about going through a lot of work, to provide what I felt was less security than the GPG sig, and complicates the heck out of my signing&release process.  Is it useless?  Not exactly.  But I'm comfortable with the idea that the user either checks the GPG sig and knows it's good, or they don't and know it's not verified. 

However, it is possible that the new installer format works with linux authenticode tools, so that it could be easily integrated into the release process.  If anyone wants to try that out for us and provide a recipe for doing it, I will take a shot at it.  But I'm not anxious to put a lot effort into what is already a complex and inconvenient process (low convenience but high security!).

267  Bitcoin / Armory / Re: Armory - Discussion Thread on: June 17, 2014, 01:55:32 PM
I have an old Armory wallet on an offline computer - if I upgrade my offline installation with the latest Armory version (0.9.2), will I be able to do an n-of-m paper backup or should I create a new wallet with the newest Armory and transfer my funds there to be able to print such a backup?

The new backup system is backwards compatible.  It has no problem doing fragmented backups of old wallets, though they will be four-line backups instead of the new two-line backups.  This is because the older versions of Armory (before fragmented backups were implemented) independently generated the root key and chaincode from secure-random data and thus both needed to be backed up.  This was unnecessary since there is already more than enough entropy in the 256-bit key, so we switched to computing it from the root key itself.  Thus, if you have the root key, the chaincode can be computed and doesn't need to be backed up.   

Just make sure you use the backup tester and/or actually remove the wallet and restore it.   It will give you the option to test your backup after you are done creating it.
268  Bitcoin / Armory / Re: Armory - Discussion Thread on: June 16, 2014, 10:38:07 PM
I'd recommend to encrypt the swap (maybe with a passphrase instead of a random one time password, I don't trust the entropy pool while booting up). No swap at all might get nasty if you hit your ram constraints.


Well the most sensitive keys will be kept on an offline computer which presumably runs nothing else except offline Armory.  There's not really a way to run through your RAM there.  Plus, I'd rather run out of swap than have the keys accidentally hit the hard drive unencrypted without warning.  But yes, it is possible to have encrypted swap, though I don't think you can use hibernate if you do that, so you'd be disabling hibernate which is 80% the reason you wanted encrypted swap to begin with.

Encrypt the whole OS with Truecrypt and you dont have to bother anymore... though TC is somewhat in a strange state... now that the devs dont want to work on it anymore.

As far as I know, TrueCrypt doesn't do encrypted swap.  It makes sure that nothing touches your primary (storage) partitions unencrypted, but if you hibernate with key material in RAM, it will still end up on disk unencrypted.   I recommend both disabling swap (and hibernate), and use full-disk encryption.  TrueCrypt works for the disk encryption part, though most recent versions of Ubuntu have had home-partition encryption in the OS-install wizard for a while
269  Bitcoin / Armory / Re: Armory - Discussion Thread on: June 16, 2014, 08:32:20 PM
I'd recommend to encrypt the swap (maybe with a passphrase instead of a random one time password, I don't trust the entropy pool while booting up). No swap at all might get nasty if you hit your ram constraints.


Well the most sensitive keys will be kept on an offline computer which presumably runs nothing else except offline Armory.  There's not really a way to run through your RAM there.  Plus, I'd rather run out of swap than have the keys accidentally hit the hard drive unencrypted without warning.  But yes, it is possible to have encrypted swap, though I don't think you can use hibernate if you do that, so you'd be disabling hibernate which is 80% the reason you wanted encrypted swap to begin with.
270  Bitcoin / Development & Technical Discussion / Re: [ANN] Armory Multi-Sig with Simulfunding [BOUNTY 0.03 per bug] on: June 16, 2014, 08:54:12 AM
Question: If I create let's say a 6/9 lockbox and want to spend some funs from there, is it possible to send the unsigned tx to all 9 keyholders and have them sign the transaction. Can I then fuse it together once I have six signatures? Or do all the 6 participants have to sign sequentially? Would be really great if they could all sign in parallel.

Yup, you can sign in parallel.   Both regular multi-sig spends and simulfunding. 

If you look at the screenshot I posted a few up, you'll see that the latest version organizes everything into "Organizer" and everyone else.  In all operations, the organizer simply communicates with each other party/device indepdently, and merges the results. 
271  Bitcoin / Armory / Re: Armory - Discussion Thread on: June 16, 2014, 05:31:04 AM
Nothing can be done about this. Some of Armory's stack is forced in the RAM through mlock. Hibernation copies the entire RAM into the swap partition. Since that would defeat mlock's purpose, mlock'ed memory is not copied imaged in on hibernation. Armory won't be able to recover from that.

I wish this were true, but it's a common misperception about mlock().  mlock() actually cannot prevent keys from getting swapped, and it is pretty much guaranteed if you hibernate.  It's one reason we recommend that high-security device disable swap space entirely -- it's not like you're going to need it running offline Armory, anyway, which has a very limited resource footprint.  And hibernate as well, but I'm not sure hibernate works without a swap partition (good question, but go ahead and disable both). 
 
Quote from: man mlock()
       Cryptographic  security  software  often  handles  critical bytes like passwords or secret keys as data
       structures.  As a result of paging, these secrets could be transferred onto a persistent swap store medium,  where
       they  might  be  accessible to the enemy long after the security software has erased the secrets in RAM and termi‐
       nated. (But be aware that the suspend mode on laptops and some desktop computers will save a copy of the system's
       RAM to disk, regardless of memory locks.)


Even worse, mlock() cannot guarantee that key material is not paged even outside of hibernate.  mlock() is simply a very strong suggestion not to swap that key data, but if your really stress your system, it might happen.  This is why Armory guarantees that key material stays in RAM self-destructs after 5 seconds of being unlocked.  This pretty much guarantees that the user can't accidentally end up with key data in swap, unless they hibernate within 5 seconds of signing a transaction.  Luckily, Armory enforces a 5 sec delay before showing you if a transaction succeeded Smiley

272  Bitcoin / Development & Technical Discussion / Re: [ANN] Armory Multi-Sig with Simulfunding [BOUNTY 0.03 per bug] on: June 16, 2014, 12:57:31 AM
With the new lockbox dashboard and a bunch of these quirks fixed, I'll have a new version for you to test midweek and you can collect more bounties. 

Awesome! I've been using Armory for years now and it is hands down my favorite bitcoin wallet.

You seem like you do a lot of the stuff yourself, if you need help with anything else give me a PM. I'm not a coder but I do network administration/security research/pentesting and I can help with things such as documentation, support, servers, maintenance, testing, etc.

Also, I just want to verify that as of now there is no way to getting armory on testnet in OSX, correct?

Thanks! 

Armory is now a company, and we have a few full-time devs.  I still do the "feature innovation" like multi-sig, which I've been anxious to do for months/years and have already implemented six times over in my head.  When my current "vision" for Armory is complete, then I'll let some of the other guys do fun stuff like this Smiley   Plus, it's no small task to learn the subtleties of Bitcoin the way that is needed to implement things like this securely/properly. 

So yeah, all the multisig stuff I'm doing myself, with the others helping out, doing code reviews, fixing bugs and generally learning about what I implemented.  But they are covering the other parts of project so I can focus on my vision, such as armoryd, blockchain engine upgrades, better testing frameworks, etc.

Speaking of that, one of the big things for this release is a much more featureful armoryd.  It's not complete yet, so I won't call for testing, but it will be by the time we release 0.92-multisig, and will feature multi-wallet, multi-sig, and have a full suite of unit/functional tests.  PM me if you'd like to discuss how you could contribute.  We'd love to get more testing resources, especially if there's some security background involved!

As for testnet on OSX:  should be no problem.  You'll have to run it from the command line and use "--args" as the first CLI arg, otherwise OSX doesn't pass them along.  I believe it would look something like

Code:
open ArmoryQt --args --testnet --debug
273  Bitcoin / Development & Technical Discussion / Re: [ANN] Armory Multi-Sig with Simulfunding [BOUNTY 0.03 per bug] on: June 15, 2014, 06:55:25 PM
Thanks Alan for responding, OK I get your points. But if I had Admin privileges and could turn on/off or limit user functions based on login it would be even more useful. Certainly someone compromising the machine as Admin is still a threat (HSM etc would help that as you say).
Here's my scenario: I want a User to be able to create, import, sign, and broadcast multi-sig txns, but not be able to import new public addresses, and not be able to spend single sig from his wallet, or at least only be able to spend to whitelist addresses maintained by Admin. Only Admin can import new public addresses, change whitelist etc. Even better would be daily spending or txn number limits.
Am I missing something? Will pay BTC to someone who wants to consult and figure this out, thx

Going forward, this kind of thing makes sense for us to do.  In fact, your comments inspired this thread, and I think that will be one of the first things we implement when we start figuring out how to better satisfy small-business type use cases.  I hadn't considered the idea before that you could make sure the key is encrypted with multiple passwords, thus enabling better access control on consumer hardware as long as there is operational security to back it up.

@PRab

Just fixed the repeated-public-key issue.  Will release an update this week that will enable you to sign your transactions back to the faucet

@helgabutters

Thanks so much for the feedback!  Especially for all the useful videos showing the bugs!  It's been extremely helpful. 

I think I fixed most of the issues you identified, except for some of the longstanding sizing issues and quirks running Armory on Linux.  Mostly what I've done is I've imposed a maximum character size on all the free-form entry fields (like prom note labels, etc), or limited the number of characters displayed. 




With the new lockbox dashboard and a bunch of these quirks fixed, I'll have a new version for you to test midweek and you can collect more bounties. 
274  Bitcoin / Armory / Re: Consistent output precedence for tx's from a single address? on: June 15, 2014, 04:28:06 PM
ok. So if I choose an amount, say, consistent with the sum of the 3 oldest outputs (fee inclusive) at an address with 100 outputs, and use Coin Control mode to use only the address that contains those outputs, will the algorithm choose those 3? This is an address with outputs all of somewhat different sizes (as is typical of mining addresses), so it's not likely that there will be any other combination of outputs that will have the same sum as the oldest 3.

If not, when can we expect to see coin control that allows control of output selection? It seems odd that coin control is currently an expert feature, when everyone ought to be paying some attention to the issue. I'd see output specific coin control as an expert feature, as only merchants, power users and miners are ever likely to need it.

If you use coin control and only select a few addresses with lots of outputs, you are most likely to spend them oldest-first.  I had been meaning to update the coin-control dialog to use a proper table instead of its current design, and along the way I would have it show individual UTXOs, not just addresses.  But that hasn't been a priority.

As for being an expert feature... no matter how you look at it, this is still not something that "regular" users use, care about or even understand.  Should they?  Maybe in a perfect world everyone would study Bitcoin and understand how to optimize their privacy, etc.  But the vast majority don't and the feature would just confuse them.
275  Bitcoin / Armory / Re: Consistent output precendence for tx's from a single address? on: June 15, 2014, 03:53:35 PM
I think everyone mining is probably familiar with this: do multiple outputs get chosen in a predictable order when spent from a single address? If yes, what's the order? Reverse date order? (i.e. highest priority first)

It's complicated.  There is some randomness involved in Armory's algorithm, but it's usually unnecessary.  I've written a detailed description of it before, and you can traverse the code for it starting here:

https://github.com/etotheipi/BitcoinArmory/blob/master/armoryengine/CoinSelection.py#L582

The gist of it is that we create a pool of coin-selection solutions, and then score each solution based on a variety of factors, such as "output anonymity," tx size, spending zero-conf, and most importantly -- number of input addresses linked.  The coin-selection solution with the highest score from that function is what is used:

https://github.com/etotheipi/BitcoinArmory/blob/master/armoryengine/CoinSelection.py#L358

The pool of coin-selections is created by doing a bunch of different sortings of the UTXOs.  Some by straight priority, some by modified "priority", some even have a few random solutions in them.   Then we pop off the highest sorted UTXOs until we have a candidate that is close to exactly the output amount, and one aiming for 2x (so that both output sizes are approx the same, if there is change).   Those two candidates are added to the pool to be ranked.

The process ends up with about 20 solutions, ranks all of them, and then uses the one with the highest score.   Typically, the solutions use the UTXOs with the highest priority.  Some of the sortings guarantee that coins from the same address are near each other and thus will typically use multiple inputs from a single address.

So the answer to your question is basically that it's not consistent, but there is a strong preference for using older UTXOs before newer ones.  You're also not guaranteed to use coins from the same address, though it is likely to happen due to the ranking system, which will give a higher score to solutions that have less unique input addresses. 

276  Bitcoin / Armory / Re: Doing an offline transaction with a watch-only wallet without a fee? on: June 14, 2014, 07:49:12 PM
Fees are a sticky subject.  This is a limitation of the network, not Armory.
 
I am short on time at the moment, so I don't have time to look up fee calculation discussion links, but I can tell you if you are trying to send 0.01 BTC, you will need a fee unless that input is 100 days old.  800 confirmations is about 5 days.  So it absolutely will require a fee.  Armory is only applying the same algorithm that the network does, to avoid you using sub-par fees that might cause your tx to be DOA or get stuck.
277  Bitcoin / Development & Technical Discussion / Re: M-of-N passwords to generate wallet encryption key on: June 12, 2014, 05:01:29 PM
One way to achieve this would be to generate a random AES key, use SSS to split it and then encrypt the each of the pieces with their corresponding passwords.

So AES_MasterKey -> SSS(2 of 3) -> {S1, S2, S3}

Encrypt(S1, PBKDF2(password1)) = Encrypted_S1
Encrypt(S2, PBKDF2(password2)) = Encrypted_S2
Encrypt(S3, PBKDF2(password3)) = Encrypted_S3

Store Encrypted_S1, Encrypted_S2, & Encrypted_S3 in the wallet file.

You need at least two of the passwords and the wallet file to recover the master key.

I think this is the right answer!  Rather, it securely gets me what I want without too much implementation complexity.

@Crowex:  this is cool stuff.  I'm glad I finally know what to search for.   I'm a mathematician, so I am still intrigued by these theoretical solutions, and I'd love to find some math that does this naturally instead of the solution D&T posted above.  Though, if I put these features into Armory it will be D&T's solution for obvious reasons.   But I'm happy to continue discussing the math in this thread.
278  Bitcoin / Development & Technical Discussion / Re: [ANN] Armory Multi-Sig with Simulfunding [BOUNTY 0.03 per bug] on: June 12, 2014, 04:42:41 AM
Approximately 4 seconds into the video, when hitting "Cancel" in the "Import Multi-Spend Transaction" on Windows 7 32-bit, the "Bitcoin Wallet Management" window will pop up and then close.

https://www.youtube.com/watch?v=4xR6ghvsL9c

1CpZpDhoFciGCydqw3S73iF8rqbX9D6sxs

Ack, you just reminded me that I need to do something with that menu.  It is tough to describe why thy are there -- mainly you use them if you want to simulfund a regular address or lockbox you don't have loaded.  The lockbox manager requires you to select the lockbox to be simulfunded, and if you try to switch the simulfunding to another address or lockbox, you get an error (it seems unnecessary, but implementation was much simpler).   

In other words, if you want to simulfund a lockbox that you have loaded, you use the lockbox manager.  If you want to simulfund anything else (such as matching donations to a regular bitcoin address), you currently have to use those menu options.  I'd like to figure out how to make both available in a coherent way.

Nothing really to do with your bug, simply stating that I meant to figure out how to clean those up or remove those menu items, and actually forgot they were there, so they've been neglected.  You will get your bounty nonetheless. 
279  Bitcoin / Development & Technical Discussion / Re: M-of-N passwords to generate wallet encryption key on: June 11, 2014, 10:27:51 PM
Can't Shamir's secret sharing scheme already do the same sort of thing?

 If you want a (k,n) threshold scheme where at least k out of n are required to reveal the secret then you construct a polynomial of degree k-1.
Calculate any n points (x,y) on this curve (n must be less than P where P is the order of the finite field) and distribute these to the participants.
Any subset k of these points will allow you to use Lagrange interpolation to calculate the coefficients of the curve and calculate the constant term (which is the secret).

 Your key creating software would have to choose (pseudo) random coefficients for the curve and calculate the n points to give to the participants. The wallet is encrypted with the constant term of the curve. The wallet software (that has no knowledge of the coefficients of the curve) could recreate the encryption key (the constant term) given k out of n points on the curve.

 Perhaps I've misunderstood your problem. I'm not sure if that's exactly what you require?

Yeah, I should've been more clear in my post.  Rephrasing what you said:

Shamir's Secret Sharing usually starts with a secret, and then you split it into M-of-N shares.   The participants receiving the shares get no say in the data contained in the shares.   You start with the secret and get M-of-N shares.

What I want is that your N participants each produce their own shares indpendently (their passwords), and then some calculation is performed on all of them to produce an encryption key that is only computable with M of them.   You start with the shares, and get an M-of-N secret.  It is okay if this process produces a piece of non-sensitive data that needs to be stored with the encrypted data to complete the computation.

When phrased that way, it's just an inverse of the problem that SSS solves
280  Bitcoin / Development & Technical Discussion / M-of-N passwords to generate wallet encryption key on: June 11, 2014, 09:32:11 PM
Today I was thinking about the idea that you could implement a software-based multi-factor encryption key for a wallet.  What comes to mind is Shamir's Secret Sharing, but in reverse.  I'll explain what that means after I explain basic SSS.

Goal
Modify wallet encryption, which normally requires the user to enter a password, and then key stretches it into a symmetric encryption key (such as AES256) and uses that to encrypt the wallet private keys.  What I would like is:  during wallet setup, you can have 3 passwords entered, and any 2 of them would be sufficient for the system to compute the AES256 encryption key.   Of course, it would be nice to implement any M-of-N.

The idea is that 3 employees of an [wing of] an organization would be responsible for managing either a single-sig wallet, or a single key of a multi-sig wallet.  In order to gain access to the offline key to sign transactions, the wallet will need to be decrypted, but the decryption key can't be calculated from any single employee's password.  


Background
Shamir's Secret Sharing is a mechanism by which a secret piece of data is interpretted as the highest order coefficeint of a polynomial, and then points of that polynomial are distributed and stored separately.  For instance, you store the secret as the slope of a line, and then you write down three points of the line on separate pieces of paper.  If you have any two pieces of paper, you have two points on the line and can compute the slope--which recovers the secret.  This would be 2-of-3.  You can do this with any M and N, using N points on an (M-1)th order polynomial.

While this concept is easy to visualize like we did in high school, you can't use floating point numbers because of precision issues.  Instead, you do all operations on finite fields, which are really just modulo-arithmatic, cyclic groups.  You simply define all operations to be on integers between 1 and some large prime N, define division to be   a/b = a * bN-1, and then you can implement all the algebra identically.  I won't go into the details here, but this is how SSS is implemented in crypto systems.  However, usually the prime N is chosen ahead of time, and known by the device, so it knows which finite field to use to combine the points.  

Rephrased goal:  
Shamir's Secret Sharing is a process for converting a secret into M-of-N shares to be distributed.  What I want is a process for converting N shares (user passwords) into an M-of-N secret.  It's the inverse of the problem being solved by SSS.


Half-way there
If this was 2-of-2,  3-of-3, or M-of-M, stock SSS would work.  Say for 3-of-3:  the system collects all three passwords when the wallet is created, computes the highest-order coeffiicent of the parabola created by the hash of all three passwords (perhaps using the first four bytes of the hash as the X-value, and the remaining as the Y-value), then uses that as the encryption key for the wallet.  When all passwords are entered, the system can compute this value, decrypt the wallet, then destroy it.  This works, though there are simpler ways to combine mulitple passwords.   But how do you do arbitrary M-of-N?  


Discussion
But this doesn't work for M-of-N where M is not equal to N.  For 2-of-3:  you would like to compute a slope that could be computed from any two of the three points, but the three points are not co-linear in a pre-defined finite field.   One way would be to collect all the passwords first, and then figure out a set of finite field parameters for which all three points are colinear (for simple prime-based finite fields, try to find a prime N such that they are colinear).  Store the FF parameters in the wallet, and the wallet will use that data when two passwords are entered.    But this feels like a hack.

Unfortunately, my googling skills are failing me -- as I keep running into a bunch of unrelated things.   I feel like this must be a solved problem, and I just need to find the right documentation of it.


Alternatives
The best alternative is to simply not let users create passwords, but create a secure encryption key, then use SSS and put the shares onto smartcards.  In the institutional security world, this is at least how backups are made when using HSMs (and how Armory does fragmented backups of its wallets).  In this case, we're simply trying to expand on the user-password concept to be executed on consumer PCs.  At the moment, HSMs don't exist in the BTC world, and while they may, it would still be cool to have a solution for this problem here.

Another alternative, for small M and N is to simply store all N-choose-M multi-encrypted forms of the encryption key.  For instance, for 2-of-3, the encryption key will be randomly generated by the system, and then it will be stored 3 times in the wallet, each one encrypted with a different 2 keys.  Decrypting would simply be matter of trying to decrypt all three keys and picking the one that works (if any).  But this is an even bigger hack, and it doesn't scale very well (though modern computers could handle most use-cases pretty easily if there was no additional key stretching).


Caveats
I recognize we're still talking about a single piece of consumer hardware that could be compromised by malware, or someone with DMA could swipe the key from RAM once all passwords are entered, etc.  The goal is to provide a mechanism whereby multiple people are required to access the system, and together they monitor all interactions with the system and verify that no one is tampering/manipulating it.  Is it failproof?  No.  But it still prevents one person who temporarily gains access from pulling the key off the disk, even if they have one password.  If proper access control is exercised, this might provide another tool for implementing segregation of duties, in-place-of or in-addition-to multi-sig transactions.  

In the future, this might be moot, since orgs will move to HSMs which are all tamper-proof, destroy the private keys if you try to open, implement similar M-of-N access control, etc.  But for consumer hardware, I think this could be pretty strong.

Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 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 ... 186 »
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!