Author Topic: On passwords and encryption  (Read 23630 times)

Rocinante

  • Posts: 642
  • Turrets: +252/-668
    • My Homepage
On passwords and encryption
« on: October 19, 2009, 01:50:09 am »
Please note that this thread is not a place to discuss the events of this weekend - once there's solid information to disseminate I'm sure that will be forthcoming - but instead this is to answer some questions I've seen repeated in email and IRC.  Do try to avoid wild speculation and misinformation, and not bring up what so-and-so told you happened this weekend.

I've seen quite a few people question recent events, specifically when told there was a database breach and that passwords should be changed everyone asks, "But aren't they encrypted?"  The answer is yes, of course they are.  But that means nothing.

Passwords tend to be encrypted using what is called a "one-way hash"; this is a mathematical function where given a certain input, a specific output is generated.  However, given the output, you cannot determine mathematically what the input to the function was - it only works in one direction.  Some examples of one-way hashes are MD5, SHA1 and RIPEMD.  See this article for more on hashes.

Now, even though you can't mathematically determine what the input to a hash was, you can still "crack" it through other means.  Some, such as MD5, have particular flaws that make it easier to calculate what the input was when given the hashed output, while for others there's the dictionary attack.  For example, if my password was "p@ssw0rd", one possible hash of that is "A6.WLhKd.rk2M".  While you may not easily be able to reverse that, what you can do is take every word of a dictionary (including variants, such as substituting 1 for i or l, 0 for o, etc) and hash that value to see what you get.  Sooner or later, you're bound to find out that when using the input "p@ssw0rd" you get the same value.  Now without cryptographically attacking the actual hash, you've defeated it because the password itself was weak.

If instead I had used "WA53@WaIOGxL;Qq" as my password.. well, yes you could eventually brute force that value and find that it matches the hashed output.  But that's going to take a lot longer since the password itself is random.  When cracking accounts, you'll get all the easy ones first - people who use their username as a password, or a common dictionary word, followed by those who prepend or append a number, change capitalization, or substitute some numbers and symbols for letters.  So as you can see, it doesn't matter how strong an encryption algorithm is.  If an attacker has your encrypted password, and you have a crappy password, and they know what method was used to encrypt it (which is usually the easiest part of the equation to get) then they can get your password.  It's all a matter of how much CPU time they want to throw at the problem, and how patient they are to get your password as a result.

I invite and encourage any questions on passwords, encryption and security - I'll leave this topic here, even though it will quickly become "off topic" for the forum itself, until a few days have passed and those who would be interested in the idea have seen it here before moving it to the off topic board.
}MG{Mercenaries Guild
"On my ship, the Rocinante, wheeling through the galaxies, headed for the heart of Cygnus, headlong into mystery." -- Rush, "Cygnus X-1"

MitSugna

  • Guest
Re: On passwords and encryption
« Reply #1 on: October 19, 2009, 02:01:19 am »

Demolution

  • Posts: 1198
  • Turrets: +157/-64
Re: On passwords and encryption
« Reply #2 on: October 19, 2009, 05:23:51 am »
tl;dr: Put in the effort to memorize a longer and more complicated (and thus more secure) password.

Off topic:
Will we get some information on what actually happened this weekend? Or should I not even bother asking this?

Clan [AC] - For all your air conditioning needs please visit: http://s1.zetaboards.com/AC_NoS/index/
my brain > your brain.
and i am VERY stupid.

your face

  • Community Moderators
  • *
  • Posts: 3843
  • Turrets: +116/-420
Re: On passwords and encryption
« Reply #3 on: October 19, 2009, 05:24:39 am »
Check my signature, it's my view of the matter. :P

Good article, thanks for explaining.
spam spam spam, waste waste waste!

janev

  • Spam Killer
  • *
  • Posts: 534
  • Turrets: +130/-26
Re: On passwords and encryption
« Reply #4 on: October 19, 2009, 08:59:19 am »
Thanks for the heads up. Password changed.

General Question: Is there any way of discerning where else a password may or may not have been used?

Author of "The quick beginner's guide to playing tremulous"
Founding member of the "undefeated in clanwars since 2006" club and narcissist extraordinaire.


"Your quote-tower trolling reminds me of two dogs fighting over a piece of poo." [c] Ingar

maniaxx

  • Posts: 2
  • Turrets: +1/-0
Re: On passwords and encryption
« Reply #5 on: October 19, 2009, 10:57:17 am »
what about salting?

Rocinante

  • Posts: 642
  • Turrets: +252/-668
    • My Homepage
Re: On passwords and encryption
« Reply #6 on: October 19, 2009, 12:15:59 pm »
tl;dr: Put in the effort to memorize a longer and more complicated (and thus more secure) password.

Definitely.  I use 1Password on the Mac/iPhone, some use KeePass, and there's plenty of other secure password managers to help you keep track of not only what password is used, but where it's used (or even better, generate long and complex ones everywhere).

Off topic:
Will we get some information on what actually happened this weekend? Or should I not even bother asking this?

I'm pretty sure that's coming very soon.

General Question: Is there any way of discerning where else a password may or may not have been used?

Only using your memory, and trial-and-error.  If you store passwords in Firefox, you can search its list of stored passwords, or there's even a plugin you can get that can dump the list of passwords to a CSV or XML file; pretty sure there's similar methods in all the major browsers.

what about salting?

In short, it helps, but it doesn't prevent.  The long: Salting is adding some extra bit of information to the password, so that the encrypted data consists of the password plus that extra bit; in this way, you tend to create a stronger encrypted string since the data isn't just the password.  However, if you know the salt method used this sometimes doesn't help much.  SMF uses a slightly strange method (and this is published all over the web, as well as the source code, so it's not like I'm divulging anything special here): The encrypted string consists of your username + password + salt.  So the only thing this prevents is a straight dictionary attack, because instead of encrypting every password possible, you have to encrypt every username + password + salt to get a single password.  Programs like "Jack the Ripper", used for brute forcing password databases, work on the principal that there's a small number of salts and the rest of the encrypted strings are just the password.  In the case of my example "p@ssw0rd" above, if four people had the same password you wouldn't know until you tried encrypting that word plus our usernames and the salt, whereas without the method used by SMF you would find all four passwords at the same time.
}MG{Mercenaries Guild
"On my ship, the Rocinante, wheeling through the galaxies, headed for the heart of Cygnus, headlong into mystery." -- Rush, "Cygnus X-1"

gimhael

  • Posts: 546
  • Turrets: +70/-16
Re: On passwords and encryption
« Reply #7 on: October 19, 2009, 01:07:16 pm »
FireFox users can install the PasswordMaker plugin to get unique passwords for every website. The advantage is that these unique passwords are autogenerated, so you don't need to carry them with you on an USB stick or something.

tuple

  • Posts: 833
  • Turrets: +97/-80
Re: On passwords and encryption
« Reply #8 on: October 19, 2009, 01:24:41 pm »
keypass here.  You can generate obscene passwords that you'll never remember, and keepass can live on your task bar.  You can right-click copy just the password (which it is set to not show you) and paste it into wherever.  It only lives for a short while in you copy buffer though, so you don't have to worry about pasting it into something else 5 hours later when you get back to your computer  ;D

Linux and windows version, maybe mac, I haven't looked.

==Troy==

  • Posts: 440
  • Turrets: +65/-67
Re: On passwords and encryption
« Reply #9 on: October 19, 2009, 01:51:22 pm »
And what about password strengthening? I.e. taking hash of a hash 20k times (about 1-2 seconds of average PC speed).

David

  • Spam Killer
  • *
  • Posts: 3543
  • Turrets: +249/-273
Re: On passwords and encryption
« Reply #10 on: October 19, 2009, 01:56:25 pm »
Because that also kills the server.
Any maps not in the MG repo?  Email me or come to irc.freenode.net/#mg.
--
My words are mine and mine alone.  I can't speak for anyone else, and there is no one who can speak for me.  If I ever make a post that gives the opinions or positions of other users or groups, then they will be clearly labeled as such.
I'm disappointed that people's past actions have forced me to state what should be obvious.
I am not a dev.  Nothing I say counts for anything.

MitSugna

  • Guest
Re: On passwords and encryption
« Reply #11 on: October 19, 2009, 07:27:38 pm »
a hash of a hash of a hash of a hash of a hash of a hash of a hash of a hash.... over 9000 times.
Yeah, Hash the Hashing Hashers!

Nux

  • Posts: 1778
  • Turrets: +258/-69
Re: On passwords and encryption
« Reply #12 on: October 19, 2009, 07:55:06 pm »
keypass here.  You can generate obscene passwords that you'll never remember, and keepass can live on your task bar.  You can right-click copy just the password (which it is set to not show you) and paste it into wherever.  It only lives for a short while in you copy buffer though, so you don't have to worry about pasting it into something else 5 hours later when you get back to your computer  ;D

Linux and windows version, maybe mac, I haven't looked.

How secure is this basket you're putting all your eggs into? And I don't mean from haxors. How about friends and family with access to your computer?

People you know are generally more aware of and interested in your online stuff than most people.

No, I don't wear a tinfoil hat. It's a tinfoil top hat.

tuple

  • Posts: 833
  • Turrets: +97/-80
Re: On passwords and encryption
« Reply #13 on: October 19, 2009, 08:05:35 pm »
How secure is this basket you're putting all your eggs into? And I don't mean from haxors. How about friends and family with access to your computer?

People you know are generally more aware of and interested in your online stuff than most people.

No, I don't wear a tinfoil hat. It's a tinfoil top hat.

How much do you want?  You can lock the DB with a key you keep on a thumbdrive if you wish, or a password only you know, or both. It only runs in the taskbar if you start the program, not on OS start and the windows version even locks that so you need to reopen the db (with however you've locked it) when you call it back from the taskbar.

You could even store it on an encrypted partition on a usb drive if you want to start getting crazy paranoid :P


FisherP

  • Posts: 295
  • Turrets: +31/-32
Re: On passwords and encryption
« Reply #14 on: October 19, 2009, 08:29:27 pm »
The PasswordMaker Add-on for Firefox is pretty good. I use that so that every web site has a different password and I only have to remember one.

Rocinante

  • Posts: 642
  • Turrets: +252/-668
    • My Homepage
Re: On passwords and encryption
« Reply #15 on: October 19, 2009, 08:46:03 pm »
No, I don't wear a tinfoil hat. It's a tinfoil top hat.

Hah!  I don't know what line of business you're in, but in mine tinfoil is too flimsy :>

Tuple spoke about KeePass, I can speak about 1Password - it also has a "master password" which is used to lock the keychain, and has settings which determine how often it locks and when.  You can have a time limit (defaults to 20m), when the machine goes to sleep, or even whenever the screen saver starts as triggers to relock the keychain.

They've got a new system coming out soon where you can point a web browser at a .html file in the keychain (it's just a directory), enter your master password and using javascript access the contents for when you're not at your Mac.  I use this for my Linux machine at work.  Also an iPhone app which has two layers of "security", a four digit PIN you enter to open the app and a password you enter to unlock any of the passwords contained within (though you can loosen restrictions on a case-by-case basis if, for example, you want to only require the PIN for some passwords).
}MG{Mercenaries Guild
"On my ship, the Rocinante, wheeling through the galaxies, headed for the heart of Cygnus, headlong into mystery." -- Rush, "Cygnus X-1"

Bissig

  • Posts: 1309
  • Turrets: +103/-131
Re: On passwords and encryption
« Reply #16 on: October 19, 2009, 11:11:24 pm »
I don't trust those password managers:

If I lose my head, I will lose all my passwords but probably also all of my life. So losing passwords is the lesser threat.

If I lose the USB stick or the hardisk with the password manager or forget the masterpassword.. I am really fucked.

David

  • Spam Killer
  • *
  • Posts: 3543
  • Turrets: +249/-273
Re: On passwords and encryption
« Reply #17 on: October 19, 2009, 11:21:46 pm »
I know the passwords to my email.  With that I can reset everything else.
Also, print the list out.  Can't forget the password to a bit of paper.

I'm using keepassx, which is keepass for linux.  It seems to work great.  Keepass2 is supposedly better, but it wouldn't run under mono (I didn't try too hard) and things like Auto-Type don't work on linux, which is kinda a deal breaker.
Any maps not in the MG repo?  Email me or come to irc.freenode.net/#mg.
--
My words are mine and mine alone.  I can't speak for anyone else, and there is no one who can speak for me.  If I ever make a post that gives the opinions or positions of other users or groups, then they will be clearly labeled as such.
I'm disappointed that people's past actions have forced me to state what should be obvious.
I am not a dev.  Nothing I say counts for anything.

Nux

  • Posts: 1778
  • Turrets: +258/-69
Re: On passwords and encryption
« Reply #18 on: October 19, 2009, 11:52:07 pm »
Thanks for the info.

So as far as I can see, there are only two real disadvantages to using such a tool.

1. Eggs in the basket
If the security on the database is cracked, the security of all your associated accounts are also cracked. A big 'if'? Maybe but it's an inherent flaw nonetheless.

2. Dependency
If you don't learn to remember the individual passwords, you need this tool to log in to your accounts.

I won't be using one of these but I can see why you would.

beware of troll

  • Posts: 11
  • Turrets: +0/-4
Re: On passwords and encryption
« Reply #19 on: October 20, 2009, 02:34:43 am »
Why is it even bad if someone cracks your password on tremulous.net? They can't even see your email by logging into the account, can they? As long as you didn't use the same username/password combo on a banking website or something, it doesn't seem like a big deal. It's not like you should really care if the hacker(s) want to defame your trem.net reputation.
« Last Edit: October 20, 2009, 02:37:03 am by beware of troll »

mooseberry

  • Community Moderators
  • *
  • Posts: 4005
  • Turrets: +666/-325
Re: On passwords and encryption
« Reply #20 on: October 20, 2009, 03:21:46 am »
Your email is very much visable in account settings. And if you have the same password on the forums as your email or any other site they know you are on they can get into it. And if you have the same password to your email account they can get anywhere.
Bucket: [You hear the distant howl of a coyote losing at Counterstrike.]

मैं हिन्दी का समर्थन

~Mooseberry.

Paradox

  • Posts: 2612
  • Turrets: +253/-250
    • Paradox Designs
Re: On passwords and encryption
« Reply #21 on: October 20, 2009, 08:18:59 am »
Best password:

the 10,000-10,008th nucleotide pair of your 23rd chromosome

∧OMG ENTROPY∧

Demolution

  • Posts: 1198
  • Turrets: +157/-64
Re: On passwords and encryption
« Reply #22 on: October 20, 2009, 03:46:33 pm »
Best password:

the 10,000-10,008th nucleotide pair of your 23rd chromosome

Brute forced with the aid of The Human Genome Project?  :P

Clan [AC] - For all your air conditioning needs please visit: http://s1.zetaboards.com/AC_NoS/index/
my brain > your brain.
and i am VERY stupid.

Nux

  • Posts: 1778
  • Turrets: +258/-69
Re: On passwords and encryption
« Reply #23 on: October 20, 2009, 04:24:30 pm »
Best password:

the 10,000-10,008th nucleotide pair of your 23rd chromosome

Armed with that information, I've only got 65,536 strings to brute-force. Muhahahaha!

I'll start with 'gattaca' strings on the off chance you liked that movie so much you restructured your DNA to prove your devotion.

Paradox

  • Posts: 2612
  • Turrets: +253/-250
    • Paradox Designs
Re: On passwords and encryption
« Reply #24 on: October 21, 2009, 03:51:41 am »
Or even better. Since encoding is good, RNA encode them.

∧OMG ENTROPY∧

Dance Commander

  • Posts: 70
  • Turrets: +6/-9
Re: On passwords and encryption
« Reply #25 on: October 23, 2009, 12:07:18 am »
thank god i used 12345 instead of a word from the dictionary, AMIRITE?
'll kill you if you try me for my air-max 95s.
high like spaceships, fly like planes
get your robin hood on
put some pressure on the man

Rocinante

  • Posts: 642
  • Turrets: +252/-668
    • My Homepage
Re: On passwords and encryption
« Reply #26 on: October 23, 2009, 02:22:24 am »
thank god i used 12345 instead of a word from the dictionary, AMIRITE?

You, go change the combination on my luggage!
}MG{Mercenaries Guild
"On my ship, the Rocinante, wheeling through the galaxies, headed for the heart of Cygnus, headlong into mystery." -- Rush, "Cygnus X-1"

SlackerLinux

  • Spam Killer
  • *
  • Posts: 555
  • Turrets: +41/-62
Re: On passwords and encryption
« Reply #27 on: October 23, 2009, 04:48:21 am »
thank god i used 12345 instead of a word from the dictionary, AMIRITE?

please dont write my password on forums backwards k thx bye :p
Slackware64 13.1
SlackersQVM/

Undeference

  • Tremulous Developers
  • *
  • Posts: 1254
  • Turrets: +122/-45
Re: On passwords and encryption
« Reply #28 on: October 23, 2009, 06:47:36 am »
thank god i used 12345 instead of a word from the dictionary, AMIRITE?
Not exactly a dictionary, but does this count?
Need help? Ask intelligently. Please share solutions you find.

Thats what we need, helpful players, not more powerful admins.

silverbak

  • Posts: 20
  • Turrets: +1/-4
Re: On passwords and encryption
« Reply #29 on: October 27, 2009, 03:35:16 am »
Which hashing algorithm was used on the passwords?