<div class="gmail_quote">On Thu, Feb 18, 2010 at 2:37 PM, IRcapmail <span dir="ltr"><<a href="mailto:ircapmail@yahoo.es">ircapmail@yahoo.es</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Thank you, Waqas.<br>
<br>
I have fixed step 3, but I don't know how to compute the 16 octect in step 2. The $md5(X) always returns 32 characters. I have tried to get the first 16 and last 16 characters, but the response is wrong.<br></blockquote>
<div><br></div><div> it sounds like this is returning md5hex, and not the raw characters. You need to convert the 32 chars into 16 octects using hex2chr as shown here: <a href="http://www.hawkee.mobi/snippet/6505/">http://www.hawkee.mobi/snippet/6505/</a></div>
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I don't know if its a limitation of the mIRC's language and its possible to create md5 hashes with 16 chars in others more "professional" languages, or I'm doing something wrong.<br>
<br>
<br>
Waqas Hussain escribió:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div></div><div class="h5">
On Thu, Feb 18, 2010 at 4:04 AM, IRcapmail <<a href="mailto:ircapmail@yahoo.es" target="_blank">ircapmail@yahoo.es</a>> wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
2. Compute the 16 octet MD5 hash of X. Call the result Y.<br>
<br>
%Y = $md5(%X)<br>
<br>
Result= 85434cc70bb832bc456c27834bfa5d25<br>
<br>
<br>
</blockquote>
This is incorrect. You need 16 octets, but your result is 32 octets. Don't<br>
hex encode in this step.<br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
3. Create a string of the form "Y:nonce:cnonce:authzid". Call this string<br>
A1.<br>
<br>
%A1 = %Y $+<br>
:x8djfKCd/aoKCUIeI5IwN0lNGzs91oSdMCR7SZT6L9s=:EzAaOdnJwGDj2ABlUat3a1ZPeH06Pyzic6PpnVnqkBE=:<br>
<a href="http://testuser456@jabber.org/Psi" target="_blank">testuser456@jabber.org/Psi</a><br>
<br>
Result=<br>
85434cc70bb832bc456c27834bfa5d25:x8djfKCd/aoKCUIeI5IwN0lNGzs91oSdMCR7SZT6L9s=:EzAaOdnJwGDj2ABlUat3a1ZPeH06Pyzic6PpnVnqkBE=:<br>
<a href="http://testuser456@jabber.org/Psi" target="_blank">testuser456@jabber.org/Psi</a><br>
<br>
<br>
</blockquote>
You are including an authzid here, Psi didn't. When there is no authzid, you<br>
use:<br>
A1 = Y:nonce:cnonce<br>
<br>
A note about authzid: You must not provide an authzid when it's the same as<br>
the JID you are logging in with. And when provided, it has to be a bare JID.<br>
See the spec:<br>
<a href="http://xmpp.org/internet-drafts/draft-ietf-xmpp-3920bis-04.html#sasl-rules-authzid" target="_blank">http://xmpp.org/internet-drafts/draft-ietf-xmpp-3920bis-04.html#sasl-rules-authzid</a><br>
<br>
The rest of your code is correct, and I managed to get the correct result<br>
with the above two fixes.<br>
<br>
--<br>
Waqas Hussain<br>
<br>
<br>
<br></div></div>
------------------------------------------------------------------------<div class="im"><br>
<br>
_______________________________________________<br>
JDev mailing list<br>
Forum: <a href="http://www.jabberforum.org/forumdisplay.php?f=20" target="_blank">http://www.jabberforum.org/forumdisplay.php?f=20</a><br>
Info: <a href="http://mail.jabber.org/mailman/listinfo/jdev" target="_blank">http://mail.jabber.org/mailman/listinfo/jdev</a><br>
Unsubscribe: <a href="mailto:JDev-unsubscribe@jabber.org" target="_blank">JDev-unsubscribe@jabber.org</a><br>
_______________________________________________<br>
</div></blockquote><div><div></div><div class="h5">
<br>
_______________________________________________<br>
JDev mailing list<br>
Forum: <a href="http://www.jabberforum.org/forumdisplay.php?f=20" target="_blank">http://www.jabberforum.org/forumdisplay.php?f=20</a><br>
Info: <a href="http://mail.jabber.org/mailman/listinfo/jdev" target="_blank">http://mail.jabber.org/mailman/listinfo/jdev</a><br>
Unsubscribe: <a href="mailto:JDev-unsubscribe@jabber.org" target="_blank">JDev-unsubscribe@jabber.org</a><br>
_______________________________________________<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>- Norman Rasmussen<br> - Email: <a href="mailto:norman@rasmussen.co.za">norman@rasmussen.co.za</a><br> - Home page: <a href="http://norman.rasmussen.co.za/">http://norman.rasmussen.co.za/</a><br>