comparison ecdsa.c @ 1251:52a456a3add0

Merge branch '20151231_indent' of https://github.com/fperrad/dropbear into fperrad-20151231_indent
author Matt Johnston <matt@ucc.asn.au>
date Tue, 15 Mar 2016 21:41:06 +0800
parents 2bb4c662d1c2
children 750ec4ec4cbe
comparison
equal deleted inserted replaced
1248:739b3909c499 1251:52a456a3add0
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