I know very little about openssl so I'm wondering whether the default parameters to openssl genpkey
are sufficiently secure. If I run openssl genpkey -algorithm rsa
I get a private key. But is it fine to use like that? I don't even know whether rsa
is the correct value to be using in that command. There seem to be an overwhelming number of options to openssl so could you help explain what options to pass to make things secure?
Asked
Active
Viewed 520 times
2

user779159
- 395
- 1
- 5
- 10
-
2Secure **against what threat**? Security's not an absolute property; you don't just get to use `--be-secure` and stop worrying. The defaults aren't stupid, and you won't introduce huge easily-avoidable vulnerabilities by accepting them, generally; but unless you can be much more precise about what kind of threats you wish to be secure against, this question is unanswerable. – MadHatter Nov 16 '15 at 10:28
-
In addition to @MadHatter's excellent point, you may wish to be specific about what version of OpenSSL you're using. I'd be surprised if the default parameters haven't changed over time that OpenSSL has been in existence. – womble Nov 17 '15 at 03:41
1 Answers
1
Short answer: yes. The makers of OpenSSL aren't stupid, and they didn't design the tool to produce insecure output by default. After that, it's up to the user not to make mistakes that make the system insecure, for instance by leaking the private key.
A RSA 2048-bit key (or 4096-bit, if you're paranoid) will provide security for all your uses. Attacks on systems protected with such strong keys are never done on the crypto itself, but rather going around it: backdoors in the application, bugs, social engineering, use of malware, etc. Security is a process, not a product.

dr_
- 1,085
- 12
- 19
-
-
It's whatever is configured in the OpenSSL config file `openssl.cnf`; usually 2048 bits for a RSA key. – dr_ Nov 17 '15 at 08:13