A simple terminal command line tool for encryption & decryption of any files, currently supports Vigenere, AES128-CBC, AES192-CBC and AES256-CBC ciphers.
The program can also use hardware acceleration technology for AES ciphers using AES-NI (Intel and AMD CPUs) and ARM-neon (armv8, aarch64 CPUs) intrinsics.
- Requirement:
- make
- compiler that can compile with or above C++17
-
Clone the repo
git clone --recurse-submodules https://github.com/mrdcvlsc/bethela git submodule update --init --recursive cd bethela -
Compile the program
Example:
make compile CXX=clang++ VERSION=aesni TYPE=releaseThis table shows what values you can pass to a dflag during compilation to alter the compilation behaviour.
If a variable flag is not specified, the first value in the table below are taken as the default values.
Variable Value CXX g++,clang++TYPE release,debug,debug_threadsVERSION portable,aesni,neonLINK dynamic,staticaesni - will enable hardware acceleration technology
AES-NIwhen compiling for x86-64 Intel and/or AMD CPUs.neon - will enable hardware acceleration technology in ARM when compiling for ARM armv8/aarch64 CPUs.
-
Install the program to usr/local/bin (for linux)
make installTo Uninstall the program in usr/local/bin (for linux), use the command below
make uninstall
bethela --generate key_filename key_size_in_bytesThe key size should be a positive number greater than 0
Adding -replace command when encrypting/decrypting will
replace the old files with the encrypted/decrypted files.
Requires any key file sizes.
bethela --encrypt-replace keyfile file1 file2 ... fileN
bethela --decrypt-replace keyfile file1.bthl file2.bthl ... fileN.bthl
Requires a 128-bit key, or 16 byte key file size.
bethela --enc-AES128-replace keyfile file1 file2 ... fileN
bethela --dec-AES128-replace keyfile file1.bthl file2.bthl ... fileN.bthl
Requires a 192-bit key, or 24 byte key file size.
bethela --enc-AES192-replace keyfile file1 file2 ... fileN
bethela --dec-AES192-replace keyfile file1.bthl file2.bthl ... fileN.bthl
Requires a 256-bit key, or 32 byte key file size.
bethela --enc-AES256-replace keyfile file1 file2 ... fileN
bethela --dec-AES256-replace keyfile file1.bthl file2.bthl ... fileN.bthl
bethela --help
- AES - for AES encryption with hardware acceleration support.
- BytePadding - for simple padding operations.
- BlockCipherModes - for block cipher encryption modes.