Home GnuPG

pubkey: Move sexp parsing for gcry_pk_get_nbits to the modules.
4645f3728bb0Unpublished

Unpublished Commit · Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

pubkey: Move sexp parsing for gcry_pk_get_nbits to the modules.

* cipher/pubkey.c (spec_from_sexp): New.
(gcry_pk_get_nbits): Simplify.
* cipher/rsa.c (rsa_get_nbits): Take only PARMS as args and do sexp
parsing here.
* cipher/dsa.c (dsa_get_nbits): Ditto.
* cipher/elgamal.c (elg_get_nbits): Ditto.
* cipher/ecc.c (ecc_get_nbits): Ditto.
* cipher/ecc-curves.c (_gcry_ecc_fill_in_curve): Allow NULL for arg
CURVE.

gcry_pk_get_nbits should now also be faster for ECC because there is
no more need to copy all the parms if a curve name has been given.

  • Signed-off-by: Werner Koch <wk@gnupg.org>

Details

Provenance
wernerAuthored on Oct 8 2013, 8:51 PM
Parents
rC3816e46ce211: pubkey: Move sexp parsing for gcry_pk_getkey to the modules.
Branches
Unknown
Tags
Unknown

Event Timeline