Debian Codegraph @

upstream/debian-unstable/man7/EVP_PKEY-LMS.7ssl

raw
1 .\" -*- mode: troff; coding: utf-8 -*-
2 .\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
3 .\"
4 .\" Standard preamble:
5 .\" ========================================================================
6 .de Sp \" Vertical space (when we can't use .PP)
7 .if t .sp .5v
8 .if n .sp
9 ..
10 .de Vb \" Begin verbatim text
11 .ft CW
12 .nf
13 .ne \\$1
14 ..
15 .de Ve \" End verbatim text
16 .ft R
17 .fi
18 ..
19 .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
20 .ie n \{\
21 . ds C` ""
22 . ds C' ""
23 'br\}
24 .el\{\
25 . ds C`
26 . ds C'
27 'br\}
28 .\"
29 .\" Escape single quotes in literal strings from groff's Unicode transform.
30 .ie \n(.g .ds Aq \(aq
31 .el .ds Aq '
32 .\"
33 .\" If the F register is >0, we'll generate index entries on stderr for
34 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
35 .\" entries marked with X<> in POD. Of course, you'll have to process the
36 .\" output yourself in some meaningful fashion.
37 .\"
38 .\" Avoid warning from groff about undefined register 'F'.
39 .de IX
40 ..
41 .nr rF 0
42 .if \n(.g .if rF .nr rF 1
43 .if (\n(rF:(\n(.g==0)) \{\
44 . if \nF \{\
45 . de IX
46 . tm Index:\\$1\t\\n%\t"\\$2"
47 ..
48 . if !\nF==2 \{\
49 . nr % 0
50 . nr F 2
51 . \}
52 . \}
53 .\}
54 .rr rF
55 .\" ========================================================================
56 .\"
57 .IX Title "EVP_PKEY-LMS 7SSL"
58 .TH EVP_PKEY-LMS 7SSL 2026-04-07 3.6.2 OpenSSL
59 .\" For nroff, turn off justification. Always turn off hyphenation; it makes
60 .\" way too many mistakes in technical documents.
61 .if n .ad l
62 .nh
63 .SH NAME
64 EVP_PKEY\-LMS, EVP_KEYMGMT\-LMS, LMS
65 \&\- EVP_PKEY Leighton\-Micali Signature (LMS) keytype and algorithm support
66 .SH DESCRIPTION
67 .IX Header "DESCRIPTION"
68 The \fBLMS\fR keytype is implemented in OpenSSL's default and FIPS providers.
69 The OpenSSL providers only support LMS signature verification, as this is a
70 [SP 800\-208](https://csrc.nist.gov/pubs/sp/800/208/final) requirement for
71 FIPS software modules.
72 .SS "Common LMS parameters"
73 .IX Subsection "Common LMS parameters"
74 LMS public keys are encoded in XDR format (i.e. not ASN1 format).
75 The following parameters are used by \fBEVP_PKEY_fromdata()\fR and by the
76 LMS keymanager for import and export.
77 .IP """pub"" (\fBOSSL_PKEY_PARAM_PUB_KEY\fR) <octet string>" 4
78 .IX Item """pub"" (OSSL_PKEY_PARAM_PUB_KEY) <octet string>"
79 Used for getting and setting the encoding of an LMS public key. The public key
80 is expected to be in XDR format.
81 .SH "CONFORMING TO"
82 .IX Header "CONFORMING TO"
83 .IP "RFC 8554" 4
84 .IX Item "RFC 8554"
85 Leighton-Micali Hash-Based Signatures
86 .IP "NIST SP800\-208" 4
87 .IX Item "NIST SP800-208"
88 Recommendation for Stateful Hash-Based Signature Schemes
89 .IP "CNSA 2.0" 4
90 .IX Item "CNSA 2.0"
91 Commercial National Security Algorithm Suite
92 .SH NOTES
93 .IX Header "NOTES"
94 LMS support is disabled by default at compile-time.
95 To enable it, specify the \fBenable-lms\fR build configuration option.
96 .SH EXAMPLES
97 .IX Header "EXAMPLES"
98 NOTE error checking has been omitted in these examples
99 .PP
100 An \fBEVP_PKEY\fR context can be obtained by calling:
101 .PP
102 .Vb 1
103 \& EVP_PKEY_CTX *ctx = EVP_PKEY_CTX_new_from_name(libctx, "LMS", propq);
104 .Ve
105 .PP
106 An \fBLMS\fR public key can be loaded simply like this:
107 .PP
108 .Vb 3
109 \& EVP_PKEY *pkey = NULL;
110 \& OSSL_DECODER_CTX *dctx = NULL;
111 \& int selection = OSSL_KEYMGMT_SELECT_PUBLIC_KEY;
112 \&
113 \& dctx = OSSL_DECODER_CTX_new_for_pkey(&pkey, "XDR", NULL,
114 \& "LMS", selection, libctx, propq);
115 \& ret = OSSL_DECODER_from_bio(dctx, bio);
116 \& OSSL_DECODER_CTX_free(dctx);
117 .Ve
118 .PP
119 To load a LMS key from XDR encoded "data" of size "datalen":
120 .PP
121 .Vb 2
122 \& EVP_PKEY *key = NULL;
123 \& OSSL_PARAM params[2];
124 \&
125 \& params[0] =
126 \& OSSL_PARAM_construct_octet_string(OSSL_PKEY_PARAM_ENCODED_PUBLIC_KEY,
127 \& (unsigned char *)data, datalen);
128 \& params[1] = OSSL_PARAM_construct_end();
129 \& ret = EVP_PKEY_fromdata_init(ctx)
130 \& ret = EVP_PKEY_fromdata(ctx, &key, EVP_PKEY_PUBLIC_KEY, params);
131 .Ve
132 .SH "SEE ALSO"
133 .IX Header "SEE ALSO"
134 \&\fBEVP_KEYMGMT\fR\|(3),
135 \&\fBEVP_PKEY\fR\|(3),
136 \&\fBEVP_SIGNATURE\-LMS\fR\|(7),
137 \&\fBprovider\-keymgmt\fR\|(7)
138 .SH HISTORY
139 .IX Header "HISTORY"
140 This functionality was added in OpenSSL 3.6.
141 .SH COPYRIGHT
142 .IX Header "COPYRIGHT"
143 Copyright 2025 The OpenSSL Project Authors. All Rights Reserved.
144 .PP
145 Licensed under the Apache License 2.0 (the "License"). You may not use
146 this file except in compliance with the License. You can obtain a copy
147 in the file LICENSE in the source distribution or at
148 <https://www.openssl.org/source/license.html>.