Soenneker.Hashing.Slhdsa
4.0.558
Prefix Reserved
dotnet add package Soenneker.Hashing.Slhdsa --version 4.0.558
NuGet\Install-Package Soenneker.Hashing.Slhdsa -Version 4.0.558
<PackageReference Include="Soenneker.Hashing.Slhdsa" Version="4.0.558" />
<PackageVersion Include="Soenneker.Hashing.Slhdsa" Version="4.0.558" />
<PackageReference Include="Soenneker.Hashing.Slhdsa" />
paket add Soenneker.Hashing.Slhdsa --version 4.0.558
#r "nuget: Soenneker.Hashing.Slhdsa, 4.0.558"
#:package Soenneker.Hashing.Slhdsa@4.0.558
#addin nuget:?package=Soenneker.Hashing.Slhdsa&version=4.0.558
#tool nuget:?package=Soenneker.Hashing.Slhdsa&version=4.0.558
Soenneker.Hashing.Slhdsa
Generates SLH-DSA post-quantum key pairs, signs UTF-8 messages, and verifies signatures using Bouncy Castle. This is a digital-signature utility, not a password-hashing API.
Installation
dotnet add package Soenneker.Hashing.Slhdsa
Generate keys, sign, and verify
using Soenneker.Hashing.Slhdsa;
(string privateKey, string publicKey) = SlhDsaHashingUtil.GenerateKeyPair();
string signature = SlhDsaHashingUtil.SignMessage(
"release-manifest-v42",
privateKey);
bool valid = SlhDsaHashingUtil.VerifySignature(
"release-manifest-v42",
signature,
publicKey);
Keys and signatures are returned as Base64 strings. The private key contains a DER-encoded PKCS#8 PrivateKeyInfo; the public key contains a DER-encoded X.509 SubjectPublicKeyInfo.
Choose a parameter set
using Soenneker.Hashing.Slhdsa.Enums;
const SlhDsaParameterType parameters = SlhDsaParameterType.SLH_DSA_SHA2_192S;
(string privateKey, string publicKey) =
SlhDsaHashingUtil.GenerateKeyPair(parameters);
string signature = SlhDsaHashingUtil.SignMessage(message, privateKey, parameters);
bool valid = SlhDsaHashingUtil.VerifySignature(message, signature, publicKey, parameters);
The same parameter set must be used for key generation, signing, and verification. The default is SLH_DSA_SHAKE_128F. In the enum names, 128, 192, and 256 identify security categories; F variants favor faster signing with larger signatures, while S variants favor smaller signatures with slower signing.
The overloads accepting Bouncy Castle’s SlhDsaParameters or a signer-name string are available for advanced interoperability scenarios. Prefer the enum overloads when both sides use this package.
VerifySignature() returns false for malformed Base64, invalid keys, invalid signatures, unsupported signer names, and encoded inputs above its defensive size limits. Signing and key generation surface configuration/key errors. Decoded private-key and message buffers are cleared after signing, but the returned private-key string is immutable managed data: protect it with an appropriate secret store, restrict access, and never log it.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- BouncyCastle.Cryptography (>= 2.7.0)
- Soenneker.Extensions.Arrays.Bytes (>= 4.0.69)
- Soenneker.Extensions.String (>= 4.0.770)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 4.0.558 | 97 | 9/30/2026 |
| 4.0.557 | 108 | 9/25/2026 |
| 4.0.556 | 87 | 9/25/2026 |
| 4.0.555 | 85 | 9/24/2026 |
| 4.0.554 | 95 | 9/24/2026 |
| 4.0.553 | 93 | 9/20/2026 |
| 4.0.552 | 100 | 9/16/2026 |
| 4.0.551 | 104 | 9/16/2026 |
| 4.0.550 | 91 | 9/16/2026 |
| 4.0.549 | 92 | 9/15/2026 |
| 4.0.548 | 93 | 9/15/2026 |
| 4.0.547 | 97 | 9/13/2026 |
| 4.0.546 | 107 | 9/13/2026 |
| 4.0.545 | 94 | 9/13/2026 |
| 4.0.544 | 95 | 9/12/2026 |
| 4.0.543 | 97 | 9/12/2026 |
| 4.0.542 | 94 | 9/12/2026 |
| 4.0.539 | 98 | 9/9/2026 |
| 4.0.538 | 99 | 9/8/2026 |
| 4.0.537 | 103 | 9/8/2026 |
Updated Soenneker.Extensions.String to 4.0.770