All Linux HowTo's Security HowTo's

Encrypt Large Files With OpenSSL Using Public/Private Keys

Share This:

This article explains how to encrypt large files with OpenSSL and Public/Private keys.

Create your key-pair:

openssl req -x509 -nodes -newkey rsa:2048 -keyout private.pem -out public_nopass.pem

Encrypt your larger file:

openssl smime -encrypt -aes256 -in bigfile.tar -binary -outform DEM -out bigfile.tar.ssl public.pem

Decrypt your file:

openssl smime -decrypt -in bigfile.tar.ssl -binary -inform DEM -inkey privatekey.pem -out bigfile.tar

At this stage you’ve been able to create your key-pair, encrypt and decrypt files.

Similar Posts: