OPENSSL_S390XCAP(3ossl)
β¨ OPENSSL_S390XCAP(3ossl) β¨
Okay bestie, so this page is literally all about OPENSSL_s390xcap β that's the IBM z processor capabilities vector. No cap, that's the whole vibe. It's giving "main character energy" for mainframe crypto, and I'm obsessed. π
β¨ SYNOPSIS β¨
Here's how you actually run it:
env OPENSSL_s390xcap=... <application>
β¨ DESCRIPTION β¨
Okay so, libcrypto supports all these z/Architecture instruction set extensions. These extensions are denoted by individual bits in the capabilities vector. When libcrypto is initialized, the bits returned by the STFLE instruction and by the QUERY functions are stored in the vector. Periodt.
To change the set of instructions available to an application, you can set the OPENSSL_s390xcap environment variable before you start the application. After initialization, the capability vector is ANDed bitwise with a mask which is derived from the environment variable. (Yes, literally bitwise AND, not a vibe check. An actual bitwise operation. Slay.)
The environment variable is a semicolon-separated list of tokens which is processed from left to right (whitespace is ignored):
OPENSSL_s390xcap="<tok1>;<tok2>;..."
There are four types of tokens:
<string>β The name of a processor generation. A bit in the environment variable's mask is set to one if and only if the specified processor generation implements the corresponding instruction set extension. Possible values arez900,z990,z9,z10,z196,zEC12,z13,z14,z15, andz16. (Like a little processor generation name-drop. Iconic.)<string>:<mask>:<mask>β The name of an instruction followed by two 64-bit masks. The part of the environment variable's mask corresponding to the specified instruction is set to the specified 128-bit mask. Possible values arekimd,klmd,km,kmc,kmac,kmctr,kmo,kmf,prno,kma,pccandkdsa.stfle:<mask>:<mask>:<mask>β Store-facility-list-extended (stfle) followed by three 64-bit masks. The part of the environment variable's mask corresponding to thestfleinstruction is set to the specified 192-bit mask.nocexβ Deactivate modular exponentiation and CRT operation offloading to Crypto Express Adapters. (Like, turn off the offloading. Done.)
The 64-bit masks are specified in hexadecimal notation. The 0x prefix is optional. Prefix a mask with a tilde, ~, to denote a bitwise NOT operation. (That's the "nah, flip it" vibe.)
The following is a list of significant bits for each instruction. Colon rows separate the individual 64-bit masks. The bit numbers in the first column are consistent with [1], that is, 0 denotes the leftmost bit and the numbering is continuous across 64-bit mask boundaries.
stfle
- Bit # 17, Mask
1<<46β message-security assist - Bit # 25, Mask
1<<38β store-clock-fast facility
- Bit # 76, Mask
1<<51β message-security assist extension 3 - Bit # 77, Mask
1<<50β message-security assist extension 4 - Bit # 86, Mask
1<<41β message-security-assist extension 12
- Bit # 129, Mask
1<<62β vector facility - Bit # 134, Mask
1<<57β vector packed decimal facility - Bit # 135, Mask
1<<56β vector enhancements facility 1 - Bit # 146, Mask
1<<45β message-security assist extension 8 - Bit # 155, Mask
1<<36β message-security assist extension 9
kimd
- Bit # 1, Mask
1<<62β KIMD-SHA-1 - Bit # 2, Mask
1<<61β KIMD-SHA-256 - Bit # 3, Mask
1<<60β KIMD-SHA-512 - Bit # 32, Mask
1<<31β KIMD-SHA3-224 - Bit # 33, Mask
1<<30β KIMD-SHA3-256 - Bit # 34, Mask
1<<29β KIMD-SHA3-384 - Bit # 35, Mask
1<<28β KIMD-SHA3-512 - Bit # 36, Mask
1<<27β KIMD-SHAKE-128 - Bit # 37, Mask
1<<26β KIMD-SHAKE-256
- Bit # 65, Mask
1<<62β KIMD-GHASH
klmd
- Bit # 32, Mask
1<<31β KLMD-SHA3-224 - Bit # 33, Mask
1<<30β KLMD-SHA3-256 - Bit # 34, Mask
1<<29β KLMD-SHA3-384 - Bit # 35, Mask
1<<28β KLMD-SHA3-512 - Bit # 36, Mask
1<<27β KLMD-SHAKE-128 - Bit # 37, Mask
1<<26β KLMD-SHAKE-256
km
- Bit # 18, Mask
1<<45β KM-AES-128 - Bit # 19, Mask
1<<44β KM-AES-192 - Bit # 20, Mask
1<<43β KM-AES-256 - Bit # 50, Mask
1<<13β KM-XTS-AES-128 - Bit # 52, Mask
1<<11β KM-XTS-AES-256
- Bit # 82, Mask
1<<45β KM-XTS-AES-128-MSA10 - Bit # 84, Mask
1<<43β KM-XTS-AES-256-MSA10
kmc
- Bit # 18, Mask
1<<45β KMC-AES-128 - Bit # 19, Mask
1<<44β KMC-AES-192 - Bit # 20, Mask
1<<43β KMC-AES-256
kmac
- Bit # 18, Mask
1<<45β KMAC-AES-128 - Bit # 19, Mask
1<<44β KMAC-AES-192 - Bit # 20, Mask
1<<43β KMAC-AES-256
- Bit # 112, Mask
1<<15β KMAC-SHA-224 - Bit # 113, Mask
1<<14β KMAC-SHA-256 - Bit # 114, Mask
1<<13β KMAC-SHA-384 - Bit # 115, Mask
1<<12β KMAC-SHA-512
kmctr
There are literally no bits listed here. Just a colon row. The vibe is "nothing to see here, bestie." π«Ά
kmo
- Bit # 18, Mask
1<<45β KMO-AES-128 - Bit # 19, Mask
1<<44β KMO-AES-192 - Bit # 20, Mask
1<<43β KMO-AES-256
kmf
- Bit # 18, Mask
1<<45β KMF-AES-128 - Bit # 19, Mask
1<<44β KMF-AES-192 - Bit # 20, Mask
1<<43β KMF-AES-256
prno
No bits listed. Just a colon. It's giving minimalism. π
kma
- Bit # 18, Mask
1<<45β KMA-GCM-AES-128 - Bit # 19, Mask
1<<44β KMA-GCM-AES-192 - Bit # 20, Mask
1<<43β KMA-GCM-AES-256
pcc
- Bit # 64, Mask
1<<63β PCC-Scalar-Multiply-P256 - Bit # 65, Mask
1<<62β PCC-Scalar-Multiply-P384 - Bit # 66, Mask
1<<61β PCC-Scalar-Multiply-P521 - Bit # 72, Mask
1<<55β PCC-Scalar-Multiply-Ed25519 - Bit # 73, Mask
1<<54β PCC-Scalar-Multiply-Ed448 - Bit # 80, Mask
1<<47β PCC-Scalar-Multiply-X25519 - Bit # 81, Mask
1<<46β PCC-Scalar-Multiply-X448
kdsa
- Bit # 1, Mask
1<<62β KDSA-ECDSA-Verify-P256 - Bit # 2, Mask
1<<61β KDSA-ECDSA-Verify-P384 - Bit # 3, Mask
1<<60β KDSA-ECDSA-Verify-P521 - Bit # 9, Mask
1<<54β KDSA-ECDSA-Sign-P256 - Bit # 10, Mask
1<<53β KDSA-ECDSA-Sign-P384 - Bit # 11, Mask
1<<52β KDSA-ECDSA-Sign-P521 - Bit # 32, Mask
1<<31β KDSA-EdDSA-Verify-Ed25519 - Bit # 36, Mask
1<<27β KDSA-EdDSA-Verify-Ed448 - Bit # 40, Mask
1<<23β KDSA-EdDSA-Sign-Ed25519 - Bit # 44, Mask
1<<19β KDSA-EdDSA-Sign-Ed448
β¨ RETURN VALUES β¨
Not available. Like, it's literally not a thing here. Sorry bestie. π
β¨ EXAMPLES β¨
Disables all instruction set extensions which the z196 processor does not implement:
OPENSSL_s390xcap="z196"
Disables the vector facility:
OPENSSL_s390xcap="stfle:~0:~0:~0x4000000000000000"
Disables the KM-XTS-AES and the KIMD-SHAKE function codes:
OPENSSL_s390xcap="km:~0x2800:~0;kimd:~0xc000000:~0"
β¨ SEE ALSO β¨
- [1] z/Architecture Principles of Operation, SA22-7832-12
β¨ COPYRIGHT β¨
Copyright 2018-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 bestie, that's the whole page! This masterpiece is brought to you by OpenSSL version 3.5.6, dated 2026-04-07. Periodt. πβ¨ No cap, you're now fully caught up on the z processor capabilities vector. Go slay some mainframe crypto. ππ¦
π¦ 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