jueves, 13 de septiembre de 2012

RSA Algorithm




hello, the task was to make an implementation of the RSA algorithm with sockets

in this case I put the numbers already fixed but the ideal is that the prime number p, q are randomly generated.

i put :

p=61
q=53

and this is the source code of the server:

the source code of the client:

Server Running:



 screenshots client:






references:
http://es.wikipedia.org/wiki/RSA

miércoles, 5 de septiembre de 2012

Diffie Hellman

Hi, In the last class, the homework was about Diffie Hellman.


The Diffie-Hellman allows two parties, communicating through an unencrypted channel, to agree to a numeric value without a third party who has full access to the conversation, to know or calculate it, at least convenient time.

then the values that i ​​got by Alice and Bob were the following:
p = 5
g = 3
X = 4
Y = 2


then i calculate the values of x,y and k:




and the results I got were:
x=2
y=3
k=4