Home GnuPG

Make the Q parameter optional for ECC signing.
fe91a642c7c2Unpublished

Unpublished Commit · Learn More

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

Description

Make the Q parameter optional for ECC signing.

* cipher/ecc.c (ecc_sign): Remove the need for Q.
* cipher/pubkey.c (sexp_elements_extract_ecc): Make Q optional for a
private key.
(sexp_to_key): Add optional arg R_IS_ECC.
(gcry_pk_sign): Do not call gcry_pk_get_nbits for ECC keys.
* tests/pubkey.c (die): Make sure to print a LF.
(check_ecc_sample_key): New.
(main): Call new test.

Q is the actual public key which is not used for signing. Thus we
can make it optional and even speed up the signing by parsing less
stuff.

Note: There seems to be a memory leak somewhere. Running tests/pubkey
with just the new test enabled shows it.

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

Details

Provenance
wernerAuthored on Apr 5 2013, 6:08 PM
Parents
rCf23a068bcb6e: Add test case for SCRYPT and rework the code.
Branches
Unknown
Tags
Unknown

Event Timeline

Werner Koch <wk@gnupg.org> committed rCfe91a642c7c2: Make the Q parameter optional for ECC signing. (authored by Werner Koch <wk@gnupg.org>).Apr 5 2013, 6:08 PM