[git] GCRYPT - branch, LIBGCRYPT-1-7-BRANCH, updated. libgcrypt-1.7.1-2-gb0b70e7
by Niibe Yutaka
cvs at cvs.gnupg.org
Thu Jun 16 04:07:11 CEST 2016
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU crypto library".
The branch, LIBGCRYPT-1-7-BRANCH has been updated
via b0b70e7fe37b1bf13ec0bfc8effcb5c7f5db6b7d (commit)
from fa917d2e24b0c98143a079ab4889ad8f69bee446 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit b0b70e7fe37b1bf13ec0bfc8effcb5c7f5db6b7d
Author: Niibe Yutaka <gniibe at fsij.org>
Date: Thu Jun 16 10:56:28 2016 +0900
ecc: Default cofactor 1 for PUBKEY_FLAG_PARAM.
* cipher/ecc.c (ecc_check_secret_key, ecc_sign, ecc_verify)
(ecc_encrypt_raw, ecc_decrypt_raw, compute_keygrip): Set default
cofactor as 1, when not specified.
--
GnuPG-bug-id: 2347
Signed-off-by: NIIBE Yutaka <gniibe at fsij.org>
(backport from master
commit 0f3a069211d8d24a61aa0dc2cc6c4ef04cc4fab7)
diff --git a/cipher/ecc.c b/cipher/ecc.c
index b09902e..8af0d14 100644
--- a/cipher/ecc.c
+++ b/cipher/ecc.c
@@ -806,6 +806,8 @@ ecc_check_secret_key (gcry_sexp_t keyparms)
sk.E.dialect = ((flags & PUBKEY_FLAG_EDDSA)
? ECC_DIALECT_ED25519
: ECC_DIALECT_STANDARD);
+ if (!sk.E.h)
+ sk.E.h = mpi_const (MPI_C_ONE);
}
if (DBG_CIPHER)
{
@@ -941,6 +943,8 @@ ecc_sign (gcry_sexp_t *r_sig, gcry_sexp_t s_data, gcry_sexp_t keyparms)
sk.E.dialect = ((ctx.flags & PUBKEY_FLAG_EDDSA)
? ECC_DIALECT_ED25519
: ECC_DIALECT_STANDARD);
+ if (!sk.E.h)
+ sk.E.h = mpi_const (MPI_C_ONE);
}
if (DBG_CIPHER)
{
@@ -1107,6 +1111,8 @@ ecc_verify (gcry_sexp_t s_sig, gcry_sexp_t s_data, gcry_sexp_t s_keyparms)
pk.E.dialect = ((sigflags & PUBKEY_FLAG_EDDSA)
? ECC_DIALECT_ED25519
: ECC_DIALECT_STANDARD);
+ if (!pk.E.h)
+ pk.E.h = mpi_const (MPI_C_ONE);
}
if (DBG_CIPHER)
@@ -1322,6 +1328,8 @@ ecc_encrypt_raw (gcry_sexp_t *r_ciph, gcry_sexp_t s_data, gcry_sexp_t keyparms)
{
pk.E.model = MPI_EC_WEIERSTRASS;
pk.E.dialect = ECC_DIALECT_STANDARD;
+ if (!pk.E.h)
+ pk.E.h = mpi_const (MPI_C_ONE);
}
/*
@@ -1577,6 +1585,8 @@ ecc_decrypt_raw (gcry_sexp_t *r_plain, gcry_sexp_t s_data, gcry_sexp_t keyparms)
{
sk.E.model = MPI_EC_WEIERSTRASS;
sk.E.dialect = ECC_DIALECT_STANDARD;
+ if (!sk.E.h)
+ sk.E.h = mpi_const (MPI_C_ONE);
}
if (DBG_CIPHER)
{
@@ -1859,6 +1869,8 @@ compute_keygrip (gcry_md_hd_t md, gcry_sexp_t keyparms)
dialect = ((flags & PUBKEY_FLAG_EDDSA)
? ECC_DIALECT_ED25519
: ECC_DIALECT_STANDARD);
+ if (!values[5])
+ values[5] = mpi_const (MPI_C_ONE);
}
/* Check that all parameters are known and normalize all MPIs (that
-----------------------------------------------------------------------
Summary of changes:
cipher/ecc.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
hooks/post-receive
--
The GNU crypto library
http://git.gnupg.org
More information about the Gnupg-commits
mailing list