Skip to content

Commit 41f1672

Browse files
RishiRishi
authored andcommitted
Recommit
1 parent 8231677 commit 41f1672

File tree

8 files changed

+15
-143
lines changed

8 files changed

+15
-143
lines changed

README

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
1-
Java Documentation located in dist/javadoc
2-
3-
Command for encrypting: java AES e -length 128/256 keyFile inputFile
4-
Command for decryption: java AES d -length 128/256 keyFile encryptedinputFile
5-
Default command for 128-bit ECB: java AES e/d keyFile inputFile <= Defaults to AES-128
6-
7-
NOTE: 128/256 means either 128 or 256. e/d means either e or d.
8-
9-
We also have another source file called MCTables.java that uses look up tables for the mixColumns multiplication.
10-
11-
In addition to implementing AES-256, we also modified our program to implement AES-128. Using the -length argument, it can be determined whether the program will run AES-256 or 128. If the -length argument is not mentioned, then it will run AES-128 by default. Also, the program will print an error if a user tries to run AES-256 using a 128-bit key, and vice versa.
12-
1+
Java Documentation located in dist/javadoc
2+
3+
Command for encrypting: java AES e [-length] [-mode] keyFile inputFile
4+
Command for decryption: java AES d [-length] [-mode] keyFile encryptedinputFile
5+
6+
-length is an optional argument which denotes the keysize that the user intends to use for the AES cipher (128 or 256).
7+
-mode is an optional argument which denotes the mode of operation which will be used for the AES cipher (ECB or CBC).
8+
9+
The default options are: -length 128, and -mode ECB.
10+
11+
Note: In order for a more secure encryption, it is recommended that you use CBC. To use CBC, you need to add an Initialization Vector to your key file
12+
in a new line after the key, which is a 32-character length hex character.
13+
14+
Files that are encrypted will have the file name: [inputfilename].enc
15+
"" decrypted "": [encryptedfilename].dec

input.txt

Lines changed: 0 additions & 5 deletions
This file was deleted.

input.txt.enc

Lines changed: 0 additions & 5 deletions
This file was deleted.

input.txt.enc.dec

Lines changed: 0 additions & 5 deletions
This file was deleted.

key.txt

Lines changed: 0 additions & 2 deletions
This file was deleted.

outputdec.txt

Lines changed: 0 additions & 57 deletions
This file was deleted.

outputenc.txt

Lines changed: 0 additions & 56 deletions
This file was deleted.

src/AES.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,6 @@ else if(iv.length() != 32)
198198
line = input.readLine();
199199
}
200200
}
201-
System.out.println(MatrixToString(initvector));
202201
input.close();
203202
out.close();
204203
}

0 commit comments

Comments
 (0)