Fastest and secure way to encrypt large files using Davinci
In cryptography, encryption is the process of encoding information. This process converts the original representation of the information, known as plaintext, into an alternative form known as ciphertext. Ideally, only authorized parties can decipher a ciphertext back to plaintext and access the original information. Encryption does not itself prevent interference but denies the intelligible content to a would-be interceptor.
Davinci
Davinci is open-source package that can encrypt large files easily on Windows, MacOS and Linux distributions.
To start encryption process, you need to download binary files from https://github.com/eminmuhammadi/davinci/releases.
- Generate passphrase (stored in a file)
davinci new-passphrase --folder ./path-to-folder
- Generate public and private key (stored in a file)
davinci new-keypair --size 2048 --passphrase ./passphrase.txt --folder ./path-to-folder
- Generate Symmetric key (stored in a file)
davinci key --folder ./path-to-folder
- Encrypt a file
davinci encrypt --input ./file.ext --output ./file-decrypted.ext --key ./key.txt --passphrase ./passphrase.txt --public-key ./publicKey.pem
- Decrypt a file
davinci decrypt --input ./file-decrypted.ext --output ./file.ext --passphrase ./passphrase.txt key --private-key ./privateKey.pem
Algorithm Specification
Key Generation:
- Generate the public and private key pair, afterwards we call this
pubK
andprivK
. - Generate the symmetric key, afterwards we call this
R
.
Encryption:
- Encrypt symmetric key using the public key.
Enc(R, pubK)
, afterwards we call thisR_enc
. - Encrypt file using the encrypted symmetric key.
Enc(file, R_enc)
, afterwards we call thisfile_enc
.
Decryption:
- Decrypt symmetric key using the private key.
Dec(R_enc, privK)=R
- Decrypt file using the decrypted symmetric key.
Dec(file_enc, R)
Author: Emin Muhammadi (https://muemin.me). You can contact here for ideas and suggestions.