2012-1 Information Security Term Project

Subject: Implement data authentication using PGP (Refer chapter 5)

Deadline :9th of May, 2012

Developing Language : C or C++

Submission: Archive all of source codes and submit it via the E-mail

* Mail address : ejcho@networking.khu.ac.kr

* Never copy the other student’s source code!

Scenario

Assume that sender delivers message m (m is string) to receiver.

Sender hash the message m and get the m’. Encrypt m’ by Private Key of sender and get the E(m')PR. Sender merge m and E(m')PR then send this to receiver.

Receiver divides m and E(m')PR, decrypt E(m')PR to get m’ using sender’s public key. Then calculate m’ using same hash function from m. Finally, compare two m’ value to authenticate the sender’s message.

Use asymmetric key Encryption algorithm (Do not use symmetric key)

Implementation flow

## You can use any value as key or Initial Vector. And you can refer any asymmetric key algorithm to implement it. SHA-1 or MD5 must be used as hash function.

# sender

Input message m

2. Hash the message m into m’

3. Encrypt m’ into E(m')PR using private key of sender (asymmetric key)

4. Merge the m and E(m')PR then deliver this to receiver.

# Receiver

1. Divide the received message into m and E(m')PR

2. Decrypt E(m')PR then get m’ using public key of sender

3. Hash the message m into m’ using same hash function.

4. Results from 2 and 3 are same, print authentication message.

Implement above program and check the amount of time taken by encryption, decryption, and hashing.

(You should make a comment on source code and make a following contents for every function except main(), send(), receive() function.)

1. functionality of function

2. meaning of argument

3. meaning of return value

Question to

E-mail -  ejcho@networking.khu.ac.kr, simoon@networking.khu.ac.kr

#352, Information and Electronic Building, Eung Jun Cho or Seung Il Moon