jueves, 13 de septiembre de 2012


For this week, the homework is to implement the RSA, I followed the next steps:

(the names of my variables are different than those we saw in class because I based the variable names on the book "Discrete Mathematics, Richard Johonsonbaugh"

  • Create 3 scripts, one that generate public and private keys, another that is client.py and one for the server.py.

  • For keys first generate a list of primes where I chose the p and q
  • After, the n in my program is part of the public key. I chose the prime number as n. I noticed that phi is not a multiple of n.
  • Immediately implements the Euclidean algorithm to get the s(private key)
  • and finally create two key files, one public.txt and one private.txt
  • I create the client.py and server.py and follow the next steps:




Corrects users and keys:

Incorrect user:

Extra points

2 comentarios:

  1. For y = (int(r)**int(n))%int(z), you lose a point. Avoid elevating to large exponents in this way in modular arithmetic. 6 pts.

  2. Thanks for the above tutorial. You explained the today's chapter so effectively.Its too much lengthy but all the necessary details explained in your chapter.You did a good job.
    digital signature software