This project presents an RSA encryption of the communication between a client and aserver
The server:
- generates the private and public key
- wait for connection
- send the public key for the client if he connects
The client
- encrypt the message and send it to the server using the public key
The server
- decrypt the message using the private key
to run the server:
python3 serverRSA.py
to run the client:
python3 clientRSA.py
Python libraries:
- socket
- pycrypto
In this part, i used the python threads in order to enable the server to communicate with many clients, for this purpose, i modelized many clients in "clientRsaPara.py" , each of them send a message with a length that we choose. For the server part, in "serverRsaPara.py" , each thread represents a connection.
in "time_en_de_RSA.py", i drew the variation of the encryption and decryption time function of the message length variating from 10 to 128 bytes, as a result, the diration is approximately constant