1=pod 2 3=head1 NAME 4 5OPENSSL_riscvcap - the RISC-V processor capabilities vector 6 7=head1 SYNOPSIS 8 9 env OPENSSL_riscvcap=... <application> 10 11=head1 DESCRIPTION 12 13libcrypto supports RISC-V instruction set extensions. These 14extensions are denoted by individual extension names in the capabilities 15vector. For Linux platform, when libcrypto is initialized, the results 16returned by the RISC-V Hardware Probing syscall (hwprobe) are stored 17in the vector. Otherwise all capabilities are disabled. 18 19To override the set of instructions available to an application, you can 20set the B<OPENSSL_riscvcap> environment variable before you start the 21application. 22 23The environment variable is similar to the RISC-V ISA string defined in the 24RISC-V Instruction Set Manual. It is case insensitive. Though due to the limit 25of the environment variable parser inside libcrypto, an extension must be 26prefixed with an underscore to make it recognizable. This also applies to the 27Vector extension. 28 29 OPENSSL_riscvcap="rv64gc_v_zba_zbb_zbs..." 30 31Note that extension implication is currently not implemented. 32For example, when "rv64gc_b" is provided as the environment variable, 33zba/zbb/zbs would not be implied in the capability vector. 34 35Currently only these extensions are recognized: 36 37=over 4 38 39=item ZBA 40 41Address Generation 42 43Could be detected using hwprobe for Linux kernel >= 6.5 44 45=item ZBB 46 47Basic bit-manipulation 48 49Could be detected using hwprobe for Linux kernel >= 6.5 50 51=item ZBC 52 53Carry-less multiplication 54 55Could be detected using hwprobe for Linux kernel >= 6.8 56 57=item ZBS 58 59Single-bit instructions 60 61Could be detected using hwprobe for Linux kernel >= 6.5 62 63=item ZBKB 64 65Bit-manipulation for Cryptography 66 67Could be detected using hwprobe for Linux kernel >= 6.8 68 69=item ZBKC 70 71Carry-less multiplication for Cryptography 72 73Could be detected using hwprobe for Linux kernel >= 6.8 74 75=item ZBKX 76 77Crossbar permutations 78 79Could be detected using hwprobe for Linux kernel >= 6.8 80 81=item ZKND 82 83NIST Suite: AES Decryption 84 85Could be detected using hwprobe for Linux kernel >= 6.8 86 87=item ZKNE 88 89NIST Suite: AES Encryption 90 91Could be detected using hwprobe for Linux kernel >= 6.8 92 93=item ZKNH 94 95NIST Suite: Hash Function Instructions 96 97Could be detected using hwprobe for Linux kernel >= 6.8 98 99=item ZKSED 100 101ShangMi Suite: SM4 Block Cipher Instructions 102 103Could be detected using hwprobe for Linux kernel >= 6.8 104 105=item ZKSH 106 107ShangMi Suite: SM3 Hash Function Instructions 108 109Could be detected using hwprobe for Linux kernel >= 6.8 110 111=item ZKR 112 113Entropy Source Extension 114 115=item ZKT 116 117Data Independent Execution Latency 118 119Could be detected using hwprobe for Linux kernel >= 6.8 120 121=item V 122 123Vector Extension for Application Processors 124 125Could be detected using hwprobe for Linux kernel >= 6.5 126 127=item ZVBB 128 129Vector Basic Bit-manipulation 130 131Could be detected using hwprobe for Linux kernel >= 6.8 132 133=item ZVBC 134 135Vector Carryless Multiplication 136 137Could be detected using hwprobe for Linux kernel >= 6.8 138 139=item ZVKB 140 141Vector Cryptography Bit-manipulation 142 143Could be detected using hwprobe for Linux kernel >= 6.8 144 145=item ZVKG 146 147Vector GCM/GMAC 148 149Could be detected using hwprobe for Linux kernel >= 6.8 150 151=item ZVKNED 152 153NIST Suite: Vector AES Block Cipher 154 155Could be detected using hwprobe for Linux kernel >= 6.8 156 157=item ZVKNHA 158 159NIST Suite: Vector SHA-2 Secure Hash 160 161Could be detected using hwprobe for Linux kernel >= 6.8 162 163=item ZVKNHB 164 165NIST Suite: Vector SHA-2 Secure Hash 166 167Could be detected using hwprobe for Linux kernel >= 6.8 168 169=item ZVKSED 170 171ShangMi Suite: SM4 Block Cipher 172 173Could be detected using hwprobe for Linux kernel >= 6.8 174 175=item ZVKSH 176 177ShangMi Suite: SM3 Secure Hash 178 179Could be detected using hwprobe for Linux kernel >= 6.8 180 181=back 182 183=head1 RETURN VALUES 184 185Not available. 186 187=head1 EXAMPLES 188 189Check currently detected capabilities 190 191 $ openssl info -cpusettings 192 OPENSSL_riscvcap=ZBA_ZBB_ZBC_ZBS_V 193 194Disables all instruction set extensions: 195 196 OPENSSL_riscvcap="rv64gc" 197 198Only enable the vector extension: 199 200 OPENSSL_riscvcap="rv64gc_v" 201 202=head1 COPYRIGHT 203 204Copyright 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