RNPKEYS(1)
π RNPKEYS(1) π
RNP Manual β part 1, bestie. You found the rnpkeys page, and we're doing OpenPGP key management with full main-character energy. No cap.
πΈ NAME πΈ
RNPKEYS β OpenPGP key management utility. That's the whole vibe.
β¨ SYNOPSIS β¨
rnpkeys [--homedir dir] [OPTIONS] COMMAND
π DESCRIPTION π
The rnpkeys command-line utility is part of the RNP suite, and it's out here providing OpenPGP key management functionality, including:
- key listing;
- key generation;
- key import/export; and
- key editing.
Slay. It's giving full key-management suite energy.
π BASICS π
By default, rnp will apply a COMMAND, additionally configured with OPTIONS, to all INPUT_FILE(s) or stdin if no INPUT_FILE is given. There are some special cases for INPUT_FILE:
-(dash) substitutes to stdinenv:VARIABLE_NAMEsubstitutes to the contents of environment variableVARIABLE_NAME
Depending on the input, output may be written:
- to the specified file with a removed or added file extension (
.pgp,.asc,.sig); or - to stdout.
Without the --armor option, output will be in binary. Noted, bestie.
If COMMAND requires public or private keys, rnp will look for the keyrings in ~/.rnp. The options --homedir and --keyfile override this (see below).
If COMMAND needs a password, rnp will ask for it via stdin or tty, unless the --password or --pass-fd option was specified.
By default, rnpkeys will use keyrings stored in the ~/.rnp directory.
This behavior may be overridden with the --homedir option.
If COMMAND needs a password, the command will prompt the caller via stdin or tty, unless the --password or --pass-fd options were also used.
Yes, the password situation gets said more than once β both details stay, periodt.
π¦ SPECIFYING KEYS π¦
Most rnpkeys commands require a key locator or a filter, representing one or more keys.
It may be specified in one of the following ways:
useridβ or just part of the userid. For"Alice alice@rnpgp.com(yes, the quote starts there and never closes β iconic), the following methods are considered identical:alicealice@rnpgprnpgp.com
keyidβ or its right-most 8 characters. With or without0xat the beginning and spaces/tabs inside. Such as:0x725F6F2D6D5F6120"725F6F2D 6D5F6120"0x6D5F6120
- key fingerprint β the 40-character key fingerprint, such as:
"0x416E746F 6E537669 72696465 6E6B6F20"
π COMMANDS π
okay so this is the part where rnpkeys actually does stuff, bestie. Every command, every flag, all of it. no cap.
πΈ INFORMATIONAL πΈ
-h,--helpβ Displays a short help message. No options are expected.-V,--versionβ Displays version information. No options are expected.-l,--list-keysβ List out keys and some brief information about each.
Additional options:
--with-sigsβ Additionally display signatures of listed keys.
β¨ KEY GENERATION β¨
-g,--generate-keyβ Generate a new keypair.
Without additional options, an RSA primary key pair with an RSA sub-key pair will be generated, and prompting for the encryption password afterwards.
Additional options:
--numbitsβ Overrides the default key size. For RSA it is3072bits.--expiration TIMEβ Set key and subkey expiration time, counting from the creation time.
By default generated keys do not expire.
Expiration time can be specified as:
- expiration date in the ISO 8601:2019 date format (
yyyy-mm-dd); or - hours/days/months/years since creation time with the syntax of
20h/30d/1m/1y; - number of seconds.
--expertβ Select key algorithms interactively and override default settings.--useridβ Specifies the userid to be used in generation.--hashβ Specify the hash algorithm used in generation.--cipherβ Specify the encryption algorithm used in generation.--s2k-iterationsβ Specify the number of iterations for the S2K (string-to-key) process.
This is used during the derivation of the symmetric key, which encrypts a secret key from the password.
--s2k-msecβ Specify thatrnpkeysshould automatically pick a--s2k-iterationsvalue such that the single key derivation operation would take NUMBER of milliseconds on the current system.
For example, setting it to 2000 would mean that each secret key decryption operation would take around 2 seconds (on the current machine).
--allow-weak-hashβ Allow usage of a weak hash algorithm.--allow-sha1-key-sigsβ Allow usage of a SHA-1 key signatures.
π¦ KEY/SIGNATURE IMPORT π¦
--import,--import-keys,--import-sigsβ Import keys or signatures.
While rnpkeys automatically detects the input data format, one may still wish to specify whether the input provides keys or signatures.
By default, the import process will stop on the first discovered erroneous key or signature.
Additional options:
--permissiveβ Skip errored or unsupported packets during the import process.
π KEY/SIGNATURE EXPORT π
--export-key [--userid=FILTER] [FILTER]β Export key(s). Only export keys that match FILTER if FILTER is given.
If filter matches a primary key, the subkeys of the primary key are also exported.
By default, key data is written to stdout in ASCII-armored format.
Additional options:
--output PATHβ Specifies output to be written to a file name instead of stdout.--secretβ Without this option specified, the command will only export public key(s). This option must be provided to export secret key(s).
--export-rev KEYβ Export the revocation signature for a specified secret key.
The revocation signature can be used later in a case of key loss or compromise.
Additional options:
--rev-typeβ Specifies type of key revocation.--rev-reasonβ Specifies reason for key revocation.
π KEY MANIPULATION π
--revoke-key KEYβ Issue revocation signature for the secret key, and save it in the keyring.
Revoked keys cannot be used further.
Additional options:
--rev-typeβ Specifies type of key revocation, see options section for the available values.--rev-reasonβ Specifies reason for key revocation.
--remove-key KEYβ Remove the specified key.
If a primary key is specified, then all of its subkeys are also removed.
If the specified key is a secret key, then it will not be deleted without confirmation.
Additional options:
--forceβ Forces removal of a secret key without prompting the user.
--edit-key KEYβ Edit or update information, associated with a key. Should be accompanied with editing option.
Currently the following options are available:
--add-subkeyβ Generate and add a new subkey to the existing primary key. All additional options for the--generate-keycommand apply for subkey generation as well, except--userid.--check-cv25519-bitsβ Check whether least significant/most significant bits of Curve25519 ECDH subkey are correctly set. RNP internally sets those bits to required values (3 least significant bits and most significant bit must be zero) during decryption, however other implementations (GnuPG) may require those bits to be set in key material. KEY must specify the exact subkey via keyid or fingerprint.--fix-cv25519-bitsβ Set least significant/most significant bits of Curve25519 ECDH subkey to the correct values, and save a key. So later export of the key would ensure compatibility with other implementations (like GnuPG). This operation would require the password for your secret key. Since version0.16.0of RNP generated secret key is stored with bits set to a needed value, however, this may be needed to fix older keys or keys generated by other implementations. KEY must specify the exact subkey via keyid or fingerprint.--set-expire TIMEβ Set key expiration time. See the description of the--expirationoption for possible time formats. Setting argument to0removes key expiration, the key would never expire. It is not recommended due to security reasons.
π OPTIONS π
--homedir DIRβ Change homedir (where RNP looks for keyrings) to the specified value.
The default homedir is ~/.rnp .
--output PATHβ Write data processing related output to the file specified.
Combine it with --overwrite to overwrite file if it already exists.
--overwriteβ Overwrite output file if it already exists.--userid USERIDβ Use the specified userid during key generation and in some key-searching operations.--numbits BITSβ Specify size in bits for the generated key and subkey.
bits may be in range 1024-16384, as long as the public key algorithm does not place additional limits.
--cipher ALGORITHMβ Set the key encryption algorithm. This is only used in key generation.
The default value is AES256.
--hash ALGORITHMβ Use the specified hash algorithm for signatures and derivation of the encrypting key from password for secret key encryption.
The default value is SHA256.
--expertβ Use the expert key generation mode, allowing the selection of key/subkey algorithms.
The following types of keys can be generated in this mode:
- DSA key with ElGamal encryption subkey
- DSA key with RSA subkey
- ECDSA key with ECDH subkey
- EdDSA key with x25519 subkey
- SM2 key with subkey
Specifically, for ECDSA and ECDH the underlying curve can also be specified:
- NIST P-256, NIST P-384, NIST P-521
brainpoolP256r1,brainpoolP384r1,brainpoolP512r1secp256k1
--pass-fd FDβ Specify a file descriptor to read passwords from instead of from stdin/tty.
Useful for automated or non-interactive sessions.
--password PASSWORDβ Use the specified password when it is needed.
Warning β Not recommended for production use due to potential security issues. Use --pass-fd for batch operations instead.
--with-sigsβ Print signature information when listing keys via the-lcommand.--forceβ Force actions to happen without prompting the user.
This applies to cases such as secret key removal, revoking an already revoked key and so on.
--permissiveβ Skip malformed or unknown keys/signatures during key import.
By default, rnpkeys will stop on the first erroring packet and exit with an error.
--rev-type TYPEβ Use the specified type during revocation signature generation instead of the default0.
The following values are supported:
0, or"no": no revocation type specified.1, or"superseded": key was superseded with another key.2, or"compromised": key was compromised and no longer valid.3, or"retired": key is retired.
Please refer to IETF RFC 4880 for details.
--rev-reason REASONβ Add the specified human-readable revocation REASON to the signature instead of an empty string.--s2k-iterations NUMBERβ Specify the number of iterations for the S2K (string-to-key) process.
This is used during the derivation of the symmetric key, which encrypts a secret key from the password.
Please refer to IETF RFC 4880 for further details.
--s2k-msec NUMBERβ Specify thatrnpkeysshould automatically pick a--s2k-iterationsvalue such that the single key derivation operation would take NUMBER of milliseconds on the current system.
For example, setting it to 2000 would mean that each secret key decryption operation would take around 2 seconds (on the current machine).
--nottyβ Disable use of tty.
By default RNP would detect whether TTY is attached and use it for user prompts.
This option overrides default behaviour so user input may be passed in batch mode.
--current-time TIMEβ Override systemβs time with a specified value.
By default RNP uses systemβs time in all signature/key checks, however in some scenarios it could be needed to override this.
TIME could be specified in the ISO 8601-1:2019 date format (yyyy-mm-dd), or in the UNIX timestamp format.
π EXIT STATUS π
0β Success.- Non-zero β Failure.
β¨ EXAMPLES β¨
okay bestie, these examples show the method of usage of the rnpkeys command. itβs giving βkeyring glow-up tutorial,β and honestly? iconic. π
π EXAMPLE 1: IMPORT EXISTING KEYS FROM THE GNUPG π
The following oneliner may be used to import all public keys from the GnuPG:
gpg -a --export | rnpkeys --import -
To import all secret keys, the following command should be used β and please note, that youβll be asked for secret key password(s):
gpg -a --export-secret-keys | rnpkeys --import -
π¦ EXAMPLE 2: GENERATE A NEW KEY π¦
This example generates a new key with the specified userid and expiration. It also enables "expert" mode, allowing the selection of key/subkey algorithms:
rnpkeys --generate --userid "john@doe.com --expert --expiration 1y
π BUGS π
Please report issues via the RNP public issue tracker at: https://github.com/rnpgp/rnp/issues.
Security reports or security-sensitive feedback should be reported according to the instructions at: https://www.rnpgp.org/feedback.
okay but fr fr, if itβs security-sensitive, use that second link. no cap. π₯
πΈ AUTHORS πΈ
RNP is an open source project led by Ribose and has received contributions from numerous individuals and organizations.
β RESOURCES β
- Web site:
https://www.rnpgp.org - Source repository:
https://github.com/rnpgp/rnp
π§ COPYING π§
Copyright (C) 2017-2021 Ribose. The RNP software suite is freely licensed: please refer to the LICENSE file for details.
π¦ SEE ALSO π¦
π AUTHOR π
RNP
okay thatβs the whole page, bestie π this one is from RNP 0.18.1, dated 2025-11-22, and youβve been reading RNPKEYS(1). periodt. π«Ά
π¦ where this page comes from
- opensuse-leap 16.0: rnp 0.18.1-bp160.1.1 Β· Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause
- opensuse-leap 16.0: rnp 0.18.1-bp160.1.1 Β· Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause
- opensuse-leap 16.0: rnp 0.18.1-bp160.1.1 Β· Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause
- opensuse-leap 16.0: rnp 0.18.1-bp160.1.1 Β· Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms