From 3c4ae77fec28b89fcb6311898540ee129b800b85 Mon Sep 17 00:00:00 2001 From: Raef Coles Date: Mon, 10 Oct 2022 15:48:24 +0100 Subject: [PATCH] Improve LMS private context documentation Signed-off-by: Raef Coles --- include/mbedtls/lms.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/include/mbedtls/lms.h b/include/mbedtls/lms.h index 8bf395bcd..7505ae462 100644 --- a/include/mbedtls/lms.h +++ b/include/mbedtls/lms.h @@ -228,9 +228,15 @@ 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. NULL + when have_private_key is 0 and non-NULL otherwise. + is 2^MBEDTLS_LMS_H_TREE_HEIGHT(type) in length. */ mbedtls_lmots_public_t *MBEDTLS_PRIVATE(ots_public_keys); /*!< The OTS key public keys, used to - build the Merkle tree. */ + build the Merkle tree. NULL + when have_private_key is 0 and + non-NULL otherwise. + Is 2^MBEDTLS_LMS_H_TREE_HEIGHT(type) + in length. */ unsigned char MBEDTLS_PRIVATE(have_private_key); /*!< Whether the context contains a private key. Boolean values only. */ } mbedtls_lms_private_t;