Click here to Skip to main content
15,895,142 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
wout de zeeuw29-Oct-12 0:28
wout de zeeuw29-Oct-12 0:28 
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 
Hi,

This I understand. What I mean is this: If each salt is unique, your passwords will never match as between generation and comparison, they will have to be different!

In very simplified pseudocode:

Making the salted password
$salt = generateRandomSalt();
//The function returned 159
$pwd = md5('password');
//$pwd = 12345678901234567890123456789012
writeToDb($salt + $pwd);



Checking the salted password:
$salt = generateRandomSalt();
//This time the function returned 246
$pwd = md5('password');
//$pwd = 12345678901234567890123456789012

//compare
//12312345678901234567890123456789012 and
//24612345678901234567890123456789012
//Not looking good...

if(($salt + $pwd) == getStoredPasswordFromDB()) then
 win();
else
 fail();
endif


As the generated salt will always be random, the salt will always be different for each call, so... if both passwords are different, how do you validate it? In this example with a random salt, the checking condition will always fail, and if you store the salt (or even store the method of generating a unique salt per user), then you are pwned just as bad, it will just take some extra time to reverse engineer the login system, and from there, back to some form of rainbow tables once the salt part is understood and removed.

Can someone light my candle here? My area of expertise is PHP along with Classic VB & VBA, so a .NET library is not much use, but really, it's the idea of just how this really works, as I am already sold on the need of such a system!

Cheers!
GeneralRe: Salted Password Hashing - Doing it Right Pin
ThatEffinIanHarrisBloke30-Oct-12 15:39
ThatEffinIanHarrisBloke30-Oct-12 15:39 
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 PinPopular
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 

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.