Click here to Skip to main content
15,904,153 members

The Insider News

   

The Insider News is for breaking IT and Software development news. Post your news, your alerts and your inside scoops. This is an IT news-only forum - all off-topic, non-news posts will be removed. If you wish to ask a programming question please post it here.

Get The Daily Insider direct to your mailbox every day. Subscribe now!

 
GeneralRe: Salted Password Hashing - Doing it Right Pin
Schmuli29-Oct-12 8:20
Schmuli29-Oct-12 8:20 
GeneralRe: Salted Password Hashing - Doing it Right Pin
TheGreatAndPowerfulOz29-Oct-12 8:37
TheGreatAndPowerfulOz29-Oct-12 8:37 
GeneralRe: Salted Password Hashing - Doing it Right Pin
Taylor Hornby30-Oct-12 9:09
Taylor Hornby30-Oct-12 9:09 
GeneralRe: Salted Password Hashing - Doing it Right Pin
fickendichdu29-Oct-12 9:59
fickendichdu29-Oct-12 9:59 
GeneralRe: Salted Password Hashing - Doing it Right Pin
bpfh29-Oct-12 10:25
bpfh29-Oct-12 10:25 
GeneralRe: Salted Password Hashing - Doing it Right Pin
ThatEffinIanHarrisBloke29-Oct-12 20:14
ThatEffinIanHarrisBloke29-Oct-12 20:14 
GeneralRe: Salted Password Hashing - Doing it Right Pin
bpfh30-Oct-12 10:28
bpfh30-Oct-12 10:28 
GeneralRe: Salted Password Hashing - Doing it Right Pin
ThatEffinIanHarrisBloke30-Oct-12 15:39
ThatEffinIanHarrisBloke30-Oct-12 15:39 
G'Day,

Yes you are correct you cannot just generate a new random salt at each authentication. You ONLY generate the random salt when the password is created, and the sal is indeed stored somewhere, generally in the DB with the Hash. Now what you are saying is if the DB is compromised and the attacker gains your hash and your salt you suggest that they are pwned and can then use the salt to generate a hash table. Now you are correct that the salt can be used to generate a hash table however that is why simply salt + hashing is not good enough. You also need to implement key stretching. The point of key stretching as per PBKDF2, Bcrypt etc, is such that generating said hash table takes an INFEASIBLE amount of time. It does this by performing a hash function such as HMACSHA1 over x (supplied) number of times and XORing the result of each pass with the previous one. If each hash generation takes half a second, it would take 1 second to generate two hashes! Making hash table generation not a viable option.

So basically it is fine for the attacker to gain your salt, hell give it to them if they ask for it even....you should always assume your salt is known anyway!!!

So folks always remember salt + password -> Key Stretching Function -> hash output to store.

I think the provided article does a better attempt at explaining than me but I hope I make sense anyhow Smile | :)

Cheers,

Ian
NewsWhy Coding Style Matters PinPopular
Terrence Dorsey25-Oct-12 11:03
sitebuilderTerrence Dorsey25-Oct-12 11:03 
GeneralRe: Why Coding Style Matters Pin
Andrew Torrance28-Oct-12 13:54
Andrew Torrance28-Oct-12 13:54 
NewsSSH key and passwordless login basics for developers Pin
Terrence Dorsey25-Oct-12 11:02
sitebuilderTerrence Dorsey25-Oct-12 11:02 
NewsRob Pike - 'Concurrency Is Not Parallelism' [video] Pin
Terrence Dorsey25-Oct-12 11:02
sitebuilderTerrence Dorsey25-Oct-12 11:02 
NewsTypescript - a real world story of adoption in TFS Pin
Terrence Dorsey25-Oct-12 11:02
sitebuilderTerrence Dorsey25-Oct-12 11:02 
GeneralRe: Typescript - a real world story of adoption in TFS Pin
Ravi Bhavnani25-Oct-12 11:25
professionalRavi Bhavnani25-Oct-12 11:25 
NewsThe future of .NET lies in Mono. The future of F# lies in MonoDevelop. Pin
Terrence Dorsey25-Oct-12 11:01
sitebuilderTerrence Dorsey25-Oct-12 11:01 
GeneralRe: The future of .NET lies in Mono. The future of F# lies in MonoDevelop. Pin
Marc Clifton25-Oct-12 11:58
mvaMarc Clifton25-Oct-12 11:58 
GeneralRe: The future of .NET lies in Mono. The future of F# lies in MonoDevelop. Pin
devvvy25-Oct-12 15:02
devvvy25-Oct-12 15:02 
GeneralRe: The future of .NET lies in Mono. The future of F# lies in MonoDevelop. Pin
Jörgen Andersson25-Oct-12 20:29
professionalJörgen Andersson25-Oct-12 20:29 
GeneralRe: The future of .NET lies in Mono. The future of F# lies in MonoDevelop. Pin
Nemanja Trifunovic26-Oct-12 3:01
Nemanja Trifunovic26-Oct-12 3:01 
GeneralRe: The future of .NET lies in Mono. The future of F# lies in MonoDevelop. Pin
BrainiacV26-Oct-12 3:47
BrainiacV26-Oct-12 3:47 
GeneralRe: The future of .NET lies in Mono. The future of F# lies in MonoDevelop. Pin
TheGreatAndPowerfulOz26-Oct-12 6:25
TheGreatAndPowerfulOz26-Oct-12 6:25 
NewsOn Being A Senior Engineer Pin
Terrence Dorsey25-Oct-12 9:25
sitebuilderTerrence Dorsey25-Oct-12 9:25 
GeneralRe: On Being A Senior Engineer Pin
devvvy25-Oct-12 15:03
devvvy25-Oct-12 15:03 
GeneralRe: On Being A Senior Engineer Pin
TheCoolCoder25-Oct-12 18:28
TheCoolCoder25-Oct-12 18:28 
GeneralRe: On Being A Senior Engineer Pin
Clark Kent12326-Oct-12 7:21
professionalClark Kent12326-Oct-12 7:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.