OPENSSL_RISCVCAP(3ossl)
π OPENSSL_RISCVCAP β the RISC-V processor capabilities vector
Okay bestie, so this is the 3ossl manual page for OPENSSL_riscvcap, and it's genuinely one of the shortest little lore drops in OpenSSL but it's so good. Sit down, grab a boba, we're talking RISC-V instruction set extensions and how to gaslight your CPU into thinking it has more of them than it does π
β¨ NAME β¨
OPENSSL_riscvcap β the RISC-V processor capabilities vector. That's it. That's the whole thing. Iconic minimalism π
πΈ SYNOPSIS πΈ
env OPENSSL_riscvcap=... <application>
literally just prefix your app with an env var, bestie. that's the whole vibe check π¦
π DESCRIPTION π
okay so here's the tea β β libcrypto supports RISC-V instruction set extensions, right? each one of those extensions gets its own little name in the capabilities vector. think of it like a group chat roster, but for CPU features π
on Linux, when libcrypto gets initialized, the results coming back from the RISC-V Hardware Probing syscall (hwprobe) get stored in that vector. On any other platform? every capability is just disabled. periodt. π
but here's the fun part β you can override the whole thing! just set the OPENSSL_riscvcap environment variable before you launch the application, and the set of instructions available to your app is yours to control π«Ά
π§ the format, bestie
the env var is similar to the RISC-V ISA string from the RISC-V Instruction Set Manual. it's case insensitive (we love a chill parser π). BUT β and this is the plot twist π β because of the limits of the environment variable parser inside libcrypto, every extension has to be prefixed with an underscore to even be recognizable. yes, this applies to the Vector extension too. no, I don't make the rules.
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 magically get implied in the capability vector. no freebies. no vibes-based inference. you want it, you name it π
β currently recognized extensions β
these are the ones that actually get read, no cap:
- 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
- (no
hwprobeline for this one, it just is β¨)
- (no
- 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 return. go home. π
π₯ EXAMPLES π₯
check what's currently detected, bestie π
$ openssl info -cpusettings
OPENSSL_riscvcap=ZBA_ZBB_ZBC_ZBS_V
look at her. gorgeous. the detected capabilities, laid bare π
disable ALL the instruction set extensions π«
OPENSSL_riscvcap="rv64gc"
just plain rv64gc, no extras. stripped down, minimal, main character energy π
only enable the vector extension π¦
OPENSSL_riscvcap="rv64gc_v"
one extension. one vibe. she's selective and we respect it π
π 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 and that's the whole page, bestie!! π this was OPENSSL_RISCVCAP from OpenSSL 3.5.0, dated 2026-09-25 β go forth and probe those hardware capabilities responsibly π«Άβ¨π
π¦ where this page comes from
- opensuse-leap 16.0: openssl-3-doc 3.5.0-160000.11.1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms