comparison ecdsa.c @ 1256:506f7681d0f8 coverity

merge up to date
author Matt Johnston <matt@ucc.asn.au>
date Tue, 15 Mar 2016 22:45:43 +0800
parents 2bb4c662d1c2
children 750ec4ec4cbe
comparison
equal deleted inserted replaced
1219:84cf9062718d 1256:506f7681d0f8
383 /* add them */ 383 /* add them */
384 if (ltc_mp.ecc_ptadd(mQ, mG, mG, m, mp) != CRYPT_OK) { 384 if (ltc_mp.ecc_ptadd(mQ, mG, mG, m, mp) != CRYPT_OK) {
385 goto out; 385 goto out;
386 } 386 }
387 387
388 /* reduce */ 388 /* reduce */
389 if (ltc_mp.ecc_map(mG, m, mp) != CRYPT_OK) { 389 if (ltc_mp.ecc_map(mG, m, mp) != CRYPT_OK) {
390 goto out; 390 goto out;
391 } 391 }
392 } else { 392 } else {
393 /* use Shamir's trick to compute u1*mG + u2*mQ using half of the doubles */ 393 /* use Shamir's trick to compute u1*mG + u2*mQ using half of the doubles */
394 if (ltc_mp.ecc_mul2add(mG, u1, mQ, u2, mG, m) != CRYPT_OK) { 394 if (ltc_mp.ecc_mul2add(mG, u1, mQ, u2, mG, m) != CRYPT_OK) {
395 goto out; 395 goto out;
396 } 396 }
397 } 397 }
398 398