diff options
author | Werner Koch <wk@gnupg.org> | 2013-11-08 10:07:40 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2013-11-08 10:09:34 +0100 |
commit | 9f63c0f7a3b2c15c7e258cd17395cabd0a8f00cc (patch) | |
tree | d735a8284329782accc6e6e4a77b9310dba5a82e /cipher/ecc.c | |
parent | ed45fd2e60c88e2f005282e6eadd018b59dcf65b (diff) | |
download | libgcrypt-9f63c0f7a3b2c15c7e258cd17395cabd0a8f00cc.tar.gz |
ecc: Implement the "nocomp" flag for key generation.
* cipher/ecc.c (ecc_generate): Support the "nocomp" flag.
* tests/keygen.c (check_ecc_keys): Add a test for it.
Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'cipher/ecc.c')
-rw-r--r-- | cipher/ecc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cipher/ecc.c b/cipher/ecc.c index f2a0e829..d62f5555 100644 --- a/cipher/ecc.c +++ b/cipher/ecc.c @@ -483,7 +483,7 @@ ecc_generate (const gcry_sexp_t genparms, gcry_sexp_t *r_skey) if (_gcry_mpi_ec_get_affine (x, y, &sk.E.G, ctx)) log_fatal ("ecgen: Failed to get affine coordinates for %s\n", "G"); base = _gcry_ecc_ec2os (x, y, sk.E.p); - if (sk.E.dialect == ECC_DIALECT_ED25519) + if (sk.E.dialect == ECC_DIALECT_ED25519 && !(flags & PUBKEY_FLAG_NOCOMP)) { unsigned char *encpk; unsigned int encpklen; |