OPENSSL-GENRSA(1ossl)
okay so hi bestie π this is the OPENSSL-GENRSA(1ossl) page β the OpenSSL manual for openssl-genrsa β and we're literally about to generate an RSA private key together. no cap. π
πΈ NAME πΈ
openssl-genrsa β generate an RSA private key β¨
π¦ SYNOPSIS π¦
openssl genrsa [-help] [-out filename] [-passout arg] [-aes128]
[-aes192] [-aes256] [-aria128] [-aria192] [-aria256] [-camellia128]
[-camellia192] [-camellia256] [-des] [-des3] [-idea] [-F4] [-f4] [-3]
[-primes num] [-verbose] [-quiet] [-traditional] [-rand files]
[-writerand file] [-engine id] [-provider name] [-provider-path path]
[-provparam [name:]key=value] [-propquery propq] [numbits]
π DESCRIPTION π
This command generates an RSA private key. that's the whole vibe. π
π OPTIONS π
-helpβ print out a usage message.-out filenameβ output the key to the specified file. If this argument is not specified, then standard output is used.-passout argβ the output file password source. For more information about the format, seeopenssl-passphrase-options(1).-aes128β encrypts the private key with this cipher before outputting it.-aes192β encrypts the private key with this cipher before outputting it.-aes256β encrypts the private key with this cipher before outputting it.-aria128β encrypts the private key with this cipher before outputting it.-aria192β encrypts the private key with this cipher before outputting it.-aria256β encrypts the private key with this cipher before outputting it.-camellia128β encrypts the private key with this cipher before outputting it.-camellia192β encrypts the private key with this cipher before outputting it.-camellia256β encrypts the private key with this cipher before outputting it.-desβ encrypts the private key with this cipher before outputting it.-des3β encrypts the private key with this cipher before outputting it.-ideaβ encrypts the private key with this cipher before outputting it.
okay so about those cipher options: if none of these options is specified, no encryption is used. If encryption is used, a pass phrase is prompted for if it is not supplied via the -passout argument. π
-F4β the public exponent to use, either65537or3. The default is65537. The-3option has been deprecated.-f4β the public exponent to use, either65537or3. The default is65537. The-3option has been deprecated.-3β the public exponent to use, either65537or3. The default is65537. This option has been deprecated.-primes numβ specify the number of primes to use while generating the RSA key. Thenumparameter must be a positive integer that is greater than1and less than16. Ifnumis greater than2, then the generated key is called a'multi-prime'RSA key, which is defined in RFC 8017.-verboseβ print extra details about the operations being performed.-quietβ print fewer details about the operations being performed, which may be handy during batch scripts and pipelines.-traditionalβ write the key using the traditional PKCS#1 format instead of the PKCS#8 format.-rand filesβ see"Random State Options"inopenssl(1)for details.-writerand fileβ see"Random State Options"inopenssl(1)for details.-engine idβ see"Engine Options"inopenssl(1). This option is deprecated.-provider nameβ see"Provider Options"inopenssl(1),provider(7), andproperty(7).-provider-path pathβ see"Provider Options"inopenssl(1),provider(7), andproperty(7).-provparam [name:]key=valueβ see"Provider Options"inopenssl(1),provider(7), andproperty(7).-propquery propqβ see"Provider Options"inopenssl(1),provider(7), andproperty(7).numbitsβ the size of the private key to generate in bits. This must be the last option specified. The default is2048and values less than512are not allowed.
π₯ NOTES π₯
RSA private key generation essentially involves the generation of two or more prime numbers. When generating a private key, various symbols will be output to indicate the progress of the generation. A . represents each number which has passed an initial sieve test, + means a number has passed a single round of the Miller-Rabin primality test, * means the current prime starts a regenerating progress due to some failed tests. A newline means that the number has passed all the prime tests (the actual number depends on the key size). π§
Because key generation is a random process, the time taken to generate a key may vary somewhat. But in general, more primes lead to less generation time of a key. β³
π SEE ALSO π
π COPYRIGHT π
Copyright 2000-2023 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 bye bestie π«Ά this was OpenSSL 3.5.6, dated 2026-04-07 β OPENSSL-GENRSA(1ossl) signing off. slay. π
β¨
π¦ 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