Social Icons

twitterfacebookgoogle plusemail

jueves, 13 de septiembre de 2012

Homework: Implementation of RSA algorithm in Python

I implemented with sockets where the server read a plaintext, in the plaintext we have the users with his private keys. The server have to create a random number and pass it by a function, then the server send it to a client where the client has to pass it by a function, the user have to give his name to get his public key where he has d and n. The client have to squarting the random number that the server sent to d module of n, we can call it r. The client sends the hist username and the r value, then the server squart r to e module of n( n and e are the private key), if the value that we get of that operation is equal to the y value, we establish a secure connection, else we say a warning.


The client has to type his name to get his public key.


Server socket

Client socket

1 comentarios:

  1. A la entrada le faltó la etiqueta de la materia. Sería más práctico un f(x) de enteros a enteros. Quito un punto por la exponenciación explícita r = ( ( y ** d ) % n); son 6 pts.

    ResponderEliminar