<div class="gmail_quote">On Wed, Jan 19, 2011 at 12:39 PM, Mark <span dir="ltr"><<a href="mailto:mark@edgewire.sg">mark@edgewire.sg</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi folks,<br>
<br>
Been trying to look for information on this but haven't been able to find anything, prompting me to turn to the mailing list for help.<br>
<br>
In the event of using salted md5 hashes for passwords, where exactly does one store the salt?</blockquote><div><br></div><div>In the beginning of the password.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
 There doesn't seem to be a place within the FR config  to do that. Any advice would be much appreciated.<br>
<br></blockquote><div><br></div><div>No special place needed.</div><div><br></div><div>You're probably confusing MD5-Password and Crypt-Password (which in turn can use MD5 hash). For example, if you use PAP, these three attributes will allow access when user enter password "testpass":</div>
<div><br></div><div><div>Cleartext-Password := "testpass"</div><div>MD5-Password := "179ad45c6ce2cb97cf1029e212046e81"</div><div>Crypt-Password := "$1$12345678$duTc/02K9TK/XCYFyofbZ/"</div></div>
<div><meta http-equiv="content-type" content="text/html; charset=utf-8"><div><div>Crypt-Password := "122U0BPYjrauc"</div></div></div><div><br></div><div>MD5-Password does not have any salt.</div><div>Crypt-Password in the first example has the salt "$1$12345678$", with MD5-based hash (crypted passwords have the hash in front of them, which for MD5 starts with $1$ and is 12 characters long)</div>
<meta http-equiv="content-type" content="text/html; charset=utf-8"><div><div><meta http-equiv="content-type" content="text/html; charset=utf-8"><div>Crypt-Password in the second example has the salt "12", with DES-based hash</div>
<div></div></div></div><div><br></div><div>See also:</div><div><meta http-equiv="content-type" content="text/html; charset=utf-8"><a href="http://freeradius.org/radiusd/man/rlm_pap.txt">http://freeradius.org/radiusd/man/rlm_pap.txt</a></div>
<div><a href="http://en.wikipedia.org/wiki/Crypt_(Unix)#MD5-based_scheme">http://en.wikipedia.org/wiki/Crypt_(Unix)#MD5-based_scheme</a></div><div><meta http-equiv="content-type" content="text/html; charset=utf-8"><a href="http://id.php.net/manual/en/function.crypt.php">http://id.php.net/manual/en/function.crypt.php</a></div>
<div><br></div><div>-- </div><div>Fajar</div></div>