aboutsummaryrefslogtreecommitdiffstats
path: root/cipher
diff options
context:
space:
mode:
Diffstat (limited to 'cipher')
-rw-r--r--cipher/ChangeLog5
-rw-r--r--cipher/pubkey.c9
2 files changed, 14 insertions, 0 deletions
diff --git a/cipher/ChangeLog b/cipher/ChangeLog
index f3ff35b04..b01d0a6ef 100644
--- a/cipher/ChangeLog
+++ b/cipher/ChangeLog
@@ -1,3 +1,8 @@
+2007-12-12 Werner Koch <[email protected]>
+
+ * pubkey.c (pubkey_encrypt, pubkey_decrypt): Allow type 20 keys.
+ (pubkey_algo_to_string): Ditto.
+
2007-12-11 Werner Koch <[email protected]>
* pubkey.c (check_pubkey_algo2): Hack to allow decryption using an
diff --git a/cipher/pubkey.c b/cipher/pubkey.c
index 4313cd62d..02c096ea6 100644
--- a/cipher/pubkey.c
+++ b/cipher/pubkey.c
@@ -234,6 +234,9 @@ pubkey_algo_to_string( int algo )
{
int i;
+ if (algo == PUBKEY_ALGO_ELGAMAL)
+ return "ELG";
+
do {
for(i=0; pubkey_table[i].name; i++ )
if( pubkey_table[i].algo == algo )
@@ -470,6 +473,9 @@ pubkey_encrypt( int algo, MPI *resarr, MPI data, MPI *pkey )
log_mpidump(" data:", data );
}
+ if (algo == PUBKEY_ALGO_ELGAMAL)
+ algo = PUBKEY_ALGO_ELGAMAL_E;
+
do {
for(i=0; pubkey_table[i].name; i++ )
if( pubkey_table[i].algo == algo ) {
@@ -509,6 +515,9 @@ pubkey_decrypt( int algo, MPI *result, MPI *data, MPI *skey )
log_mpidump(" data:", data[i] );
}
+ if (algo == PUBKEY_ALGO_ELGAMAL)
+ algo = PUBKEY_ALGO_ELGAMAL_E;
+
do {
for(i=0; pubkey_table[i].name; i++ )
if( pubkey_table[i].algo == algo ) {