forked from wolfSSL/wolfssl
Fixed CID 536133.
This commit is contained in:
@ -868,16 +868,13 @@ int mp_exptmod (mp_int * G, mp_int * X, mp_int * P, mp_int * Y)
|
|||||||
return MP_VAL;
|
return MP_VAL;
|
||||||
}
|
}
|
||||||
if (mp_isone(P)) {
|
if (mp_isone(P)) {
|
||||||
mp_set(Y, 0);
|
return mp_set(Y, 0);
|
||||||
return MP_OKAY;
|
|
||||||
}
|
}
|
||||||
if (mp_iszero(X)) {
|
if (mp_iszero(X)) {
|
||||||
mp_set(Y, 1);
|
return mp_set(Y, 1);
|
||||||
return MP_OKAY;
|
|
||||||
}
|
}
|
||||||
if (mp_iszero(G)) {
|
if (mp_iszero(G)) {
|
||||||
mp_set(Y, 0);
|
return mp_set(Y, 0);
|
||||||
return MP_OKAY;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* if exponent X is negative we have to recurse */
|
/* if exponent X is negative we have to recurse */
|
||||||
|
Reference in New Issue
Block a user