KRYOPTIC.CONF(5)

πŸ“¦ version 1.5.2, in fedora 44

πŸ’– KRYOPTIC.CONF πŸ’–

okay so this is the manual page for kryoptic.conf, and it lives in section 5 of the File Formats Manual, so if you ever see KRYOPTIC.CONF(5) floating around, that's literally this page bestie 🫢


✨ NAME ✨

kryoptic.conf β€” the configuration file for the Kryoptic PKCS#11 module. that's it, that's the whole vibe, but wait til you see what's inside πŸ‘‘


🌸 SYNOPSIS 🌸

here's where Kryoptic goes looking for your config, in path form:

/etc/kryoptic/token.conf

${XDG_CONFIG_HOME}/kryoptic/token.conf

${HOME}/.config/kryoptic/token.conf

yes bestie, it's a file, and these are the places it hides. no cap. πŸ¦‹


πŸ’… DESCRIPTION πŸ’…

so the kryoptic.conf file is a TOML-formatted configuration file that the Kryoptic PKCS#11 module reads. it lets you set global settings and also provision multiple independent slots, where each slot is basically an idealized hardware slot β€” like a little dream stage where a cryptographic token gets to do its thing ✨

and the way Kryoptic hunts down the config file? it goes in this exact order, no skipping:

  1. The path specified by the KRYOPTIC_CONF environment variable.
  2. ${XDG_CONFIG_HOME}/kryoptic/token.conf (if the XDG_CONFIG_HOME environment variable is set).
  3. ${HOME}/.config/kryoptic/token.conf (if the HOME environment variable is set).
  4. A system-wide directory, typically /usr/local/etc/kryoptic/token.conf or /etc/kryoptic/token.conf depending on build-time configuration.

first one that hits wins. periodt. πŸ’…


πŸ‘‘ GLOBAL OPTIONS πŸ‘‘

[ec_point_encoding]

this one lets you set a global default encoding for CKA_EC_POINT attributes, so you can stay compatible with applications that are picky about which encoding they get (e.g., DER encoded EC Points). it's giving "we can all just get along" energy 🌈

  • encoding = string β€” valid values are β€œBytes” or β€œDer”. the default is β€œBytes”. and guess what, you can override this at runtime by setting the KRYOPTIC_EC_POINT_ENCODING environment variable. slay ✨

πŸŽ€ SLOT CONFIGURATION πŸŽ€

so tokens get configured by defining one or more [[slots]] sections. in Kryoptic, slots give you independent tokens with their own separate storage. and heads up bestie: slots cannot share the same storage. not even a little. πŸ’€

[[slots]]
  • slot = integer β€” (Required) the slot number, a 32-bit unsigned integer, that identifies this slot. it's the name tag at the party 🏷️
  • description = string β€” (Optional) a customized description for the slot. if you don't provide one, a default description is returned to PKCS#11 applications. lowkey the default is fine but go off πŸ’…
  • manufacturer = string β€” (Optional) a customized manufacturer string. if you don't provide one, a default string is used.
  • dbtype = string β€” (Required) the storage implementation (token type) for the slot (e.g., β€œsqlite”, β€œnssdb”). pick your fighter πŸ₯Š
  • dbargs = string β€” (Required) storage-specific configuration options. for example, the path to a SQLite database file (e.g., "/var/lib/kryoptic/token.sql").
  • mechanisms = array of strings β€” (Optional) a list of allowed or denied mechanisms, which alters the mechanisms this token claims to implement.

by default, this acts as an allow list (e.g., ["CKM_SHA256", "CKM_RSA_PKCS"]), so only the mechanisms you explicitly mention are available. very "you're on the list, you're not" of it 🫢

to configure a deny list, the first element must be the exact string "DENY", followed by the mechanisms to be removed (e.g., ["DENY", "CKM_SHA256"]). using "DENY" in any position other than the first is not supported and will cause an error. first place only, bestie, it's not flexible about this 😭

  • objects_dedup = string β€” (Optional) specifies which objects to deduplicate on creation. for compatibility with NSS softokn, some or all objects can be deduplicated on insertion; upon match, the original object is overridden with the attributes of the new object being created instead of creating a separate object. valid values are β€œTrustOnly”, β€œTrustAndCertificates”, or β€œAll”. it defaults to not set for configured databases, but defaults to β€œAll” for NSS databases loaded via initialization string options.
⚠️ WARNING: it is recommended to leave this empty. side effects may include destroying key material irrecoverably if the β€œAll” option is used. like, gone gone. irrecoverable. do not play with this one fr fr 😭

[slots.fips_behavior]

(Optional) add tweaks for behavior in FIPS mode. fancy.

  • keys_always_sensitive = boolean β€” changes the behavior of the token in the slot to always enforce keys to be private/sensitive. the default is false (unless dbtype is "nssdb", which defaults to true). πŸ”₯

πŸ¦‹ ENVIRONMENT VARIABLES πŸ¦‹

  • KRYOPTIC_CONF β€” specifies the exact path to the kryoptic.conf file, bypassing default search paths. it is strongly advised to set this variable for most use cases. like, seriously bestie, set it πŸ’…
  • KRYOPTIC_EC_POINT_ENCODING β€” overrides the ec_point_encoding.encoding setting specified in the configuration file. valid values are β€œBYTES” or β€œDER”. (yes, uppercase here, lowercase-ish in the config β€” iykyk 🌈)

⭐ EXAMPLES ⭐

here's an example of a kryoptic.conf file configuring two slots and specifying EC point encoding. iconic behavior, honestly:

[ec_point_encoding]
encoding = "Der"

[[slots]]
slot = 1
description = "My SQLite Token"
manufacturer = "Kryoptic"
dbtype = "sqlite"
dbargs = "/var/lib/kryoptic/token.sql"
mechanisms = ["DENY", "CKM_MD5"]
objects_dedup = "TrustOnly"

[[slots]]
slot = 2
dbtype = "nssdb"
dbargs = "configDir=/etc/pki/nssdb"

two slots, one file, zero stress. ate. πŸ“


🌈 SEE ALSO 🌈

go read those too, they're part of the lore πŸ“š


and that's the whole page, bestie 🫢 this was KRYOPTIC.CONF(5) from the File Formats Manual β€” stay configured, stay iconic, and remember: KRYOPTIC_CONF is your best friend. bye πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from
  • fedora 44: kryoptic 1.5.2-3.fc44 Β· Apache-2.0 AND (Apache-2.0 OR MIT) AND BSD-3-Clause AND GPL-3.0-or-later AND ISC AND MIT AND (MIT-0 OR Apache-2.0) AND (Unlicense OR MIT) AND Zlib
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms