aboutsummaryrefslogtreecommitdiffstats
path: root/cipher/pubkey.c
diff options
context:
space:
mode:
Diffstat (limited to 'cipher/pubkey.c')
-rw-r--r--cipher/pubkey.c9
1 files changed, 9 insertions, 0 deletions
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 ) {