"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "cipher/ecc-gost.c" between
libgcrypt-1.9.1.tar.bz2 and libgcrypt-1.9.2.tar.bz2

About: Libgcrypt is a general purpose library of cryptographic building blocks (originally based on GnuPG code).

ecc-gost.c  (libgcrypt-1.9.1.tar.bz2):ecc-gost.c  (libgcrypt-1.9.2.tar.bz2)
skipping to change at line 133 skipping to change at line 133
* Check if R and S verifies INPUT. * Check if R and S verifies INPUT.
*/ */
gpg_err_code_t gpg_err_code_t
_gcry_ecc_gost_verify (gcry_mpi_t input, mpi_ec_t ec, _gcry_ecc_gost_verify (gcry_mpi_t input, mpi_ec_t ec,
gcry_mpi_t r, gcry_mpi_t s) gcry_mpi_t r, gcry_mpi_t s)
{ {
gpg_err_code_t err = 0; gpg_err_code_t err = 0;
gcry_mpi_t e, x, z1, z2, v, rv, zero; gcry_mpi_t e, x, z1, z2, v, rv, zero;
mpi_point_struct Q, Q1, Q2; mpi_point_struct Q, Q1, Q2;
if (!_gcry_mpi_ec_curve_point (ec->Q, ec))
return GPG_ERR_BROKEN_PUBKEY;
if( !(mpi_cmp_ui (r, 0) > 0 && mpi_cmp (r, ec->n) < 0) ) if( !(mpi_cmp_ui (r, 0) > 0 && mpi_cmp (r, ec->n) < 0) )
return GPG_ERR_BAD_SIGNATURE; /* Assertion 0 < r < n failed. */ return GPG_ERR_BAD_SIGNATURE; /* Assertion 0 < r < n failed. */
if( !(mpi_cmp_ui (s, 0) > 0 && mpi_cmp (s, ec->n) < 0) ) if( !(mpi_cmp_ui (s, 0) > 0 && mpi_cmp (s, ec->n) < 0) )
return GPG_ERR_BAD_SIGNATURE; /* Assertion 0 < s < n failed. */ return GPG_ERR_BAD_SIGNATURE; /* Assertion 0 < s < n failed. */
x = mpi_alloc (0); x = mpi_alloc (0);
e = mpi_alloc (0); e = mpi_alloc (0);
z1 = mpi_alloc (0); z1 = mpi_alloc (0);
z2 = mpi_alloc (0); z2 = mpi_alloc (0);
v = mpi_alloc (0); v = mpi_alloc (0);
 End of changes. 1 change blocks. 
0 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)