Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
fuss:openssl [2014/11/24 01:17] – [Create a Self-Signed Certificate] officefuss:openssl [2017/02/22 18:30] – external edit 127.0.0.1
Line 1: Line 1:
 +====== Encrypt and Decrypt a File using Symmetric Encryption ======
 +
 +To encrypt:
 +<code bash>
 +openssl enc -aes-256-cbc -salt -in archive.tar.xz -out archive.tar.xz.aes
 +</code>
 +
 +To decrypt:
 +<code bash>
 +openssl enc -d -aes-256-cbc -in archive.tar.xz.aes -out archive.tar.xz
 +</code>
 +
 +====== Create a Self-Signed Certificate ======
 +
 +  * Generate the private key:
 +
 +<code bash>
 +openssl genrsa -des3 -out server.key 1024
 +</code>
 +
 +  * Create a certificate signing request (''CSR''):
 +
 +<code bash>
 +openssl req -key server.key -out server.csr
 +</code>
 +
 +  * Sign the certificate signing request (''CSR''):
 +
 +<code bash>
 +openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
 +</code>
 +
 +  * Remove the passphrase from the private key (for apache to not prompt):
 +
 +<code bash>
 +cp server.key server.key.secure
 +openssl rsa -in server.key.secure -out server.key
 +</code>
 +
 +====== Benchmark ======
 +
 +To benchmark an OpenSSL encryption scheme, for example ''aes-256-cbc'', issue the following command:
 +
 +<code>
 +openssl speed -evp aes-256-cbc
 +</code>
  

fuss/openssl.txt · Last modified: 2022/04/19 08:28 by 127.0.0.1

Access website using Tor Access website using i2p Wizardry and Steamworks PGP Key


For the contact, copyright, license, warranty and privacy terms for the usage of this website please see the contact, license, privacy, copyright.