Home | History | Annotate | Download | only in openssh

Lines Matching defs:challenge

73 	BIGNUM *challenge;
76 if ((challenge = BN_new()) == NULL)
78 /* Generate a random challenge. */
79 if (BN_rand(challenge, 256, 0, 0) == 0)
83 if (BN_mod(challenge, challenge, key->rsa->n, ctx) == 0)
87 return challenge;
91 auth_rsa_verify_response(Key *key, BIGNUM *challenge, u_char response[16])
104 /* The response is MD5 of decrypted challenge plus session id. */
105 len = BN_num_bytes(challenge);
107 fatal("auth_rsa_verify_response: bad challenge length %d", len);
109 BN_bn2bin(challenge, buf + 32 - len);
115 /* Verify that the response is the original challenge. */
125 * Performs the RSA authentication challenge-response dialog with the client,
127 * our challenge; returns zero if the client gives a wrong answer.
133 BIGNUM *challenge, *encrypted_challenge;
140 challenge = PRIVSEP(auth_rsa_generate_challenge(key));
142 /* Encrypt the challenge with the public key. */
143 rsa_public_encrypt(encrypted_challenge, challenge, key->rsa);
145 /* Send the encrypted challenge to the client. */
158 success = PRIVSEP(auth_rsa_verify_response(key, challenge, response));
159 BN_clear_free(challenge);
180 * found, perform a challenge-response dialog to verify that the
242 * do not send challenge.
311 /* Perform the challenge-response dialog for this key. */
314 verbose("Wrong response to RSA authentication challenge.");
315 packet_send_debug("Wrong response to RSA authentication challenge.");
318 * another challenge and break the protocol.