config.h.
Rev: src/nettle/ChangeLog:1.195
Rev: src/nettle/aes-decrypt-table.c:1.4
Rev: src/nettle/aes-decrypt.c:1.5
Rev: src/nettle/aes-encrypt-table.c:1.4
Rev: src/nettle/aes-encrypt.c:1.5
Rev: src/nettle/aes-meta.c:1.3
Rev: src/nettle/aes-set-decrypt-key.c:1.2
Rev: src/nettle/aes-set-encrypt-key.c:1.2
Rev: src/nettle/aes.c:1.12
Rev: src/nettle/aesdata.c:1.2
Rev: src/nettle/arcfour-meta.c:1.2
Rev: src/nettle/arcfour.c:1.3
Rev: src/nettle/base16-decode.c:1.2
Rev: src/nettle/base16-encode.c:1.2
Rev: src/nettle/base16-meta.c:1.3
Rev: src/nettle/base64-decode.c:1.5
Rev: src/nettle/base64-encode.c:1.3
Rev: src/nettle/base64-meta.c:1.4
Rev: src/nettle/bignum-random.c:1.3
Rev: src/nettle/bignum.c:1.7
Rev: src/nettle/blowfish.c:1.4
Rev: src/nettle/buffer-init.c:1.3
Rev: src/nettle/buffer.c:1.8
Rev: src/nettle/cast128-meta.c:1.3
Rev: src/nettle/cast128.c:1.4
Rev: src/nettle/cbc.c:1.6
Rev: src/nettle/des-compat.c:1.10
Rev: src/nettle/des.c:1.7
Rev: src/nettle/des3.c:1.2
Rev: src/nettle/dsa-keygen.c:1.6
Rev: src/nettle/dsa-sign.c:1.7
Rev: src/nettle/dsa-verify.c:1.4
Rev: src/nettle/dsa.c:1.5
Rev: src/nettle/examples/io.c:1.4
Rev: src/nettle/examples/nettle-benchmark.c:1.8
Rev: src/nettle/examples/nettle-openssl.c:1.2
Rev: src/nettle/examples/rsa-keygen.c:1.10
Rev: src/nettle/examples/rsa-sign.c:1.5
Rev: src/nettle/examples/rsa-verify.c:1.4
Rev: src/nettle/hmac-md5.c:1.5
Rev: src/nettle/hmac-sha1.c:1.2
Rev: src/nettle/hmac-sha256.c:1.2
Rev: src/nettle/hmac.c:1.4
Rev: src/nettle/knuth-lfib.c:1.2
Rev: src/nettle/md5-compat.c:1.3
Rev: src/nettle/md5-meta.c:1.2
Rev: src/nettle/md5.c:1.6
Rev: src/nettle/memxor.c:1.2
Rev: src/nettle/nettle-internal.c:1.3
Rev: src/nettle/pgp-encode.c:1.4
Rev: src/nettle/pkcs1-rsa-md5.c:1.2
Rev: src/nettle/pkcs1-rsa-sha1.c:1.2
Rev: src/nettle/pkcs1.c:1.2
Rev: src/nettle/realloc.c:1.3
Rev: src/nettle/rsa-compat.c:1.8
Rev: src/nettle/rsa-decrypt.c:1.4
Rev: src/nettle/rsa-encrypt.c:1.5
Rev: src/nettle/rsa-keygen.c:1.5
Rev: src/nettle/rsa-md5-sign.c:1.2
Rev: src/nettle/rsa-md5-verify.c:1.2
Rev: src/nettle/rsa-sha1-sign.c:1.2
Rev: src/nettle/rsa-sha1-verify.c:1.2
Rev: src/nettle/rsa-sign.c:1.3
Rev: src/nettle/rsa-verify.c:1.2
Rev: src/nettle/rsa.c:1.12
Rev: src/nettle/rsa2openpgp.c:1.2
Rev: src/nettle/rsa2sexp.c:1.7
Rev: src/nettle/serpent-meta.c:1.2
Rev: src/nettle/serpent.c:1.4
Rev: src/nettle/sexp-format.c:1.9
Rev: src/nettle/sexp-transport-format.c:1.2
Rev: src/nettle/sexp-transport.c:1.4
Rev: src/nettle/sexp.c:1.14
Rev: src/nettle/sexp2bignum.c:1.5
Rev: src/nettle/sexp2dsa.c:1.4
Rev: src/nettle/sexp2rsa.c:1.11
Rev: src/nettle/sha1-meta.c:1.2
Rev: src/nettle/sha1.c:1.8
Rev: src/nettle/sha256-meta.c:1.2
Rev: src/nettle/sha256.c:1.3
Rev: src/nettle/tools/input.c:1.2
Rev: src/nettle/tools/misc.c:1.2
Rev: src/nettle/tools/output.c:1.3
Rev: src/nettle/tools/parse.c:1.2
Rev: src/nettle/tools/sexp-conv.c:1.14
Rev: src/nettle/twofish-meta.c:1.2
Rev: src/nettle/twofish.c:1.6
Rev: src/nettle/yarrow256.c:1.17
Rev: src/nettle/yarrow_key_event.c:1.4
+2003-05-12 Niels Möller <nisse@cuckoo.hack.org>
+
+ * Reordered includes in most or all .c-files. All should now
+ include config.h.
+
2003-05-12 Niels Möller <niels@s3.kth.se>
* configure.ac: Use LSH_FUNC_ALLOCA.
* MA 02111-1307, USA.
*/
+#if HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include "aes-internal.h"
const struct aes_table
* MA 02111-1307, USA.
*/
-#include "aes-internal.h"
+#if HAVE_CONFIG_H
+# include "config.h"
+#endif
#include <assert.h>
+#include "aes-internal.h"
+
void
aes_decrypt(struct aes_ctx *ctx,
unsigned length, uint8_t *dst,
* MA 02111-1307, USA.
*/
+#if HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include "aes-internal.h"
/* Tables are assembled using little-endian byte order, including the
* MA 02111-1307, USA.
*/
-#include "aes-internal.h"
+#if HAVE_CONFIG_H
+# include "config.h"
+#endif
#include <assert.h>
+#include "aes-internal.h"
+
/* On my sparc, encryption is significantly slower than decryption,
* even though the *only* difference is which table is passed to _aes_crypt.
*
* MA 02111-1307, USA.
*/
+#if HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include "nettle-meta.h"
#include "aes.h"
/* Originally written by Rafael R. Sevilla <dido@pacific.net.ph> */
+#if HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include "aes-internal.h"
-/* Tables for comoutations in the AES GF2 field. */
+/* Tables for computations in the AES GF2 field. */
static const uint8_t log[0x100] =
{
0x00,0x00,0x19,0x01,0x32,0x02,0x1a,0xc6,
/* Originally written by Rafael R. Sevilla <dido@pacific.net.ph> */
-#include "aes-internal.h"
+#if HAVE_CONFIG_H
+# include "config.h"
+#endif
#include <assert.h>
+#include "aes-internal.h"
+
/* Tables for comoutations in the AES GF2 field. */
static const uint8_t log[0x100] =
{
/* Originally written by Rafael R. Sevilla <dido@pacific.net.ph> */
+#if HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <assert.h>
+
#include "aes-internal.h"
#include "macros.h"
-#include <assert.h>
-
#ifndef AES_DEBUG
# define AES_DEBUG 0
#endif
+#if HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <assert.h>
#include <inttypes.h>
#include <stdlib.h>
return x;
}
-/* Computes the expoenntiatiom and logarithm tables for GF_2, to the
+/* Computes the exponentiatiom and logarithm tables for GF_2, to the
* base x+1 (0x03). The unit element is 1 (0x01).*/
static void
compute_log(void)
* MA 02111-1307, USA.
*/
+#if HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include "nettle-meta.h"
#include "arcfour.h"
* MA 02111-1307, USA.
*/
-#include "arcfour.h"
+#if HAVE_CONFIG_H
+# include "config.h"
+#endif
#include <assert.h>
+#include "arcfour.h"
+
#define SWAP(a,b) do { int _t = a; a = b; b = _t; } while(0)
void
* MA 02111-1307, USA.
*/
-#include "base16.h"
+#if HAVE_CONFIG_H
+# include "config.h"
+#endif
#include <assert.h>
#include <stdlib.h>
+#include "base16.h"
+
void
base16_decode_init(struct base16_decode_ctx *ctx)
{
* MA 02111-1307, USA.
*/
+#if HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include "base16.h"
* MA 02111-1307, USA.
*/
+#if HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include "nettle-meta.h"
#include "base16.h"
* MA 02111-1307, USA.
*/
-#include "base64.h"
+#if HAVE_CONFIG_H
+# include "config.h"
+#endif
#include <assert.h>
#include <stdlib.h>
+#include "base64.h"
+
#define TABLE_INVALID -1
#define TABLE_SPACE -2
#define TABLE_END -3
* MA 02111-1307, USA.
*/
-#include "base64.h"
+#if HAVE_CONFIG_H
+# include "config.h"
+#endif
#include <assert.h>
#include <stdlib.h>
+#include "base64.h"
static const uint8_t encode_table[64] =
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
* MA 02111-1307, USA.
*/
+#if HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include "nettle-meta.h"
#include "base64.h"
*/
#if HAVE_CONFIG_H
-#include "config.h"
+# include "config.h"
#endif
#if HAVE_LIBGMP
-#include "bignum.h"
-
#include <stdlib.h>
+#include "bignum.h"
+
void
nettle_mpz_random_size(mpz_t x,
void *ctx, nettle_random_func random,
*/
#if HAVE_CONFIG_H
-#include "config.h"
+# include "config.h"
#endif
#if HAVE_LIBGMP
-#include "bignum.h"
-
#include <assert.h>
#include <string.h>
+#include "bignum.h"
+
/* Two's complement negation means that -x = ~x + 1, ~x = -(x+1),
* and we use that x = ~~x = ~(-x-1).
*
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
+#if HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <assert.h>
+
#include "blowfish.h"
#include "macros.h"
-#include <assert.h>
-
/* Initial keysetup state */
static const struct blowfish_ctx
initial_ctx =
* MA 02111-1307, USA.
*/
-#include "buffer.h"
-#include "realloc.h"
+#if HAVE_CONFIG_H
+# include "config.h"
+#endif
#include <stdlib.h>
+#include "buffer.h"
+#include "realloc.h"
+
/* This is in a separate file so that we don't link in realloc in
* programs that don't need it. */
* MA 02111-1307, USA.
*/
-#include "buffer.h"
+#if HAVE_CONFIG_H
+# include "config.h"
+#endif
#include <assert.h>
#include <stdlib.h>
#include <string.h>
+#include "buffer.h"
+
int
nettle_buffer_grow(struct nettle_buffer *buffer,
unsigned length)
* MA 02111-1307, USA.
*/
+#if HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include "nettle-meta.h"
#include "cast128.h"
* MA 02111-1307, USA.
*/
+#if HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <assert.h>
+
#include "cast128.h"
#include "cast128_sboxes.h"
#include "macros.h"
-#include <assert.h>
-
#define CAST_SMALL_KEY 10
#define CAST_SMALL_ROUNDS 12
#define CAST_FULL_ROUNDS 16
* MA 02111-1307, USA.
*/
-#include "cbc.h"
-
-#include "memxor.h"
+#if HAVE_CONFIG_H
+# include <config.h>
+#endif
#include <assert.h>
#include <stdlib.h>
#include <string.h>
+#include "cbc.h"
+
+#include "memxor.h"
+
void
cbc_encrypt(void *ctx, void (*f)(void *ctx,
unsigned length, uint8_t *dst,
* MA 02111-1307, USA.
*/
+#if HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <string.h>
+#include <assert.h>
+
#include "des-compat.h"
#include "cbc.h"
#include "macros.h"
#include "memxor.h"
-#include <string.h>
-#include <assert.h>
-
struct des_compat_des3 { struct des_ctx *keys[3]; };
typedef void (*cbc_crypt_func)(void *, uint32_t, uint8_t *, const uint8_t *);
* Please see the file `descore.README' for the complete copyright notice.
*/
+#if HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <assert.h>
+
#include "des.h"
#include "desCode.h"
-#include <assert.h>
-
static ENCRYPT(DesSmallFipsEncrypt,TEMPSMALL, LOADFIPS,KEYMAPSMALL,SAVEFIPS)
static DECRYPT(DesSmallFipsDecrypt,TEMPSMALL, LOADFIPS,KEYMAPSMALL,SAVEFIPS)
* MA 02111-1307, USA.
*/
+#if HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include "des.h"
/* It's possible to make some more general pipe construction, like the
*/
#if HAVE_CONFIG_H
-#include "config.h"
+# include "config.h"
#endif
#if WITH_PUBLIC_KEY
+#include <stdlib.h>
+
#include "dsa.h"
#include "bignum.h"
#include "memxor.h"
-#include <stdlib.h>
-
/* The (slow) NIST method of generating DSA primes. Algorithm 4.56 of
* Handbook of Applied Cryptography. */
*/
#if HAVE_CONFIG_H
-#include "config.h"
+# include "config.h"
#endif
#if WITH_PUBLIC_KEY
+#include <stdlib.h>
+
#include "dsa.h"
#include "bignum.h"
-#include <stdlib.h>
-
void
dsa_sign_digest(const struct dsa_public_key *pub,
*/
#if HAVE_CONFIG_H
-#include "config.h"
+# include "config.h"
#endif
#if WITH_PUBLIC_KEY
+#include <stdlib.h>
+
#include "dsa.h"
#include "bignum.h"
-#include <stdlib.h>
-
int
dsa_verify_digest(const struct dsa_public_key *key,
const uint8_t *digest,
*/
#if HAVE_CONFIG_H
-#include "config.h"
+# include "config.h"
#endif
#if WITH_PUBLIC_KEY
#if HAVE_CONFIG_H
# include "config.h"
-#endif /* HAVE_CONFIG_H */
-
-#include "io.h"
+#endif
#include <stdarg.h>
#include <stdlib.h>
+#include "io.h"
+
#define RANDOM_DEVICE "/dev/urandom"
#define BUFSIZE 1000
#if HAVE_CONFIG_H
# include "config.h"
-#endif /* HAVE_CONFIG_H */
+#endif
+
+#include <assert.h>
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <time.h>
#include "aes.h"
#include "arcfour.h"
#include "cbc.h"
-#include <assert.h>
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <time.h>
-
-#if __GNUC__
-# define UNUSED __attribute__ ((__unused__))
-#else
-# define UNUSED
-#endif
/* Encrypt 10MB, 1K at a time. */
#define BENCH_BLOCK 1024
#if HAVE_CONFIG_H
# include "config.h"
-#endif /* HAVE_CONFIG_H */
+#endif
/* Openssl glue, for comparative benchmarking only */
#if HAVE_LIBCRYPTO
-#include "nettle-internal.h"
+#include <assert.h>
#include <openssl/blowfish.h>
#include <openssl/des.h>
#include <openssl/cast.h>
-#include <assert.h>
+#include "nettle-internal.h"
/* Blowfish */
* MA 02111-1307, USA.
*/
-#include "buffer.h"
-#include "rsa.h"
-#include "sexp.h"
-#include "yarrow.h"
-
-#include "io.h"
+#if HAVE_CONFIG_H
+# include "config.h"
+#endif
#include <ctype.h>
#include <errno.h>
/* For getopt */
#include <unistd.h>
+#include "buffer.h"
+#include "rsa.h"
+#include "sexp.h"
+#include "yarrow.h"
+
+#include "io.h"
+
#define KEYSIZE 500
#define ESIZE 30
* MA 02111-1307, USA.
*/
+#if HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <errno.h>
#include <stdlib.h>
#include <stdio.h>
* MA 02111-1307, USA.
*/
-
-#include "rsa.h"
-#include "io.h"
+#if HAVE_CONFIG_H
+# include "config.h"
+#endif
#include <errno.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
+#include "rsa.h"
+#include "io.h"
+
static int
read_signature(const char *name, mpz_t s)
{
* MA 02111-1307, USA.
*/
+#if HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include "hmac.h"
void
* MA 02111-1307, USA.
*/
+#if HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include "hmac.h"
void
* MA 02111-1307, USA.
*/
+#if HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include "hmac.h"
void
* MA 02111-1307, USA.
*/
-#include "hmac.h"
-
-#include "memxor.h"
+#if HAVE_CONFIG_H
+# include <config.h>
+#endif
#include <assert.h>
#include <string.h>
+#include "hmac.h"
+
+#include "memxor.h"
+
#define IPAD 0x36
#define OPAD 0x5c
* applications. It is useful for generating deterministic but
* random-looking test data, and is used by the Nettle testsuite. */
-#include "knuth-lfib.h"
-
-#include "macros.h"
+#if HAVE_CONFIG_H
+# include <config.h>
+#endif
#include <assert.h>
#include <stdlib.h>
+#include "knuth-lfib.h"
+
+#include "macros.h"
+
#define KK _KNUTH_LFIB_KK
#define LL 37
#define MM (1UL << 30)
* MA 02111-1307, USA.
*/
+#if HAVE_CONFIG_H
+# include <config.h>
+#endif
+
#include "md5-compat.h"
void
* MA 02111-1307, USA.
*/
+#if HAVE_CONFIG_H
+# include <config.h>
+#endif
+
#include "nettle-meta.h"
#include "md5.h"
/* Based on public domain code hacked by Colin Plumb, Andrew Kuchling, and
* Niels Möller. */
-#include "md5.h"
-
-#include "macros.h"
+#if HAVE_CONFIG_H
+# include <config.h>
+#endif
#include <assert.h>
#include <string.h>
+#include "md5.h"
+
+#include "macros.h"
+
/* A block, treated as a sequence of 32-bit words. */
#define MD5_DATA_LENGTH 16
if the source overlaps with the destination.
Return DESTADDR. */
+#if HAVE_CONFIG_H
+# include <config.h>
+#endif
+
#include "memxor.h"
uint8_t *memxor(uint8_t *dst, const uint8_t *src, size_t n)
* MA 02111-1307, USA.
*/
-#include "nettle-internal.h"
-#include "des.h"
-#include "blowfish.h"
+#if HAVE_CONFIG_H
+# include <config.h>
+#endif
#include <assert.h>
#include <stdlib.h>
+#include "nettle-internal.h"
+#include "des.h"
+#include "blowfish.h"
+
/* DES uses a different signature for the key set function.
* And we have to adjust parity. */
static void
* MA 02111-1307, USA.
*/
+#if HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <assert.h>
+#include <stdlib.h>
+#include <string.h>
+
#include "pgp.h"
#include "base64.h"
#include "buffer.h"
#include "macros.h"
-#include <assert.h>
-#include <stdlib.h>
-#include <string.h>
-
int
pgp_put_uint32(struct nettle_buffer *buffer, uint32_t i)
{
*/
#if HAVE_CONFIG_H
-#include "config.h"
+# include "config.h"
#endif
#if WITH_PUBLIC_KEY
+#include <assert.h>
+#include <stdlib.h>
+#include <string.h>
+
#include "rsa.h"
#include "bignum.h"
#include "pkcs1.h"
-#include <assert.h>
-#include <stdlib.h>
-#include <string.h>
-
/* From pkcs-1v2
*
* md5 OBJECT IDENTIFIER ::=
*/
#if HAVE_CONFIG_H
-#include "config.h"
+# include "config.h"
#endif
#if WITH_PUBLIC_KEY
+#include <assert.h>
+#include <stdlib.h>
+#include <string.h>
+
#include "rsa.h"
#include "bignum.h"
#include "pkcs1.h"
-#include <assert.h>
-#include <stdlib.h>
-#include <string.h>
-
/* From pkcs-1v2
*
* id-sha1 OBJECT IDENTIFIER ::=
*/
#if HAVE_CONFIG_H
-#include "config.h"
+# include "config.h"
#endif
#if WITH_PUBLIC_KEY
-#include "pkcs1.h"
-
#include <assert.h>
#include <string.h>
+#include "pkcs1.h"
+
void
pkcs1_signature_prefix(unsigned length,
uint8_t *buffer,
# include "config.h"
#endif
-#include "realloc.h"
-
#include <stdlib.h>
#include <stdio.h>
+#include "realloc.h"
+
void *
nettle_realloc(void *ctx UNUSED, void *p, unsigned length)
{
*/
#if HAVE_CONFIG_H
-#include "config.h"
+# include "config.h"
#endif
#if WITH_PUBLIC_KEY
*/
#if HAVE_CONFIG_H
-#include "config.h"
+# include "config.h"
#endif
#if WITH_PUBLIC_KEY
-#include "rsa.h"
-
-#include "bignum.h"
-
#include <assert.h>
#include <stdlib.h>
#include <string.h>
+#include "rsa.h"
+
+#include "bignum.h"
+
int
rsa_decrypt(const struct rsa_private_key *key,
unsigned *length, uint8_t *message,
*/
#if HAVE_CONFIG_H
-#include "config.h"
+# include "config.h"
#endif
#if WITH_PUBLIC_KEY
-#include "rsa.h"
-
-#include "bignum.h"
-
#include <assert.h>
#include <stdlib.h>
#include <string.h>
+#include "rsa.h"
+
+#include "bignum.h"
+
int
rsa_encrypt(const struct rsa_public_key *key,
/* For padding */
*/
#if HAVE_CONFIG_H
-#include "config.h"
+# include "config.h"
#endif
#if WITH_PUBLIC_KEY
-#include "rsa.h"
-#include "bignum.h"
-
#include <assert.h>
#include <limits.h>
#include <stdlib.h>
+#include "rsa.h"
+#include "bignum.h"
+
#ifndef DEBUG
# define DEBUG 0
#endif
*/
#if HAVE_CONFIG_H
-#include "config.h"
+# include "config.h"
#endif
#if WITH_PUBLIC_KEY
+#include <assert.h>
+
#include "rsa.h"
#include "bignum.h"
#include "pkcs1.h"
-#include <assert.h>
-
void
rsa_md5_sign(const struct rsa_private_key *key,
struct md5_ctx *hash,
*/
#if HAVE_CONFIG_H
-#include "config.h"
+# include "config.h"
#endif
#if WITH_PUBLIC_KEY
+#include <assert.h>
+
#include "rsa.h"
#include "bignum.h"
#include "pkcs1.h"
-#include <assert.h>
-
int
rsa_md5_verify(const struct rsa_public_key *key,
struct md5_ctx *hash,
*/
#if HAVE_CONFIG_H
-#include "config.h"
+# include "config.h"
#endif
#if WITH_PUBLIC_KEY
-#include "rsa.h"
+#include <assert.h>
+
+include "rsa.h"
#include "bignum.h"
#include "pkcs1.h"
-#include <assert.h>
-
void
rsa_sha1_sign(const struct rsa_private_key *key,
struct sha1_ctx *hash,
*/
#if HAVE_CONFIG_H
-#include "config.h"
+# include "config.h"
#endif
#if WITH_PUBLIC_KEY
+#include <assert.h>
+
#include "rsa.h"
#include "bignum.h"
#include "pkcs1.h"
-#include <assert.h>
-
int
rsa_sha1_verify(const struct rsa_public_key *key,
struct sha1_ctx *hash,
*/
#if HAVE_CONFIG_H
-#include "config.h"
+# include "config.h"
#endif
#if WITH_PUBLIC_KEY
*/
#if HAVE_CONFIG_H
-#include "config.h"
+# include "config.h"
#endif
#if WITH_PUBLIC_KEY
*/
#if HAVE_CONFIG_H
-#include "config.h"
+# include "config.h"
#endif
#if WITH_PUBLIC_KEY
#include "bignum.h"
-/* FIXME: Perhaps we should split this into several functions, so that
- * one can link in the signature functions without also getting the
- * verify functions. */
-
void
rsa_public_key_init(struct rsa_public_key *key)
{
* MA 02111-1307, USA.
*/
+#if HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#if WITH_PUBLIC_KEY
+#include <time.h>
+
#include "rsa.h"
#include "buffer.h"
#include "pgp.h"
-#include <time.h>
-
/* According to RFC 2440, a public key consists of the following packets:
*
*/
#if HAVE_CONFIG_H
-#include "config.h"
+# include "config.h"
#endif
#if WITH_PUBLIC_KEY
* MA 02111-1307, USA.
*/
+#if HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include "nettle-meta.h"
#include "serpent.h"
* selection process. No other use is allowed." However, the authors
* later decided to GPL the code. /nisse */
-/* FIXME: Use the READ_UINT32 and WRITE_UINT32 macros, where
- * applicable. */
+#if HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <assert.h>
#include "serpent.h"
#include "serpent_sboxes.h"
#include "macros.h"
-#include <assert.h>
-
void
serpent_set_key(struct serpent_ctx *ctx,
unsigned key_size, const uint8_t *key)
*/
#if HAVE_CONFIG_H
-#include "config.h"
+# include "config.h"
#endif
-#include "sexp.h"
-#include "buffer.h"
-
#include <assert.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include "sexp.h"
+#include "buffer.h"
+
#if HAVE_LIBGMP
# include "bignum.h"
#endif
* MA 02111-1307, USA.
*/
+#if HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include "sexp.h"
#include "base64.h"
* MA 02111-1307, USA.
*/
-#include "sexp.h"
-
-#include "base64.h"
+#if HAVE_CONFIG_H
+# include "config.h"
+#endif
#include <assert.h>
#include <string.h>
+#include "sexp.h"
+
+#include "base64.h"
+
/* NOTE: Decodes the input string in place */
int
sexp_transport_iterator_first(struct sexp_iterator *iterator,
* MA 02111-1307, USA.
*/
-#include "sexp.h"
-
-#include "macros.h"
+#if HAVE_CONFIG_H
+# include "config.h"
+#endif
#include <stdlib.h>
#include <string.h>
+#include "sexp.h"
+
+#include "macros.h"
+
/* Initializes the iterator, but one has to call next to get to the
* first element. */
static void
*/
#if HAVE_CONFIG_H
-#include "config.h"
+# include "config.h"
#endif
#if HAVE_LIBGMP
*/
#if HAVE_CONFIG_H
-#include "config.h"
+# include "config.h"
#endif
#if WITH_PUBLIC_KEY
+#include <string.h>
+
#include "dsa.h"
#include "bignum.h"
#include "sexp.h"
-#include <string.h>
-
#define GET(x, l, v) \
do { \
if (!nettle_mpz_set_sexp((x), (l), (v)) \
*/
#if HAVE_CONFIG_H
-#include "config.h"
+# include "config.h"
#endif
#if WITH_PUBLIC_KEY
+#include <string.h>
+
#include "rsa.h"
#include "bignum.h"
#include "sexp.h"
-#include <string.h>
-
#define GET(x, l, v) \
do { \
if (!nettle_mpz_set_sexp((x), (l), (v)) \
* MA 02111-1307, USA.
*/
+#if HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include "nettle-meta.h"
#include "sha.h"
* effort (for example the reengineering of a great many Capstone chips).
*/
-#include "sha.h"
-
-#include "macros.h"
+#if HAVE_CONFIG_H
+# include "config.h"
+#endif
#include <assert.h>
#include <stdlib.h>
#include <string.h>
+#include "sha.h"
+
+#include "macros.h"
+
/* A block, treated as a sequence of 32-bit words. */
#define SHA1_DATA_LENGTH 16
* MA 02111-1307, USA.
*/
+#if HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include "nettle-meta.h"
#include "sha.h"
/* Modelled after the sha1.c code by Peter Gutmann. */
-#include "sha.h"
-
-#include "macros.h"
+#if HAVE_CONFIG_H
+# include "config.h"
+#endif
#include <assert.h>
#include <stdlib.h>
#include <string.h>
+#include "sha.h"
+
+#include "macros.h"
+
/* A block, treated as a sequence of 32-bit words. */
#define SHA256_DATA_LENGTH 16
* MA 02111-1307, USA.
*/
-#include "input.h"
+#if HAVE_CONFIG_H
+# include "config.h"
+#endif
#include <assert.h>
#include <errno.h>
#include <stdlib.h>
#include <string.h>
+#include "input.h"
+
void
sexp_input_init(struct sexp_input *input, FILE *f)
{
* MA 02111-1307, USA.
*/
-#include "misc.h"
+#if HAVE_CONFIG_H
+# include "config.h"
+#endif
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
+#include "misc.h"
+
void
die(const char *format, ...)
{
* MA 02111-1307, USA.
*/
-#include "output.h"
+#if HAVE_CONFIG_H
+# include "config.h"
+#endif
#include <assert.h>
#include <errno.h>
#include <stdlib.h>
#include <string.h>
+#include "output.h"
+
void
sexp_output_init(struct sexp_output *output, FILE *f,
unsigned width, int prefer_hex)
* MA 02111-1307, USA.
*/
-#include "parse.h"
-
-#include "input.h"
+#if HAVE_CONFIG_H
+# include "config.h"
+#endif
#include <assert.h>
#include <stdlib.h>
+#include "parse.h"
+
+#include "input.h"
+
void
sexp_compound_token_init(struct sexp_compound_token *token)
{
* MA 02111-1307, USA.
*/
-#define BUG_ADDRESS "nettle-bugs@lists.lysator.liu.se"
-
-#include "buffer.h"
-#include "nettle-meta.h"
-
-#include "getopt.h"
-
-#include "input.h"
-#include "output.h"
-#include "parse.h"
+#if HAVE_CONFIG_H
+# include "config.h"
+#endif
#include <assert.h>
#include <errno.h>
#include <stdlib.h>
#include <string.h>
+#include "buffer.h"
+#include "nettle-meta.h"
+#include "getopt.h"
+#include "input.h"
+#include "output.h"
+#include "parse.h"
+#define BUG_ADDRESS "nettle-bugs@lists.lysator.liu.se"
\f
/* Conversion functions. */
* MA 02111-1307, USA.
*/
+#if HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include "nettle-meta.h"
#include "twofish.h"
* MA 02111-1307, USA.
*/
-#include "twofish.h"
-
-#include "macros.h"
+#if HAVE_CONFIG_H
+# include "config.h"
+#endif
#include <assert.h>
#include <string.h>
+#include "twofish.h"
+
+#include "macros.h"
+
/* Bitwise rotations on 32-bit words. These are defined as macros that
* evaluate their argument twice, so do not apply to any expressions with
* side effects.
* MA 02111-1307, USA.
*/
-#include "yarrow.h"
-
-#include "macros.h"
+#if HAVE_CONFIG_H
+# include "config.h"
+#endif
#include <assert.h>
#include <stdlib.h>
#include <string.h>
+#include "yarrow.h"
+
+#include "macros.h"
+
#ifndef YARROW_DEBUG
#define YARROW_DEBUG 0
#endif
* MA 02111-1307, USA.
*/
+#if HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include "yarrow.h"
void