| 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 "OPENSSL_RISCVCAP 3SSL" |
| 58 |
.TH OPENSSL_RISCVCAP 3SSL 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 |
OPENSSL_riscvcap \- the RISC\-V processor capabilities vector |
| 65 |
.SH SYNOPSIS |
| 66 |
.IX Header "SYNOPSIS" |
| 67 |
.Vb 1 |
| 68 |
\& env OPENSSL_riscvcap=... <application> |
| 69 |
.Ve |
| 70 |
.SH DESCRIPTION |
| 71 |
.IX Header "DESCRIPTION" |
| 72 |
libcrypto supports RISC-V instruction set extensions. These |
| 73 |
extensions are denoted by individual extension names in the capabilities |
| 74 |
vector. For Linux platform, when libcrypto is initialized, the results |
| 75 |
returned by the RISC-V Hardware Probing syscall (hwprobe) are stored |
| 76 |
in the vector. Otherwise all capabilities are disabled. |
| 77 |
.PP |
| 78 |
To override the set of instructions available to an application, you can |
| 79 |
set the \fBOPENSSL_riscvcap\fR environment variable before you start the |
| 80 |
application. |
| 81 |
.PP |
| 82 |
The environment variable is similar to the RISC-V ISA string defined in the |
| 83 |
RISC-V Instruction Set Manual. It is case insensitive. Though due to the limit |
| 84 |
of the environment variable parser inside libcrypto, an extension must be |
| 85 |
prefixed with an underscore to make it recognizable. This also applies to the |
| 86 |
Vector extension. |
| 87 |
.PP |
| 88 |
.Vb 1 |
| 89 |
\& OPENSSL_riscvcap="rv64gc_v_zba_zbb_zbs..." |
| 90 |
.Ve |
| 91 |
.PP |
| 92 |
Note that extension implication is currently not implemented. |
| 93 |
For example, when "rv64gc_b" is provided as the environment variable, |
| 94 |
zba/zbb/zbs would not be implied in the capability vector. |
| 95 |
.PP |
| 96 |
Currently only these extensions are recognized: |
| 97 |
.IP ZBA 4 |
| 98 |
.IX Item "ZBA" |
| 99 |
Address Generation |
| 100 |
.Sp |
| 101 |
Could be detected using hwprobe for Linux kernel >= 6.5 |
| 102 |
.IP ZBB 4 |
| 103 |
.IX Item "ZBB" |
| 104 |
Basic bit-manipulation |
| 105 |
.Sp |
| 106 |
Could be detected using hwprobe for Linux kernel >= 6.5 |
| 107 |
.IP ZBC 4 |
| 108 |
.IX Item "ZBC" |
| 109 |
Carry-less multiplication |
| 110 |
.Sp |
| 111 |
Could be detected using hwprobe for Linux kernel >= 6.8 |
| 112 |
.IP ZBS 4 |
| 113 |
.IX Item "ZBS" |
| 114 |
Single-bit instructions |
| 115 |
.Sp |
| 116 |
Could be detected using hwprobe for Linux kernel >= 6.5 |
| 117 |
.IP ZBKB 4 |
| 118 |
.IX Item "ZBKB" |
| 119 |
Bit-manipulation for Cryptography |
| 120 |
.Sp |
| 121 |
Could be detected using hwprobe for Linux kernel >= 6.8 |
| 122 |
.IP ZBKC 4 |
| 123 |
.IX Item "ZBKC" |
| 124 |
Carry-less multiplication for Cryptography |
| 125 |
.Sp |
| 126 |
Could be detected using hwprobe for Linux kernel >= 6.8 |
| 127 |
.IP ZBKX 4 |
| 128 |
.IX Item "ZBKX" |
| 129 |
Crossbar permutations |
| 130 |
.Sp |
| 131 |
Could be detected using hwprobe for Linux kernel >= 6.8 |
| 132 |
.IP ZKND 4 |
| 133 |
.IX Item "ZKND" |
| 134 |
NIST Suite: AES Decryption |
| 135 |
.Sp |
| 136 |
Could be detected using hwprobe for Linux kernel >= 6.8 |
| 137 |
.IP ZKNE 4 |
| 138 |
.IX Item "ZKNE" |
| 139 |
NIST Suite: AES Encryption |
| 140 |
.Sp |
| 141 |
Could be detected using hwprobe for Linux kernel >= 6.8 |
| 142 |
.IP ZKNH 4 |
| 143 |
.IX Item "ZKNH" |
| 144 |
NIST Suite: Hash Function Instructions |
| 145 |
.Sp |
| 146 |
Could be detected using hwprobe for Linux kernel >= 6.8 |
| 147 |
.IP ZKSED 4 |
| 148 |
.IX Item "ZKSED" |
| 149 |
ShangMi Suite: SM4 Block Cipher Instructions |
| 150 |
.Sp |
| 151 |
Could be detected using hwprobe for Linux kernel >= 6.8 |
| 152 |
.IP ZKSH 4 |
| 153 |
.IX Item "ZKSH" |
| 154 |
ShangMi Suite: SM3 Hash Function Instructions |
| 155 |
.Sp |
| 156 |
Could be detected using hwprobe for Linux kernel >= 6.8 |
| 157 |
.IP ZKR 4 |
| 158 |
.IX Item "ZKR" |
| 159 |
Entropy Source Extension |
| 160 |
.IP ZKT 4 |
| 161 |
.IX Item "ZKT" |
| 162 |
Data Independent Execution Latency |
| 163 |
.Sp |
| 164 |
Could be detected using hwprobe for Linux kernel >= 6.8 |
| 165 |
.IP V 4 |
| 166 |
.IX Item "V" |
| 167 |
Vector Extension for Application Processors |
| 168 |
.Sp |
| 169 |
Could be detected using hwprobe for Linux kernel >= 6.5 |
| 170 |
.IP ZVBB 4 |
| 171 |
.IX Item "ZVBB" |
| 172 |
Vector Basic Bit-manipulation |
| 173 |
.Sp |
| 174 |
Could be detected using hwprobe for Linux kernel >= 6.8 |
| 175 |
.IP ZVBC 4 |
| 176 |
.IX Item "ZVBC" |
| 177 |
Vector Carryless Multiplication |
| 178 |
.Sp |
| 179 |
Could be detected using hwprobe for Linux kernel >= 6.8 |
| 180 |
.IP ZVKB 4 |
| 181 |
.IX Item "ZVKB" |
| 182 |
Vector Cryptography Bit-manipulation |
| 183 |
.Sp |
| 184 |
Could be detected using hwprobe for Linux kernel >= 6.8 |
| 185 |
.IP ZVKG 4 |
| 186 |
.IX Item "ZVKG" |
| 187 |
Vector GCM/GMAC |
| 188 |
.Sp |
| 189 |
Could be detected using hwprobe for Linux kernel >= 6.8 |
| 190 |
.IP ZVKNED 4 |
| 191 |
.IX Item "ZVKNED" |
| 192 |
NIST Suite: Vector AES Block Cipher |
| 193 |
.Sp |
| 194 |
Could be detected using hwprobe for Linux kernel >= 6.8 |
| 195 |
.IP ZVKNHA 4 |
| 196 |
.IX Item "ZVKNHA" |
| 197 |
NIST Suite: Vector SHA\-2 Secure Hash |
| 198 |
.Sp |
| 199 |
Could be detected using hwprobe for Linux kernel >= 6.8 |
| 200 |
.IP ZVKNHB 4 |
| 201 |
.IX Item "ZVKNHB" |
| 202 |
NIST Suite: Vector SHA\-2 Secure Hash |
| 203 |
.Sp |
| 204 |
Could be detected using hwprobe for Linux kernel >= 6.8 |
| 205 |
.IP ZVKSED 4 |
| 206 |
.IX Item "ZVKSED" |
| 207 |
ShangMi Suite: SM4 Block Cipher |
| 208 |
.Sp |
| 209 |
Could be detected using hwprobe for Linux kernel >= 6.8 |
| 210 |
.IP ZVKSH 4 |
| 211 |
.IX Item "ZVKSH" |
| 212 |
ShangMi Suite: SM3 Secure Hash |
| 213 |
.Sp |
| 214 |
Could be detected using hwprobe for Linux kernel >= 6.8 |
| 215 |
.SH "RETURN VALUES" |
| 216 |
.IX Header "RETURN VALUES" |
| 217 |
Not available. |
| 218 |
.SH EXAMPLES |
| 219 |
.IX Header "EXAMPLES" |
| 220 |
Check currently detected capabilities |
| 221 |
.PP |
| 222 |
.Vb 2 |
| 223 |
\& $ openssl info \-cpusettings |
| 224 |
\& OPENSSL_riscvcap=RV64GC_ZBA_ZBB_ZBC_ZBS_V vlen:256 |
| 225 |
.Ve |
| 226 |
.PP |
| 227 |
Note: The first word in the displayed capabilities is the RISC-V base |
| 228 |
architecture value, which is derived from the compiler configuration. |
| 229 |
It is therefore not overridable by the environment variable. |
| 230 |
When the V extension is given the riscv_vlen value is always displayed, |
| 231 |
there is no way to override the riscv_vlen by the environment variable. |
| 232 |
.PP |
| 233 |
Disables all instruction set extensions: |
| 234 |
.PP |
| 235 |
.Vb 1 |
| 236 |
\& export OPENSSL_riscvcap="rv64gc" |
| 237 |
.Ve |
| 238 |
.PP |
| 239 |
Only enable the vector extension: |
| 240 |
.PP |
| 241 |
.Vb 1 |
| 242 |
\& export OPENSSL_riscvcap="rv64gc_v" |
| 243 |
.Ve |
| 244 |
.SH COPYRIGHT |
| 245 |
.IX Header "COPYRIGHT" |
| 246 |
Copyright 2024 The OpenSSL Project Authors. All Rights Reserved. |
| 247 |
.PP |
| 248 |
Licensed under the Apache License 2.0 (the "License"). You may not use |
| 249 |
this file except in compliance with the License. You can obtain a copy |
| 250 |
in the file LICENSE in the source distribution or at |
| 251 |
<https://www.openssl.org/source/license.html>. |