Lines Matching refs:blowfish
12 @file blowfish.c
13 Implementation of the Blowfish block cipher, Tom St Denis
17 #ifdef BLOWFISH
21 "blowfish",
301 Initialize the Blowfish block cipher
336 skey->blowfish.K[x] = ORIG_P[x] ^ A;
342 skey->blowfish.S[x][y] = ORIG_S[x][y];
355 LOAD32H(skey->blowfish.K[x], &B[0]);
356 LOAD32H(skey->blowfish.K[x+1], &B[4]);
365 LOAD32H(skey->blowfish.S[x][y], &B[0]);
366 LOAD32H(skey->blowfish.S[x][y+1], &B[4]);
380 #define F(x) ((skey->blowfish.S[0][byte(x,3)] + skey->blowfish.S[1][byte(x,2)]) ^ skey->blowfish.S[2][byte(x,1)]) + skey->blowfish.S[3][byte(x,0)]
384 Encrypts a block of text with Blowfish
407 S1 = skey->blowfish.S[0];
408 S2 = skey->blowfish.S[1];
409 S3 = skey->blowfish.S[2];
410 S4 = skey->blowfish.S[3];
419 L ^= skey->blowfish.K[r++]; R ^= F(L);
420 R ^= skey->blowfish.K[r++]; L ^= F(R);
421 L ^= skey->blowfish.K[r++]; R ^= F(L);
422 R ^= skey->blowfish.K[r++]; L ^= F(R);
426 R ^= skey->blowfish.K[17];
427 L ^= skey->blowfish.K[16];
446 Decrypts a block of text with Blowfish
469 S1 = skey->blowfish.S[0];
470 S2 = skey->blowfish.S[1];
471 S3 = skey->blowfish.S[2];
472 S4 = skey->blowfish.S[3];
480 R ^= skey->blowfish.K[17];
481 L ^= skey->blowfish.K[16];
485 L ^= F(R); R ^= skey->blowfish.K[r--];
486 R ^= F(L); L ^= skey->blowfish.K[r--];
487 L ^= F(R); R ^= skey->blowfish.K[r--];
488 R ^= F(L); L ^= skey->blowfish.K[r--];
508 Performs a self-test of the Blowfish block cipher
592 /* $Source: /cvs/libtom/libtomcrypt/src/ciphers/blowfish.c,v $ */