/* challenge_response - ChallengeResponse() - RFC 2759, Sect. 8.5 @challenge: 8-octet Challenge (IN) @password_hash: 16-octet PasswordHash (IN) @response: 24-octet Response (OUT)  */
void challenge_response(const u8 *challenge, const u8 *password_hash, u8 *response)
/* challenge_response - ChallengeResponse() - RFC 2759, Sect. 8.5 @challenge: 8-octet Challenge (IN) @password_hash: 16-octet PasswordHash (IN) @response: 24-octet Response (OUT)  */
void challenge_response(const u8 *challenge, const u8 *password_hash, u8 *response)
{
	u8 zpwd[7];
	des_encrypt(challenge, password_hash, response);
	des_encrypt(challenge, password_hash + 7, response + 8);
	zpwd[0] = password_hash[14];
	zpwd[1] = password_hash[15];
	os_memset(zpwd + 2, 0, 5);
	des_encrypt(challenge, zpwd, response + 16);
}