EVP_PKEY-SLH-DSA(7SSL)
π EVP_PKEY-SLH-DSA π
okay bestie, sit down, hydrate, because this is the EVP_PKEY-SLH-DSA(7SSL) manual page and it's literally iconic. post-quantum signatures, tiny keys, big brains. no cap. π§β¨
β¨ NAME β¨
so basically this page covers the EVP_PKEY SLH-DSA keytype and algorithm support. that's a whole squad, and here's every single member, no one left behind π
EVP_PKEY-SLH-DSAEVP_KEYMGMT-SLH-DSAEVP_PKEY-SLH-DSA-SHA2-128sEVP_PKEY-SLH-DSA-SHA2-128fEVP_PKEY-SLH-DSA-SHA2-192sEVP_PKEY-SLH-DSA-SHA2-192fEVP_PKEY-SLH-DSA-SHA2-256sEVP_PKEY-SLH-DSA-SHA2-256fEVP_PKEY-SLH-DSA-SHAKE-128sEVP_PKEY-SLH-DSA-SHAKE-128fEVP_PKEY-SLH-DSA-SHAKE-192sEVP_PKEY-SLH-DSA-SHAKE-192fEVP_PKEY-SLH-DSA-SHAKE-256sEVP_PKEY-SLH-DSA-SHAKE-256f
πΈ DESCRIPTION πΈ
okay so SLH-DSA implements these algorithms, and yes you have to say all twelve of them out loud because they each deserve their moment:
SLH-DSA-SHA2-128sSLH-DSA-SHA2-128fSLH-DSA-SHA2-192sSLH-DSA-SHA2-192fSLH-DSA-SHA2-256sSLH-DSA-SHA2-256fSLH-DSA-SHAKE-128sSLH-DSA-SHAKE-128fSLH-DSA-SHAKE-192sSLH-DSA-SHAKE-192fSLH-DSA-SHAKE-256sSLH-DSA-SHAKE-256f
and the matching key types, also twelve, also all main characters:
EVP_PKEY_SLH_DSA_SHA2_128SEVP_PKEY_SLH_DSA_SHA2_128FEVP_PKEY_SLH_DSA_SHA2_192SEVP_PKEY_SLH_DSA_SHA2_192FEVP_PKEY_SLH_DSA_SHA2_256SEVP_PKEY_SLH_DSA_SHA2_256FEVP_PKEY_SLH_DSA_SHAKE_128SEVP_PKEY_SLH_DSA_SHAKE_128FEVP_PKEY_SLH_DSA_SHAKE_192SEVP_PKEY_SLH_DSA_SHAKE_192FEVP_PKEY_SLH_DSA_SHAKE_256SEVP_PKEY_SLH_DSA_SHAKE_256F
these are all implemented in OpenSSL's default and FIPS providers π«Ά and these implementations support the associated key, which contains the public key pub and the private key priv.
SLH-DSA stands for Stateless Hash-based Digital Signature Standard and the vibe is: small keys, but relatively large signatures, and it is relatively slow at performing all operations compared to ML-DSA π. the glow-up though? it has proven security proofs, because it relies only on hash functions. periodt.
each of the different key types has an associated security parameter n. this value is one of 16, 24 or 32 for key types SLH-DSA*128*, SLH-DSA*192* and SLH-DSA*256*, respectively. π’
both the public and private key components contain 2 elements of size n. key generation generates the private key elements and one of the public key elements randomly, and the final public key element is computed from these values. math ate, honestly.
the public key has relatively small sizes of 32, 48 or 64 bytes, corresponding to the algorithm names of 128, 192 and 256 respectively. tiny. adorable. pocket-sized. π
the algorithms ending with s produce smaller signatures, but they are much slower than the faster f variants. it's giving "small but takes forever to get ready". π
the signature sizes for the s algorithm variants are 7856, 16224 and 29792, which correspond to the algorithm names of 128s, 192s and 256s respectively. the signature sizes for the f algorithm variants are 17088, 35664 and 49856, which correspond to the algorithm names containing 128f, 192f and 256f respectively.
internally there are 7 hash related functions that are used for each algorithm. for algorithms containing SHAKE in their name, SHAKE-256 is used for all functions. for the <SHA2-128> algorithms the functions use <MGF1-SHA-256>, <HMAC-SHA-256> and <SHA-256>. the remaining <SHA2> algorithms use <MGF1-SHA-512>, <HMAC-SHA-512>, <SHA-256> and <SHA-512>. see FIPS 205 Section 11.1 and 11.2 for more information. iykyk π
π Keygen Parameters π
"seed"(OSSL_PKEY_PARAM_SLH_DSA_SEED)<octet string>β supplies values to use for the private seed, private prf and public seed instead of generating random values.
β οΈ bestie this is for testing purposes only. and the length of the value supplied must be 3 * n.
"properties"(OSSL_PKEY_PARAM_PROPERTIES)<utf8_string>β sets properties to be used when fetching algorithm implementations used for SLH-DSA hashing operations.
use EVP_PKEY_CTX_set_params() after calling EVP_PKEY_keygen_init(). π«Ά
the following key generation parameter can be retrieved with EVP_PKEY_CTX_get_params(3) from the OpenSSL FIPS provider:
"fips-indicator"(OSSL_PKEY_PARAM_FIPS_APPROVED_INDICATOR)<integer>β returns1if the operation is FIPS approved, or0otherwise. see "FIPS indicators" infips_module(7)for more information.
π¦ Common SLH-DSA parameters π¦
in addition to the common parameters that all keytypes should support (see "Common Information Parameters" in provider-keymgmt(7)), the implementation of these key types supports the following. π
the following parameters are gettable using EVP_PKEY_get_octet_string_param(), and settable when using EVP_PKEY_fromdata().
"pub"(OSSL_PKEY_PARAM_PUB_KEY)<octet string>β the public key has a size of2 * nbytes. i.e. it consists of the concatenation ofPK.seedandPK.rootas defined by FIPS 205 Figure 16."priv"(OSSL_PKEY_PARAM_PRIV_KEY)<octet string>β the private key has a size of4 * nbytes, which includes the public key components. i.e. it consists of the concatenation ofSK.seed,SK.prf,PK.seedandPF.rootas defined by FIPS 205 Figure 15."mandatory-digest"(OSSL_PKEY_PARAM_MANDATORY_DIGEST)<UTF8 string>β the empty string, signifying that no digest may be specified.
π CONFORMING TO π
FIPS 205. slay. certified behavior only π
β¨ EXAMPLES β¨
an EVP_PKEY context can be obtained by calling:
EVP_PKEY_CTX *pctx =
EVP_PKEY_CTX_new_from_name(NULL, "SLH-DSA-SHA2-128f", NULL);
an SLH-DSA key can be generated like this:
pkey = EVP_PKEY_Q_keygen(NULL, NULL, "SLH-DSA-SHA2-128f");
the key pair components can be extracted from a key by calling:
uint8_t priv[64], pub[32];
size_t priv_len, pub_len;
EVP_PKEY_get_octet_string_param(pkey, OSSL_PKEY_PARAM_PRIV_KEY,
priv, sizeof(priv), &priv_len);
EVP_PKEY_get_octet_string_param(pkey, OSSL_PKEY_PARAM_PUB_KEY,
pub, sizeof(pub), &pub_len));
similar code can be used for the other key types such as "SLH-DSA-SHAKE-256f". π§
π SEE ALSO π
π HISTORY π
this functionality was added in OpenSSL 3.5. yes she's new here and she's already thriving. π
π COPYRIGHT π
Copyright 2024-2026 The OpenSSL Project Authors. All Rights Reserved.
Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at https://www.openssl.org/source/license.html.
and that's the whole page, bestie π«Ά this was OpenSSL 4.0.3, dated 2026-09-29 β go forth and sign things with hash-based main character energy ππ
π¦ where this page comes from
- ubuntu stonking: openssl 4.0.3-1ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms