aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2014-01-29 19:35:05 +0000
committerWerner Koch <[email protected]>2014-01-29 19:35:05 +0000
commitea8a1685f75d27f5277d42ea7390ad5aeaf51b1f (patch)
treeee6f6e47d7232e0f38f549b9250ed3b5a3fa03c5 /common
parentinclude: Remove this directory. (diff)
downloadgnupg-ea8a1685f75d27f5277d42ea7390ad5aeaf51b1f.tar.gz
gnupg-ea8a1685f75d27f5277d42ea7390ad5aeaf51b1f.zip
gpg: Remove cipher.h and put algo ids into a common file.
* common/openpgpdefs.h (cipher_algo_t, pubkey_algo_t, digest_algo_t) (compress_algo_t): New. * agent/gpg-agent.c: Remove ../g10/cipher.h. Add openpgpdefs.h. * g10/cipher.h (DEK): Move to ... * g10/dek.h: new file. * g10/cipher.h (is_RSA, is_ELGAMAL, is_DSA) (PUBKEY_MAX_NPKEY, PUBKEY_MAX_NSKEY, PUBKEY_MAX_NSIG, PUBKEY_MAX_NENC) (PUBKEY_USAGE_SIG, PUBKEY_USAGE_ENC, PUBKEY_USAGE_CERT) (PUBKEY_USAGE_AUTH, PUBKEY_USAGE_NONE): Move to * g10/packet.h: here. * g10/cipher.h: Remove. Remove from all files. * g10/filter.h, g10/packet.h: Include dek.h. * g10/Makefile.am (common_source): Remove cipher.h. Add dek.h. Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'common')
-rw-r--r--common/openpgpdefs.h62
1 files changed, 62 insertions, 0 deletions
diff --git a/common/openpgpdefs.h b/common/openpgpdefs.h
index c2fa617f3..0a5844227 100644
--- a/common/openpgpdefs.h
+++ b/common/openpgpdefs.h
@@ -1,6 +1,7 @@
/* openpgpdefs.h - Constants from the OpenPGP standard (rfc2440)
* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
* 2006 Free Software Foundation, Inc.
+ * Copyright (C) 2014 Werner Koch
*
* This file is free software; you can redistribute it and/or modify
* it under the terms of either
@@ -92,4 +93,65 @@ typedef enum
sigsubpkttype_t;
+typedef enum
+ {
+ CIPHER_ALGO_NONE = 0,
+ CIPHER_ALGO_IDEA = 1,
+ CIPHER_ALGO_3DES = 2,
+ CIPHER_ALGO_CAST5 = 3,
+ CIPHER_ALGO_BLOWFISH = 4, /* 128 bit */
+ /* 5 & 6 are reserved */
+ CIPHER_ALGO_AES = 7,
+ CIPHER_ALGO_AES192 = 8,
+ CIPHER_ALGO_AES256 = 9,
+ CIPHER_ALGO_TWOFISH = 10, /* 256 bit */
+ CIPHER_ALGO_CAMELLIA128 = 11,
+ CIPHER_ALGO_CAMELLIA192 = 12,
+ CIPHER_ALGO_CAMELLIA256 = 13,
+
+ CIPHER_ALGO_DUMMY = 110 /* No encryption at all (private). */
+ }
+cipher_algo_t;
+
+
+typedef enum
+ {
+ PUBKEY_ALGO_RSA = 1,
+ PUBKEY_ALGO_RSA_E = 2, /* RSA encrypt only (legacy). */
+ PUBKEY_ALGO_RSA_S = 3, /* RSA sign only (legacy). */
+ PUBKEY_ALGO_ELGAMAL_E = 16, /* Elgamal encrypt only. */
+ PUBKEY_ALGO_DSA = 17,
+ PUBKEY_ALGO_ECDH = 18, /* RFC-6637 */
+ PUBKEY_ALGO_ECDSA = 19, /* RFC-6637 */
+ PUBKEY_ALGO_ELGAMAL = 20, /* Elgamal encrypt+sign (legacy). */
+
+ PUBKEY_ALGO_EDDSA = 105 /* EdDSA (cf. Ed25519) (experimental). */
+ }
+pubkey_algo_t;
+
+
+typedef enum
+ {
+ DIGEST_ALGO_MD5 = 1,
+ DIGEST_ALGO_SHA1 = 2,
+ DIGEST_ALGO_RMD160 = 3,
+ /* 4, 5, 6, and 7 are reserved. */
+ DIGEST_ALGO_SHA256 = 8,
+ DIGEST_ALGO_SHA384 = 9,
+ DIGEST_ALGO_SHA512 = 10,
+ DIGEST_ALGO_SHA224 = 11
+ }
+digest_algo_t;
+
+
+typedef enum
+ {
+ COMPRESS_ALGO_NONE = 0,
+ COMPRESS_ALGO_ZIP = 1,
+ COMPRESS_ALGO_ZLIB = 2,
+ COMPRESS_ALGO_BZIP2 = 3
+ }
+compress_algo_t;
+
+
#endif /*GNUPG_COMMON_OPENPGPDEFS_H*/