diff options
author | Werner Koch <wk@gnupg.org> | 2016-03-18 18:57:19 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2016-03-18 18:57:19 +0100 |
commit | 897ccd21b7221982806b5c024518f4e989152f14 (patch) | |
tree | 14eb21b32255c176e1cdfad843fe35edf0471eac /cipher/cipher-ccm.c | |
parent | 9ecc2690181ba0bb44f66451a7dce2fc19965793 (diff) | |
download | libgcrypt-897ccd21b7221982806b5c024518f4e989152f14.tar.gz |
Always require a 64 bit integer type
* configure.ac (available_digests_64): Merge with available_digests.
(available_kdfs_64): Merge with available_kdfs.
<64 bit datatype test>: Bail out if no such type is available.
* src/types.h: Emit #error if no u64 can be defined.
(PROPERLY_ALIGNED_TYPE): Always add u64 type.
* cipher/bithelp.h: Remove all code paths which handle the
case of !HAVE_U64_TYPEDEF.
* cipher/bufhelp.h: Ditto.
* cipher/cipher-ccm.c: Ditto.
* cipher/cipher-gcm.c: Ditto.
* cipher/cipher-internal.h: Ditto.
* cipher/cipher.c: Ditto.
* cipher/hash-common.h: Ditto.
* cipher/md.c: Ditto.
* cipher/poly1305.c: Ditto.
* cipher/scrypt.c: Ditto.
* cipher/tiger.c: Ditto.
* src/g10lib.h: Ditto.
* tests/basic.c: Ditto.
* tests/bench-slope.c: Ditto.
* tests/benchmark.c: Ditto.
--
Given that SHA-2 and some other algorithms require a 64 bit type it
does not make anymore sense to conditionally compile some part when
the platform does not provide such a type.
GnuPG-bug-id: 1815.
Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'cipher/cipher-ccm.c')
-rw-r--r-- | cipher/cipher-ccm.c | 78 |
1 files changed, 0 insertions, 78 deletions
diff --git a/cipher/cipher-ccm.c b/cipher/cipher-ccm.c index 3d5f2209..4d8f8167 100644 --- a/cipher/cipher-ccm.c +++ b/cipher/cipher-ccm.c @@ -28,9 +28,6 @@ #include "bufhelp.h" #include "./cipher-internal.h" -/* We need a 64 bit type for this code. */ -#ifdef HAVE_U64_TYPEDEF - #define set_burn(burn, nburn) do { \ unsigned int __nburn = (nburn); \ @@ -364,78 +361,3 @@ _gcry_cipher_ccm_decrypt (gcry_cipher_hd_t c, unsigned char *outbuf, return err; } - -#else - -/* - * Provide dummy functions so that we avoid adding too much #ifdefs in - * cipher.c. - */ - -gcry_err_code_t -_gcry_cipher_ccm_encrypt(gcry_cipher_hd_t c, unsigned char *outbuf, - size_t outbuflen, const unsigned char *inbuf, - size_t inbuflen) -{ - (void)c; - (void)outbuf; - (void)outbuflen; - (void)inbuf; - (void)inbuflen; - return GPG_ERR_NOT_SUPPORTED; -} - -gcry_err_code_t -_gcry_cipher_ccm_decrypt(gcry_cipher_hd_t c, unsigned char *outbuf, - size_t outbuflen, const unsigned char *inbuf, - size_t inbuflen) -{ - (void)c; - (void)outbuf; - (void)outbuflen; - (void)inbuf; - (void)inbuflen; - return GPG_ERR_NOT_SUPPORTED; -} - -gcry_err_code_t -_gcry_cipher_ccm_set_nonce(gcry_cipher_hd_t c, const unsigned char *nonce, - size_t noncelen) -{ - (void)c; - (void)nonce; - (void)noncelen; - return GPG_ERR_NOT_SUPPORTED; -} - -gcry_err_code_t -_gcry_cipher_ccm_authenticate(gcry_cipher_hd_t c, const unsigned char *abuf, - size_t abuflen) -{ - (void)c; - (void)abuf; - (void)abuflen; - return GPG_ERR_NOT_SUPPORTED; -} - -gcry_err_code_t -_gcry_cipher_ccm_get_tag(gcry_cipher_hd_t c, unsigned char *outtag, - size_t taglen) -{ - (void)c; - (void)outtag; - (void)taglen; - return GPG_ERR_NOT_SUPPORTED; -} - -gcry_err_code_t -_gcry_cipher_ccm_check_tag(gcry_cipher_hd_t c, const unsigned char *intag, - size_t taglen) -{ - (void)c; - (void)intag; - (void)taglen; - return GPG_ERR_NOT_SUPPORTED; -} - -#endif /*HAVE_U64_TYPEDEF*/ |