#ifndef SPX_WOTS_H
#define SPX_WOTS_H

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

#include "params.h"
#include "context.h"

/**
 * Takes a WOTS signature and an n-byte message, computes a WOTS public key.
 *
 * Writes the computed public key to 'pk'.
 */
#define wots_pk_from_sig SPX_NAMESPACE(wots_pk_from_sig)
VOID wots_pk_from_sig(UINT8 *pk,
                      const UINT8 *sig, const UINT8 *msg,
                      const spx_ctx *ctx, UINT32 addr[8]);

/*
 * Compute the chain lengths needed for a given message hash
 */
#define chain_lengths SPX_NAMESPACE(chain_lengths)
VOID chain_lengths(UINT32 *lengths, const UINT8 *msg);

#endif
