Implementation of K128 Encryption algorithm.
Project for subject MAC0336 (Cryptography for data security) at IME-USP.
$ make
$ ./k128 [execution mode] [-i input file] [-o output file] [-p password] [-a erase input]
- -c: Encrypts the input file
- -d: Decrypts the input file
- -1: Calculates the entropy of the algorithm (mode 1)
- -2: Calculates the entropy of the algorithm (mode 2)
The password needs to have:
- At least 8 characters;
- At least 2 letters;
- At least 2 numbers.
Using the flag -a
, the input file is overwritten and deleted.
Encrypt the file test.in and erase it:
$ ./k128 -c -i test.in -o test.out -p "SeCur3P4SS" -a
Decrypt the file test.out:
$ ./k128 -d -i test.out -o test.out.dec -p "SeCur3P4SS"
Test the algorithm entropy (mode 1):
$ ./k128 -1 -i test.in -p "SeCur3P4SS"
Test the algorithm entropy (mode 2):
$ ./k128 -2 -i test.in -p "SeCur3P4SS"
MIT