diff options
| author | Ken Raeburn <raeburn@mit.edu> | 2005-04-13 20:19:31 +0000 |
|---|---|---|
| committer | Ken Raeburn <raeburn@mit.edu> | 2005-04-13 20:19:31 +0000 |
| commit | f0b00252909f0db54226a30f57a2d44b4d79a1e7 (patch) | |
| tree | 7753ccad346e35488ae6b7dfb661cc5e7b4a5012 /src/lib | |
| parent | c473839ae11613c4af2494281f2aef658fb3d627 (diff) | |
| download | krb5-f0b00252909f0db54226a30f57a2d44b4d79a1e7.tar.gz krb5-f0b00252909f0db54226a30f57a2d44b4d79a1e7.tar.xz krb5-f0b00252909f0db54226a30f57a2d44b4d79a1e7.zip | |
* aesopt.h: On PalmOS, include FloatMgr.h to get endianness flag.
(ENC_UNROLL, DEC_UNROLL, ENC_ROUND, LAST_ENC_ROUND, DEC_ROUND, LAST_DEC_ROUND,
KEY_SCHED): If CONFIG_SMALL is defined, set to NONE or NO_TABLES as
appropriate.
(Latter change drops about 40K -- over 85% -- from AES code/table size in
shared libraries on x86/glibc/gcc.)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17182 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/crypto/aes/ChangeLog | 5 | ||||
| -rw-r--r-- | src/lib/crypto/aes/aesopt.h | 16 |
2 files changed, 14 insertions, 7 deletions
diff --git a/src/lib/crypto/aes/ChangeLog b/src/lib/crypto/aes/ChangeLog index 047ab0bae..2438b62f3 100644 --- a/src/lib/crypto/aes/ChangeLog +++ b/src/lib/crypto/aes/ChangeLog @@ -1,5 +1,10 @@ 2005-04-13 Ken Raeburn <raeburn@mit.edu> + * aesopt.h: On PalmOS, include FloatMgr.h to get endianness flag. + (ENC_UNROLL, DEC_UNROLL, ENC_ROUND, LAST_ENC_ROUND, DEC_ROUND, + LAST_DEC_ROUND, KEY_SCHED): If CONFIG_SMALL is defined, set to + NONE or NO_TABLES as appropriate. + * aes_s2k.c (krb5int_aes_string_to_key): Widen bytes of iteration count before shifting. diff --git a/src/lib/crypto/aes/aesopt.h b/src/lib/crypto/aes/aesopt.h index 0eebd46ae..1bb7529ed 100644 --- a/src/lib/crypto/aes/aesopt.h +++ b/src/lib/crypto/aes/aesopt.h @@ -176,6 +176,8 @@ # endif #elif defined(_MSC_VER) # include <stdlib.h> +#elif defined(__m68k__) && defined(__palmos__) +# include <FloatMgr.h> /* defines BIG_ENDIAN */ #elif defined(_MIPSEB) # define PLATFORM_BYTE_ORDER AES_BIG_ENDIAN #elif defined(_MIPSEL) @@ -367,7 +369,7 @@ unrolling. The following options allow partial or full loop unrolling to be set independently for encryption and decryption */ -#if 1 +#if !defined(CONFIG_SMALL) #define ENC_UNROLL FULL #elif 0 #define ENC_UNROLL PARTIAL @@ -375,7 +377,7 @@ #define ENC_UNROLL NONE #endif -#if 1 +#if !defined(CONFIG_SMALL) #define DEC_UNROLL FULL #elif 0 #define DEC_UNROLL PARTIAL @@ -460,7 +462,7 @@ of tables used by this implementation. */ -#if 1 /* set tables for the normal encryption round */ +#if !defined(CONFIG_SMALL) /* set tables for the normal encryption round */ #define ENC_ROUND FOUR_TABLES #elif 0 #define ENC_ROUND ONE_TABLE @@ -468,7 +470,7 @@ #define ENC_ROUND NO_TABLES #endif -#if 1 /* set tables for the last encryption round */ +#if !defined(CONFIG_SMALL) /* set tables for the last encryption round */ #define LAST_ENC_ROUND FOUR_TABLES #elif 0 #define LAST_ENC_ROUND ONE_TABLE @@ -476,7 +478,7 @@ #define LAST_ENC_ROUND NO_TABLES #endif -#if 1 /* set tables for the normal decryption round */ +#if !defined(CONFIG_SMALL) /* set tables for the normal decryption round */ #define DEC_ROUND FOUR_TABLES #elif 0 #define DEC_ROUND ONE_TABLE @@ -484,7 +486,7 @@ #define DEC_ROUND NO_TABLES #endif -#if 1 /* set tables for the last decryption round */ +#if !defined(CONFIG_SMALL) /* set tables for the last decryption round */ #define LAST_DEC_ROUND FOUR_TABLES #elif 0 #define LAST_DEC_ROUND ONE_TABLE @@ -496,7 +498,7 @@ way that the round functions can. Include or exclude the following defines to set this requirement. */ -#if 1 +#if !defined(CONFIG_SMALL) #define KEY_SCHED FOUR_TABLES #elif 0 #define KEY_SCHED ONE_TABLE |
