Skip to content

Instantly share code, notes, and snippets.

@AKupetskiy
Created September 1, 2016 12:47
Show Gist options
  • Save AKupetskiy/e91b68a33a7f125cfc94b07c3e4e2753 to your computer and use it in GitHub Desktop.
Save AKupetskiy/e91b68a33a7f125cfc94b07c3e4e2753 to your computer and use it in GitHub Desktop.
share large files using AES256 encryption
//1. Generate public/private keys pair (Hit enter to skip questions):
openssl req -x509 -nodes -days 100000 -newkey rsa:2048 -keyout privatekey.pem -out publickey.pem
//2. Encrypt file using public key:
openssl smime -encrypt -aes256 -in LargeFile.zip -binary -outform DEM -out LargeFile_encrypted.zip publickey.pem
//3. Decrypt file using private key:
openssl smime -decrypt -in LargeFile_encrypted.zip -binary -inform DEM -inkey privatekey.pem -out LargeFile.zip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment