forked from cisco/hash-sigs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlm_ots_verify.h
23 lines (20 loc) · 879 Bytes
/
lm_ots_verify.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#if !defined( LM_OTS_VERIFY_H_ )
#define LM_OTS_VERIFY_H_
#include <stddef.h>
#include "common_defs.h"
/*
* This validates an OTS signature, but instead of producing a SUCCESS/FAILURE
* return, it generates the root value (which the caller is expected to check).
* It can return false (failure), for things such as unrecognized parameter
* set It also makes sure that the parameter set of the signature is that
* value (as we need to make sure that the attacker didn't substitute a
* weaker one)
*/
bool lm_ots_validate_signature_compute(
unsigned char *computed_public_key,
const unsigned char *I,
merkle_index_t q, /* Diversification string, 4 bytes value */
const void *message, size_t message_len, bool prehashed,
const unsigned char *signature, size_t signature_len,
param_set_t expected_parameter_set);
#endif /* LM_OTS_VERIFY_H_ */