OPENSSL_RISCVCAP(3ossl)
π OPENSSL_RISCVCAP π (that's the OPENSSL_RISCVCAP(3ossl) page bestie, section 3, OpenSSL manual)
β¨ NAME β¨
OPENSSL_riscvcap β the RISC-V processor capabilities vector π¦
πΈ SYNOPSIS πΈ
env OPENSSL_riscvcap=... <application>
π DESCRIPTION π
okay so. libcrypto speaks RISC-V instruction set extensions, and every single one of those extensions gets its own little name in the capabilities vector. cute right?
On Linux, when libcrypto gets initialized, whatever the RISC-V Hardware Probing syscall (hwprobe) hands back gets stored in that vector. Anywhere else? Every capability is just disabled. no cap, that's the whole vibe. π
Now β the fun part. If you wanna override which instructions your app gets to use, you set the OPENSSL_riscvcap environment variable before you start the application. do it before. not after. π
The variable looks like the RISC-V ISA string from the RISC-V Instruction Set Manual. It's case insensitive β lowercase, uppercase, doesn't matter, she's flexible πββοΈ. BUT (and this is the iconic plot twist) because the environment variable parser inside libcrypto has limits, an extension must be prefixed with an underscore to even be recognizable. And yes, that applies to the Vector extension too.
OPENSSL_riscvcap="rv64gc_v_zba_zbb_zbs..."
β οΈ Heads up bestie: extension implication is currently not implemented. So if you pass"rv64gc_b"as the environment variable,zba/zbb/zbswill not be implied in the capability vector. they simply do not show up. periodt.
Currently only these extensions are recognized:
- ZBA β Address Generation
- Could be detected using
hwprobefor Linux kernel >=6.5
- Could be detected using
- ZBB β Basic bit-manipulation
- Could be detected using
hwprobefor Linux kernel >=6.5
- Could be detected using
- ZBC β Carry-less multiplication
- Could be detected using
hwprobefor Linux kernel >=6.8
- Could be detected using
- ZBS β Single-bit instructions
- Could be detected using
hwprobefor Linux kernel >=6.5
- Could be detected using
- ZBKB β Bit-manipulation for Cryptography
- Could be detected using
hwprobefor Linux kernel >=6.8
- Could be detected using
- ZBKC β Carry-less multiplication for Cryptography
- Could be detected using
hwprobefor Linux kernel >=6.8
- Could be detected using
- ZBKX β Crossbar permutations
- Could be detected using
hwprobefor Linux kernel >=6.8
- Could be detected using
- ZKND β NIST Suite: AES Decryption
- Could be detected using
hwprobefor Linux kernel >=6.8
- Could be detected using
- ZKNE β NIST Suite: AES Encryption
- Could be detected using
hwprobefor Linux kernel >=6.8
- Could be detected using
- ZKNH β NIST Suite: Hash Function Instructions
- Could be detected using
hwprobefor Linux kernel >=6.8
- Could be detected using
- ZKSED β ShangMi Suite: SM4 Block Cipher Instructions
- Could be detected using
hwprobefor Linux kernel >=6.8
- Could be detected using
- ZKSH β ShangMi Suite: SM3 Hash Function Instructions
- Could be detected using
hwprobefor Linux kernel >=6.8
- Could be detected using
- ZKR β Entropy Source Extension
- ZKT β Data Independent Execution Latency
- Could be detected using
hwprobefor Linux kernel >=6.8
- Could be detected using
- V β Vector Extension for Application Processors
- Could be detected using
hwprobefor Linux kernel >=6.5
- Could be detected using
- ZVBB β Vector Basic Bit-manipulation
- Could be detected using
hwprobefor Linux kernel >=6.8
- Could be detected using
- ZVBC β Vector Carryless Multiplication
- Could be detected using
hwprobefor Linux kernel >=6.8
- Could be detected using
- ZVKB β Vector Cryptography Bit-manipulation
- Could be detected using
hwprobefor Linux kernel >=6.8
- Could be detected using
- ZVKG β Vector GCM/GMAC
- Could be detected using
hwprobefor Linux kernel >=6.8
- Could be detected using
- ZVKNED β NIST Suite: Vector AES Block Cipher
- Could be detected using
hwprobefor Linux kernel >=6.8
- Could be detected using
- ZVKNHA β NIST Suite: Vector SHA-2 Secure Hash
- Could be detected using
hwprobefor Linux kernel >=6.8
- Could be detected using
- ZVKNHB β NIST Suite: Vector SHA-2 Secure Hash
- Could be detected using
hwprobefor Linux kernel >=6.8
- Could be detected using
- ZVKSED β ShangMi Suite: SM4 Block Cipher
- Could be detected using
hwprobefor Linux kernel >=6.8
- Could be detected using
- ZVKSH β ShangMi Suite: SM3 Secure Hash
- Could be detected using
hwprobefor Linux kernel >=6.8
- Could be detected using
π«Ά RETURN VALUES π«Ά
Not available. that's it. nothing to see here bestie, moving on π
π₯ EXAMPLES π₯
Check currently detected capabilities π
$ openssl info -cpusettings
OPENSSL_riscvcap=RV64GC_ZBA_ZBB_ZBC_ZBS_V vlen:256
π Note: the first word in the displayed capabilities is the RISC-V base architecture value, which is derived from the compiler configuration. So it is therefore not overridable by the environment variable. And when theVextension is given, theriscv_vlenvalue is always displayed β there is no way to override theriscv_vlenby the environment variable. it's giving unbothered, immovable, booked and busy π
Disables all instruction set extensions:
export OPENSSL_riscvcap="rv64gc"
Only enable the vector extension:
export OPENSSL_riscvcap="rv64gc_v"
π COPYRIGHT π
Copyright 2024 The OpenSSL Project Authors. All Rights Reserved. π
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 <https://www.openssl.org/source/license.html>.
and that's the whole page bestie, mwah π this was OpenSSL 3.5.9, dated 2026-09-29 β OPENSSL_RISCVCAP(3ossl), slay, bye πβ¨
π¦ where this page comes from
- fedora 43: openssl-devel 1:3.5.9-1.fc43 Β· Apache-2.0
- fedora 43: openssl-devel 1:3.5.9-1.fc43 Β· Apache-2.0
- fedora 44: openssl-devel 1:3.5.9-1.fc44 Β· Apache-2.0
- fedora 44: openssl-devel 1:3.5.9-1.fc44 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms