◆ jlmots() [1/2]
ProtocolPP::jlmots::jlmots |
( |
std::shared_ptr< jrand > & |
rand, |
|
|
bool |
psuedorandom |
|
) |
| |
Standard constructor with LMOTS_SHA256_N32_W8
- Parameters
-
rand | - psuedorandom with uniform distribution |
psuedorandom | - psuedorandom method from Appendix A used for private key |
◆ jlmots() [2/2]
ProtocolPP::jlmots::jlmots |
( |
std::shared_ptr< jrand > & |
rand, |
|
|
uint32_t |
que, |
|
|
bool |
psuedorandom, |
|
|
lmots_algorithm_t |
type |
|
) |
| |
Constructor with private and public key
- Parameters
-
rand | - psuedorandom with uniform distribution |
que | - leaf value for the Merkle tree |
psuedorandom | - psuedorandom method from Appendix A used for private key |
type | - Type of LMOTS (LMOTS_SHA256_N32_W1, LMOTS_SHA256_N32_W2, LMOTS_SHA256_N32_W4, LMOTS_SHA256_N32_W8) |
◆ genpk()
jarray<uint8_t> ProtocolPP::jlmots::genpk |
( |
jarray< uint8_t > & |
lmots_sk | ) |
|
Generate a LMOTS Public Key from Private Key
- Parameters
-
lmots_sk | - LMOTS Private Key |
- Returns
- LMOTS Public Key
◆ gensk()
jarray<uint8_t> ProtocolPP::jlmots::gensk |
( |
| ) |
|
Generate a LMOTS Private Key
- Returns
- LMOTS Private Key
◆ get_field()
template<typename T >
T ProtocolPP::jlmots::get_field |
( |
field_t |
field | ) |
|
Returns the field in LMOTS
LMOTS Get Fields
field type | field name | Example |
lmots_algorithm_t | AUTH | ProtocolPP::lmots_algorithm_t myalg = get_field<ProtocolPP::lmots_algorithm_t>(ProtocolPP::field_t::AUTH) |
uint32_t | OTSW | uint32_t myw = get_field<uint32_t>(ProtocolPP::field_t::OTSW) |
uint32_t | OTSQ | uint32_t myw = get_field<uint32_t>(ProtocolPP::field_t::OTSQ) |
uint32_t | OTSP | uint32_t myw = get_field<uint32_t>(ProtocolPP::field_t::OTSP) |
uint32_t | OTSN | uint32_t myw = get_field<uint32_t>(ProtocolPP::field_t::OTSN) |
uint32_t | OTSLS | uint32_t myw = get_field<uint32_t>(ProtocolPP::field_t::OTSLS) |
uint32_t | SIGLEN | uint32_t myw = get_field<uint32_t>(ProtocolPP::field_t::SIGLEN) |
- Parameters
-
field | - field to retrieve from the security association |
- Returns
- value of the field in the security association
◆ set_field()
template<typename T >
void ProtocolPP::jlmots::set_field |
( |
field_t |
field, |
|
|
T |
fieldval |
|
) |
| |
Allows the user to update the fields LMOTS
- Parameters
-
field | - field to update the security association with |
fieldval | - value to update the security association with |
◆ sign()
jarray<uint8_t> ProtocolPP::jlmots::sign |
( |
jarray< uint8_t > & |
message, |
|
|
jarray< uint8_t > & |
lmots_sk |
|
) |
| |
Generate a LMOTS Signature from a private key and message
- Parameters
-
message | - Message to sign with LMOTS |
lmots_sk | - LMOTS Private Key |
- Returns
- LMOTS Signature
◆ verify()
jarray<uint8_t> ProtocolPP::jlmots::verify |
( |
jarray< uint8_t > & |
message, |
|
|
jarray< uint8_t > & |
lmots_sig, |
|
|
jarray< uint8_t > & |
lmots_pk |
|
) |
| |
Computing a LMOTS public key from a message and signature (verification)
- Parameters
-
message | - Message to verify with WOTS+ |
lmots_sig | - LMOTS Signature to verify |
lmots_pk | - LMOTS Public key |
- Returns
- Temporary LMOTS Public Key
The documentation for this class was generated from the following file: