Skip to content

vatsal-dp/Affine-Cipher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

CRYPTOGRAPHY

Ciphering/Deciphering data using Affine Cipher Algorithm in Java language

Group 7 Fanatics

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.

Results

1.

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

2.

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

3.

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

4.

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

References

Youtube Video

Group 7 Fanatics ALA Project Link

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages