diff options
Diffstat (limited to 'twofish.c')
-rw-r--r-- | twofish.c | 22 |
1 files changed, 11 insertions, 11 deletions
@@ -9,7 +9,7 @@ * Ported to CryptoAPI by Colin Slater <hoho@tacomeat.net> * * The original author has disclaimed all copyright interest in this - * code and thus put it in the public domain. The subsequent authors + * code and thus put it in the public domain. The subsequent authors * have put this under the GNU General Public License. * * This program is free software; you can redistribute it and/or modify @@ -21,7 +21,7 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 @@ -629,7 +629,7 @@ static const u8 calc_sb_tbl[512] = { /* Perform the key setup. */ int twofish_setkey(void *cx, const u8 *key, unsigned int key_len, u32 *flags) { - + struct twofish_ctx *ctx = cx; int i, j, k; @@ -788,7 +788,7 @@ void twofish_encrypt(void *cx, u8 *out, const u8 *in) /* The four 32-bit chunks of the text. */ u32 a, b, c, d; - + /* Temporaries used by the round function. */ u32 x, y; @@ -797,7 +797,7 @@ void twofish_encrypt(void *cx, u8 *out, const u8 *in) INPACK (1, b, 1); INPACK (2, c, 2); INPACK (3, d, 3); - + /* Encryption Feistel cycles. */ ENCCYCLE (0); ENCCYCLE (1); @@ -807,32 +807,32 @@ void twofish_encrypt(void *cx, u8 *out, const u8 *in) ENCCYCLE (5); ENCCYCLE (6); ENCCYCLE (7); - + /* Output whitening and unpacking. */ OUTUNPACK (0, c, 4); OUTUNPACK (1, d, 5); OUTUNPACK (2, a, 6); OUTUNPACK (3, b, 7); - + } /* Decrypt one block. in and out may be the same. */ void twofish_decrypt(void *cx, u8 *out, const u8 *in) { struct twofish_ctx *ctx = cx; - + /* The four 32-bit chunks of the text. */ u32 a, b, c, d; - + /* Temporaries used by the round function. */ u32 x, y; - + /* Input whitening and packing. */ INPACK (0, c, 4); INPACK (1, d, 5); INPACK (2, a, 6); INPACK (3, b, 7); - + /* Encryption Feistel cycles. */ DECCYCLE (7); DECCYCLE (6); |