#if !defined( MERKLE_H_ )
#define MERKLE_H_

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

/* Generate a Merkle signature (WOTS signature followed by the Merkle */
/* authentication path) */
#define merkle_sign SPX_NAMESPACE(merkle_sign)
VOID merkle_sign(UINT8 *sig, UINT8 *root,
        const spx_ctx* ctx,
        UINT32 wots_addr[8], UINT32 tree_addr[8],
        UINT32 idx_leaf);

/* Compute the root node of the top-most subtree. */
#define merkle_gen_root SPX_NAMESPACE(merkle_gen_root)
VOID merkle_gen_root(UINT8 *root, const spx_ctx* ctx);

#endif /* MERKLE_H_ */
