Post-quantum primitives
@webbuf/slhdsa
Rust/wasm SLH-DSA (FIPS 205) post-quantum hash-based digital signatures
Install
npm install @webbuf/slhdsa Usage
const { verifyingKey, signingKey } = slhDsaSha2_128fKeyPair();
const signature = slhDsaSha2_128fSign(signingKey, message, context);
const ok = slhDsaSha2_128fVerify(verifyingKey, message, signature, context); API reference (97 exports)
Constants
SLH_DSA_SHA2_128F
constSLH_DSA_SHA2_128F: { readonly seedSize: 16; readonly verifyingKeySize: 32; readonly signingKeySize: 64; readonly signatureSize: 17088; } SLH_DSA_SHA2_128S
constSLH_DSA_SHA2_128S: { readonly seedSize: 16; readonly verifyingKeySize: 32; readonly signingKeySize: 64; readonly signatureSize: 7856; } SLH_DSA_SHA2_192F
constSLH_DSA_SHA2_192F: { readonly seedSize: 24; readonly verifyingKeySize: 48; readonly signingKeySize: 96; readonly signatureSize: 35664; } SLH_DSA_SHA2_192S
constSLH_DSA_SHA2_192S: { readonly seedSize: 24; readonly verifyingKeySize: 48; readonly signingKeySize: 96; readonly signatureSize: 16224; } SLH_DSA_SHA2_256F
constSLH_DSA_SHA2_256F: { readonly seedSize: 32; readonly verifyingKeySize: 64; readonly signingKeySize: 128; readonly signatureSize: 49856; } SLH_DSA_SHA2_256S
constSLH_DSA_SHA2_256S: { readonly seedSize: 32; readonly verifyingKeySize: 64; readonly signingKeySize: 128; readonly signatureSize: 29792; } SLH_DSA_SHAKE_128F
constSLH_DSA_SHAKE_128F: { readonly seedSize: 16; readonly verifyingKeySize: 32; readonly signingKeySize: 64; readonly signatureSize: 17088; } SLH_DSA_SHAKE_128S
constSLH_DSA_SHAKE_128S: { readonly seedSize: 16; readonly verifyingKeySize: 32; readonly signingKeySize: 64; readonly signatureSize: 7856; } SLH_DSA_SHAKE_192F
constSLH_DSA_SHAKE_192F: { readonly seedSize: 24; readonly verifyingKeySize: 48; readonly signingKeySize: 96; readonly signatureSize: 35664; } SLH_DSA_SHAKE_192S
constSLH_DSA_SHAKE_192S: { readonly seedSize: 24; readonly verifyingKeySize: 48; readonly signingKeySize: 96; readonly signatureSize: 16224; } SLH_DSA_SHAKE_256F
constSLH_DSA_SHAKE_256F: { readonly seedSize: 32; readonly verifyingKeySize: 64; readonly signingKeySize: 128; readonly signatureSize: 49856; } SLH_DSA_SHAKE_256S
constSLH_DSA_SHAKE_256S: { readonly seedSize: 32; readonly verifyingKeySize: 64; readonly signingKeySize: 128; readonly signatureSize: 29792; } Functions
slhDsaSha2_128fKeyPair
functionslhDsaSha2_128fKeyPair(): SlhDsaKeyPair<32, 64>
slhDsaSha2_128fKeyPair(skSeed: FixedBuf<16>, skPrf: FixedBuf<16>, pkSeed: FixedBuf<16>): SlhDsaKeyPair<32, 64> slhDsaSha2_128fKeyPairDeterministic
functionslhDsaSha2_128fKeyPairDeterministic(skSeed: FixedBuf<16>, skPrf: FixedBuf<16>, pkSeed: FixedBuf<16>): SlhDsaKeyPair<32, 64> slhDsaSha2_128fSign
functionslhDsaSha2_128fSign(signingKey: FixedBuf<64>, message: WebBuf, context?: WebBuf): FixedBuf<17088> slhDsaSha2_128fSignDeterministic
functionslhDsaSha2_128fSignDeterministic(signingKey: FixedBuf<64>, message: WebBuf, context?: WebBuf): FixedBuf<17088> slhDsaSha2_128fSignInternal
functionslhDsaSha2_128fSignInternal(signingKey: FixedBuf<64>, message: WebBuf, addrnd?: FixedBuf<16>): FixedBuf<17088> slhDsaSha2_128fVerify
functionslhDsaSha2_128fVerify(verifyingKey: FixedBuf<32>, message: WebBuf, signature: FixedBuf<17088>, context?: WebBuf): boolean slhDsaSha2_128fVerifyInternal
functionslhDsaSha2_128fVerifyInternal(verifyingKey: FixedBuf<32>, message: WebBuf, signature: FixedBuf<17088>): boolean slhDsaSha2_128sKeyPair
functionslhDsaSha2_128sKeyPair(): SlhDsaKeyPair<32, 64>
slhDsaSha2_128sKeyPair(skSeed: FixedBuf<16>, skPrf: FixedBuf<16>, pkSeed: FixedBuf<16>): SlhDsaKeyPair<32, 64> slhDsaSha2_128sKeyPairDeterministic
functionslhDsaSha2_128sKeyPairDeterministic(skSeed: FixedBuf<16>, skPrf: FixedBuf<16>, pkSeed: FixedBuf<16>): SlhDsaKeyPair<32, 64> slhDsaSha2_128sSign
functionslhDsaSha2_128sSign(signingKey: FixedBuf<64>, message: WebBuf, context?: WebBuf): FixedBuf<7856> slhDsaSha2_128sSignDeterministic
functionslhDsaSha2_128sSignDeterministic(signingKey: FixedBuf<64>, message: WebBuf, context?: WebBuf): FixedBuf<7856> slhDsaSha2_128sSignInternal
functionslhDsaSha2_128sSignInternal(signingKey: FixedBuf<64>, message: WebBuf, addrnd?: FixedBuf<16>): FixedBuf<7856> slhDsaSha2_128sVerify
functionslhDsaSha2_128sVerify(verifyingKey: FixedBuf<32>, message: WebBuf, signature: FixedBuf<7856>, context?: WebBuf): boolean slhDsaSha2_128sVerifyInternal
functionslhDsaSha2_128sVerifyInternal(verifyingKey: FixedBuf<32>, message: WebBuf, signature: FixedBuf<7856>): boolean slhDsaSha2_192fKeyPair
functionslhDsaSha2_192fKeyPair(): SlhDsaKeyPair<48, 96>
slhDsaSha2_192fKeyPair(skSeed: FixedBuf<24>, skPrf: FixedBuf<24>, pkSeed: FixedBuf<24>): SlhDsaKeyPair<48, 96> slhDsaSha2_192fKeyPairDeterministic
functionslhDsaSha2_192fKeyPairDeterministic(skSeed: FixedBuf<24>, skPrf: FixedBuf<24>, pkSeed: FixedBuf<24>): SlhDsaKeyPair<48, 96> slhDsaSha2_192fSign
functionslhDsaSha2_192fSign(signingKey: FixedBuf<96>, message: WebBuf, context?: WebBuf): FixedBuf<35664> slhDsaSha2_192fSignDeterministic
functionslhDsaSha2_192fSignDeterministic(signingKey: FixedBuf<96>, message: WebBuf, context?: WebBuf): FixedBuf<35664> slhDsaSha2_192fSignInternal
functionslhDsaSha2_192fSignInternal(signingKey: FixedBuf<96>, message: WebBuf, addrnd?: FixedBuf<24>): FixedBuf<35664> slhDsaSha2_192fVerify
functionslhDsaSha2_192fVerify(verifyingKey: FixedBuf<48>, message: WebBuf, signature: FixedBuf<35664>, context?: WebBuf): boolean slhDsaSha2_192fVerifyInternal
functionslhDsaSha2_192fVerifyInternal(verifyingKey: FixedBuf<48>, message: WebBuf, signature: FixedBuf<35664>): boolean slhDsaSha2_192sKeyPair
functionslhDsaSha2_192sKeyPair(): SlhDsaKeyPair<48, 96>
slhDsaSha2_192sKeyPair(skSeed: FixedBuf<24>, skPrf: FixedBuf<24>, pkSeed: FixedBuf<24>): SlhDsaKeyPair<48, 96> slhDsaSha2_192sKeyPairDeterministic
functionslhDsaSha2_192sKeyPairDeterministic(skSeed: FixedBuf<24>, skPrf: FixedBuf<24>, pkSeed: FixedBuf<24>): SlhDsaKeyPair<48, 96> slhDsaSha2_192sSign
functionslhDsaSha2_192sSign(signingKey: FixedBuf<96>, message: WebBuf, context?: WebBuf): FixedBuf<16224> slhDsaSha2_192sSignDeterministic
functionslhDsaSha2_192sSignDeterministic(signingKey: FixedBuf<96>, message: WebBuf, context?: WebBuf): FixedBuf<16224> slhDsaSha2_192sSignInternal
functionslhDsaSha2_192sSignInternal(signingKey: FixedBuf<96>, message: WebBuf, addrnd?: FixedBuf<24>): FixedBuf<16224> slhDsaSha2_192sVerify
functionslhDsaSha2_192sVerify(verifyingKey: FixedBuf<48>, message: WebBuf, signature: FixedBuf<16224>, context?: WebBuf): boolean slhDsaSha2_192sVerifyInternal
functionslhDsaSha2_192sVerifyInternal(verifyingKey: FixedBuf<48>, message: WebBuf, signature: FixedBuf<16224>): boolean slhDsaSha2_256fKeyPair
functionslhDsaSha2_256fKeyPair(): SlhDsaKeyPair<64, 128>
slhDsaSha2_256fKeyPair(skSeed: FixedBuf<32>, skPrf: FixedBuf<32>, pkSeed: FixedBuf<32>): SlhDsaKeyPair<64, 128> slhDsaSha2_256fKeyPairDeterministic
functionslhDsaSha2_256fKeyPairDeterministic(skSeed: FixedBuf<32>, skPrf: FixedBuf<32>, pkSeed: FixedBuf<32>): SlhDsaKeyPair<64, 128> slhDsaSha2_256fSign
functionslhDsaSha2_256fSign(signingKey: FixedBuf<128>, message: WebBuf, context?: WebBuf): FixedBuf<49856> slhDsaSha2_256fSignDeterministic
functionslhDsaSha2_256fSignDeterministic(signingKey: FixedBuf<128>, message: WebBuf, context?: WebBuf): FixedBuf<49856> slhDsaSha2_256fSignInternal
functionslhDsaSha2_256fSignInternal(signingKey: FixedBuf<128>, message: WebBuf, addrnd?: FixedBuf<32>): FixedBuf<49856> slhDsaSha2_256fVerify
functionslhDsaSha2_256fVerify(verifyingKey: FixedBuf<64>, message: WebBuf, signature: FixedBuf<49856>, context?: WebBuf): boolean slhDsaSha2_256fVerifyInternal
functionslhDsaSha2_256fVerifyInternal(verifyingKey: FixedBuf<64>, message: WebBuf, signature: FixedBuf<49856>): boolean slhDsaSha2_256sKeyPair
functionslhDsaSha2_256sKeyPair(): SlhDsaKeyPair<64, 128>
slhDsaSha2_256sKeyPair(skSeed: FixedBuf<32>, skPrf: FixedBuf<32>, pkSeed: FixedBuf<32>): SlhDsaKeyPair<64, 128> slhDsaSha2_256sKeyPairDeterministic
functionslhDsaSha2_256sKeyPairDeterministic(skSeed: FixedBuf<32>, skPrf: FixedBuf<32>, pkSeed: FixedBuf<32>): SlhDsaKeyPair<64, 128> slhDsaSha2_256sSign
functionslhDsaSha2_256sSign(signingKey: FixedBuf<128>, message: WebBuf, context?: WebBuf): FixedBuf<29792> slhDsaSha2_256sSignDeterministic
functionslhDsaSha2_256sSignDeterministic(signingKey: FixedBuf<128>, message: WebBuf, context?: WebBuf): FixedBuf<29792> slhDsaSha2_256sSignInternal
functionslhDsaSha2_256sSignInternal(signingKey: FixedBuf<128>, message: WebBuf, addrnd?: FixedBuf<32>): FixedBuf<29792> slhDsaSha2_256sVerify
functionslhDsaSha2_256sVerify(verifyingKey: FixedBuf<64>, message: WebBuf, signature: FixedBuf<29792>, context?: WebBuf): boolean slhDsaSha2_256sVerifyInternal
functionslhDsaSha2_256sVerifyInternal(verifyingKey: FixedBuf<64>, message: WebBuf, signature: FixedBuf<29792>): boolean slhDsaShake_128fKeyPair
functionslhDsaShake_128fKeyPair(): SlhDsaKeyPair<32, 64>
slhDsaShake_128fKeyPair(skSeed: FixedBuf<16>, skPrf: FixedBuf<16>, pkSeed: FixedBuf<16>): SlhDsaKeyPair<32, 64> slhDsaShake_128fKeyPairDeterministic
functionslhDsaShake_128fKeyPairDeterministic(skSeed: FixedBuf<16>, skPrf: FixedBuf<16>, pkSeed: FixedBuf<16>): SlhDsaKeyPair<32, 64> slhDsaShake_128fSign
functionslhDsaShake_128fSign(signingKey: FixedBuf<64>, message: WebBuf, context?: WebBuf): FixedBuf<17088> slhDsaShake_128fSignDeterministic
functionslhDsaShake_128fSignDeterministic(signingKey: FixedBuf<64>, message: WebBuf, context?: WebBuf): FixedBuf<17088> slhDsaShake_128fSignInternal
functionslhDsaShake_128fSignInternal(signingKey: FixedBuf<64>, message: WebBuf, addrnd?: FixedBuf<16>): FixedBuf<17088> slhDsaShake_128fVerify
functionslhDsaShake_128fVerify(verifyingKey: FixedBuf<32>, message: WebBuf, signature: FixedBuf<17088>, context?: WebBuf): boolean slhDsaShake_128fVerifyInternal
functionslhDsaShake_128fVerifyInternal(verifyingKey: FixedBuf<32>, message: WebBuf, signature: FixedBuf<17088>): boolean slhDsaShake_128sKeyPair
functionslhDsaShake_128sKeyPair(): SlhDsaKeyPair<32, 64>
slhDsaShake_128sKeyPair(skSeed: FixedBuf<16>, skPrf: FixedBuf<16>, pkSeed: FixedBuf<16>): SlhDsaKeyPair<32, 64> slhDsaShake_128sKeyPairDeterministic
functionslhDsaShake_128sKeyPairDeterministic(skSeed: FixedBuf<16>, skPrf: FixedBuf<16>, pkSeed: FixedBuf<16>): SlhDsaKeyPair<32, 64> slhDsaShake_128sSign
functionslhDsaShake_128sSign(signingKey: FixedBuf<64>, message: WebBuf, context?: WebBuf): FixedBuf<7856> slhDsaShake_128sSignDeterministic
functionslhDsaShake_128sSignDeterministic(signingKey: FixedBuf<64>, message: WebBuf, context?: WebBuf): FixedBuf<7856> slhDsaShake_128sSignInternal
functionslhDsaShake_128sSignInternal(signingKey: FixedBuf<64>, message: WebBuf, addrnd?: FixedBuf<16>): FixedBuf<7856> slhDsaShake_128sVerify
functionslhDsaShake_128sVerify(verifyingKey: FixedBuf<32>, message: WebBuf, signature: FixedBuf<7856>, context?: WebBuf): boolean slhDsaShake_128sVerifyInternal
functionslhDsaShake_128sVerifyInternal(verifyingKey: FixedBuf<32>, message: WebBuf, signature: FixedBuf<7856>): boolean slhDsaShake_192fKeyPair
functionslhDsaShake_192fKeyPair(): SlhDsaKeyPair<48, 96>
slhDsaShake_192fKeyPair(skSeed: FixedBuf<24>, skPrf: FixedBuf<24>, pkSeed: FixedBuf<24>): SlhDsaKeyPair<48, 96> slhDsaShake_192fKeyPairDeterministic
functionslhDsaShake_192fKeyPairDeterministic(skSeed: FixedBuf<24>, skPrf: FixedBuf<24>, pkSeed: FixedBuf<24>): SlhDsaKeyPair<48, 96> slhDsaShake_192fSign
functionslhDsaShake_192fSign(signingKey: FixedBuf<96>, message: WebBuf, context?: WebBuf): FixedBuf<35664> slhDsaShake_192fSignDeterministic
functionslhDsaShake_192fSignDeterministic(signingKey: FixedBuf<96>, message: WebBuf, context?: WebBuf): FixedBuf<35664> slhDsaShake_192fSignInternal
functionslhDsaShake_192fSignInternal(signingKey: FixedBuf<96>, message: WebBuf, addrnd?: FixedBuf<24>): FixedBuf<35664> slhDsaShake_192fVerify
functionslhDsaShake_192fVerify(verifyingKey: FixedBuf<48>, message: WebBuf, signature: FixedBuf<35664>, context?: WebBuf): boolean slhDsaShake_192fVerifyInternal
functionslhDsaShake_192fVerifyInternal(verifyingKey: FixedBuf<48>, message: WebBuf, signature: FixedBuf<35664>): boolean slhDsaShake_192sKeyPair
functionslhDsaShake_192sKeyPair(): SlhDsaKeyPair<48, 96>
slhDsaShake_192sKeyPair(skSeed: FixedBuf<24>, skPrf: FixedBuf<24>, pkSeed: FixedBuf<24>): SlhDsaKeyPair<48, 96> slhDsaShake_192sKeyPairDeterministic
functionslhDsaShake_192sKeyPairDeterministic(skSeed: FixedBuf<24>, skPrf: FixedBuf<24>, pkSeed: FixedBuf<24>): SlhDsaKeyPair<48, 96> slhDsaShake_192sSign
functionslhDsaShake_192sSign(signingKey: FixedBuf<96>, message: WebBuf, context?: WebBuf): FixedBuf<16224> slhDsaShake_192sSignDeterministic
functionslhDsaShake_192sSignDeterministic(signingKey: FixedBuf<96>, message: WebBuf, context?: WebBuf): FixedBuf<16224> slhDsaShake_192sSignInternal
functionslhDsaShake_192sSignInternal(signingKey: FixedBuf<96>, message: WebBuf, addrnd?: FixedBuf<24>): FixedBuf<16224> slhDsaShake_192sVerify
functionslhDsaShake_192sVerify(verifyingKey: FixedBuf<48>, message: WebBuf, signature: FixedBuf<16224>, context?: WebBuf): boolean slhDsaShake_192sVerifyInternal
functionslhDsaShake_192sVerifyInternal(verifyingKey: FixedBuf<48>, message: WebBuf, signature: FixedBuf<16224>): boolean slhDsaShake_256fKeyPair
functionslhDsaShake_256fKeyPair(): SlhDsaKeyPair<64, 128>
slhDsaShake_256fKeyPair(skSeed: FixedBuf<32>, skPrf: FixedBuf<32>, pkSeed: FixedBuf<32>): SlhDsaKeyPair<64, 128> slhDsaShake_256fKeyPairDeterministic
functionslhDsaShake_256fKeyPairDeterministic(skSeed: FixedBuf<32>, skPrf: FixedBuf<32>, pkSeed: FixedBuf<32>): SlhDsaKeyPair<64, 128> slhDsaShake_256fSign
functionslhDsaShake_256fSign(signingKey: FixedBuf<128>, message: WebBuf, context?: WebBuf): FixedBuf<49856> slhDsaShake_256fSignDeterministic
functionslhDsaShake_256fSignDeterministic(signingKey: FixedBuf<128>, message: WebBuf, context?: WebBuf): FixedBuf<49856> slhDsaShake_256fSignInternal
functionslhDsaShake_256fSignInternal(signingKey: FixedBuf<128>, message: WebBuf, addrnd?: FixedBuf<32>): FixedBuf<49856> slhDsaShake_256fVerify
functionslhDsaShake_256fVerify(verifyingKey: FixedBuf<64>, message: WebBuf, signature: FixedBuf<49856>, context?: WebBuf): boolean slhDsaShake_256fVerifyInternal
functionslhDsaShake_256fVerifyInternal(verifyingKey: FixedBuf<64>, message: WebBuf, signature: FixedBuf<49856>): boolean slhDsaShake_256sKeyPair
functionslhDsaShake_256sKeyPair(): SlhDsaKeyPair<64, 128>
slhDsaShake_256sKeyPair(skSeed: FixedBuf<32>, skPrf: FixedBuf<32>, pkSeed: FixedBuf<32>): SlhDsaKeyPair<64, 128> slhDsaShake_256sKeyPairDeterministic
functionslhDsaShake_256sKeyPairDeterministic(skSeed: FixedBuf<32>, skPrf: FixedBuf<32>, pkSeed: FixedBuf<32>): SlhDsaKeyPair<64, 128> slhDsaShake_256sSign
functionslhDsaShake_256sSign(signingKey: FixedBuf<128>, message: WebBuf, context?: WebBuf): FixedBuf<29792> slhDsaShake_256sSignDeterministic
functionslhDsaShake_256sSignDeterministic(signingKey: FixedBuf<128>, message: WebBuf, context?: WebBuf): FixedBuf<29792> slhDsaShake_256sSignInternal
functionslhDsaShake_256sSignInternal(signingKey: FixedBuf<128>, message: WebBuf, addrnd?: FixedBuf<32>): FixedBuf<29792> slhDsaShake_256sVerify
functionslhDsaShake_256sVerify(verifyingKey: FixedBuf<64>, message: WebBuf, signature: FixedBuf<29792>, context?: WebBuf): boolean slhDsaShake_256sVerifyInternal
functionslhDsaShake_256sVerifyInternal(verifyingKey: FixedBuf<64>, message: WebBuf, signature: FixedBuf<29792>): boolean Interfaces
SlhDsaKeyPair
interfaceverifyingKey: FixedBuf<VkSize>
signingKey: FixedBuf<SkSize>