IES is a block cipher that created based on AES and DES and feistel network. It uses the Sbox from AES and Feistel network from DES.
NIM | Name |
---|---|
13520029 | Muhammad Garebaldhie ER Rahman |
13520163 | Frederik Imanuel Louis |
13520166 | Raden Rifqi Rahman |
Generally IES have 5 components
- Sbox
- Pbox
- Expansion Matrix
- Round function
- Key Generation
- Python 3.10
- virtualenv
- Make sure you have all the requirements installed.
- Create virtualenv by using
virtualenv venv
- Use the virtualenv by using
- Windows:
./venv/Scripts/activate
- UNIX:
source ./venv/bin/activate
- Windows:
- Install all the requirements using
pip3 install -r requirements.txt
usage: encrypt.py/decrypt [-h] [-M MODE] [-iv initial-vector-file] [-o output-vector-file] filepath key-file-or-phrase
positional arguments:
filepath
key-file-or-phrase
optional arguments:
-h, --help show this help message and exit
-M MODE, --mode MODE
-iv initial-vector-file
-o initial-vector-file, --outfile initial-vector-file
-M mode
is consisting ofECB, CBC, CFB, OFB, CTR
other than that it will fails-iv path
is filepath consisting of the iv the program want to use. The file might be anything.txt
,.in
or no exstention. The files is consisting bytes or text.iv
options will be used for all modes exceptECB
This is example of iv
file
akusukamakaniyayayaya
-o output
is the filename that you want to output, the default is it will appendencrypted-
to the filename so if the filename isa.txt
the result will beencrypted-a.txt
filepath
file you want toencrypt
ordecrpyt
key-file-or-phrase
the key that will be used for the process, might be phrase or from file
Example:
- Encrypt file named
requirements.txt
usingECB
mode withkey
from stdin
python .\src\encrypt.py -M ecb .\requirements.txt akusukakripto
- Encrypt file named
requirements.txt
usingCBC
mode andiv
file withkey
from stdin
python .\src\encrypt.py -M cbc -iv .\iv .\requirements.txt akusukakripto
- Decrypt file named
requirements.txt
usingCBC
mode andiv
file withkey
froma
file
python .\src\decrypt.py -M cbc -iv .\iv .\encrypted-requirements.txt .\a
- Decrypt file named
requirements.txt
usingCBC
mode andiv
file withkey
froma
file with file namegare
python .\src\decrypt.py -M cbc -iv .\iv -o .\gare .\encrypted-requirements.txt .\a