Skip to content

An imitation of message exchange between two parties using Diffie-Hellman Key Exchange and AES-128 Encryption with CBC mode of operation.

Notifications You must be signed in to change notification settings

terlan98/Diffie-Hellman-and-AES

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

INFT3508 – Assignment 1

This java application imitates a message exchange between two parties using Diffie-Hellman Key Exchange and AES-128 Encryption with CBC mode of operation.

How can I run it?

  1. Run MessageExchanger.java
  2. Provide a prime number and generator value for Diffie-Hellman Key Exchange algorithm. (11 and 2, for example)
  3. You will see some information regarding the key exchange process.
  4. Type a message and press enter to send.
  5. You will see the original message (plaintext), ciphertext, and decrypted message followed by the initial vector that was used for the CBC mode of encryption.

The initial vector is generated randomly and changes every time the program starts.

NOTE: It is assumed that p and alpha are not big. Using big values will cause the Math.pow() function used in DHKeyExchanger to behave unexpectedly and will result in an unsuccessful key exchange. This problem can be solved using BigInteger class. However, since the assignment description states that the values should be kept low, we decided not to bother moving from primitive types to BigInteger.

About

An imitation of message exchange between two parties using Diffie-Hellman Key Exchange and AES-128 Encryption with CBC mode of operation.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages