diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/ChangeLog | 4 | ||||
-rw-r--r-- | include/cipher.h | 3 | ||||
-rw-r--r-- | include/mpi.h | 24 |
3 files changed, 26 insertions, 5 deletions
diff --git a/include/ChangeLog b/include/ChangeLog index ed61159fe..7f6d87f80 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,7 @@ +2000-10-12 Werner Koch <[email protected]> + + * mpi.h: Changed the way mpi_limb_t is defined. + Wed Sep 6 17:55:47 CEST 2000 Werner Koch <[email protected]> * iobuf.c (IOBUF_FILELENGTH_LIMIT): New. diff --git a/include/cipher.h b/include/cipher.h index bf2010fe0..8299e0438 100644 --- a/include/cipher.h +++ b/include/cipher.h @@ -33,6 +33,9 @@ #define CIPHER_ALGO_BLOWFISH 4 /* blowfish 128 bit key */ #define CIPHER_ALGO_SAFER_SK128 5 #define CIPHER_ALGO_DES_SK 6 +#define CIPHER_ALGO_RIJNDAEL 7 +#define CIPHER_ALGO_RIJNDAEL192 8 +#define CIPHER_ALGO_RIJNDAEL256 9 #define CIPHER_ALGO_TWOFISH 10 /* twofish 256 bit */ #define CIPHER_ALGO_SKIPJACK 101 /* experimental: skipjack */ #define CIPHER_ALGO_TWOFISH_OLD 102 /* experimental: twofish 128 bit */ diff --git a/include/mpi.h b/include/mpi.h index 2293af8fd..77e6c48ca 100644 --- a/include/mpi.h +++ b/include/mpi.h @@ -29,20 +29,34 @@ #ifndef G10_MPI_H #define G10_MPI_H +#include <config.h> #include <stdio.h> #include "iobuf.h" #include "types.h" #include "memory.h" +#include "../mpi/mpi-asm-defs.h" + +#if BYTES_PER_MPI_LIMB == SIZEOF_UNSIGNED_INT + typedef unsigned int mpi_limb_t; + typedef signed int mpi_limb_signed_t; +#elif BYTES_PER_MPI_LIMB == SIZEOF_UNSIGNED_LONG + typedef unsigned long int mpi_limb_t; + typedef signed long int mpi_limb_signed_t; +#elif BYTES_PER_MPI_LIMB == SIZEOF_UNSIGNED_LONG_LONG + typedef unsigned long long int mpi_limb_t; + typedef signed long long int mpi_limb_signed_t; +#elif BYTES_PER_MPI_LIMB == SIZEOF_UNSIGNED_SHORT + typedef unsigned short int mpi_limb_t; + typedef signed short int mpi_limb_signed_t; +#else + #error BYTES_PER_MPI_LIMB does not match any C type +#endif +#define BITS_PER_MPI_LIMB (8*BYTES_PER_MPI_LIMB) #define DBG_MPI mpi_debug_mode int mpi_debug_mode; -#define BITS_PER_MPI_LIMB (8*SIZEOF_UNSIGNED_LONG) -#define BYTES_PER_MPI_LIMB SIZEOF_UNSIGNED_LONG -typedef unsigned long int mpi_limb_t; -typedef signed long int mpi_limb_signed_t; - struct gcry_mpi { int alloced; /* array size (# of allocated limbs) */ int nlimbs; /* number of valid limbs */ |