diff options
-rw-r--r-- | cipher/ChangeLog | 5 | ||||
-rw-r--r-- | cipher/pubkey.c | 6 |
2 files changed, 11 insertions, 0 deletions
diff --git a/cipher/ChangeLog b/cipher/ChangeLog index 07ab5bdcf..f3ff35b04 100644 --- a/cipher/ChangeLog +++ b/cipher/ChangeLog @@ -1,3 +1,8 @@ +2007-12-11 Werner Koch <[email protected]> + + * pubkey.c (check_pubkey_algo2): Hack to allow decryption using an + type 20 Elgamal key. + 2007-11-29 David Shaw <[email protected]> * camellia-glue.c (camellia_get_info), cipher.c diff --git a/cipher/pubkey.c b/cipher/pubkey.c index 06642445a..4313cd62d 100644 --- a/cipher/pubkey.c +++ b/cipher/pubkey.c @@ -272,6 +272,12 @@ check_pubkey_algo2( int algo, unsigned use ) { int i; + /* Map type 20 Elgamal algorithm to type 16 if it is used for + decryption. This allows to use legacy type 20 Elgamal keys for + decryption. */ + if (algo == PUBKEY_ALGO_ELGAMAL && use == PUBKEY_USAGE_ENC) + algo = PUBKEY_ALGO_ELGAMAL_E; + do { for(i=0; pubkey_table[i].name; i++ ) if( pubkey_table[i].algo == algo ) { |