#if !defined( WOTSX1_H_ )
#define WOTSX1_H_

#include <Library/UefiLib.h>
#include <Library/BaseLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/BaseMemoryLib.h>
#include <Uefi.h>

/*
 * This is here to provide an interface to the internal wots_gen_leafx1
 * routine.  While this routine is not referenced in the package outside of
 * wots.c, it is called from the stand-alone benchmark code to characterize
 * the performance
 */
struct leaf_info_x1 {
    UINT8 *wots_sig;
    UINT32 wots_sign_leaf; /* The index of the WOTS we're using to sign */
    UINT32 *wots_steps;
    UINT32 leaf_addr[8];
    UINT32 pk_addr[8];
};

/* Macro to set the leaf_info to something 'benign', that is, it would */
/* run with the same time as it does during the real signing process */
/* Used only by the benchmark code */
#define INITIALIZE_LEAF_INFO_X1(info, addr, step_buffer) { \
    info.wots_sig = 0;             \
    info.wots_sign_leaf = ~0u;      \
    info.wots_steps = step_buffer; \
    CopyMem( &info.leaf_addr[0], addr, 32 ); \
    CopyMem( &info.pk_addr[0], addr, 32 ); \
}

#define wots_gen_leafx1 SPX_NAMESPACE(wots_gen_leafx1)
VOID wots_gen_leafx1(UINT8 *dest,
                   const spx_ctx *ctx,
                   UINT32 leaf_idx, VOID *v_info);

#endif /* WOTSX1_H_ */
