Lines Matching defs:tree

76 /* Calculate the value of a leaf node of the Merkle tree (which is a hash of a
88 * r_node_idx The index of this node in the Merkle tree. Note
89 * that the root node of the Merkle tree is
145 /* Calculate the value of an internal node of the Merkle tree (which is a hash
155 * Merkle tree, this is a hash output.
159 * Merkle tree, this is a hash output.
161 * r_node_idx The index of this node in the Merkle tree. Note
162 * that the root node of the Merkle tree is
413 /* Calculate a full Merkle tree based on a private key. This function
415 * public key is the root node of the Merkle tree).
421 * tree The output tree, which is 2^(H + 1) hash outputs.
422 * In the case of H=10 we have 2048 tree nodes (of
424 * because the Merkle tree root is 1-indexed, the 0
425 * index tree node is never used.
428 unsigned char *tree)
443 &tree[r_node_idx * MBEDTLS_LMS_M_NODE_BYTES(
456 &tree[(r_node_idx * 2) *
458 &tree[(r_node_idx * 2 + 1) *
461 &tree[r_node_idx *
471 /* Calculate a path from a leaf node of the Merkle tree to the root of the tree,
490 unsigned char *tree = NULL;
494 tree = mbedtls_calloc((size_t) MERKLE_TREE_NODE_AM(ctx->params.type),
496 if (tree == NULL) {
500 ret = calculate_merkle_tree(ctx, tree);
510 &tree[adjacent_node_id * node_bytes], node_bytes);
518 mbedtls_zeroize_and_free(tree, node_bytes *
642 unsigned char *tree = NULL;
658 tree = mbedtls_calloc((size_t) MERKLE_TREE_NODE_AM(priv_ctx->params.type),
660 if (tree == NULL) {
667 ret = calculate_merkle_tree(priv_ctx, tree);
673 memcpy(ctx->T_1_pub_key, &tree[node_bytes], node_bytes);
680 mbedtls_zeroize_and_free(tree, node_bytes *