Lines Matching refs:twofish
280 #define S1 skey->twofish.S[0]
281 #define S2 skey->twofish.S[1]
282 #define S3 skey->twofish.S[2]
283 #define S4 skey->twofish.S[3]
303 z = key->twofish.start; in _g_func()
313 g = g ^ key->twofish.S[4*i++ + y]; in _g_func()
385 rs_mult(M+(x*8), skey->twofish.S+(x*4)); in _twofish_setup()
407 skey->twofish.K[x+x] = (A + B) & 0xFFFFFFFFUL; in _twofish_setup()
410 skey->twofish.K[x+x+1] = ROLc(B + B + A, 9); in _twofish_setup()
419 skey->twofish.S[0][x] = mds_column_mult(sbox(1, (sbox(0, tmpx0 ^ S[0]) ^ S[4])),0); in _twofish_setup()
420 skey->twofish.S[1][x] = mds_column_mult(sbox(0, (sbox(0, tmpx1 ^ S[1]) ^ S[5])),1); in _twofish_setup()
421 skey->twofish.S[2][x] = mds_column_mult(sbox(1, (sbox(1, tmpx0 ^ S[2]) ^ S[6])),2); in _twofish_setup()
422 skey->twofish.S[3][x] = mds_column_mult(sbox(0, (sbox(1, tmpx1 ^ S[3]) ^ S[7])),3); in _twofish_setup()
428 …skey->twofish.S[0][x] = mds_column_mult(sbox(1, (sbox(0, sbox(0, tmpx1 ^ S[0]) ^ S[4]) ^ S[8])),0); in _twofish_setup()
429 …skey->twofish.S[1][x] = mds_column_mult(sbox(0, (sbox(0, sbox(1, tmpx1 ^ S[1]) ^ S[5]) ^ S[9])),1); in _twofish_setup()
430 …skey->twofish.S[2][x] = mds_column_mult(sbox(1, (sbox(1, sbox(0, tmpx0 ^ S[2]) ^ S[6]) ^ S[10])),2… in _twofish_setup()
431 …skey->twofish.S[3][x] = mds_column_mult(sbox(0, (sbox(1, sbox(1, tmpx0 ^ S[3]) ^ S[7]) ^ S[11])),3… in _twofish_setup()
437 …skey->twofish.S[0][x] = mds_column_mult(sbox(1, (sbox(0, sbox(0, sbox(1, tmpx1 ^ S[0]) ^ S[4]) ^ S… in _twofish_setup()
438 …skey->twofish.S[1][x] = mds_column_mult(sbox(0, (sbox(0, sbox(1, sbox(1, tmpx0 ^ S[1]) ^ S[5]) ^ S… in _twofish_setup()
439 …skey->twofish.S[2][x] = mds_column_mult(sbox(1, (sbox(1, sbox(0, sbox(0, tmpx0 ^ S[2]) ^ S[6]) ^ S… in _twofish_setup()
440 …skey->twofish.S[3][x] = mds_column_mult(sbox(0, (sbox(1, sbox(1, sbox(0, tmpx1 ^ S[3]) ^ S[7]) ^ S… in _twofish_setup()
447 case 4 : skey->twofish.start = 0; break; in _twofish_setup()
448 case 3 : skey->twofish.start = 1; break; in _twofish_setup()
449 default: skey->twofish.start = 2; break; in _twofish_setup()
489 S1 = skey->twofish.S[0]; in _twofish_ecb_encrypt()
490 S2 = skey->twofish.S[1]; in _twofish_ecb_encrypt()
491 S3 = skey->twofish.S[2]; in _twofish_ecb_encrypt()
492 S4 = skey->twofish.S[3]; in _twofish_ecb_encrypt()
497 a ^= skey->twofish.K[0]; in _twofish_ecb_encrypt()
498 b ^= skey->twofish.K[1]; in _twofish_ecb_encrypt()
499 c ^= skey->twofish.K[2]; in _twofish_ecb_encrypt()
500 d ^= skey->twofish.K[3]; in _twofish_ecb_encrypt()
502 k = skey->twofish.K + 8; in _twofish_ecb_encrypt()
517 ta = c ^ skey->twofish.K[4]; in _twofish_ecb_encrypt()
518 tb = d ^ skey->twofish.K[5]; in _twofish_ecb_encrypt()
519 tc = a ^ skey->twofish.K[6]; in _twofish_ecb_encrypt()
520 td = b ^ skey->twofish.K[7]; in _twofish_ecb_encrypt()
562 S1 = skey->twofish.S[0]; in _twofish_ecb_decrypt()
563 S2 = skey->twofish.S[1]; in _twofish_ecb_decrypt()
564 S3 = skey->twofish.S[2]; in _twofish_ecb_decrypt()
565 S4 = skey->twofish.S[3]; in _twofish_ecb_decrypt()
573 a = tc ^ skey->twofish.K[6]; in _twofish_ecb_decrypt()
574 b = td ^ skey->twofish.K[7]; in _twofish_ecb_decrypt()
575 c = ta ^ skey->twofish.K[4]; in _twofish_ecb_decrypt()
576 d = tb ^ skey->twofish.K[5]; in _twofish_ecb_decrypt()
578 k = skey->twofish.K + 36; in _twofish_ecb_decrypt()
593 a ^= skey->twofish.K[0]; in _twofish_ecb_decrypt()
594 b ^= skey->twofish.K[1]; in _twofish_ecb_decrypt()
595 c ^= skey->twofish.K[2]; in _twofish_ecb_decrypt()
596 d ^= skey->twofish.K[3]; in _twofish_ecb_decrypt()