Capitalize "Merkle" in LMS and LMOTS code
As it is a proper noun Signed-off-by: Raef Coles <raef.coles@arm.com>
This commit is contained in:
parent
faf59babe8
commit
285d44b180
2 changed files with 17 additions and 17 deletions
|
@ -181,7 +181,7 @@ typedef struct {
|
|||
|
||||
/** LMS public context structure.
|
||||
*
|
||||
*A LMS public key is the hash output that is the root of the merkle tree, and
|
||||
*A LMS public key is the hash output that is the root of the Merkle tree, and
|
||||
* the applicable parameter set
|
||||
*
|
||||
* The context must be initialized before it is used. A public key must either
|
||||
|
@ -200,7 +200,7 @@ typedef struct {
|
|||
typedef struct {
|
||||
mbedtls_lms_parameters_t MBEDTLS_PRIVATE(params);
|
||||
unsigned char MBEDTLS_PRIVATE(T_1_pub_key)[MBEDTLS_LMS_M_NODE_BYTES_MAX]; /*!< The public key, in
|
||||
the form of the merkle tree root node. */
|
||||
the form of the Merkle tree root node. */
|
||||
unsigned char MBEDTLS_PRIVATE(have_public_key); /*!< Whether the context contains a public key.
|
||||
Boolean values only. */
|
||||
} mbedtls_lms_public_t;
|
||||
|
@ -228,9 +228,9 @@ typedef struct {
|
|||
uint32_t MBEDTLS_PRIVATE(q_next_usable_key); /*!< The index of the next OTS key that has not
|
||||
been used. */
|
||||
mbedtls_lmots_private_t *MBEDTLS_PRIVATE(ots_private_keys); /*!< The private key material. One OTS key
|
||||
for each leaf node in the merkle tree. */
|
||||
for each leaf node in the Merkle tree. */
|
||||
mbedtls_lmots_public_t *MBEDTLS_PRIVATE(ots_public_keys); /*!< The OTS key public keys, used to
|
||||
build the merkle tree. */
|
||||
build the Merkle tree. */
|
||||
unsigned char MBEDTLS_PRIVATE(have_private_key); /*!< Whether the context contains a private key.
|
||||
Boolean values only. */
|
||||
} mbedtls_lms_private_t;
|
||||
|
|
|
@ -83,7 +83,7 @@ static const unsigned char D_LEAF_CONSTANT_BYTES[D_CONST_LEN] = {0x82, 0x82};
|
|||
static const unsigned char D_INTR_CONSTANT_BYTES[D_CONST_LEN] = {0x83, 0x83};
|
||||
|
||||
|
||||
/* Calculate the value of a leaf node of the merkle tree (which is a hash of a
|
||||
/* Calculate the value of a leaf node of the Merkle tree (which is a hash of a
|
||||
* public key and some other parameters like the leaf index). This function
|
||||
* implements RFC8554 section 5.3, in the case where r >= 2^h.
|
||||
*
|
||||
|
@ -95,8 +95,8 @@ static const unsigned char D_INTR_CONSTANT_BYTES[D_CONST_LEN] = {0x83, 0x83};
|
|||
* corresponds to the index of this leaf node. This
|
||||
* is a hash output.
|
||||
*
|
||||
* r_node_idx The index of this node in the merkle tree. Note
|
||||
* that the root node of the merkle tree is
|
||||
* r_node_idx The index of this node in the Merkle tree. Note
|
||||
* that the root node of the Merkle tree is
|
||||
* 1-indexed.
|
||||
*
|
||||
* out The output node value, which is a hash output.
|
||||
|
@ -146,7 +146,7 @@ exit:
|
|||
return ( mbedtls_lms_error_from_psa( status ) );
|
||||
}
|
||||
|
||||
/* Calculate the value of an internal node of the merkle tree (which is a hash
|
||||
/* Calculate the value of an internal node of the Merkle tree (which is a hash
|
||||
* of a public key and some other parameters like the node index). This function
|
||||
* implements RFC8554 section 5.3, in the case where r < 2^h.
|
||||
*
|
||||
|
@ -156,14 +156,14 @@ exit:
|
|||
*
|
||||
* left_node The value of the child of this node which is on
|
||||
* the left-hand side. As with all nodes on the
|
||||
* merkle tree, this is a hash output.
|
||||
* Merkle tree, this is a hash output.
|
||||
*
|
||||
* right_node The value of the child of this node which is on
|
||||
* the right-hand side. As with all nodes on the
|
||||
* merkle tree, this is a hash output.
|
||||
* Merkle tree, this is a hash output.
|
||||
*
|
||||
* r_node_idx The index of this node in the merkle tree. Note
|
||||
* that the root node of the merkle tree is
|
||||
* r_node_idx The index of this node in the Merkle tree. Note
|
||||
* that the root node of the Merkle tree is
|
||||
* 1-indexed.
|
||||
*
|
||||
* out The output node value, which is a hash output.
|
||||
|
@ -434,9 +434,9 @@ int mbedtls_lms_verify( const mbedtls_lms_public_t *ctx,
|
|||
|
||||
#if defined(MBEDTLS_LMS_PRIVATE)
|
||||
|
||||
/* Calculate a full merkle tree based on a private key. This function
|
||||
/* Calculate a full Merkle tree based on a private key. This function
|
||||
* implements RFC8554 section 5.3, and is used to generate a public key (as the
|
||||
* public key is the root node of the merkle tree).
|
||||
* public key is the root node of the Merkle tree).
|
||||
*
|
||||
* ctx The LMS private context, containing a parameter
|
||||
* set and private key material consisting of both
|
||||
|
@ -445,7 +445,7 @@ int mbedtls_lms_verify( const mbedtls_lms_public_t *ctx,
|
|||
* tree The output tree, which is 2^(H + 1) hash outputs.
|
||||
* In the case of H=10 we have 2048 tree nodes (of
|
||||
* which 1024 of them are leaf nodes). Note that
|
||||
* because the merkle tree root is 1-indexed, the 0
|
||||
* because the Merkle tree root is 1-indexed, the 0
|
||||
* index tree node is never used.
|
||||
*/
|
||||
static int calculate_merkle_tree( const mbedtls_lms_private_t *ctx,
|
||||
|
@ -491,9 +491,9 @@ static int calculate_merkle_tree( const mbedtls_lms_private_t *ctx,
|
|||
return( 0 );
|
||||
}
|
||||
|
||||
/* Calculate a path from a leaf node of the merkle tree to the root of the tree,
|
||||
/* Calculate a path from a leaf node of the Merkle tree to the root of the tree,
|
||||
* and return the full path. This function implements RFC8554 section 5.4.1, as
|
||||
* the merkle path is the main component of an LMS signature.
|
||||
* the Merkle path is the main component of an LMS signature.
|
||||
*
|
||||
* ctx The LMS private context, containing a parameter
|
||||
* set and private key material consisting of both
|
||||
|
|
Loading…
Reference in a new issue