Lines Matching refs:challenge

209 	{ "mschap-challenge", o_string, &mschap_challenge,
210 "specify CHAP challenge" },
211 { "mschap2-peer-challenge", o_string, &mschap2_peer_challenge,
212 "specify CHAP peer challenge" },
220 * chapms_generate_challenge - generate a challenge for MS-CHAP.
221 * For MS-CHAP the challenge length is fixed at 8 bytes.
222 * The length goes in challenge[0] and the actual challenge starts
223 * at challenge[1].
225 static void chapms_generate_challenge(ppp_pcb *pcb, unsigned char *challenge) {
228 *challenge++ = 8;
231 memcpy(challenge, mschap_challenge, 8);
234 magic_random_bytes(challenge, 8);
237 static void chapms2_generate_challenge(ppp_pcb *pcb, unsigned char *challenge) {
240 *challenge++ = 16;
243 memcpy(challenge, mschap_challenge, 16);
246 magic_random_bytes(challenge, 16);
251 const unsigned char *challenge, const unsigned char *response,
259 challenge_len = *challenge++; /* skip length, is 8 */
273 ChapMS(pcb, (const u_char *)challenge, (const char *)secret, secret_len, md);
293 challenge_len, challenge);
299 const unsigned char *challenge, const unsigned char *response,
306 challenge_len = *challenge++; /* skip length, is 16 */
312 ChapMS2(pcb, (const u_char*)challenge, (const u_char*)&response[MS_CHAP2_PEER_CHALLENGE], name,
353 * c = challenge to use for next response, we reuse previous
361 * Note that it's safe to reuse the same challenge as we don't
369 challenge_len, challenge, "Access denied");
375 const unsigned char *challenge, const char *secret, int secret_len,
380 challenge++; /* skip length, should be 8 */
382 ChapMS(pcb, challenge, secret, secret_len, response);
386 const unsigned char *challenge, const char *secret, int secret_len,
389 challenge++; /* skip length, should be 16 */
391 ChapMS2(pcb, challenge,
496 static void ChallengeResponse(const u_char *challenge,
514 lwip_des_crypt_ecb(&des, challenge, response +0);
520 lwip_des_crypt_ecb(&des, challenge, response +8);
526 lwip_des_crypt_ecb(&des, challenge, response +16);