summaryrefslogtreecommitdiffstats
path: root/include/cipher.h
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>1998-05-04 20:49:26 +0200
committerWerner Koch <wk@gnupg.org>1998-05-04 20:49:26 +0200
commit42b03f6ebdda25a5b61db72cf9aecaaf6788de16 (patch)
treea36d2fe06b19dca6f64009010e2a731b45e6b886 /include/cipher.h
parentfixed last passphrase bug (diff)
downloadgnupg2-42b03f6ebdda25a5b61db72cf9aecaaf6788de16.tar.xz
gnupg2-42b03f6ebdda25a5b61db72cf9aecaaf6788de16.zip
new releaseV0-2-17
Diffstat (limited to 'include/cipher.h')
-rw-r--r--include/cipher.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/cipher.h b/include/cipher.h
index c82d35140..b64d234db 100644
--- a/include/cipher.h
+++ b/include/cipher.h
@@ -50,9 +50,9 @@
#define PUBKEY_ALGO_RSA 1
#define PUBKEY_ALGO_RSA_E 2 /* RSA encrypt only */
#define PUBKEY_ALGO_RSA_S 3 /* RSA sign only */
-#define PUBKEY_ALGO_ELGAMAL 16
+#define PUBKEY_ALGO_ELGAMAL_E 16 /* encrypt only ElGamal (but not vor v3)*/
#define PUBKEY_ALGO_DSA 17
-/*#define PUBKEY_ALGO_ELGAMAL 20 sign and encrypt elgamal */
+#define PUBKEY_ALGO_ELGAMAL 20 /* sign and encrypt elgamal */
#define DIGEST_ALGO_MD5 1
#define DIGEST_ALGO_SHA1 2
@@ -61,6 +61,10 @@
#define DIGEST_ALGO_TIGER 101
#endif
+#define is_RSA(a) ((a)==PUBKEY_ALGO_RSA || (a)==PUBKEY_ALGO_RSA_E \
+ || (a)==PUBKEY_ALGO_RSA_S )
+#define is_ELGAMAL(a) ((a)==PUBKEY_ALGO_ELGAMAL || (a)==PUBKEY_ALGO_ELGAMAL_E)
+
typedef struct {
int algo;
int keylen;