Lines Matching refs:rounds
212 @param num_rounds The number of rounds desired (0 for default)
220 static const int rounds[3] = { 8, 12, 16 };
230 /* Is the number of rounds valid? Either use zero for default or
231 * 8,12,16 rounds for 16,24,32 byte keys
233 if (num_rounds != 0 && num_rounds != rounds[(keylen/8)-2]) {
265 skey->saferp.rounds = 8;
292 skey->saferp.rounds = 12;
319 skey->saferp.rounds = 16;
343 /* do eight rounds */
356 if (skey->saferp.rounds > 8) {
363 if (skey->saferp.rounds > 12) {
369 ct[0] = b[0] ^ skey->saferp.K[skey->saferp.rounds*2][0];
370 ct[1] = (b[1] + skey->saferp.K[skey->saferp.rounds*2][1]) & 255;
371 ct[2] = (b[2] + skey->saferp.K[skey->saferp.rounds*2][2]) & 255;
372 ct[3] = b[3] ^ skey->saferp.K[skey->saferp.rounds*2][3];
373 ct[4] = b[4] ^ skey->saferp.K[skey->saferp.rounds*2][4];
374 ct[5] = (b[5] + skey->saferp.K[skey->saferp.rounds*2][5]) & 255;
375 ct[6] = (b[6] + skey->saferp.K[skey->saferp.rounds*2][6]) & 255;
376 ct[7] = b[7] ^ skey->saferp.K[skey->saferp.rounds*2][7];
377 ct[8] = b[8] ^ skey->saferp.K[skey->saferp.rounds*2][8];
378 ct[9] = (b[9] + skey->saferp.K[skey->saferp.rounds*2][9]) & 255;
379 ct[10] = (b[10] + skey->saferp.K[skey->saferp.rounds*2][10]) & 255;
380 ct[11] = b[11] ^ skey->saferp.K[skey->saferp.rounds*2][11];
381 ct[12] = b[12] ^ skey->saferp.K[skey->saferp.rounds*2][12];
382 ct[13] = (b[13] + skey->saferp.K[skey->saferp.rounds*2][13]) & 255;
383 ct[14] = (b[14] + skey->saferp.K[skey->saferp.rounds*2][14]) & 255;
384 ct[15] = b[15] ^ skey->saferp.K[skey->saferp.rounds*2][15];
407 /* do eight rounds */
408 b[0] = ct[0] ^ skey->saferp.K[skey->saferp.rounds*2][0];
409 b[1] = (ct[1] - skey->saferp.K[skey->saferp.rounds*2][1]) & 255;
410 b[2] = (ct[2] - skey->saferp.K[skey->saferp.rounds*2][2]) & 255;
411 b[3] = ct[3] ^ skey->saferp.K[skey->saferp.rounds*2][3];
412 b[4] = ct[4] ^ skey->saferp.K[skey->saferp.rounds*2][4];
413 b[5] = (ct[5] - skey->saferp.K[skey->saferp.rounds*2][5]) & 255;
414 b[6] = (ct[6] - skey->saferp.K[skey->saferp.rounds*2][6]) & 255;
415 b[7] = ct[7] ^ skey->saferp.K[skey->saferp.rounds*2][7];
416 b[8] = ct[8] ^ skey->saferp.K[skey->saferp.rounds*2][8];
417 b[9] = (ct[9] - skey->saferp.K[skey->saferp.rounds*2][9]) & 255;
418 b[10] = (ct[10] - skey->saferp.K[skey->saferp.rounds*2][10]) & 255;
419 b[11] = ct[11] ^ skey->saferp.K[skey->saferp.rounds*2][11];
420 b[12] = ct[12] ^ skey->saferp.K[skey->saferp.rounds*2][12];
421 b[13] = (ct[13] - skey->saferp.K[skey->saferp.rounds*2][13]) & 255;
422 b[14] = (ct[14] - skey->saferp.K[skey->saferp.rounds*2][14]) & 255;
423 b[15] = ct[15] ^ skey->saferp.K[skey->saferp.rounds*2][15];
425 if (skey->saferp.rounds > 12) {
432 if (skey->saferp.rounds > 8) {