summaryrefslogtreecommitdiff
path: root/cipher/elgamal.c
diff options
context:
space:
mode:
authorMoritz Schulte <mo@g10code.com>2003-04-27 19:18:27 +0000
committerMoritz Schulte <mo@g10code.com>2003-04-27 19:18:27 +0000
commit55ddea17ae11d69b6fc1a4ff402e5e5b011d28af (patch)
treeb6bf227e7f8b88d0f6d317101490f694566da71c /cipher/elgamal.c
parent5238a4c07992095083091dd1d52fd81502f141b9 (diff)
downloadlibgcrypt-55ddea17ae11d69b6fc1a4ff402e5e5b011d28af.tar.gz
2003-04-27 Moritz Schulte <moritz@g10code.com>
* pubkey.c (gcry_pubkey_register_default): New macro `pubkey_use_dummy', use it. * elgamal.c (elg_names): New variable. (pubkey_spec_elg): Include elg_names. * dsa.c (dsa_names): New variable. (pubkey_spec_dsa): Include dsa_names. * rsa.c (rsa_names): New variable. (pubkey_spec_rsa): Include rsa_names. * pubkey.c (gcry_pubkey_lookup_func_name): Compare name also with the names listed in `sexp_names'. 2003-04-24 Moritz Schulte <moritz@g10code.com> * pubkey.c (sexp_to_key): New variables: module, pubkey. Adjusted to new module interface. (sexp_to_key): Changend type of argument `retalgo' from `int *' to `GcryModule **'. Adjusted all callers. Removed argument: r_algotblidx. (sexp_to_sig): Changend type of argument `retalgo' from `int *' to `GcryModule **'. Adjusted all callers. (sexp_to_enc): Likewise. (pubkey_get_npkey, pubkey_get_nskey, pubkey_get_nsig, pubkey_get_nenc): Use strlen to find out the number. * rsa.c: Adjust pubkey_spec_rsa to new internal interface. * dsa.c: Likewise. * elgamal.c: Likewise.
Diffstat (limited to 'cipher/elgamal.c')
-rw-r--r--cipher/elgamal.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/cipher/elgamal.c b/cipher/elgamal.c
index f9e63966..e9a4804e 100644
--- a/cipher/elgamal.c
+++ b/cipher/elgamal.c
@@ -625,9 +625,19 @@ _gcry_elg_get_nbits( int algo, MPI *pkey )
return mpi_get_nbits( pkey[0] );
}
+static char *elg_names[] =
+ {
+ "elg",
+ "openpgp-elg",
+ "openpgp-elg-sig",
+ NULL,
+ };
+
+
GcryPubkeySpec pubkey_spec_elg =
{
- "ELG", GCRY_PK_ELG, 3, 4, 2, 2,
+ "ELG", elg_names, GCRY_PK_ELG,
+ "pgy", "pgyx", "ab", "rs", "pgy",
GCRY_PK_USAGE_SIGN | GCRY_PK_USAGE_ENCR,
_gcry_elg_generate,
_gcry_elg_check_secret_key,