On Fri, May 28, 2004 at 02:34:48AM +0200, Dinko Korunic wrote:
> As we can see, initial challenge calculation has gone wrong somewhere.. which
> is happening in challenge_hash(), function whish is strictly using OpenSSL SHA1
> functions. Doh. I thought at least OpenSSL should be endian-clean..

To prove my wording, here is some more of debug info. Already first SHA1 hash
is different. However, I'm not sure if challenge-grabbing (20 octets) from end
SHA1-hash is wrong, or SHA1 is wrong.. Could anyone help?

Unsuccessful:
CHAPDBG, challenge_hash: username aland
CHAPDBG, challenge_hash: peer_challenge 202122232425262728292A2B2C2D2E2F
CHAPDBG, challenge_hash: auth_challenge 303132333435363738393A3B3C3D3E3F
CHAPDBG, challenge_hash: sha1-1 41D03A478398AF4E7B18306592E77B8C8F99E76B
CHAPDBG, challenge_hash: sha1-2 88E8358965B10060C8BEEC85FA03A49E75CC0AAD
CHAPDBG, challenge_hash: sha1-3 E234830DFF297968936E5BA5A6022D31B32B2AE2
CHAPDBG, challenge_hash: end hash 389A5773F16E40A37FFB45A5DAEC13829A709102
CHAPDBG: challenge 389A5773F16E40A3
CHAPDBG: calculated 0CCC41AB13690C2C83BA7D143C12D758D34762A2194D663F
CHAPDBG: response 6649E30199C56F7B1413EBA10A19D963D03165C1AEA0EBBF
  rlm_mschap: FAILED: MS-CHAP2-Response is incorrect

Successful:
CHAPDBG, challenge_hash: username aland
CHAPDBG, challenge_hash: peer_challenge 202122232425262728292A2B2C2D2E2F
CHAPDBG, challenge_hash: auth_challenge 303132333435363738393A3B3C3D3E3F
CHAPDBG, challenge_hash: sha1-1 5C3F75DDA77EB61EF6D04B5045BDF661F4FA608C
CHAPDBG, challenge_hash: sha1-2 9502711A5B6468A0400D095480515D9610F327AC
CHAPDBG, challenge_hash: sha1-3 CC8E988B421E3260801E39F23C3CAA402C02F2B8
CHAPDBG, challenge_hash: end hash CC8E988B421E3260801E39F23C3CAA402C02F2B8
CHAPDBG: challenge CC8E988B421E3260
CHAPDBG: calculated 6649E30199C56F7B1413EBA10A19D963D03165C1AEA0EBBF
CHAPDBG: response 6649E30199C56F7B1413EBA10A19D963D03165C1AEA0EBBF
rlm_mschap: adding MS-CHAPv2 MPPE keys

-- 
|  |--.----.-----. Dinko 'kreator' Korunic       #include <stddisclaimer.h>
|    <|   _|  -__| http://www.srce.hr/~kreator/ | http://kre.deviantart.com
|__|__|__| |_____| PGP:0xEA160D0B | IRC:kre | ICQ:16965294 | AIM:kreatorMoo

- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Reply via email to