Available on (32-bit or 64-bit) and (crate features
test-utils) only.Expand description
§Known Answer Tests for treemath
This test file generates and read test vectors for tree math. See https://github.com/mlswg/mls-implementations/blob/master/test-vectors.md for more description on the test vectors.
§Parameter:
Number of leaves n_leaves.
§Format:
{
"cipher_suite": /* uint16 */,
"root": /* uint32 */,
"left": [ /* array of option<uint32> */ ],
"right": [ /* array of option<uint32> */ ],
"parent": [ /* array of option<uint32> */ ],
"sibling": [ /* array of option<uint32> */ ]
}Any value that is invalid is represented as null.
§Verification:
n_nodesis the number of nodes in the tree withn_leavesleavesrootis the root node index of the treeleft[i]is the node index of the left child of the node with indexiin a tree withn_leavesleavesright[i]is the node index of the right child of the node with indexiin a tree withn_leavesleavesparent[i]is the node index of the parent of the node with indexiin a tree withn_leavesleavessibling[i]is the node index of the sibling of the node with indexiin a tree withn_leavesleaves
Structs§
Enums§
- TmTest
Vector Error - TreeMath test vector error