Skip to content

Commit

Permalink
Merge pull request cheat#41 from 8go/patch-5
Browse files Browse the repository at this point in the history
added "ideal" options to openssl
  • Loading branch information
chrisallenlane authored Oct 6, 2020
2 parents 9ae63ac + 782b15b commit 33c252b
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions openssl
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,30 @@ openssl x509 -noout -enddate

# To generate Diffie-Hellman parameters:
openssl dhparam -outform PEM -out dhparams.pem 2048

# High-quality options for openssl for symmetric (secret key) encryption

This is what knowledgable people consider a good set of options for
symmetric encryption with openssl to give you a high-quality result.
Also, always remember that the result is only as good as the password
you use. You must use a strong password otherwise encryption is meaningless.

openssl enc -e -aes-256-cbc \
-salt \
-pbkdf2 \
-iter 1000000 \
-md sha512 \
-base64 \
-in somefile \
-out somefile.enc # to encrypt

openssl enc -d -aes-256-cbc \
-salt \
-pbkdf2 \
-iter 1000000 \
-md sha512 \
-base64 \
-in somefile.enc \
-out somefile # to decrypt


0 comments on commit 33c252b

Please sign in to comment.