Lines Matching defs:window

172     int i, j, bits, ret = 0, wstart, wend, window, wvalue;
227 window = BN_window_bits_for_exponent_size(bits);
228 if (window > 1) {
231 j = 1 << (window - 1);
242 wvalue = 0; /* The 'value' of the window */
243 wstart = bits - 1; /* The top bit of the window */
244 wend = 0; /* The bottom bit of the window */
261 * a window to do. To do this we need to scan forward until the last
262 * set bit before the end of the window
266 for (i = 1; i < window; i++) {
276 /* wend is the size of the current window */
285 /* wvalue will be an odd number < 2^window */
289 /* move the 'window' down further */
307 int i, j, bits, ret = 0, wstart, wend, window, wvalue;
372 window = BN_window_bits_for_exponent_size(bits);
373 if (window > 1) {
376 j = 1 << (window - 1);
387 wvalue = 0; /* The 'value' of the window */
388 wstart = bits - 1; /* The top bit of the window */
389 wend = 0; /* The bottom bit of the window */
419 * a window to do. To do this we need to scan forward until the last
420 * set bit before the end of the window
424 for (i = 1; i < window; i++) {
434 /* wend is the size of the current window */
443 /* wvalue will be an odd number < 2^window */
447 /* move the 'window' down further */
509 int window)
512 int width = 1 << window;
527 int window)
530 int width = 1 << window;
544 if (window <= 3) {
556 int xstride = 1 << (window - 2);
559 i = idx >> (window - 2); /* equivalent of idx / xstride */
605 int i, bits, ret = 0, window, wvalue, wmask, window0;
703 /* Get the window size to use with size of p. */
704 window = BN_window_bits_for_ctime_exponent_size(bits);
706 if (window >= 5 && (top & 15) == 0 && top <= 64 &&
709 window = 5;
713 if (window >= 5 && top <= BN_SOFT_LIMIT) {
714 window = 5; /* ~5% improvement for RSA2048 sign, and even
726 numPowers = 1 << window;
870 * To simplify the main loop, the initial window has between 1 and
871 * full-window-size bits such that what remains is always a whole
881 * Scan the exponent one window at a time starting from the most
917 if (window == 5 && top > 1) {
923 * The paper discusses a 4-bit window to optimize 512-bit modular
1002 * To simplify the main loop, the initial window has between 1 and
1003 * full-window-size bits such that what remains is always a whole
1013 * Scan the exponent one window at a time starting from the most
1049 if (!MOD_EXP_CTIME_COPY_TO_PREBUF(&tmp, top, powerbuf, 0, window))
1051 if (!MOD_EXP_CTIME_COPY_TO_PREBUF(&am, top, powerbuf, 1, window))
1055 * If the window size is greater than 1, then calculate
1060 if (window > 1) {
1064 window))
1071 window))
1078 * To simplify the main loop, the initial window has between 1 and
1079 * full-window-size bits such that what remains is always a whole
1082 window0 = (bits - 1) % window + 1;
1087 window))
1090 wmask = (1 << window) - 1;
1092 * Scan the exponent one window at a time starting from the most
1097 /* Square the result window-size times */
1098 for (i = 0; i < window; i++)
1103 * Get a window's worth of bits from the exponent
1112 bits -= window;
1118 window))
1306 int i, j, bits, ret = 0, wstart, wend, window, wvalue;
1346 window = BN_window_bits_for_exponent_size(bits);
1347 if (window > 1) {
1350 j = 1 << (window - 1);
1361 wvalue = 0; /* The 'value' of the window */
1362 wstart = bits - 1; /* The top bit of the window */
1363 wend = 0; /* The bottom bit of the window */
1380 * a window to do. To do this we need to scan forward until the last
1381 * set bit before the end of the window
1385 for (i = 1; i < window; i++) {
1395 /* wend is the size of the current window */
1404 /* wvalue will be an odd number < 2^window */
1408 /* move the 'window' down further */