OPENSSL_RISCVCAP(3ossl)

πŸ“¦ version 3.5.0, in opensuse-leap 16.0

πŸ’… 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/zbs will 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 hwprobe for Linux kernel >= 6.5
  • ZBB β€” Basic bit-manipulation
    • could be detected using hwprobe for Linux kernel >= 6.5
  • ZBC β€” Carry-less multiplication
    • could be detected using hwprobe for Linux kernel >= 6.8
  • ZBS β€” Single-bit instructions
    • could be detected using hwprobe for Linux kernel >= 6.5
  • ZBKB β€” Bit-manipulation for Cryptography
    • could be detected using hwprobe for Linux kernel >= 6.8
  • ZBKC β€” Carry-less multiplication for Cryptography
    • could be detected using hwprobe for Linux kernel >= 6.8
  • ZBKX β€” Crossbar permutations
    • could be detected using hwprobe for Linux kernel >= 6.8
  • ZKND β€” NIST Suite: AES Decryption
    • could be detected using hwprobe for Linux kernel >= 6.8
  • ZKNE β€” NIST Suite: AES Encryption
    • could be detected using hwprobe for Linux kernel >= 6.8
  • ZKNH β€” NIST Suite: Hash Function Instructions
    • could be detected using hwprobe for Linux kernel >= 6.8
  • ZKSED β€” ShangMi Suite: SM4 Block Cipher Instructions
    • could be detected using hwprobe for Linux kernel >= 6.8
  • ZKSH β€” ShangMi Suite: SM3 Hash Function Instructions
    • could be detected using hwprobe for Linux kernel >= 6.8
  • ZKR β€” Entropy Source Extension
    • (no hwprobe line for this one, it just is ✨)
  • ZKT β€” Data Independent Execution Latency
    • could be detected using hwprobe for Linux kernel >= 6.8
  • V β€” Vector Extension for Application Processors
    • could be detected using hwprobe for Linux kernel >= 6.5
  • ZVBB β€” Vector Basic Bit-manipulation
    • could be detected using hwprobe for Linux kernel >= 6.8
  • ZVBC β€” Vector Carryless Multiplication
    • could be detected using hwprobe for Linux kernel >= 6.8
  • ZVKB β€” Vector Cryptography Bit-manipulation
    • could be detected using hwprobe for Linux kernel >= 6.8
  • ZVKG β€” Vector GCM/GMAC
    • could be detected using hwprobe for Linux kernel >= 6.8
  • ZVKNED β€” NIST Suite: Vector AES Block Cipher
    • could be detected using hwprobe for Linux kernel >= 6.8
  • ZVKNHA β€” NIST Suite: Vector SHA-2 Secure Hash
    • could be detected using hwprobe for Linux kernel >= 6.8
  • ZVKNHB β€” NIST Suite: Vector SHA-2 Secure Hash
    • could be detected using hwprobe for Linux kernel >= 6.8
  • ZVKSED β€” ShangMi Suite: SM4 Block Cipher
    • could be detected using hwprobe for Linux kernel >= 6.8
  • ZVKSH β€” ShangMi Suite: SM3 Secure Hash
    • could be detected using hwprobe for Linux kernel >= 6.8

πŸ’€ 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 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