For Friday, September 29th

  1. Announcements:
      1. Check out the last daily post for info on a Module 1 retake.  I’ve set up an appointment calendar (link is on the canvas main page where private links are kept).  Choose a 15 minute slot and put your name and what problem you want to redo (one of the Part B long answer problems).
      2. Let me know if you’d be interested in an opportunity for extra credit if you either (a) program all the algorithms of the course or (b) fill in proofs to a variety of results of the course.  If so, I’ll design an assignment along these lines.  Both are productive things to do, depending on your interests.  There’s a discord thread for discussing this.
      3. If you’re a graduate student (or taking for grad credit), we should chat one-on-one about a final project idea at this point.  Let’s be in touch.
  2. An RSA ciphertext chain!
      1. If you need a review of RSA, check the lecture notes, overleaf (where there’s an explicit example with Sage advice), and lecture video.  For what follows, the Sage Sandbox page should be useful, as may be the RSA Tools page.  These pages show how to do operations like modular inverse, exponentiation, and euler phi function in Sage.  You can use basic number theory functions in Sage to do all your computations.
      2. First, set up your public and private key.
          1. Choose two 8-decimal-digit primes and form their product $n$.   You can get primes out of Sage using the next_prime() function.  So pick a number in the ballpark you want (maybe using randint()) and use next_prime() to get the next smallest integer which is prime.
          2. Compute $\varphi(n)$.  Note that euler_phi() will do this for you in Sage, but it’s better to use the formula (p-1)*(q-1) because at cryptographic size, Sage would not return an answer, since euler_phi(n) would try to factor n.
          3. Choose an encryption exponent $e$ that is positive and less than $\varphi(n)$.
          4. Compute your decryption exponent $d$.  It’s possible this will fail (e.g., if $e$ is not invertible!).  If this error gets annoying (depends on your $\varphi(n)$), you could try using next_prime() to get a likely invertible $e$.
          5. Keep $d$ safe (along with $p$ and $q$, $n$ and $\varphi(n)$ just in case) in a private file on your computer.  This is your private key information.
          6. Reveal your public key $n$ and $e$ on the discord #public-keys channel (“My RSA Public Key Is (n,e)=(….,….)”).
      3. Create a secret message which is at most 6 letters long.  It should answer “What’s something awesome?”  Please don’t make it longer or this exercise won’t work.
      4. Turn it into an integer using the Text to Integer tool.  (There’s an Integer-to-Text tool on the same page to undo this process.)
      5. Now find someone else who has posted their public key, and encrypt your message to that person.  Post it on the #ciphertexts channel for them (use @theirname to alert them).
      6. When someone posts a message for you, decrypt it and announce the result using discord’s “spoiler” feature.
  3. You can turn in on canvas a screenshot of your discord result(s).