Mercurial > dropbear
comparison src/ciphers/twofish/twofish.c @ 195:19e5d79b7190 libtomcrypt
Cleanup of import of LTC 1.02, still problematic for Dropbear
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Mon, 09 May 2005 09:33:00 +0000 |
parents | 9cc34777b479 |
children | 4768b55c5240 |
comparison
equal
deleted
inserted
replaced
192:9cc34777b479 | 195:19e5d79b7190 |
---|---|
576 t1 = g_func(c, skey) + t2; | 576 t1 = g_func(c, skey) + t2; |
577 a = ROLc(a, 1) ^ (t1 + k[2]); | 577 a = ROLc(a, 1) ^ (t1 + k[2]); |
578 b = RORc(b ^ (t2 + t1 + k[3]), 1); | 578 b = RORc(b ^ (t2 + t1 + k[3]), 1); |
579 | 579 |
580 t2 = g1_func(b, skey); | 580 t2 = g1_func(b, skey); |
581 t1 = g_func(a, key) + t2; | 581 t1 = g_func(a, skey) + t2; |
582 c = ROLc(c, 1) ^ (t1 + k[0]); | 582 c = ROLc(c, 1) ^ (t1 + k[0]); |
583 d = RORc(d ^ (t2 + t1 + k[1]), 1); | 583 d = RORc(d ^ (t2 + t1 + k[1]), 1); |
584 k -= 4; | 584 k -= 4; |
585 } | 585 } |
586 | 586 |