Bitcoin Forum
April 30, 2024, 04:16:29 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: 1 2 [All]
  Print  
Author Topic: A Proposal for Brainwallets (v2)  (Read 3219 times)
fireduck (OP)
Sr. Member
****
Offline Offline

Activity: 392
Merit: 251



View Profile
March 02, 2014, 04:11:19 AM
 #1

http://1209k.com/brainv2/

About

People love the idea of a memorizable key for bitcoin wallets. There is an appeal to having something in your head worth something and having it written no where and not stealable without a $5 wrench.

Problem

What people currently refer to as a "brainwallet" is simply a passphrase run through a single SHA-256 and then the result is the private key for a bitcoin address. The problem here is that an attacker can download the blockchain and then run very fast attacks basically hashing any text they can find to see if it hashes to a key which has some bitcoins. And when they find one, they drain that address. They can do this very fast since a single SHA-256 is quite cheap. This leads to sadness.

Solution

An awesome answer is key stretching. The short version is that a function is used to make it more time complex to test a key. As a simple example, lets say rather than SHA-256 once, it is SHA-256 a million times. That means it is a million times more expensive for an attacker to test each possible password. Then you make it even better by adding in something unique to the user. This makes the attacker have to do much more work as each different salt uses a different input on its million SHA-256 operations.

Bitrated user: fireduck.
1714493789
Hero Member
*
Offline Offline

Posts: 1714493789

View Profile Personal Message (Offline)

Ignore
1714493789
Reply with quote  #2

1714493789
Report to moderator
1714493789
Hero Member
*
Offline Offline

Posts: 1714493789

View Profile Personal Message (Offline)

Ignore
1714493789
Reply with quote  #2

1714493789
Report to moderator
1714493789
Hero Member
*
Offline Offline

Posts: 1714493789

View Profile Personal Message (Offline)

Ignore
1714493789
Reply with quote  #2

1714493789
Report to moderator
Bitcoin mining is now a specialized and very risky industry, just like gold mining. Amateur miners are unlikely to make much money, and may even lose money. Bitcoin is much more than just mining, though!
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714493789
Hero Member
*
Offline Offline

Posts: 1714493789

View Profile Personal Message (Offline)

Ignore
1714493789
Reply with quote  #2

1714493789
Report to moderator
jcrubino
Member
**
Offline Offline

Activity: 83
Merit: 10


View Profile
March 02, 2014, 05:16:35 AM
 #2

warpwallet https://keybase.io/warp/

Uses scrypt to hash the passphrase first.

odolvlobo
Legendary
*
Offline Offline

Activity: 4298
Merit: 3211



View Profile
March 02, 2014, 06:03:44 AM
Last edit: July 01, 2014, 03:21:56 PM by odolvlobo
 #3

A better solution is to add something unusual to the pass phrase. Even if pass phrases are hashed a million times, a 1 TH/s ASIC could still generate a million candidates per second. Not only does making the pass phrase longer make it take longer to generate the correct hash, but it makes it more costly to check the hashes.

Imagine creating a pass phrase by selecting four random words from a 1,000 word dictionary. A hacker with a 1 TH/s ASIC can generate a table of all possible hashes in one second and the size of the table will be 32 TB (actually much less with compression).

If the pass phrase is hashed a million times, then it will take a million seconds to generate the table and that is a benefit. However, if two more words are added to the pass phrase, then not only would it take a million seconds, but it would also make the table a million times bigger.

Using scrypt instead, as jcrubino suggests, is a good idea too because scrypt is designed to be resistant to password cracking. Whoever decided to use SHA-256 for hashing a brain wallet password knew very little about security.

Join an anti-signature campaign: Click ignore on the members of signature campaigns.
PGP Fingerprint: 6B6BC26599EC24EF7E29A405EAF050539D0B2925 Signing address: 13GAVJo8YaAuenj6keiEykwxWUZ7jMoSLt
piotr_n
Legendary
*
Offline Offline

Activity: 2053
Merit: 1354


aka tonikt


View Profile WWW
March 02, 2014, 08:51:38 AM
 #4

The problem here is that an attacker can download the blockchain and then run very fast attacks basically hashing any text they can find to see if it hashes to a key which has some bitcoins.
The obvious solution to this problem (which applies to any password, not only one that protects bitcoins) it to pick a text that they cannot find. Smiley

Check out gocoin - my original project of full bitcoin node & cold wallet written in Go.
PGP fingerprint: AB9E A551 E262 A87A 13BB  9059 1BE7 B545 CDF3 FD0E
Luke-Jr
Legendary
*
expert
Offline Offline

Activity: 2576
Merit: 1186



View Profile
March 02, 2014, 09:18:39 AM
 #5

Key stretching does nothing to improve entropy, which is the real problem with so-called brainwallets.
It is simply impossible to have a human-chosen passphrase as a secure key, no matter how you do it.
A high-entropy passphrase will almost certainly be very difficult to memorise for a human.

fireduck (OP)
Sr. Member
****
Offline Offline

Activity: 392
Merit: 251



View Profile
March 02, 2014, 03:58:41 PM
 #6

Key stretching does nothing to improve entropy, which is the real problem with so-called brainwallets.
It is simply impossible to have a human-chosen passphrase as a secure key, no matter how you do it.
A high-entropy passphrase will almost certainly be very difficult to memorise for a human.

While that is true, attackers do not have unlimited resources and there are some situations where people really like brain wallets.  I wouldn't say it is appropriate for many use cases, but I'd say it is for some.

Bitrated user: fireduck.
spartacusrex
Hero Member
*****
Offline Offline

Activity: 718
Merit: 545



View Profile
March 02, 2014, 06:54:00 PM
 #7

Is there some way of checking the entropy of a Human-Chosen phrase ?

Is there a denomination for 'Entropy' ?

Can one thing be said to be more entropic than another.. and if so, how do you calculate it ?

 

Life is Code.
itod
Legendary
*
Offline Offline

Activity: 1974
Merit: 1076


^ Will code for Bitcoins


View Profile
March 02, 2014, 07:26:30 PM
 #8

Can one thing be said to be more entropic than another.. and if so, how do you calculate it ?

http://ritcyberselfdefense.wordpress.com/2011/09/24/how-to-calculate-password-entropy/
gmaxwell
Moderator
Legendary
*
expert
Offline Offline

Activity: 4158
Merit: 8382



View Profile WWW
March 03, 2014, 12:24:25 AM
 #9

Virtually all of those calculators are completely wrong.  You cannot simply calculate entropy of a human sourced password without a statistical model at least as powerful as a typical human mind. Advice like assuming uniform probability over the character set is provably bad (by virtue of people with ~60 character 'brainwallet' keys which have been compromised) and you should feel bad for suggesting it.

This is about the N-th time this bad idea has been brought up here. Please use the search.

I should direct you specific to my last rant on the subject: https://bitcointalk.org/index.php?topic=311000.msg3345309#msg3345309

It's very hard to advance the art here, even with awesome strengthening because there is no salt (and cannot be really effectively— if there were place to store the salt, forget the brain nonsense and just use the salt as a strong random key) and because the data is constantly available to attackers. This means that even if a cracking farm goes slowly— maybe only 1000 attempts per second— once you have a million users using it you're getting an effective rate of a billion attempts per second.  Then you run into the really strong resistance people have had in having effective strengthening: Strengthening enough to be more than the smallest speedbump is just not usable implemented in Javascript and this is constantly used as an excuse to do weak things...

and then you multiply it by the surprisingly unreliability qualities of human memory. It's just a bad idea all around, and it's irresponsible engineering to suggest anyone use this sort of scheme.
itod
Legendary
*
Offline Offline

Activity: 1974
Merit: 1076


^ Will code for Bitcoins


View Profile
March 03, 2014, 12:56:07 AM
 #10

Virtually all of those calculators are completely wrong.  You cannot simply calculate entropy of a human sourced password without a statistical model at least as powerful as a typical human mind. Advice like assuming uniform probability over the character set is provably bad (by virtue of people with ~60 character 'brainwallet' keys which have been compromised) and you should feel bad for suggesting it.

This is about the N-th time this bad idea has been brought up here. Please use the search.

I should direct you specific to my last rant on the subject: https://bitcointalk.org/index.php?topic=311000.msg3345309#msg3345309

It's very hard to advance the art here, even with awesome strengthening because there is no salt (and cannot be really effectively— if there were place to store the salt, forget the brain nonsense and just use the salt as a strong random key) and because the data is constantly available to attackers. This means that even if a cracking farm goes slowly— maybe only 1000 attempts per second— once you have a million users using it you're getting an effective rate of a billion attempts per second.  Then you run into the really strong resistance people have had in having effective strengthening: Strengthening enough to be more than the smallest speedbump is just not usable implemented in Javascript and this is constantly used as an excuse to do weak things...

and then you multiply it by the surprisingly unreliability qualities of human memory. It's just a bad idea all around, and it's irresponsible engineering to suggest anyone use this sort of scheme.

You've got me wrong, I'm all against brainwallets. Just tried to help the beginner who asked "Is there a denomination for 'Entropy'?" to get some basic ideas without directing him to Wikipedia article which is overwhelming for the most people.
Abdussamad
Legendary
*
Offline Offline

Activity: 3598
Merit: 1560



View Profile
March 03, 2014, 01:01:37 AM
 #11

Key stretching does nothing to improve entropy, which is the real problem with so-called brainwallets.
It is simply impossible to have a human-chosen passphrase as a secure key, no matter how you do it.
A high-entropy passphrase will almost certainly be very difficult to memorise for a human.

Are you sure about that last sentence? Electrum seeds are quite easy to memorize and they have 128 bits of entropy.
HostFat
Staff
Legendary
*
Offline Offline

Activity: 4214
Merit: 1203


I support freedom of choice


View Profile WWW
June 30, 2014, 11:09:54 PM
 #12

Someone has took them Smiley
19aREH3jaDba1xt14zhaUvzyAhzphdAwJN

http://1209k.com/brainv2/

NON DO ASSISTENZA PRIVATA - http://hostfatmind.com
Syke
Legendary
*
Offline Offline

Activity: 3878
Merit: 1193


View Profile
July 01, 2014, 03:28:17 AM
 #13

Key stretching does nothing to improve entropy, which is the real problem with so-called brainwallets.
It is simply impossible to have a human-chosen passphrase as a secure key, no matter how you do it.
A high-entropy passphrase will almost certainly be very difficult to memorise for a human.

As fireduck mentioned in his detailed blog, http://correcthorsebatterystaple.net/ is one example of a method to generate a highly secure, easily memorized, brain wallet. It's not "impossible". It just needs to be done carefully.

Here is my brain wallet, generated from correcthorsebatterystaple.net. Hack it and win 1 BTC!

https://blockchain.info/address/1LyoCGuuBQzqKintFHsgNEm5ZDR91prUku

Buy & Hold
jonald_fyookball
Legendary
*
Offline Offline

Activity: 1302
Merit: 1004


Core dev leaves me neg feedback #abuse #political


View Profile
July 01, 2014, 04:35:00 AM
 #14

Key stretching does nothing to improve entropy, which is the real problem with so-called brainwallets.
It is simply impossible to have a human-chosen passphrase as a secure key, no matter how you do it.
A high-entropy passphrase will almost certainly be very difficult to memorise for a human.

Are you sure about that last sentence? Electrum seeds are quite easy to memorize and they have 128 bits of entropy.


I agree about the electrum seed, and it also has key stretching.

I don't even think you can say it's impossible to create your
secure phrase.  maybe not provably secure...but you can
easily create weirdness and entropy using mental techniques,
and add additional entropy with nonsense words, misspellings, and throw in a few
numbers in there....it will be fine if you know what you are
doing (don't try this at home) and dont do something stupid
like use movie phrases.

pitfalls, yes. impossible, no.

Granted, I would rather use electrum because it's more easily memorized.


gmaxwell
Moderator
Legendary
*
expert
Offline Offline

Activity: 4158
Merit: 8382



View Profile WWW
July 01, 2014, 05:20:54 AM
 #15

I don't even think you can say it's impossible to create your
secure phrase.  maybe not provably secure...but you can
easily create weirdness and entropy using mental techniques,
and add additional entropy with nonsense words, misspellings, and throw in a few
A lot of people have screwed themselves badly this way— you are not a unique and special snowflake, the ways and manipluation people will come up with when they are trying to be "random" is fairly predictable, and that the same properties which make keys easy to remember make them more predictable. Studies of have shown people picking _more_ predictable passwords when explicitly instructed to be unpredictable. Modern password cracking is a statistical study of psychology, powered by "big data" analysis on information culled from huge leaked plaintext password databases and sources like twitter and the forums.

Using a fancy technique may really only be adding a few extra bits of entropy, and worse it's very hard for you to reason about how much entropy you have and an attacker with more powerful statistical tools than your intuition may find your key with only moderate effort.  For this reason it is far better to use a random technique (e.g. dice or a computer CSPRNG) and just add a couple bits directly, then there is no ambiguity.

(Though this is all without regarding the very real risk of forgetting— almost no one is prepared to deal with cryptographic secrets which _cannot_ be recovered if lost, and most people drastically overestimate the strength of their memory)

Whenever a website turns up having a security breach and we find it was using unsalted passwords everyone cries out claiming that the operators are incompetent fools (perhaps even criminally so) and yet thats exactly what a human generated "brainwallet" is— an unsalted hashed password, but worse: they're publicly visible to everyone so someone doesn't even have to compromise a system before they start cracking.
theymos
Administrator
Legendary
*
Offline Offline

Activity: 5180
Merit: 12900


View Profile
July 01, 2014, 06:05:44 AM
 #16

IMO, wallets that use memorized seeds should do something like this instead:
- Ask the user for some impossible-to-forget information such as their full name to use as salt.
- Generate random words to use as a passphrase. The number of words can be user-configurable, but 5 or 6 should be OK on fast computers.
- Depending on the number of words, apply enough key stretching to make attacks infeasible.

Then you only have to memorize ~6 words instead of a full ~12-word seed mnemonic, which is a lot easier. And there's still no risk of users choosing bad passphrases, since the wallet does it for them.

(The rough passphrase utility I made a while ago works a bit like this, though it doesn't generate passphrases.)

1NXYoJ5xU91Jp83XfVMHwwTUyZFK64BoAD
Syke
Legendary
*
Offline Offline

Activity: 3878
Merit: 1193


View Profile
July 01, 2014, 06:09:23 AM
 #17

(Though this is all without regarding the very real risk of forgetting— almost no one is prepared to deal with cryptographic secrets which _cannot_ be recovered if lost, and most people drastically overestimate the strength of their memory)

Which is it? Are the secrets hackable, or are they unrecoverable? You can't have it both ways.

Buy & Hold
gmaxwell
Moderator
Legendary
*
expert
Offline Offline

Activity: 4158
Merit: 8382



View Profile WWW
July 01, 2014, 06:19:08 AM
 #18

Which is it? Are the secrets hackable, or are they unrecoverable? You can't have it both ways.
You absolutely can. First: whats hackable to _you_ is not whats hackable to some guy with powerful statistical analysis and a fpga cracking farm who, with one unit of effort, simultaneously attacks all users. Secondly, what I was more expressing was an OR case,  that frequently you secrets are either crackable OR they are likely to be lost.  Both of those possible outcomes result in you losing your funds.

IMO, wallets that use memorized seeds should do something like this instead:
- Ask the user for some impossible-to-forget information such as their full name to use as salt.
- Generate random words to use as a passphrase. The number of words can be user-configurable, but 5 or 6 should be OK on fast computers.
- Depending on the number of words, apply enough key stretching to make attacks infeasible.
A challenge there is that it may be quite hard to get users to understand that your collection of personal information there isn't to send it off to some server or put it someplace public... in querying around I got the impression that lots of people would put random things in those fields, defeating the protection.  It would probably be better than what people are actually doing.

There is another weird consequence is that you lose denyablity when using such a scheme. E.g. if someone does obtain your secrets then your address is effectively a cryptographic commitment to that personal info, it's harder to say "those transactions weren't mine". Thats a little bit into the realm of movie plot threats, but at least some of the people working on encrypted wallets have insisted on "denyability" as a feature, and people have used it as selling point for "brainwallets" (and also as an argument against writing down the key, which is probably the most prudent think you should do— considering the forgetting risk).

jonald_fyookball
Legendary
*
Offline Offline

Activity: 1302
Merit: 1004


Core dev leaves me neg feedback #abuse #political


View Profile
July 01, 2014, 01:36:46 PM
Last edit: July 01, 2014, 02:04:43 PM by jonald_fyookball
 #19

I don't even think you can say it's impossible to create your
secure phrase.  maybe not provably secure...but you can
easily create weirdness and entropy using mental techniques,
and add additional entropy with nonsense words, misspellings, and throw in a few
A lot of people have screwed themselves badly this way— you are not a unique and special snowflake, the ways and manipluation people will come up with when they are trying to be "random" is fairly predictable, and that the same properties which make keys easy to remember make them more predictable. Studies of have shown people picking _more_ predictable passwords when explicitly instructed to be unpredictable. Modern password cracking is a statistical study of psychology, powered by "big data" analysis on information culled from huge leaked plaintext password databases and sources like twitter and the forums.

Using a fancy technique may really only be adding a few extra bits of entropy, and worse it's very hard for you to reason about how much entropy you have and an attacker with more powerful statistical tools than your intuition may find your key with only moderate effort.  For this reason it is far better to use a random technique (e.g. dice or a computer CSPRNG) and just add a couple bits directly, then there is no ambiguity.

(Though this is all without regarding the very real risk of forgetting— almost no one is prepared to deal with cryptographic secrets which _cannot_ be recovered if lost, and most people drastically overestimate the strength of their memory)

Whenever a website turns up having a security breach and we find it was using unsalted passwords everyone cries out claiming that the operators are incompetent fools (perhaps even criminally so) and yet thats exactly what a human generated "brainwallet" is— an unsalted hashed password, but worse: they're publicly visible to everyone so someone doesn't even have to compromise a system before they start cracking.


I do agree, its better to use computer generated randomness.

But, I'm still not convinced it can't be done.

If I wanted to use elements from my day yesterday -- say the name (which I can't even spell
correctly) of the lady at the Chinese take out place... or, a word from an episode title
that I watched with my wife... or the raw name of an AVI file that I burned, etc, or
the current time, ...maybe those methods are predictable but there is still entropy.

I can also devise a "predictable" but still effective ordering method.
(the method can be predictable, but doesn't mean the results can be
predicted)
 
if go with 100 as a lower bound of words people commonly choose, and
if I choose 25 random things, now you're talking 100^25, that's 160 bits of entropy.

Also, where do you draw the line between human-chosen and random?
If I write down random words to form a candidate word list, is it still
random, or does it have to be completely off the top of my head
without the help of rudimentary tools such as pen and paper?

Generally, it is probably best not encourage this kind of thing,
as the risks outweigh the rewards.  I just wanted to make the point
that it is not impossible if one is careful and understands the dynamics
and the numbers.

My answer to forgetting passwords is steganography.   Hide the backup on your own machine
in an image, mp3, or series of carriers if you really want to be paranoid.

When it comes to difficulty of memorizing something, I think people
are forgetting that the human brain remembers what it considers
to be important.  If I place a high importance of remembering my
bitcoin password, (and if I rehearse it), then I'm sure i could
retain a very long password for a very long time.  

I think the average person can easily remember a 12 word passphrase
if they have a substantial amount of money in it.

DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1079


Gerald Davis


View Profile
July 01, 2014, 02:28:50 PM
Last edit: July 01, 2014, 02:49:23 PM by DeathAndTaxes
 #20

The problem jonald is determining the level of entropy.  Also humans are very good at convincing themselves they are random when they aren't.  A common homework experiment of entropy is to ask 100 people to pick a random number between 1 and 10.  Usually 30%+ will pick "7" and significantly less than the expected 10% will pick either 1 or 10.   Picking 1 in the range 1 to 10 doesn't seem random to most people so at a subconcious level, most will reject it from even being a candidate.

It isn't impossible for a human to generate a passphrase with sufficient entropy however the three major problems remain:
a) Most will fail at the process, and when they fail they will have funds stolen so any method which encourages that is unethical.

b) It is very difficult to quantitatively state how much entropy your human chosen passphrase actually has.  So you pick a passphrase and your funds aren't stolen yet.  Is it because the passphrase is secure and it will never be stolen or is it just because a hacker hasn't gotten to it yet and they will steal it in the future.

c) The sheer number of inputs necessary to have a high confidence that there is sufficient entropy is high enough that a significant number of users will lose access to their funds.   Another way to look at it is if you need to memorize 25 words you chose to have the same security as 6 random words is there any benefit to advocating the former?

Quote
I think the average person can easily remember a 12 word passphrase
if they have a substantial amount of money in it.

Then use diceware and random words (or some similar system). Using diceware and truly random selections (i.e. roll some dice), 10 simple words gets you >128 bits of entropy.  This is very similar to the concept that electrum uses for the seed words.  The seed is random    

You probably can be very secure using less random words combined with key stretching.  Key stretching is very effective when used with truly random values with lower (but still useful) levels of entropy.   For example 5 diceware words is only 64 bits of entropy*. If your key is the hash of the diceware words [ key=H(set of diceware words) and your attacker can make 1 trillion hashes per second well the 50% solution time is ~100 years.   Still that may be close too close to comfort and that work requirement can be increased by key stretching.  For something like a cold storage wallet you don't need sub millisecond access; so use a KDF timed to take a little over a second to complete.  Even in unoptimized javascript that should mean tens of thousands of iterations.  Lets say 10,000.  Now the attacker can't attempt 1 trillion passwords per second.  With the same hardware they can still complete 1 trillion hashes per second but each password attempt takes 10,000 hashes so their throughput has dropped to a mere 100 million passwords per second and correspondingly the 50% solution time has been increased to one million years.

It is important to understand that key stretching can't "fix" passwords with very poor entropy.  For example if your password is on a list of 1 million known compromised passwords then the attacker would find it in a fraction of a second (assuming it isn't precomputed).  Using key stretching is still ineffective as using this hypothetical machine above even with key hardening the attacker can attack 100 million hardened passwords per second.  So the solution time is increased by 10,000x however it is increased from microseconds to a fraction of a second.

Quote
Also, where do you draw the line between human-chosen and random?
If I write down random words to form a candidate word list, is it still
random, or does it have to be completely off the top of my head
without the help of rudimentary tools such as pen and paper?

If you wrote down a large list and then randomly selected from it then it would be random.  Of course by randomly selecting I don't mean the equivalent of "pick a number from 1 to 10" as we already know the results will not be random.  You could number the words on the list and then roll dice to pick the words.  Of course you would want a large library of words.  Larger library means less words selected for the same entropy.  You would also want to avoid words which may be confused for other words or are hard to remember.  You would also want to make sure your numbers system has a uniform distribution (each word has an equal chance of being picked). You would also need to safely store multiple copies of this system and it would be a good idea for it to be widely adopted.  This means it would be both peer reviewed and there is an increased chance you can find the word list in the future. Of course if you spent countless hours doing all that ... well you just reinvented diceware.  It has been around since 1996 and is rather robust.  Maybe someday I need to make a brainwallet site using diceware so people can stop losing coins.

http://world.std.com/~reinhold/diceware.html

* D&T warning.  You can only use a reduced entropy password if you are sure the level of key stretching.  For open source software you can inspect the code and preferably any system would make this clear and visible to the end user.  Opaque websites (i.e. your login for BCT) are a different story.  You have no idea how much key stretching (if any) the site is doing.  Thus you should always assume that no key stretching is being performed.  Although the topic is about brain wallets I don't want someone using 5 (or less) diceware words for their exchange account and when they get hacked saying D&T said it was secure.  Honestly since websites are so bad at security I would recommend using diceware as a master password for a tool like lastpass and generating a random 20 digit password for each website.
spin
Sr. Member
****
Offline Offline

Activity: 362
Merit: 261


View Profile
July 01, 2014, 03:00:26 PM
 #21

Someone has took them Smiley
19aREH3jaDba1xt14zhaUvzyAhzphdAwJN

http://1209k.com/brainv2/

Lol, that was silly.

If you liked this post buy me a beer.  Beers are quite cheap where I live!
bc1q707guwp9pc73r08jw23lvecpywtazjjk399daa
jonald_fyookball
Legendary
*
Offline Offline

Activity: 1302
Merit: 1004


Core dev leaves me neg feedback #abuse #political


View Profile
July 01, 2014, 04:45:20 PM
Last edit: July 01, 2014, 05:15:30 PM by jonald_fyookball
 #22

I agree it would be unethical to promote this method and I do not doubt
many have screwed themselves.  so if anyone is reading this I am
merely discussing the possibilities, not endorsing human chosen
randomness.

at the same time, it kind of seems like an insult to human creativity
to suggest we can't come up with unique phrases.  

something like "budwhacker beaver and Tim jones had a conversation with
captain despond about the lollipop mugshankery and the BOX of why everythinggg
vinyl 4017"

It can even rhyme if you want it to:

"frick-frack newfangled clamshack tishnyiak the fishman cried
my poor lady in red died bee-cause bell made me yell for
my poor grandma maybelle SLIDER mc-chachagagaya ooo 355"

While you can't measure it, seems hard to believe that either
of those phrases has less than 128 bits of entropy, especially
the latter because of its length.

Triffin
Sr. Member
****
Offline Offline

Activity: 952
Merit: 251



View Profile
July 02, 2014, 12:05:44 AM
Last edit: July 02, 2014, 12:30:33 AM by Triffin
 #23

Go easy on me because I haven't understood 95% of this thread  Smiley

But, I do know that if BitCoin and it's offspring are ever going to go
mainstream for the average Joe non-technical user ( me ) the wallet security issue
has to be resolved one way or another without requiring the owner to
engage in numerous incomprehensible steps to guarantee 'security' ..

I do know that a functional wallet must

1) Not reside on the owner's local computer ( hard drive crashes/keyloggers/viruses )
2) Be a 'hot' wallet for easy 'coin' transactions, both 'send' and 'receive'
3) Be suitable for 'cold' storeage
4) Feature one 'click' download and self install
5) Capable of handling multiple 'coins'
 
You folks are the experts and understand the ways various security features can be defeated ..
But .. The whole process needs to be orders of magnitude 'dumbed' down for mass utility ..
It's got to have the perceived utility and security? of the typical online brokerage account ..

In my limited ( less than 2 years ) exposure to cryptocurrency, the
NXT wallet is the closest to what i think is needed and I'm sure that
it has several security issue flaws ( though I have no idea what they may be )
that would make it a less than 'perfect' solution ..

Thanks for listening ..

Triff ..  

jonald_fyookball
Legendary
*
Offline Offline

Activity: 1302
Merit: 1004


Core dev leaves me neg feedback #abuse #political


View Profile
July 02, 2014, 12:38:59 AM
 #24

Brain wallets are somewhat advanced topic but there are many user friendly wallets.  See Electrum.

bluemeanie1
Sr. Member
****
Offline Offline

Activity: 280
Merit: 257


bluemeanie


View Profile WWW
July 02, 2014, 12:45:55 AM
 #25

Key stretching does nothing to improve entropy, which is the real problem with so-called brainwallets.
It is simply impossible to have a human-chosen passphrase as a secure key, no matter how you do it.
A high-entropy passphrase will almost certainly be very difficult to memorise for a human.

While that is true, attackers do not have unlimited resources and there are some situations where people really like brain wallets.  I wouldn't say it is appropriate for many use cases, but I'd say it is for some.

you're absolutely correct.

beefing up the hash function will make it considerably more difficult to enumerate passphrases and crack the brain wallet.  It is possible to make a mnemonic passphrase that is nearly impossible to crack in this scenario - just don't use simple and plain NL text.

ex. it's best to think up some method to include numbers in the passphrase, so take some memorable english text

"The common curse of mankind, - folly and ignorance" , and find some way to include numbers that is easy to remember

"1The 2common 3curse 4of 5mankind, - 6folly 7and 8ignorance"  and maybe an additional way to include special characters

"1The% 2common% 3curse% 4of% 5mankind%, - 6folly% 7and% 8ignorance%"

and you have a brainwallet with fairly good security.

-bm




-bm

Just who IS bluemeanie?    On NXTautoDAC and a Million Stolen NXT

feel like your voice isn't being heard? PM me.   |   stole 1M NXT?
gmaxwell
Moderator
Legendary
*
expert
Offline Offline

Activity: 4158
Merit: 8382



View Profile WWW
July 02, 2014, 12:49:45 AM
 #26

and you have a brainwallet with fairly good security.
There are attackers that are already precisely searching patterns like this.  Every sentence in every book in your local library (much less just the memorable ones) is only about 32 bits of entropy. Scheme selection is 8 bits. The prefix template of decimal digits (assuming uniform probability, which you probably won't get with a human selecting them) is at most 26 more bits.  This is not an impressively secure scheme, though you've just convinced yourself that it is.

This is why you should not be using anything like this, the human capacity for self deception is too great.
bluemeanie1
Sr. Member
****
Offline Offline

Activity: 280
Merit: 257


bluemeanie


View Profile WWW
July 02, 2014, 12:55:08 AM
 #27

and you have a brainwallet with fairly good security.
There are attackers that are already precisely searching patterns like this.  Every sentence in every book in your local library (much less just the memorable ones) is only about 32 bits of entropy. Scheme selection is 8 bits. The prefix template of decimal digits (assuming uniform probability, which you probably won't get with a human selecting them) is at most 26 more bits.  This is not an impressively secure scheme, though you've just convinced yourself that it is.

This is why you should not be using anything like this, the human capacity for self deception is too great.

You're right it's not a good idea to use plain text from literature(my original base text is Shakespeare).  Someone had their brainwallet cracked who used 'one small step for man one great leap for mankind'.  So yes you should use something that is personally memorable but not universally identifiable.  The technique I suggested though makes it virtually impossible to crack with any known NL processing technique, and fairly easy to remember.

Plain text Shakespeare is absolutely not a good idea.

-bm


Just who IS bluemeanie?    On NXTautoDAC and a Million Stolen NXT

feel like your voice isn't being heard? PM me.   |   stole 1M NXT?
gmaxwell
Moderator
Legendary
*
expert
Offline Offline

Activity: 4158
Merit: 8382



View Profile WWW
July 02, 2014, 12:59:26 AM
 #28

The technique I suggested
Is _already_ modeled by existing cracking software: They already try thousands of schemes like adding characters before and after the words in input phrases.

You are taking a bet that the cracker's parametrization of likely modifications won't include yours— but the community of attackers spends in total more than your _lifetime_ in time thinking about this problem every couple of years, and they have access to stolen password databases to test their theory against the behavior of great many people.  You might get lucky and choose a scheme they don't think of or that they consider too unlikely to search— or you might not, but as a user you are likely to do the likely thing, and not likely to know better.
bluemeanie1
Sr. Member
****
Offline Offline

Activity: 280
Merit: 257


bluemeanie


View Profile WWW
July 02, 2014, 01:00:59 AM
 #29

which cracking software are you referring to?

Just who IS bluemeanie?    On NXTautoDAC and a Million Stolen NXT

feel like your voice isn't being heard? PM me.   |   stole 1M NXT?
gmaxwell
Moderator
Legendary
*
expert
Offline Offline

Activity: 4158
Merit: 8382



View Profile WWW
July 02, 2014, 01:13:43 AM
 #30

which cracking software are you referring to?
E.g. JTR rules mode is a publicly available example... though there are more powerful tools which are non-public.

An example of JTR rules on the single input word "hello world", with the minimal default rules— there are thousands of extra rules that can be enabled, and but even the default set produces a great many examples.


6hello World6
Olleh world0
World0 HELLO
Helling 8world
olleh worlD
helling dlroW
5hello dlroW
world. Olleh
HelloHello worlded
Hello0 world
5world 3hello
Dlrow Hello0
hello worlds
world7 Hello5
Hello3 World9
3hello 3world
hellohello World6
hello6 world5
Hello1 World4
Olleh world6
hello? world.
3hello world3
olleH Worlds
Hello3 7world
Hello9 world
5hello 8world
9hello world.
3hello World3
hellos dlroW
Hello9 world9
WorldWorld Hello8
olleH 3world
olleh world?
Hello5 world6
Olleh 8world
Helloed 6world
1hello World8
helloolleh world1
Hello7 worlD
Olleh World.
Hello6 1world
Hello4 World0
hellohello 1world
Hello5 wrld


Turning on some more rules:


Hello66666 Yworld
Hello07 world1111
HELLO9 world58
HelloR world1914
Hellov world15
dr.hello Qieks
Hello10 world1997
hello45 Wor1d
fqjju world1965
4hellos world1938
hellol world42
hello2012 world40
Hello222222 World14
Hello85 WORLD1
hellof World51
Hll WORLD7
Hello04 World66
Hello999999 2world
<hello> Worldy
Hello44444 world1923
Hello78 'world'
HelloC r[y'g
hello2009 World\
hello71 ld
%hello% Wor1d
Hello55 worlding
hello} World97
bluemeanie1
Sr. Member
****
Offline Offline

Activity: 280
Merit: 257


bluemeanie


View Profile WWW
July 02, 2014, 01:27:11 AM
 #31


Certainly interesting but even in my example you are very far combinatorially from what you might call *easily computable*.  Remember first they have to guess the basic passphrase, then run through each and every numbering schema, and even manage to arrive at the % special character usage.  So lets say there are a few billion base passphrases that the cracker wants to cover, lets say a million numbering schema, another million special character schema, and lets say a thousand capitalization schema.

that would be:

BILLION X MILLION X MILLION X THOUSAND = very large number of private keys to compute

Back to OP, so if you increase the computation required for each one of these possibilities(as you suggest), you are miles away from crackability.  You might be able to enhance the security a bit by using a non-standard hashing algo(back to the commodification problem).  You could even have a custom definable hashing exponent, this would make the keys even more difficult to enumerate ie. you pick how many times the brain wallet system hashes your basic passphrase.

It is true that a fully randomized private key is the best security by far.  If you have a large Bitcoin balance a brain wallet is simply not recommended.

-bm

Just who IS bluemeanie?    On NXTautoDAC and a Million Stolen NXT

feel like your voice isn't being heard? PM me.   |   stole 1M NXT?
bluemeanie1
Sr. Member
****
Offline Offline

Activity: 280
Merit: 257


bluemeanie


View Profile WWW
July 02, 2014, 01:33:12 AM
 #32

btw Greg, if you're into JTR I'd be interested to know how quickly it would arrive at my example.

Lets say for demonstration purposes that we already know it's Shakespeare.  Even that alone would be a massive computation.

-bm

Just who IS bluemeanie?    On NXTautoDAC and a Million Stolen NXT

feel like your voice isn't being heard? PM me.   |   stole 1M NXT?
jonald_fyookball
Legendary
*
Offline Offline

Activity: 1302
Merit: 1004


Core dev leaves me neg feedback #abuse #political


View Profile
July 02, 2014, 02:00:33 AM
 #33

It is true that a fully randomized private key is the best security by far.  If you have a large Bitcoin balance a brain wallet is simply not recommended.

-bm


Let's choose our words carefully and differentiate between brain wallets and human chosen passphrases.
For example, Electrum can be used as a brain wallet but you cannot choose an arbitrary seed.

To me, the main problem with brain wallets is the $5 wrench, which is why I
advocate stealth quick-transfer mechanisms to other wallets.


bluemeanie1
Sr. Member
****
Offline Offline

Activity: 280
Merit: 257


bluemeanie


View Profile WWW
July 02, 2014, 03:02:44 PM
 #34

I gave this some thought last night-

(somewhat reiterating on what I already stated)

A very secure Brain Wallet would employ both a passphrase and a numerical exponent.  The user would need to remember both the phrase and the exponent.  This way they can choose the level of security.  If the exponent is a variable, then the number of keys required to compute would be enormous(not to mention the number of keys the hacker would need to track).  This would offer fairly good security for a mnemonic security token.

You could easily modify the java code supplied above to perform this.



-bm

Just who IS bluemeanie?    On NXTautoDAC and a Million Stolen NXT

feel like your voice isn't being heard? PM me.   |   stole 1M NXT?
Pages: 1 2 [All]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!