.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" Required to disable full justification in groff 1.23.0. .if n .ds AD l .\" ======================================================================== .\" .IX Title "EVP_PKEY-LMS 7ssl" .TH EVP_PKEY-LMS 7ssl 2025-10-01 3.6.0 OpenSSL .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME EVP_PKEY\-LMS, EVP_KEYMGMT\-LMS, LMS \&\- EVP_PKEY Leighton\-Micali Signature (LMS) keytype and algorithm support .SH DESCRIPTION .IX Header "DESCRIPTION" The \fBLMS\fR keytype is implemented in OpenSSL\*(Aqs default and FIPS providers. The OpenSSL providers only support LMS signature verification, as this is a [SP 800\-208](https://csrc.nist.gov/pubs/sp/800/208/final) requirement for FIPS software modules. .SS "Common LMS parameters" .IX Subsection "Common LMS parameters" LMS public keys are encoded in XDR format (i.e. not ASN1 format). The following parameters are used by \fBEVP_PKEY_fromdata()\fR and by the LMS keymanager for import and export. .IP """pub"" (\fBOSSL_PKEY_PARAM_PUB_KEY\fR) " 4 .IX Item """pub"" (OSSL_PKEY_PARAM_PUB_KEY) " Used for getting and setting the encoding of an LMS public key. The public key is expected to be in XDR format. .SH "CONFORMING TO" .IX Header "CONFORMING TO" .IP "RFC 8554" 4 .IX Item "RFC 8554" Leighton\-Micali Hash\-Based Signatures .IP "NIST SP800\-208" 4 .IX Item "NIST SP800-208" Recommendation for Stateful Hash\-Based Signature Schemes .IP "CNSA 2.0" 4 .IX Item "CNSA 2.0" Commercial National Security Algorithm Suite .SH NOTES .IX Header "NOTES" LMS support is disabled by default at compile\-time. To enable it, specify the \fBenable\-lms\fR build configuration option. .SH EXAMPLES .IX Header "EXAMPLES" NOTE error checking has been omitted in these examples .PP An \fBEVP_PKEY\fR context can be obtained by calling: .PP .Vb 1 \& EVP_PKEY_CTX *ctx = EVP_PKEY_CTX_new_from_name(libctx, "LMS", propq); .Ve .PP An \fBLMS\fR public key can be loaded simply like this: .PP .Vb 3 \& EVP_PKEY *pkey = NULL; \& OSSL_DECODER_CTX *dctx = NULL; \& int selection = OSSL_KEYMGMT_SELECT_PUBLIC_KEY; \& \& dctx = OSSL_DECODER_CTX_new_for_pkey(&pkey, "XDR", NULL, \& "LMS", selection, libctx, propq); \& ret = OSSL_DECODER_from_bio(dctx, bio); \& OSSL_DECODER_CTX_free(dctx); .Ve .PP To load a LMS key from XDR encoded "data" of size "datalen": .PP .Vb 2 \& EVP_PKEY *key = NULL; \& OSSL_PARAM params[2]; \& \& params[0] = \& OSSL_PARAM_construct_octet_string(OSSL_PKEY_PARAM_ENCODED_PUBLIC_KEY, \& (unsigned char *)data, datalen); \& params[1] = OSSL_PARAM_construct_end(); \& ret = EVP_PKEY_fromdata_init(ctx) \& ret = EVP_PKEY_fromdata(ctx, &key, EVP_PKEY_PUBLIC_KEY, params); .Ve .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fBEVP_KEYMGMT\fR\|(3), \&\fBEVP_PKEY\fR\|(3), \&\fBEVP_SIGNATURE\-LMS\fR\|(7), \&\fBprovider\-keymgmt\fR\|(7) .SH HISTORY .IX Header "HISTORY" This functionality was added in OpenSSL 3.6. .SH COPYRIGHT .IX Header "COPYRIGHT" Copyright 2025 The OpenSSL Project Authors. All Rights Reserved. .PP 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 .