Materias

jueves, 20 de septiembre de 2012

Entrada # 6

Implementing the RSA algorithm in an HTTP (Authenticating Users)

For this week we have to implement the RSA algorithm into a web server.

Be has a user to validate your user name, for it makes use of the RSA algorithm, the server and the client need certain values ​​(the server already has the information about your name and values ​​of 'e' and 'n 'while the client would have' d ​​'and' n ').

The process would be the client requests a value of 'x' to the server, this does just that along with the link to download a script to determine the values ​​of 'and' and 'r'.

The client downloads this file and determines the values ​​mentioned above, then the client will provide the server user your name (as must be added, only find the name that is to avoid errors Language Script) together with the value of 'r '.


The server receives this data and using the user name extracts the values ​​of 'e' and 'n' (for storing information this data can use files or databases) and together with the value of 'x' that provides the client.


Obtains two different 'y' (one with a specific function for us - this function is the same as in the script that I download the client - and by the formula r ^ e mod n) and compare these values​​, if these are the same you sends a message to the user indicating that authentication was successful.


Code in PHP 
Script of Python Code of SQL


Vídeo mostrando la ejecución
En Proceso

1 comentario:

  1. PHP sucks with large keys and you're missing the examples. 7 pts.

    ResponderEliminar