Lines Matching defs:v1
65 uint32_t r, a, b, u0, v0, u1, v1, he, hr;
161 * u0, u1, v0 and v1. Initial values are:
163 * b = r u1 = r v1 = e-1
166 * b = u1*e - v1*r
172 * 0 <= v1 <= e
175 * adjust u0, u1, v0 and v1 to maintain the invariants:
182 * key or public exponent is not valid). The (u0,v0) or (u1,v1)
192 * - When b is divided by 2, u1 and v1 must be divided by 2.
193 * - When b is subtracted from a, u1 and v1 are subtracted from
196 * u1 and v1, respectively.
220 * * u1 <= u0 and v1 <= v0: just do the subtractions
222 * * u1 > u0 and v1 > v0: compute:
223 * (u0, v0) <- (u0 + r - u1, v0 + e - v1)
225 * * u1 <= u0 and v1 > v0: compute:
226 * (u0, v0) <- (u0 + r - u1, v0 + e - v1)
228 * The fourth case (u1 > u0 and v1 <= v0) is not possible
238 * solely on the comparison between v0 and v1.
245 v1 = e - 1;
261 /* a <- a-b, u0 <- u0-u1, v0 <- v0-v1 */
262 ctl = GT(v1, v0);
265 v0 -= (v1 - (e & -ctl)) & -sab;
267 /* b <- b-a, u1 <- u1-u0 mod r, v1 <- v1-v0 mod e */
268 ctl = GT(v0, v1);
271 v1 -= (v0 - (e & -ctl)) & -sba;
282 /* b <- b/2, u1 <- u1/2 mod r, v1 <- v1/2 mod e */
283 ctl = v1 & 1;
286 v1 ^= (v1 ^ ((v1 >> 1) + (he & -ctl))) & -db;