xref: /openssl/doc/man3/OPENSSL_s390xcap.pod (revision 7ed6de99)
1=pod
2
3=head1 NAME
4
5OPENSSL_s390xcap - the IBM z processor capabilities vector
6
7=head1 SYNOPSIS
8
9 env OPENSSL_s390xcap=... <application>
10
11=head1 DESCRIPTION
12
13libcrypto supports z/Architecture instruction set extensions. These
14extensions are denoted by individual bits in the capabilities vector.
15When libcrypto is initialized, the bits returned by the STFLE instruction
16and by the QUERY functions are stored in the vector.
17
18To change the set of instructions available to an application, you can
19set the B<OPENSSL_s390xcap> environment variable before you start the
20application. After initialization, the capability vector is ANDed bitwise
21with a mask which is derived from the environment variable.
22
23The environment variable is a semicolon-separated list of tokens which is
24processed from left to right (whitespace is ignored):
25
26 OPENSSL_s390xcap="<tok1>;<tok2>;..."
27
28There are four types of tokens:
29
30=over 4
31
32=item <string>
33
34The name of a processor generation. A bit in the environment variable's
35mask is set to one if and only if the specified processor generation
36implements the corresponding instruction set extension. Possible values
37are B<z900>, B<z990>, B<z9>, B<z10>, B<z196>, B<zEC12>, B<z13>, B<z14>,
38B<z15>, and B<z16>.
39
40=item <string>:<mask>:<mask>
41
42The name of an instruction followed by two 64-bit masks. The part of the
43environment variable's mask corresponding to the specified instruction is
44set to the specified 128-bit mask. Possible values are B<kimd>, B<klmd>,
45B<km>, B<kmc>, B<kmac>, B<kmctr>, B<kmo>, B<kmf>, B<prno>, B<kma>, B<pcc>
46and B<kdsa>.
47
48=item stfle:<mask>:<mask>:<mask>
49
50Store-facility-list-extended (stfle) followed by three 64-bit masks. The
51part of the environment variable's mask corresponding to the stfle
52instruction is set to the specified 192-bit mask.
53
54=item nocex
55
56Deactivate modular exponentiation and CRT operation offloading to
57Crypto Express Adapters.
58
59=back
60
61The 64-bit masks are specified in hexadecimal notation. The 0x prefix is
62optional. Prefix a mask with a tilde, C<~>, to denote a bitwise NOT operation.
63
64The following is a list of significant bits for each instruction. Colon
65rows separate the individual 64-bit masks. The bit numbers in the first
66column are consistent with [1], that is, 0 denotes the leftmost bit and
67the numbering is continuous across 64-bit mask boundaries.
68
69      Bit     Mask     Facility/Function
70
71 stfle:
72      # 17    1<<46    message-security assist
73      # 25    1<<38    store-clock-fast facility
74      :
75      # 76    1<<51    message-security assist extension 3
76      # 77    1<<50    message-security assist extension 4
77      # 86    1<<41    message-security-assist extension 12
78      :
79      #129    1<<62    vector facility
80      #134    1<<57    vector packed decimal facility
81      #135    1<<56    vector enhancements facility 1
82      #146    1<<45    message-security assist extension 8
83      #155    1<<36    message-security assist extension 9
84
85 kimd :
86      #  1    1<<62    KIMD-SHA-1
87      #  2    1<<61    KIMD-SHA-256
88      #  3    1<<60    KIMD-SHA-512
89      # 32    1<<31    KIMD-SHA3-224
90      # 33    1<<30    KIMD-SHA3-256
91      # 34    1<<29    KIMD-SHA3-384
92      # 35    1<<28    KIMD-SHA3-512
93      # 36    1<<27    KIMD-SHAKE-128
94      # 37    1<<26    KIMD-SHAKE-256
95      :
96      # 65    1<<62    KIMD-GHASH
97
98 klmd :
99      # 32    1<<31    KLMD-SHA3-224
100      # 33    1<<30    KLMD-SHA3-256
101      # 34    1<<29    KLMD-SHA3-384
102      # 35    1<<28    KLMD-SHA3-512
103      # 36    1<<27    KLMD-SHAKE-128
104      # 37    1<<26    KLMD-SHAKE-256
105      :
106
107 km   :
108      # 18    1<<45    KM-AES-128
109      # 19    1<<44    KM-AES-192
110      # 20    1<<43    KM-AES-256
111      # 50    1<<13    KM-XTS-AES-128
112      # 52    1<<11    KM-XTS-AES-256
113      :
114      # 82    1<<45    KM-XTS-AES-128-MSA10
115      # 84    1<<43    KM-XTS-AES-256-MSA10
116
117 kmc  :
118      # 18    1<<45    KMC-AES-128
119      # 19    1<<44    KMC-AES-192
120      # 20    1<<43    KMC-AES-256
121      :
122
123 kmac :
124      # 18    1<<45    KMAC-AES-128
125      # 19    1<<44    KMAC-AES-192
126      # 20    1<<43    KMAC-AES-256
127      :
128      # 112   1<<15    KMAC-SHA-224
129      # 113   1<<14    KMAC-SHA-256
130      # 114   1<<13    KMAC-SHA-384
131      # 115   1<<12    KMAC-SHA-512
132
133 kmctr:
134      :
135
136 kmo  :
137      # 18    1<<45    KMO-AES-128
138      # 19    1<<44    KMO-AES-192
139      # 20    1<<43    KMO-AES-256
140      :
141
142 kmf  :
143      # 18    1<<45    KMF-AES-128
144      # 19    1<<44    KMF-AES-192
145      # 20    1<<43    KMF-AES-256
146      :
147
148 prno :
149      :
150
151 kma  :
152      # 18    1<<45    KMA-GCM-AES-128
153      # 19    1<<44    KMA-GCM-AES-192
154      # 20    1<<43    KMA-GCM-AES-256
155      :
156
157 pcc  :
158      :
159      # 64    1<<63    PCC-Scalar-Multiply-P256
160      # 65    1<<62    PCC-Scalar-Multiply-P384
161      # 66    1<<61    PCC-Scalar-Multiply-P521
162      # 72    1<<55    PCC-Scalar-Multiply-Ed25519
163      # 73    1<<54    PCC-Scalar-Multiply-Ed448
164      # 80    1<<47    PCC-Scalar-Multiply-X25519
165      # 81    1<<46    PCC-Scalar-Multiply-X448
166
167 kdsa :
168      #  1    1<<62    KDSA-ECDSA-Verify-P256
169      #  2    1<<61    KDSA-ECDSA-Verify-P384
170      #  3    1<<60    KDSA-ECDSA-Verify-P521
171      #  9    1<<54    KDSA-ECDSA-Sign-P256
172      # 10    1<<53    KDSA-ECDSA-Sign-P384
173      # 11    1<<52    KDSA-ECDSA-Sign-P521
174      # 32    1<<31    KDSA-EdDSA-Verify-Ed25519
175      # 36    1<<27    KDSA-EdDSA-Verify-Ed448
176      # 40    1<<23    KDSA-EdDSA-Sign-Ed25519
177      # 44    1<<19    KDSA-EdDSA-Sign-Ed448
178      :
179
180=head1 RETURN VALUES
181
182Not available.
183
184=head1 EXAMPLES
185
186Disables all instruction set extensions which the z196 processor does not implement:
187
188 OPENSSL_s390xcap="z196"
189
190Disables the vector facility:
191
192 OPENSSL_s390xcap="stfle:~0:~0:~0x4000000000000000"
193
194Disables the KM-XTS-AES and the KIMD-SHAKE function codes:
195
196 OPENSSL_s390xcap="km:~0x2800:~0;kimd:~0xc000000:~0"
197
198=head1 SEE ALSO
199
200[1] z/Architecture Principles of Operation, SA22-7832-12
201
202=head1 COPYRIGHT
203
204Copyright 2018-2024 The OpenSSL Project Authors. All Rights Reserved.
205
206Licensed under the Apache License 2.0 (the "License").  You may not use
207this file except in compliance with the License.  You can obtain a copy
208in the file LICENSE in the source distribution or at
209L<https://www.openssl.org/source/license.html>.
210
211=cut
212