nerdexam
CompTIA

LX0-104 · Question #423

What openssl command will generate a private RSA key of 2048 bits and no passphrase?

The correct answer is B. openssl genrsa out privkey.pem 2048. The openssl genrsa command is used to generate an RSA private key, where out privkey.pem specifies the output file and 2048 sets the key length in bits without a passphrase.

Security

Question

What openssl command will generate a private RSA key of 2048 bits and no passphrase?

Options

  • Aopenssl genrsa des3 out privkey.pem 2048
  • Bopenssl genrsa out privkey.pem 2048
  • Copenssl genrsa nopass out privkey.pem 2048
  • Dopenssl genrsa nopass des3 out privkey.pem 2048

How the community answered

(59 responses)
  • A
    5% (3)
  • B
    90% (53)
  • C
    3% (2)
  • D
    2% (1)

Why each option

The openssl genrsa command is used to generate an RSA private key, where out privkey.pem specifies the output file and 2048 sets the key length in bits without a passphrase.

Aopenssl genrsa des3 out privkey.pem 2048

The des3 option encrypts the private key with a DES3 cipher, which requires a passphrase, contradicting the 'no passphrase' requirement.

Bopenssl genrsa out privkey.pem 2048Correct

The openssl genrsa command generates an RSA private key. Specifying out privkey.pem directs the output to a file named privkey.pem, and 2048 defines the key size in bits. By default, genrsa does not prompt for a passphrase unless an encryption option (like -des3) is explicitly used, thus fulfilling the 'no passphrase' requirement.

Copenssl genrsa nopass out privkey.pem 2048

There is no nopass option for openssl genrsa; the absence of encryption options like -des3 or -aes256 results in a key without a passphrase.

Dopenssl genrsa nopass des3 out privkey.pem 2048

This option incorrectly combines the non-existent nopass with des3, which would require a passphrase anyway.

Concept tested: OpenSSL RSA private key generation

Source: https://www.openssl.org/docs/manmaster/man1/openssl-genrsa.html

Topics

#OpenSSL#RSA key generation#private key

Community Discussion

No community discussion yet for this question.

Full LX0-104 Practice