Professional Documents
Culture Documents
Rsa and Credit Card Vault - Semester Project SS24
Rsa and Credit Card Vault - Semester Project SS24
Group Project:
Purpose:
1) Write a program to implement RSA algorithm with key size 1024 bits.
2) After public key and private key been generated, use Alice/Bob application over TCP to demonstrate
encryption and decryption process. Sockets provide the communication mechanism between two
computers using TCP. TCP is a two-way communication protocol.
Methods:
The program consists of two classes one is Alice which present the one who generate the public key pair
and send the public key to Bob through TCP socket, then decrypt the ciphertext received from Bob.
The other one is Bob who will use the public key to encrypt the message and send the ciphertext to Alice
for decryption. . The input p and q should be generated by random numbers program
To encrypt a message, M, with the public key, create the ciphertext, C, using the equation: C =
e
M mod n
The receiver then decrypts the ciphertext with the private key using the equation: M
d
= C mod n
In Alice:
1) Generate a BigInteger p which has bit length 512, prime certainty 1-1/2^50. The p is generated using
SecureRandom object Generate q the way as p.
2) Calculate p * q = n and ( p-1)*(q-1)
3) After public key n and private key d have been generated, if user click “send” the program will create
a TCP socket with hostname and port number and send the public key to Bob.
4) Create ServerSocket to wait for client and create a Socket for the connection to receive the ciphertext
from Bob.
5) Read ciphertext c from TCP socket and calculate plaintext m using d
In Bob:
1) Create ServerSocket to wait for client and create a Socket for the connection to receive the public key
from Alice.
2) After the user key in the plaintext and click “send”, calculate the ciphertext using public key
n , e and modPow function of BigInteger. Create
Prepare a lab report for the above assignment. The lab report should capture the source code and
sample output.
Group Project
Phase 1
a) Credit Card Vault Project: A merchant need to store customer’s credit card details.
You only need to collect credit card information from a customer once, then store the
card details in the vault. The next time you want to invoice a customer, you can use
the stored card information.
b) Identify sensitive, confidential and public information
c) Identify users access levels (Who should Select,Insert,Delete,Update)
d) Provide a schema showing relationship of tables in 3NF.
Phase 2