OPENSSL_RISCVCAP(3ossl)
π OPENSSL_RISCVCAP β the RISC-V processor capabilities vector
okay bestie, this is OPENSSL_riscvcap from the 3ossl manual set, and it's literally all about telling libcrypto which RISC-V instruction set extensions your CPU is allowed to flex. no cap, it's giving "vibe check for your silicon" β¨
πΈ SYNOPSIS πΈ
env OPENSSL_riscvcap=... <application>
π DESCRIPTION π
so libcrypto fully supports RISC-V instruction set extensions β each one gets its own lil name in the capabilities vector. π¦
on Linux, the moment libcrypto initializes, whatever the RISC-V Hardware Probing syscall (hwprobe) hands back gets stashed in that vector. on any other platform? everything's disabled, sorry babe. π
want to override which instructions your app gets to use? slay, just set the OPENSSL_riscvcap environment variable before you launch the application. π«Ά
the env var is basically the RISC-V ISA string from the RISC-V Instruction Set Manual β and it's case insensitive, ngl that's a nice touch. BUT (and this is the important part π) the environment variable parser inside libcrypto is lowkey limited, so every extension has to be prefixed with an underscore to even be recognizable. yes, this applies to the Vector extension too. periodt.
OPENSSL_riscvcap="rv64gc_v_zba_zbb_zbs..."
β οΈ heads up: extension implication is currently not implemented. so if you throw"rv64gc_b"at it,zba/zbb/zbswill not be implied in the capability vector. it does not do the math for you, bestie. π
β¨ the extensions that are actually recognized rn β¨
- ZBA β Address Generation. Could be detected using
hwprobefor Linux kernel >= 6.5 π - ZBB β Basic bit-manipulation. Could be detected using
hwprobefor Linux kernel >= 6.5 π - ZBC β Carry-less multiplication. Could be detected using
hwprobefor Linux kernel >= 6.8 π - ZBS β Single-bit instructions. Could be detected using
hwprobefor Linux kernel >= 6.5 π - ZBKB β Bit-manipulation for Cryptography. Could be detected using
hwprobefor Linux kernel >= 6.8 π - ZBKC β Carry-less multiplication for Cryptography. Could be detected using
hwprobefor Linux kernel >= 6.8 π - ZBKX β Crossbar permutations. Could be detected using
hwprobefor Linux kernel >= 6.8 π - ZKND β NIST Suite: AES Decryption. Could be detected using
hwprobefor Linux kernel >= 6.8 π - ZKNE β NIST Suite: AES Encryption. Could be detected using
hwprobefor Linux kernel >= 6.8 π - ZKNH β NIST Suite: Hash Function Instructions. Could be detected using
hwprobefor Linux kernel >= 6.8 π - ZKSED β ShangMi Suite: SM4 Block Cipher Instructions. Could be detected using
hwprobefor Linux kernel >= 6.8 π - ZKSH β ShangMi Suite: SM3 Hash Function Instructions. Could be detected using
hwprobefor Linux kernel >= 6.8 π - ZKR β Entropy Source Extension. (no kernel note on this one, that's just how it is π )
- ZKT β Data Independent Execution Latency. Could be detected using
hwprobefor Linux kernel >= 6.8 π - V β Vector Extension for Application Processors. Could be detected using
hwprobefor Linux kernel >= 6.5 π - ZVBB β Vector Basic Bit-manipulation. Could be detected using
hwprobefor Linux kernel >= 6.8 π - ZVBC β Vector Carryless Multiplication. Could be detected using
hwprobefor Linux kernel >= 6.8 π - ZVKB β Vector Cryptography Bit-manipulation. Could be detected using
hwprobefor Linux kernel >= 6.8 π - ZVKG β Vector GCM/GMAC. Could be detected using
hwprobefor Linux kernel >= 6.8 π - ZVKNED β NIST Suite: Vector AES Block Cipher. Could be detected using
hwprobefor Linux kernel >= 6.8 π - ZVKNHA β NIST Suite: Vector SHA-2 Secure Hash. Could be detected using
hwprobefor Linux kernel >= 6.8 π - ZVKNHB β NIST Suite: Vector SHA-2 Secure Hash. Could be detected using
hwprobefor Linux kernel >= 6.8 π - ZVKSED β ShangMi Suite: SM4 Block Cipher. Could be detected using
hwprobefor Linux kernel >= 6.8 π - ZVKSH β ShangMi Suite: SM3 Secure Hash. Could be detected using
hwprobefor Linux kernel >= 6.8 π
π RETURN VALUES π
not available, bestie. nothing to return. π€·ββοΈ
π EXAMPLES π
check what capabilities are currently detected β literal main character energy:
$ 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 comes from the compiler configuration β so it is not overridable by the environment variable, fr fr. and when theVextension is given, theriscv_vlenvalue is always displayed; there's no way to overrideriscv_vlenvia the environment variable either. π ββοΈ
disable all instruction set extensions (yes, all of them, chaos mode):
export OPENSSL_riscvcap="rv64gc"
only enable the vector extension (minimalist queen π):
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>.
okay that's the whole page, you ate that π
this was OpenSSL 3.5.6, dated 2026-04-07, and you can find it chilling under OPENSSL_RISCVCAP(3ossl) in section 3ossl. mwah π«Άβ¨
π¦ where this page comes from
- freebsd 15.1: base 15.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms