Fastest and secure way to encrypt and decrypt large files.
You can download binary files for each platform from the latest releases.
- Generate passphrase (stored in a file)
davinci new-passphrase --folder ./path-to-folderReturns a passphrase in the file passphrase.txt
- Generate public and private key (stored in a file)
davinci new-keypair --size 2048 --passphrase ./passphrase.txt --folder ./path-to-folderReturns the public key in the file publicKey.pem and the private key in the file privateKey.pem.
- Generate Symmetric key (stored in a file)
davinci key --folder ./path-to-folderReturn the symmetric key in the file key.txt.
- Encrypt a file
davinci encrypt --input ./file.ext --output ./file-decrypted.ext --key ./key.txt --passphrase ./passphrase.txt --public-key ./publicKey.pemEncrypts the file file.ext using the key key.txt (encrypted using RSA) and stores the result in file-decrypted.ext.
- Decrypt a file
davinci decrypt --input ./file-decrypted.ext --output ./file.ext --passphrase ./passphrase.txt --private-key ./privateKey.pemDecrypts the file file-decrypted.ext using the key key.txt (encrypted using RSA) and stores the result in file.ext.
go installbash build.sh
# or
chmod +x build.sh
./build.shKey Generation:
- Generate the public and private key pair, afterwards we call this
pubKandprivK. - 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 symmetric key.
Enc(file, R), afterwards we call thisfile_enc. The generated file will be in this format:R_enc + \n + file_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)
- Golang 1.16+
- Garble https://github.com/burrowers/garble (optional, for obfuscation binary build file)
- CLI Framework
- github.com/cpuguy83/go-md2man/v2
- github.com/russross/blackfriday/v2
- github.com/urfave/cli/v2
- github.com/xrash/smetrics
- Source code
- strconv
- encoding/base64
- crypto/aes
- crypto/cipher
- crypto/rand
- crypto/rsa
- crypto/sha256
- crypto/x509
- encoding/pem
- fmt
- io/ioutil
- os
- path/filepath