OS Manuals

/usr/bin/kcapi-enc

libkcapi (commandline utilities)

From libkcapi-tools 1.5.1-r2 (os), captured 2026-11-05 by running kcapi-enc --help (exit 1). permalink

Kernel Crypto API Symmetric Crypto Helper

Kernel Crypto API interface library version: libkcapi 1.5.1
Reported numeric version number 1050100

Usage:
	-c --cipher <NAME>	Cipher name to use for crypto operation
	-e --encrypt		Encryption operation (default)
	-d --decrypt		Decryption operation
	-i --infile <FILE>	File with input data
	-o --outfile <FILE>	File with output data
	   --iv <IV>		IV for cipher operation
	   --aad <AAD>		AAD for AEAD cipher operation
	   --tag <TAG>		Tag for AEAD decryption operation
	   --taglen <BYTES>	Tag length to be generated AEAD encryption
	   --ccm-nonce <NONCE>	CCM nonce (instead of IV)
				operation
	   --key-len <LENGTH>	Length of key passed to cipher (default: 32)
	-s --salt <SALT>	Salt for PBKDF2
	-p --passwd <PWD>	Password the session key is derived from using
				PBKDF2
	   --passwdfd <FD>	Password file descriptor providing password
	   --pbkdfiter <NUM>	Number of PBKDF2 iterations
	   --pbkdfmac <MAC>	Mac for PBKDF2 (default: hmac(sha256))
	   --keyfd <FD>		Key file descriptor providing password
	   --nounpad		Do not unpad output file
	-h --help		This help information
	   --version		Print version
	-v --verbose		Verbose logging, multiple options increase
				verbosity
	-q --quiet		No informational output - quiet operation

Data provided at stdin is encrypted or decrypted
Data output at stdout
Options (23)
OptionDescriptionSource
-c, --cipher --cipherThe NAME argument specifies the symmetric cipher to be used.help + man
-e, --encrypt --encryptPerform an encryption operation on the input data.help + man
-d, --decrypt --decryptPerform a decryption operation on the input data.help + man
-i, --infile --infileUse the file referenced with FILE as the input data.help + man
-o, --outfile --outfileUse the file referenced with FILE as the destination for the output of the cryptographic operation.help + man
--iv IVUse the IV data as initialization vector for the cryptographic operation.help + man
--aad AADFor AEAD ciphers like CCM, GCM or the authenc ciphers of the Linux kernel crypto API, the additional authentication data can be provided with the AAD parameter.help + man
--tag TAGThe AEAD tag value required for the decryption operation is provided with the TAG parameter.help + man
--taglen BYTESDuring encryption operation of AEAD ciphers, the tag is generated.help + man
--ccm-nonce NONCEUse the NONCE data as CCM nonce as defined in SP800-38C Appendix A.2.help + man
--key-len LENGTHLENGTH specifies length of the key passed to the cipher algorithm.help + man
-s --saltSalt for PBKDF2help
-p, --passwd --passwdThe PASSWORD parameter provides the password from which the symmetric key is derived used to encrypt or decrypt the data.help + man
--passwdfd FDInstead of providing the password via command line, it can be injected into kcapi-enc using a file descriptor.help + man
--pbkdfiter NUMPerform NUM iterations of the PBKDF2 operation to derive the symmetric key.help + man
--pbkdfmac MACUse the keyed message digest referenced with MAC for the PBKDF2 operation.help + man
--keyfd FDTo provide a symmetric key that is directly used for the cryptographic operation, the file descriptor referenced with FD must be used.help + man
--nounpadDuring decryption and when the input data is provided via a file as well as the output is written to a file, kcapi-enc automatically tries to detect a padding and removes the padding data.help + man
-h, --help --helpDisplay the help text.help + man
--versionDisplay the version number of the kcapi-enc application.help + man
-v, --verbose --verboseVerbose logging, multiple options increase verbosityhelp + man
-q, --quiet --quietNo informational output - quiet operationhelp + man
--salt SALTWhen performing the PBKDF2 operation to obtain the symmetric key from the password, the SALT value is used as one input parameter. (in the manual page but not in --help)man

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.