www.pudn.com > LOKI97jiamijiemi.rar > loki97.c
/* * Implements the LOKI97 block cipher.* * LOKI97 is a 128-bit symmetric block cipher with a 256-bit key schedule, * which may be initialised from 128, 192, or 256-bit keys. It uses 16 rounds * of data computation using a balanced feistel network with a complex * function f which incorporates two S-P layers. The 256-bit key schedule * uses 33 rounds of an unbalanced feistel network using the same complex * function f to generate the subkeys.
* * LOKI97 was written by Lawrie Brown (ADFA), Josef Pieprzyk, and Jennifer * Seberry (UOW) in 1997.
* * Copyright © 1998 by * Lawrie Brown & ITRACE (UNSW) * *
All rights reserved.* * Author: Lawrie Brown * * code derived from LOKI97 java implementation by Lawrie Brown & Raif Naffah */ /* include standard AES C header file */ #include "loki97.h" /* Global defines and variables */ #define NAME "LOKI97" #define DEBUG 0 /* * Debug diagnostics. Valid values of symbolic constant DEBUG:
* * Values are: