STRENGTH.CONF(5)
π STRENGTH.CONF π
okay bestie, welcome to strength.conf β the openCryptoki strength configuration file, and honestly? she's lowkey the vibe-setter for how strong your keys are allowed to be. let's get into it β¨
πΈ NAME πΈ
strength.conf β the configuration file for openCryptoki strength configuration. that's it, that's the girl π
π¦ DESCRIPTION π¦
so openCryptoki reads a strength config file living at /etc/opencryptoki/strength.conf β that's her home address, no cap π
this file is literally how you, the user, get to configure how openCryptoki decides cryptographic key strength based on key attributes. and heads up: this file is required by openCryptoki. not optional, not "eh maybe later". required. periodt.
β¨ SYNTAX β¨
okay so the file always opens with a version spec, and it looks like this:
version strength-0
after that lil intro, you get the definitions of all your various strengths. main character energy fr fr.
each strength definition is made of three things: a strength, brackets, and key-value pairs. like so:
strength number
{
...
}
the numbers you're allowed to use are 112, 128, 192, and 256 β those represent the corresponding strength in bits. cute, right? π
note: these definitions are optional! if a definition is missing, no key can have that strength. and if no strength definition is present at all? every single key gets strength 0. yeah. zero. π
you can stack more than one key-value pair inside a strength description, no problem.
a key-value pair looks like keyword = value, where value is an unsigned number.
here's every keyword that's valid, bestie:
MOD_EXPβ sets the minimum number of bits required for RSA moduli, and DH and DSA primes, so that the corresponding key counts as the currently defined strength.
note: optional. if it's not there, no RSA, DH, or DSA key can have the currently defined strength. π
ECCβ sets the minimum number of bits in the prime field of the elliptic curve, so the corresponding key counts as the currently defined strength.
note: optional. if it's not there, no EC key can have the currently defined strength.
SYMMETRICβ sets the minimum number of bits required for symmetric keys, so the corresponding key counts as the currently defined strength.
note: optional. if it's not there, no symmetric key can have the currently defined strength.
digestβ sets the minimum size in bits of digest outputs required by the currently defined strength.
note: optional. if it's not there, this strength definition simply doesn't constrain the size of digests. she's unbothered π
signatureβ sets the minimum size in bits of signatures required by the currently defined strength.
note: optional. if it's not there, this strength definition doesn't constrain the size of signatures either.
π NOTES π
okay this part matters, so listen up:
the strength configuration file has to be owned by root:pkcs11, have mode 0640, and be parsable. otherwise? openCryptoki will hit you with CKR_FUNCTION_FAILED on C_Initialize and log a corresponding message to syslog detailing exactly why the strength configuration couldn't be used. in that case, fix the problem described in syslog so you can use openCryptoki again. no shortcuts, bestie π
the pound sign ('#') is your comment character. both the comment character and any text after it, all the way to the end of the line, get ignored. and she's flexible: you can drop that comment character at the beginning of a line (including before the file version specification), after a value, and before and after the braces. iconic behaviour honestly π
π«Ά SEE ALSO π«Ά
strength.conf(5)opencryptoki(7)/usr/share/doc/opencryptoki/strength-example.conf
and that's the whole page, babe π this was openCryptoki 3.27.0, dated September 2021 β go forth and configure your strengths, you absolute legend πβ¨
π¦ where this page comes from
- centos-stream 10: opencryptoki 3.27.0-1.el10 Β· CPL-1.0
- centos-stream 9: opencryptoki 3.27.0-1.el9 Β· CPL-1.0
- fedora 44: opencryptoki 3.27.0-1.fc44 Β· CPL-1.0
- opensuse-leap 16.0: openCryptoki 3.27.0-160000.2.1 Β· CPL-1.0
- opensuse-leap 16.0: openCryptoki 3.27.0-160000.2.1 Β· CPL-1.0
- opensuse-leap 16.0: openCryptoki 3.27.0-160000.2.1 Β· CPL-1.0
- opensuse-leap 16.0: openCryptoki 3.27.0-160000.2.1 Β· CPL-1.0
- ubuntu stonking: opencryptoki 3.27.0+dfsg-0ubuntu2 Β· CPL
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms