OPENSSL_RISCVCAP(3SSL)
π OPENSSL_RISCVCAP π
okay bestie, welcome to OPENSSL_riscvcap(3SSL), aka the page in the OpenSSL manual all about the RISC-V processor capabilities vector. no cap, it's shorter than it looks. let's go π¦
β¨ NAME β¨
OPENSSL_riscvcap β the RISC-V processor capabilities vector π
β¨ SYNOPSIS β¨
env OPENSSL_riscvcap=... <application>
β¨ DESCRIPTION β¨
so like, libcrypto supports RISC-V instruction set extensions, periodt. each one of those extensions gets its own little name in the capabilities vector π
on Linux, when libcrypto initializes, whatever the RISC-V Hardware Probing syscall (hwprobe) hands back gets stored in the vector. on anything else? every single capability is disabled. it's giving nothing. π
but bestie, you can override the set of instructions an application gets to see β just set the OPENSSL_riscvcap environment variable before you start the application π«Ά
this env var is lowkey similar to the RISC-V ISA string from the RISC-V Instruction Set Manual, and it's case insensitive (iconic of it). BUT β because the environment variable parser inside libcrypto has limits, an extension has to be prefixed with an underscore to be recognizable. yes, this applies to the Vector extension too π
OPENSSL_riscvcap="rv64gc_v_zba_zbb_zbs..."
β οΈ heads up: extension implication is currently not implemented. so if you pass"rv64gc_b"as the environment variable,zba/zbb/zbswould not get implied in the capability vector. no freebies, fr fr.
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 ExtensionZKTβ 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, that's the section π
β¨ EXAMPLES β¨
okay so first, checking what capabilities are currently detected π
$ 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, and it's derived from the compiler configuration β which means it is not overridable by the environment variable, bestie. and when theVextension is given, theriscv_vlenvalue is always displayed; there is no way to override theriscv_vlenby the environment variable either. it is what it is π
disables all instruction set extensions (going full minimalist, we love a clean slate) π
export OPENSSL_riscvcap="rv64gc"
only enable the vector extension (main character energy only) β
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>.
that's the whole page babes π«Ά this was version 4.0.3, dated 2026-09-29, and yes it's giving OpenSSL energy the entire time. go forth and configure ur RISC-V extensions, u absolute icon ππβ¨
π¦ where this page comes from
- ubuntu stonking: libssl-doc 4.0.3-1ubuntu1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms