line |
true |
false |
branch |
209
|
0 |
0 |
for (i = 0; i < num_words; ++i) { |
220
|
0 |
0 |
for (i = 0; i < num_words; ++i) { |
236
|
0 |
0 |
for (i = max_words - 1; i >= 0 && vli[i] == 0; --i) { |
|
0 |
0 |
for (i = max_words - 1; i >= 0 && vli[i] == 0; --i) { |
248
|
0 |
0 |
if (num_digits == 0) { |
253
|
0 |
0 |
for (i = 0; digit; ++i) { |
264
|
0 |
0 |
for (i = 0; i < num_words; ++i) { |
275
|
0 |
0 |
for (i = num_words - 1; i >= 0; --i) { |
276
|
0 |
0 |
if (left[i] > right[i]) { |
278
|
0 |
0 |
} else if (left[i] < right[i]) { |
292
|
0 |
0 |
for (i = num_words - 1; i >= 0; --i) { |
320
|
0 |
0 |
while (vli-- > end) { |
336
|
0 |
0 |
for (i = 0; i < num_words; ++i) { |
338
|
0 |
0 |
if (sum != left[i]) { |
355
|
0 |
0 |
for (i = 0; i < num_words; ++i) { |
357
|
0 |
0 |
if (diff != left[i]) { |
421
|
0 |
0 |
for (k = 0; k < num_words; ++k) { |
422
|
0 |
0 |
for (i = 0; i <= k; ++i) { |
430
|
0 |
0 |
for (k = num_words; k < num_words * 2 - 1; ++k) { |
431
|
0 |
0 |
for (i = (k + 1) - num_words; i < num_words; ++i) { |
541
|
0 |
0 |
if (carry || uECC_vli_cmp_unsafe(mod, result, num_words) != 1) { |
|
0 |
0 |
if (carry || uECC_vli_cmp_unsafe(mod, result, num_words) != 1) { |
555
|
0 |
0 |
if (l_borrow) { |
579
|
0 |
0 |
if (bit_shift > 0) { |
580
|
0 |
0 |
for(index = 0; index < (uECC_word_t)num_words; ++index) { |
588
|
0 |
0 |
for (index = 1; shift >= 0; --shift) { |
591
|
0 |
0 |
for (i = 0; i < num_words * 2; ++i) { |
593
|
0 |
0 |
if (diff != v[index][i]) { |
680
|
0 |
0 |
if (!EVEN(uv)) { |
684
|
0 |
0 |
if (carry) { |
698
|
0 |
0 |
if (uECC_vli_isZero(input, num_words)) { |
708
|
0 |
0 |
while ((cmpResult = uECC_vli_cmp_unsafe(a, b, num_words)) != 0) { |
709
|
0 |
0 |
if (EVEN(a)) { |
712
|
0 |
0 |
} else if (EVEN(b)) { |
715
|
0 |
0 |
} else if (cmpResult > 0) { |
718
|
0 |
0 |
if (uECC_vli_cmp_unsafe(u, v, num_words) < 0) { |
726
|
0 |
0 |
if (uECC_vli_cmp_unsafe(v, u, num_words) < 0) { |
769
|
0 |
0 |
if (initial_Z) { |
876
|
0 |
0 |
for (i = num_bits - 2; i > 0; --i) { |
908
|
0 |
0 |
uECC_word_t carry = uECC_vli_add(k0, k, curve->n, num_n_words) || |
|
0 |
0 |
uECC_word_t carry = uECC_vli_add(k0, k, curve->n, num_n_words) || |
909
|
0 |
0 |
(num_n_bits < ((bitcount_t)num_n_words * uECC_WORD_SIZE * 8) && |
929
|
0 |
0 |
if (EccPoint_isZero(result, curve)) { |
958
|
0 |
0 |
for (i = 0; i < num_bytes; ++i) { |
969
|
0 |
0 |
for (i = 0; i < num_bytes; ++i) { |
987
|
0 |
0 |
if (!g_rng_function) { |
991
|
0 |
0 |
for (tries = 0; tries < uECC_RNG_MAX_TRIES; ++tries) { |
992
|
0 |
0 |
if (!g_rng_function((uint8_t *)random, num_words * uECC_WORD_SIZE)) { |
1016
|
0 |
0 |
for (tries = 0; tries < uECC_RNG_MAX_TRIES; ++tries) { |
1017
|
0 |
0 |
if (!uECC_generate_random_int(_private, curve->n, BITS_TO_WORDS(curve->num_n_bits))) { |
1021
|
0 |
0 |
if (EccPoint_compute_public_key(_public, _private, curve)) { |
1063
|
0 |
0 |
if (g_rng_function) { |
1064
|
0 |
0 |
if (!uECC_generate_random_int(p2[carry], curve->p, num_words)) { |
1082
|
0 |
0 |
for (i = 0; i < curve->num_bytes; ++i) { |
1107
|
0 |
0 |
if ((y[0] & 0x01) != (compressed[0] & 0x01)) { |
1124
|
0 |
0 |
if (EccPoint_isZero(point, curve)) { |
1170
|
0 |
0 |
if (uECC_vli_isZero(_private, BITS_TO_WORDS(curve->num_n_bits))) { |
1174
|
0 |
0 |
if (uECC_vli_cmp(curve->n, _private, BITS_TO_WORDS(curve->num_n_bits)) != 1) { |
1179
|
0 |
0 |
if (!EccPoint_compute_public_key(_public, _private, curve)) { |
1204
|
0 |
0 |
if (bits_size > num_n_bytes) { |
1214
|
0 |
0 |
if (bits_size * 8 <= (unsigned)curve->num_n_bits) { |
1220
|
0 |
0 |
while (ptr-- > native) { |
1227
|
0 |
0 |
if (uECC_vli_cmp_unsafe(curve->n, native, num_n_words) != 1) { |
1253
|
0 |
0 |
if (uECC_vli_isZero(k, num_words) || uECC_vli_cmp(curve->n, k, num_n_words) != 1) { |
|
0 |
0 |
if (uECC_vli_isZero(k, num_words) || uECC_vli_cmp(curve->n, k, num_n_words) != 1) { |
1259
|
0 |
0 |
if (uECC_vli_isZero(p, num_words)) { |
1265
|
0 |
0 |
if (!g_rng_function) { |
1268
|
0 |
0 |
} else if (!uECC_generate_random_int(tmp, curve->n, num_n_words)) { |
1295
|
0 |
0 |
if (uECC_vli_numBits(s, num_n_words) > (bitcount_t)curve->num_bytes * 8) { |
1314
|
0 |
0 |
for (tries = 0; tries < uECC_RNG_MAX_TRIES; ++tries) { |
1315
|
0 |
0 |
if (!uECC_generate_random_int(k, curve->n, BITS_TO_WORDS(curve->num_n_bits))) { |
1319
|
0 |
0 |
if (uECC_sign_with_k(private_key, message_hash, hash_size, k, signature, curve)) { |
1331
|
0 |
0 |
for (i = 0; i < hash_context->result_size; ++i) |
1333
|
0 |
0 |
for (; i < hash_context->block_size; ++i) |
1351
|
0 |
0 |
for (i = 0; i < hash_context->result_size; ++i) |
1353
|
0 |
0 |
for (; i < hash_context->block_size; ++i) |
1390
|
0 |
0 |
for (i = 0; i < hash_context->result_size; ++i) { |
1415
|
0 |
0 |
for (tries = 0; tries < uECC_RNG_MAX_TRIES; ++tries) { |
1421
|
0 |
0 |
for (i = 0; i < hash_context->result_size; ++i) { |
1423
|
0 |
0 |
if (T_bytes >= num_n_words * uECC_WORD_SIZE) { |
1429
|
0 |
0 |
if ((bitcount_t)num_n_words * uECC_WORD_SIZE * 8 > num_n_bits) { |
1435
|
0 |
0 |
if (uECC_sign_with_k(private_key, message_hash, hash_size, T, signature, curve)) { |
1496
|
0 |
0 |
if (uECC_vli_isZero(r, num_words) || uECC_vli_isZero(s, num_words)) { |
|
0 |
0 |
if (uECC_vli_isZero(r, num_words) || uECC_vli_isZero(s, num_words)) { |
1532
|
0 |
0 |
((!!uECC_vli_testBit(u2, num_bits - 1)) << 1)]; |
1538
|
0 |
0 |
for (i = num_bits - 2; i >= 0; --i) { |
1542
|
0 |
0 |
index = (!!uECC_vli_testBit(u1, i)) | ((!!uECC_vli_testBit(u2, i)) << 1); |
1544
|
0 |
0 |
if (point) { |
1558
|
0 |
0 |
if (uECC_vli_cmp_unsafe(curve->n, rx, num_n_words) != 1) { |