summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
aa66eba)
(just in cases someone uses a negative modulus)
while (!BN_is_bit_set(p, e))
e++;
if (e > 2)
while (!BN_is_bit_set(p, e))
e++;
if (e > 2)
/* we don't need this q if e = 1 or 2 */
if (!BN_rshift(q, p, e)) goto end;
/* we don't need this q if e = 1 or 2 */
if (!BN_rshift(q, p, e)) goto end;
* so we can use exponent (p+1)/4, i.e. (p-3)/4 + 1.
*/
if (!BN_rshift(q, p, 2)) goto end;
* so we can use exponent (p+1)/4, i.e. (p-3)/4 + 1.
*/
if (!BN_rshift(q, p, 2)) goto end;
if (!BN_add_word(q, 1)) goto end;
if (!BN_mod_exp(ret, a, q, p, ctx)) goto end;
err = 0;
if (!BN_add_word(q, 1)) goto end;
if (!BN_mod_exp(ret, a, q, p, ctx)) goto end;
err = 0;
/* b := (2*a)^((p-5)/8) */
if (!BN_rshift(q, p, 3)) goto end;
/* b := (2*a)^((p-5)/8) */
if (!BN_rshift(q, p, 3)) goto end;
if (!BN_mod_exp(b, t, q, p, ctx)) goto end;
/* y := b^2 */
if (!BN_mod_exp(b, t, q, p, ctx)) goto end;
/* y := b^2 */