comparison src/ciphers/twofish/twofish.c @ 209:39d5d58461d6 libtomcrypt-orig LTC_1.05

Import of libtomcrypt 1.05
author Matt Johnston <matt@ucc.asn.au>
date Wed, 06 Jul 2005 03:53:40 +0000
parents 1c15b283127b
children 4768b55c5240
comparison
equal deleted inserted replaced
191:1c15b283127b 209:39d5d58461d6
574 t1 = g_func(c, skey) + t2; 574 t1 = g_func(c, skey) + t2;
575 a = ROLc(a, 1) ^ (t1 + k[2]); 575 a = ROLc(a, 1) ^ (t1 + k[2]);
576 b = RORc(b ^ (t2 + t1 + k[3]), 1); 576 b = RORc(b ^ (t2 + t1 + k[3]), 1);
577 577
578 t2 = g1_func(b, skey); 578 t2 = g1_func(b, skey);
579 t1 = g_func(a, key) + t2; 579 t1 = g_func(a, skey) + t2;
580 c = ROLc(c, 1) ^ (t1 + k[0]); 580 c = ROLc(c, 1) ^ (t1 + k[0]);
581 d = RORc(d ^ (t2 + t1 + k[1]), 1); 581 d = RORc(d ^ (t2 + t1 + k[1]), 1);
582 k -= 4; 582 k -= 4;
583 } 583 }
584 584
698 698
699 #endif 699 #endif
700 700
701 701
702 702
703
704 /* $Source: /cvs/libtom/libtomcrypt/src/ciphers/twofish/twofish.c,v $ */
705 /* $Revision: 1.8 $ */
706 /* $Date: 2005/05/05 14:35:58 $ */