16#ifndef SLH_DSA_LOCAL_H
17#define SLH_DSA_LOCAL_H
19#include "hitls_build.h"
20#ifdef HITLS_CRYPTO_SLH_DSA
23#include "bsl_params.h"
24#include "crypt_algid.h"
25#include "crypt_types.h"
26#include "crypt_utils.h"
27#include "xmss_common.h"
30#define SLH_DSA_ADRS_LEN 32
31#define SLH_DSA_ADRS_COMPRESSED_LEN 22
32#define SLH_DSA_MAX_N 32
33#define SLH_DSA_MAX_M 49
37#define SLH_DSA_PRVKEY 0x1
38#define SLH_DSA_PUBKEY 0x10
40typedef union Adrs SlhDsaAdrs;
41typedef struct SlhDsaCtx CryptSlhDsaCtx;
84 uint8_t bytes[SLH_DSA_ADRS_LEN];
89void BaseB(
const uint8_t *x, uint32_t xLen, uint32_t b, uint32_t *out, uint32_t outLen);
101 uint32_t secCategory;
107 uint8_t seed[MAX_MDSIZE];
108 uint8_t root[MAX_MDSIZE];
114 uint8_t seed[MAX_MDSIZE];
115 uint8_t prf[MAX_MDSIZE];
124 bool isDeterministic;
129 const CryptHashFuncs *hashFuncs;
130 CryptAdrsOps adrsOps;
137void InitTreeCtxFromSlhDsaCtx(TreeCtx* treeCtx,
const CryptSlhDsaCtx *ctx);