• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /barrelfish-2018-10-04/lib/openssl-1.0.0d/crypto/ec/

Lines Matching defs:heap

1545 	BIGNUM **heap = NULL;
1576 heap = OPENSSL_malloc(pow2 * sizeof heap[0]);
1577 if (heap == NULL) goto err;
1581 * heap[1]
1582 * heap[2] heap[3]
1583 * heap[4] heap[5] heap[6] heap[7]
1584 * heap[8]heap[9] heap[10]heap[11] heap[12]heap[13] heap[14] heap[15]
1589 * then we invert heap[1];
1593 heap[0] = NULL;
1595 heap[i] = NULL;
1597 heap[pow2/2 + i] = &points[i]->Z;
1599 heap[i] = NULL;
1604 heap[i] = BN_new();
1605 if (heap[i] == NULL) goto err;
1607 if (heap[2*i] != NULL)
1609 if ((heap[2*i + 1] == NULL) || BN_is_zero(heap[2*i + 1]))
1611 if (!BN_copy(heap[i], heap[2*i])) goto err;
1615 if (BN_is_zero(heap[2*i]))
1617 if (!BN_copy(heap[i], heap[2*i + 1])) goto err;
1621 if (!group->meth->field_mul(group, heap[i],
1622 heap[2*i], heap[2*i + 1], ctx)) goto err;
1628 /* invert heap[1] */
1629 if (!BN_is_zero(heap[1]))
1631 if (!BN_mod_inverse(heap[1], heap[1], &group->field, ctx))
1642 if (!group->meth->field_encode(group, heap[1], heap[1], ctx)) goto err;
1643 if (!group->meth->field_encode(group, heap[1], heap[1], ctx)) goto err;
1646 /* set other heap[i]'s to their inverses */
1650 if ((heap[i + 1] != NULL) && !BN_is_zero(heap[i + 1]))
1652 if (!group->meth->field_mul(group, tmp0, heap[i/2], heap[i + 1], ctx)) goto err;
1653 if (!group->meth->field_mul(group, tmp1, heap[i/2], heap[i], ctx)) goto err;
1654 if (!BN_copy(heap[i], tmp0)) goto err;
1655 if (!BN_copy(heap[i + 1], tmp1)) goto err;
1659 if (!BN_copy(heap[i], heap[i/2])) goto err;
1696 if (heap != NULL)
1698 /* heap[pow2/2] .. heap[pow2-1] have not been allocated locally! */
1701 if (heap[i] != NULL)
1702 BN_clear_free(heap[i]);
1704 OPENSSL_free(heap);