Cronwerks MCCode/MCCodes Forums

Please login or register.

Login with username, password and session length

News:

Have you purchased a mod and are struggling to install it? Cronwerks now installs mods for only $3/$2.50. Message Cronus to discuss the details or purchase.


This forum is now closed and has moved to a new location! Click here to find out why.

Poll

What type of encryption

MD5
SHA1
SHA1 encrypted with username
Other, ive posted it in the topic
Pages: 1 2 [3]

AuthorTopic: Password Security  (Read 2412 times)

Z

  • Basic Member
  • *
  • Reputation Power: 0
  • Z has no influence.
  • Offline Offline
  • Posts: 1
    • View Profile
Re: Password Security
« Reply #30 on: February 25, 2010, 08:30:30 AM »
Time taken for hashing: md5 < sha1 < sha512 <  whirlpool

md5 is the fastest, and this is NOT always a good thing. Faster to calculate means faster to precompute, means faster to generate rainbow tables.

While the algorithms are different, length of the hash is very important. Shorter hashes can only generate x number of unique hashes before it starts creating collisions (different hash data -> single hash). MD5 is 128 bit so it can generate 2^128 unique hashes. SHA-1 can generate 2^160 unique hashes, and so on.

So, the longer the hash, the less likely it is to find a collision.

For games, this doesn't matter. Even if a collision is found, there's nothing you can do with it.

So in short:
Length of the hash does not matter for games (unless you're worried about storage space)
Time of calculating the hash does matter - longer is better, but not so long that it will slow down your game. Longer calculation times means it's not so easy to precompute hashes (rainbow tables).

MD5 and SHA-1 are the two fastest and most common hashing algorithms, so it is easy to generate rainbow tables. SHA-512 and whirlpool take too long for rainbow tables to be useful.

Personally I use SHA-1 with a salt. I'm not too worried.
Logged
Pages: 1 2 [3]
« previous next »
 


This forum is now closed and has moved to a new location! Click here to find out why.