EVP_SIGNATURE-LMS(7SSL)

πŸ“¦
version 4.0.3 Β· 3 versions
, in ubuntu stonking

πŸ’– NAME πŸ’–

EVP_SIGNATURE-LMS β€” the EVP_PKEY LMS signature implementation, aka the Leighton-Micali Signatures corner of OpenSSL, bestie. It's giving "verify only, no signing, we're just here to check your vibes." ✨

This page lives in the 7SSL manual, and it's part of the OpenSSL fam. 🫢


🌸 DESCRIPTION 🌸

So, the LMS EVP_PKEY implementation supports Leighton-Micali Signatures (LMS), described in [RFC 8554](https://datatracker.ietf.org/doc/html/rfc8854) and [SP 800-208](https://csrc.nist.gov/pubs/sp/800/208/final). πŸ’…

Not me about to drop the biggest tea: the OpenSSL providers only support LMS signature verification β€” no signing, sorry babes. That's not a vibe choice, it's literally an [SP 800-208](https://csrc.nist.gov/pubs/sp/800/208/final) requirement for FIPS software modules. Rules are rules. πŸ”₯

EVP_PKEY_verify_message_init() and EVP_PKEY_verify() are the only supported functions used for LMS signatures. Periodt.

Streaming? Not currently supported. And since the signature data already contains data related to the digest used, the functions that specify the digest name are literally not necessary. Redundant queen behavior, we don't do it. πŸ’€

⭐ FIPS indicator ⭐

This one parameter can be retrieved using EVP_PKEY_CTX_get_params(3):

  • "fips-indicator" (OSSL_SIGNATURE_PARAM_FIPS_APPROVED_INDICATOR) <integer> β€” the OpenSSL FIPS provider returns 1 if the operation is FIPS approved, or 0 otherwise. Peep "FIPS indicators" in fips_module(7) for more info. πŸ‘‘

πŸŽ€ NOTES πŸŽ€

  • LMS support is disabled by default at compile-time. To enable it, specify the enable-lms build configuration option. You gotta opt in, it's not just gonna show up uninvited. πŸ™ˆ
  • For backwards compatibility reasons, EVP_DigestVerifyInit_ex() and EVP_DigestVerify() may also be used β€” but the digest passed in mdname must be NULL. No exceptions, no cap. 🚨
  • LMS should only be used for older deployments. New deployments should use either EVP_SIGNATURE-ML-DSA(7) or EVP_SIGNATURE-SLH-DSA(7). We love a legacy moment but don't build new stuff on it fr fr. πŸ’–

🌈 EXAMPLES 🌈

Error checking has been omitted from the following examples. Yeah, we're rawdogging the return codes here β€” don't try this at home. 😭

πŸ¦‹ LMS signature verification πŸ¦‹

/* See L<EVP_PKEY-LMS(7)/EXAMPLES for an example of loading a LMS |pub| key */
ctx = EVP_PKEY_CTX_new_from_pkey(libctx, pub, propq);
sig = EVP_SIGNATURE_fetch(libctx, "LMS", propq);
EVP_PKEY_verify_message_init(ctx, sig, NULL);
/*
 * EVP_PKEY_verify_message_update() and EVP_PKEY_verify_message_final()
 * are not supported
 */
ret = EVP_PKEY_verify(ctx, sigdata, sigdata_len, msg, msglen);
/*
 * ret == 1 indicates success, 0 verify failure and < 0 for some
 * other error.
 */

So like, ret == 1 is a slay, 0 is a verify failure (rip), and < 0 means some other error happened. Keep an eye on that value, bestie. πŸ‘οΈπŸ’§


πŸ‘‘ SEE ALSO πŸ‘‘

EVP_PKEY-LMS(7), provider-signature(7),


🧚 HISTORY 🧚

This functionality was added in OpenSSL 3.6. Support for EVP_DigestVerifyInit_ex() and EVP_DigestVerify() was added in OpenSSL 4.0. Glow-up timeline, honestly. ✨


Copyright 2025-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, from the EVP_SIGNATURE-LMS(7SSL) manual β€” go verify something iconic, ily, mwah πŸ’…πŸ’–

πŸ“¦ where this page comes from