--- Crypt-Twofish2/aes.h 2010/12/01 02:12:30 1.2 +++ Crypt-Twofish2/aes.h 2021/08/01 12:32:14 1.3 @@ -12,7 +12,7 @@ This sample is to assist implementers developing to the Cryptographic API Profile for AES Candidate Algorithm Submissions. Please consult this document as a cross-reference. - + ANY CHANGES, WHERE APPROPRIATE, TO INFORMATION PROVIDED IN THIS FILE MUST BE DOCUMENTED. CHANGES ARE ONLY APPROPRIATE WHERE SPECIFIED WITH THE STRING "CHANGE POSSIBLE". FUNCTION CALLS AND THEIR PARAMETERS @@ -78,7 +78,7 @@ typedef DWORD fullSbox[4][256]; /* The structure for key information */ -typedef struct +typedef struct { BYTE direction; /* Key used for encrypting or decrypting? */ #if ALIGN32 @@ -108,7 +108,7 @@ } keyInstance; /* The structure for cipher information */ -typedef struct +typedef struct { BYTE mode; /* MODE_ECB, MODE_CBC, or MODE_CFB1 */ #if ALIGN32 @@ -167,7 +167,7 @@ keyInstance state, use a 'dummy' call to makeKey(); i.e., set the keyMaterial parameter to NULL. Then use reKey() for all key changes. Similarly, cipherInit takes an IV string in ASCII hex, so a dummy setup -call with a null IV string will skip the ASCII parse. +call with a null IV string will skip the ASCII parse. Note that CFB mode is not well tested nor defined by AES, so using the Twofish MODE_CFB it not recommended. If you wish to implement a CFB mode, @@ -208,7 +208,7 @@ return 1; /* 'dummy' setup for a 128-bit key */ if (cipherInit(&ci,mode,NULL) != TRUE) return 1; /* 'dummy' setup for cipher */ - + for (i=0;i