• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/ap/gpl/openssl/crypto/ec/

Lines Matching refs:heap

1543 	BIGNUM **heap = NULL;
1574 heap = OPENSSL_malloc(pow2 * sizeof heap[0]);
1575 if (heap == NULL) goto err;
1579 * heap[1]
1580 * heap[2] heap[3]
1581 * heap[4] heap[5] heap[6] heap[7]
1582 * heap[8]heap[9] heap[10]heap[11] heap[12]heap[13] heap[14] heap[15]
1587 * then we invert heap[1];
1591 heap[0] = NULL;
1593 heap[i] = NULL;
1595 heap[pow2/2 + i] = &points[i]->Z;
1597 heap[i] = NULL;
1602 heap[i] = BN_new();
1603 if (heap[i] == NULL) goto err;
1605 if (heap[2*i] != NULL)
1607 if ((heap[2*i + 1] == NULL) || BN_is_zero(heap[2*i + 1]))
1609 if (!BN_copy(heap[i], heap[2*i])) goto err;
1613 if (BN_is_zero(heap[2*i]))
1615 if (!BN_copy(heap[i], heap[2*i + 1])) goto err;
1619 if (!group->meth->field_mul(group, heap[i],
1620 heap[2*i], heap[2*i + 1], ctx)) goto err;
1626 /* invert heap[1] */
1627 if (!BN_is_zero(heap[1]))
1629 if (!BN_mod_inverse(heap[1], heap[1], &group->field, ctx))
1640 if (!group->meth->field_encode(group, heap[1], heap[1], ctx)) goto err;
1641 if (!group->meth->field_encode(group, heap[1], heap[1], ctx)) goto err;
1644 /* set other heap[i]'s to their inverses */
1648 if ((heap[i + 1] != NULL) && !BN_is_zero(heap[i + 1]))
1650 if (!group->meth->field_mul(group, tmp0, heap[i/2], heap[i + 1], ctx)) goto err;
1651 if (!group->meth->field_mul(group, tmp1, heap[i/2], heap[i], ctx)) goto err;
1652 if (!BN_copy(heap[i], tmp0)) goto err;
1653 if (!BN_copy(heap[i + 1], tmp1)) goto err;
1657 if (!BN_copy(heap[i], heap[i/2])) goto err;
1694 if (heap != NULL)
1696 /* heap[pow2/2] .. heap[pow2-1] have not been allocated locally! */
1699 if (heap[i] != NULL)
1700 BN_clear_free(heap[i]);
1702 OPENSSL_free(heap);