git: https://github.com/LuanNgoMinh/crypto_Application
- ECB
- CBC
- CFB
- OFB
- CTR
Encrypt file with AES Mode and IV
python encrypt.py -m <AES_Mode> -i <Initialization_Vector> <plan_text_file> <cipher_text_file>
python encrypt.py -m CFB -i "meo con xinh xan" HenMotMai.text HenMotMai.cipher
Decrypt file with AES Mode
python decrypt.py -m <AES_Mode> <cipher_text_file> <plain_text_file>
python decrypt.py -m CFB HenMotMai.cipher HenMotMai.data
Auto encrypt and decrypt file. After that, compare sha256 checksum origin file and decrypt_file
Encrypt and decrypt file storage at test_space dir in same folder with test file
sudo chmod +x test
./test <file_1> <file_2> <file_3> ...
./test sunflower.jpg HenMotMai.text testcase1
... some log ...
=> CFB true: origin_file_name
... some log ...
=> CTR true: origin_file_name
... some log ...
=> OFB false: origin_file_name
Generate checksum from a file. Verify file from check sum
- SHA
- SHA256
- MD5
./checksum.py -h <hash mode> <filename>
./checksum.py -h SHA256 sunflower.jpg
./checksum.py -h <hash mode> -c <checksum> <filename>
./checksum.py -h SHA256 -c 08ad5b6cf4f282bc3044ea437c239ebae398daa17dd366141ba6c883bccabd7b sunflower.jpg
./sign.py -h <hash_mode> <file_need_signing> <signature_file>
./sign.py -h MD5 HenMotMai.text HenMotMai.signature
./sign.py -h <hash_mode> <receive_file> <signature_file>
./verify_sign.py -h SHA256 HenMotMai.text HenMotMai.signature