Vatsal Patel (AU2040043)
Digant Patel (AU2040086)
Samarth Chauhan (AU2040097)
Abstract- Cryptography is a means of using codes to protect information and communications so that only those who are supposed to read and process it; may do so. Knowledge of ciphers is said to have been acquired by the Ancient Greeks and used for military purposes. Affine cipher uses alpha-numeric conversions and principles of matrix inversion to encrypt and decrypt data.
Enter message to be encrypted: HOW ARE YOU?
Enter number of key matrices: 2
Enter size of square key matrix: 3
Enter elements of key matrix 1 :
2 1 2
1 3 1
1 1 -1
Enter elements of key matrix 2 :
1 2 2
4 3 1
2 1 -1
Enter key matrix of size [3x1] for addition: 1 2 3
Encrypted text: CPXWZE.GMZJB
Decrypted message: HOW ARE YOU?
Process finished with exit code 0
Enter message to be encrypted: ALL WE HAVE IS NOW.
Enter number of key matrices: 1
Enter size of square key matrix: 5
Enter elements of key matrix 1 :
1 2 2 4 1
4 3 1 2 0
5 0 1 -1 1
2 3 4 0 1
7 8 5 1 3
Enter key matrix of size [5x1] for addition: 5 4 3 2 1
Encrypted text: BNKOEJSWVQB KBZZCBKO
Decrypted message: ALL WE HAVE IS NOW.
Process finished with exit code 0
Enter message to be encrypted: I AM NOT LAZY. I AM ON ENERGY SAVING MODE.
Enter number of key matrices: 3
Enter size of square key matrix: 2
Enter elements of key matrix 1
3 2
1 5
Enter elements of key matrix 2 :
1 -2
0 5
Enter elements of key matrix 3 :
2 0
-3 1
Enter key matrix of size [2x1] for addition: 2 3
Encrypted text: AHVSOKXYGWP?.ZXLUBFA.CHG?HLRUIKPY?GYKQREDC
Decrypted message: I AM NOT LAZY. I AM ON ENERGY SAVING MODE.
Process finished with exit code 0
Enter message to be encrypted: WE ENJOYED THE APPLIED LINEAR ALGEBRA COURSE.
Enter number of key matrices: 2
Enter size of square key matrix: 4
Enter elements of key matrix 1 :
1 2 3 4
5 6 17 8
10 82 12 13
21 22 23 24
Enter elements of key matrix 2
2 0 1 3
-3 1 5 50
12 1 0 -1
0 3 4 100
Enter key matrix of size [4x1] for addition: 7 8 9 0
Encrypted text: B.?DUWQPGSTUPEBOWIKPIVBEMTMI XRLHIBIVDUPABAQZECP
Decrypted message: WE ENJOYED THE APPLIED LINEAR ALGEBRA COURSE.
Process finished with exit code 0
- [1] Richards, K. (2020, April 6). What is cryptography? - definition from whatis.com. SearchSecurity. Retrieved September 27, 2021, from What is Cryptography? Definition from SearchSecurity.
- [2] Sidhpurwala, H. (2019, March 19). A brief history of cryptography. Red Hat Customer Portal. Retrieved September 27, 2021, from A Brief History of Cryptography.
- [3] GeeksforGeeks. (2021, August 4). Implementation of Affine Cipher. Implementation of Affine Cipher
- [4] Cryptography by means of linear algebra and number theory. (n.d.). Retrieved October 20, 2021, from http://i-rep.emu.edu.tr:8080/xmlui/bitstream/handle/11129/1420/ElfadelAjaeb.pdf?sequence=1