miércoles, 19 de septiembre de 2012

Program 3 RSA

Implementing RSA algorithm in a HTTP Server(Authentication)


Hi there, in this homework we made a HTTP authentication implementing RSA algorithm.
This homework is similar to the past homework, but in this case we implemented the RSA algorithm in a HTTP server, but both are authentications.

Ok, i'm gonna explain what i made, and what do my programs :P.

Firstly i installed LAMP in my computer, to get PHP and Apache(is the important for this homework), cause i developed almost all the homework in PHP, just the "r" generator was developed in Python.
Ok, the next are the codes of PHP, in this case, Cripto01.php, Cripto02.php and Cripto03.php.
Cripto01.php



"Cripto02.php"


"Cripto03.php"





Ok, the first code is the main page of the authentication, it just shows you the buttons of Download the code in python to get "r", and the button of Authenticate, Authenticate is the link to the Cripto02.php.





The second code shows you the x value and the textfields to set "r" and your "username".
When you push "send", the php links you to the Cripto03.php code (the last one page).






 The last code(Cripto03.php) just show you the values calculated and the state of authentication (Success or failed)


This is the Python, it is used to get r value, thanks to my friend Avendaño for the help (algoritmo de exponenciación modular).





I got mi d value from de past homework (the past post), this is an image of the calculates:



And this is the screen shot when i calculated "r" value.





This is the link of my work: http://alejandroave.260mb.org/triana/Triana/
I save it in the server of my friend Avendaño because i was a lot of troubles with my server, but it works anyway (i guess) XD.
 
Any doubt you can leave it in comments

Sorry for my poor english XD
Bye! 

1 comentario:

  1. PHP is a bad choice for large keys and you're missing a failed authentication example. 9 pts.

    ResponderEliminar