Protocol++® (Protocolpp®)  v5.6.2
ProtocolPP::jwots Class Reference

Public Member Functions

 jwots (std::shared_ptr< jrand > &rand)
 
 jwots (std::shared_ptr< jrand > &rand, ots_algorithm_t type, uint32_t w=16)
 
virtual ~jwots ()=default
 default
 
void base_w (uint8_t *input, uint8_t *output, uint32_t outlen)
 
int chain (uint32_t startidx, uint32_t steps, jxmssaddr &addr, uint8_t *input, uint8_t *seed, uint8_t *output)
 
void gensk (uint8_t *sk)
 
void genpk (jxmssaddr &addr, uint8_t *wots_sk, uint8_t *seed, uint8_t *pk)
 
void sign (jxmssaddr &addr, uint8_t *message, uint8_t *wots_sk, uint8_t *seed, uint8_t *sig)
 
void pkFromSig (jxmssaddr &addr, uint8_t *message, uint8_t *wots_sig, uint8_t *seed, uint8_t *pk)
 

Constructor & Destructor Documentation

◆ jwots() [1/2]

ProtocolPP::jwots::jwots ( std::shared_ptr< jrand > &  rand)
explicit

Standard constructor

Parameters
rand- psuedorandom with uniform distribution

◆ jwots() [2/2]

ProtocolPP::jwots::jwots ( std::shared_ptr< jrand > &  rand,
ots_algorithm_t  type,
uint32_t  w = 16 
)

Constructor with private and public key

Parameters
rand- psuedorandom with uniform distribution
type- Type of WOTS+ (WOTS_SHA2_256, WOTS_SHAKE_256, WOTS_SHA2_512, WOTS_SHAKE_512)
w- Winternitz parameter {4,16} (default=16)

Member Function Documentation

◆ base_w()

void ProtocolPP::jwots::base_w ( uint8_t *  input,
uint8_t *  output,
uint32_t  outlen 
)

WOTS_genSK - Generate a WOTS+ Private Key

Parameters
input- Input byte string to convert to base W
output- Input converted to baseW
outlen- length of output

◆ chain()

int ProtocolPP::jwots::chain ( uint32_t  startidx,
uint32_t  steps,
jxmssaddr addr,
uint8_t *  input,
uint8_t *  seed,
uint8_t *  output 
)

WOTS_genSK - Generate a WOTS+ Private Key

Parameters
startidx- Start index for tree
steps- Number of steps to perform
addr- Tree address
input- Chain data
seed- Seed of the tree
output- Chained data, modified private key

◆ genpk()

void ProtocolPP::jwots::genpk ( jxmssaddr addr,
uint8_t *  wots_sk,
uint8_t *  seed,
uint8_t *  pk 
)

Generate a WOTS+ Public Key from Private Key

Parameters
addr- Tree address
wots_sk- WOTS+ Private Key
seed- Seed of the tree
pk- WOTS+ public key

◆ gensk()

void ProtocolPP::jwots::gensk ( uint8_t *  sk)

Generate a WOTS+ Private Key

Parameters
sk- WOTS+ Private Key

◆ pkFromSig()

void ProtocolPP::jwots::pkFromSig ( jxmssaddr addr,
uint8_t *  message,
uint8_t *  wots_sig,
uint8_t *  seed,
uint8_t *  pk 
)

Computing a WOTS+ public key from a message and signature (verification)

Parameters
addr- Tree address
message- Message to verify with WOTS+
wots_sig- WOTS+ Signature to verify
seed- Seed of the tree
pk- temporary public key from signature

◆ sign()

void ProtocolPP::jwots::sign ( jxmssaddr addr,
uint8_t *  message,
uint8_t *  wots_sk,
uint8_t *  seed,
uint8_t *  sig 
)

Generate a WOTS+ Signature from a private key and message

Parameters
addr- Tree address
message- Message to sign with WOTS+
wots_sk- WOTS+ Private Key
seed- Seed of the tree
sig- WOTS+ Signature

The documentation for this class was generated from the following file: