项目作者: JOELKUNDU

项目描述 :
A File/Folder encryptor written in c++ and based on Crypto++ library
高级语言: C++
项目地址: git://github.com/JOELKUNDU/Zenc-command-line-file-encrypter-decryptor.git
创建时间: 2020-07-17T17:44:57Z
项目社区:https://github.com/JOELKUNDU/Zenc-command-line-file-encrypter-decryptor

开源协议:GNU General Public License v3.0

下载


Zenc - command line file encrypter / decryptor

A command line cross platform File/Folder encryptor written in c++ and based on Crypto++ library

Visit the site

Checkout CONTRIBUTING.md to see the contributing guidelines.

How to use?

Windows


-have g++ and libcrypto++(crypto++) preinstalled and configured

-Run Make.bat

else (if you are having issues with g++ and libcrypto++)

-run make_path.bat, this will create a directory c:\Zenc

-Copy exe from release folder to c:\Zenc and use it.


Linux


Clone the repository and open a terminal in the root and use:

sudo apt-get install g++
sudo apt-get install libcryptopp++
g++ src/Zenc.cpp -std=c++17 -lstdc++fs -lcrypto++ -o /usr/bin/Zenc

NOTE: optional - upx the executable (-9 —lzma) (slight boost in performance)

Encryption modes supported:


1. AES-GCM with 2k tables

2. AES-GCM with 64k tables

3. AES-EAX

4. AES-CBC

5. AES-ECB

6. AES-CTR

7. AES-CFB

8. AES-OFB

9. ChaCha20 (stream cipher)

10. XChaCha20 (stream cipher)


How to use


Zenc [-h or -H/-e/-ed/-d/-dd] [FILE PATH] -m [mode] [-p/-np] [Password in case of using -p] [-t -g]

-h or -H Help Menu

-e Encrypt a file

-ed Encrypt a directory

-d Decrypt a file

-dd Decrypt a directory

-m Mode of Encryption / Decryption (gcm2k,gcm64k,eax,cbc,ecb,ctr,cfb,ofb)

-p Password provided by the user (no limit in length or characters)

-np Either a .zkey file is created or if -g is mentioned then a password is created

-t Will encrypt/decrypt the titles and the extention

-g Will generate a password of the length specified by the user




NOTE:


1. To delete files run it on an elevated terminal else Permission Denied error will occur.

2. Time taken to do the operation will be displayed in microseconds in the end.

EXAMPLE COMMANDS:

  1. 1. To open the help book:
  2. Zenc -h
  3. Zenc -H
  4. Zenc
  5. 2. To Encrypt a file:
  6. Zenc -e C:\test\test.txt -m gcm2k -p Password123 -t (encrypt with a passwprd)
  7. Zenc -e C:\test\test.txt -m gcm2k -p C:\test\test.zkey -t (encrypt with a keyfile)
  8. Zenc -e C:\test\test.txt -m gcm2k -np -t (generate a keyfile)
  9. Zenc -e C:\test\test.txt -m gcm2k -np -t -g (generate a password)
  10. 3. To Encrypt a Directory :
  11. Zenc -ed C:\test\ -m gcm2k -p Password123 - t (encrypt with a passwprd)
  12. Zenc -ed C:\test\ -m gcm2k -p C:\test\test.zkey -t (encrypt with a keyfile)
  13. Zenc -ed C:\test\ -m gcm2k -np -t (generate a keyfile)
  14. Zenc -ed C:\test\ -m gcm2k -np -t -g (generate a password)
  15. 4. To Decrypt a file:
  16. Zenc -d C:\test\test.txt -m gcm2k -p Password123 -t (decrypt with a passwprd)
  17. Zenc -d C:\test\test.txt -m gcm2k -p C:\test\test.zkey -t (decrypt with a keyfile)
  18. 5. To Decrypt a Directory :
  19. Zenc -dd C:\test\ -m gcm2k -p Password123 -t (decrypt with a passwprd)
  20. Zenc -dd C:\test\ -m gcm2k -p C:\test\test.zkey -t (decrypt with a keyfile)

NOTE: change Zenc according to your environment.