mbedtls_lmots_calculate_public_key_candidate() function
This function creates a candidate public key from an LMOTS signature. This can then be compared to the real public key to determine the validity of the signature.
Arguments
params
The LMOTS parameter set, q and I values as an mbedtls_lmots_parameters_t struct.
msg
The buffer from which the message will be read.
msg_size
The size of the message that will be read.
sig
The buffer from which the signature will be read. #MBEDTLS_LMOTS_SIG_LEN bytes will be read from this.
out
The buffer where the candidate public key will be stored. Must be at least #MBEDTLS_LMOTS_N_HASH_LEN bytes in size.
Return value
\c 0 on success. A non-zero error code on failure.
Notes
This function is exposed publicly to be used in LMS signature verification, it is expected that mbedtls_lmots_verify will be used for LMOTS signature verification.
mbedtls_lmots_calculate_public_key_candidate() is called by 2 functions and calls 3 functions:
![]()
mbedtls_lmots_calculate_public_key_candidate()
mbedtls_lmots_calculate_public_key_candidate() reads 2 variables:
![]()
mbedtls_lmots_calculate_public_key_candidate()