Announcements
- PS#3 is on Friday 2/28.
- A "rough draft" and formatted bibliography for the project with a writing component are due on Friday 2/28. The phrase "draft" is an umbrella term; different projects may have different ultimate results and so think about what it might mean for your project specifically to show that you have been making good progress. If you are writing code, perhaps a demo or perhaps writing up a summary of progress made so far. If you are writing an essay, submit a draft that demonstrates the outline of what you hope the finished result will be -- you don't have to have everything fleshed out yet, but show me the progress.
- Before class on Friday 2/21, please read the article sent out to the class -- this paper was published in 1976 but it is a historically central paper --
the paper where public key encryption was introduced. I've also put it in the Course Documents folder, under Resources, with the name DH1976. I don't expect that you will read and understand every line in the entire 11-page, two column article but I do expect that you can come to class on Friday prepared to tell me:- What is the big difference between a public key encryption system and a private key encryption system?
- What is the big challenge for private key encryption systems that public key encryption systems overcome?
- How do the authors propose to use one-way functions for the purposes of authentication? (Do you know any one-way functions?)
- How do the authors state the knapsack problem?
- Have you heard of Jupyter Notebooks? Check out indigo.cs.oswego.edu/jupyter/ to log into our Jupyter Hub with your CS department credentials. To stay organized, create a folder for Crypto to put all of your files from this semester into and be sure that you make new SageMath files so that you can use Python-y-Math commands. :)
Getting in touch with your instructor...
- Email: I actually read and respond to emails. I check email frequently during the workday but limit my email time after work hours and on weekends. Please be patient, but if I don't reply by the end of the next working day then feel free to email me again – there's always a chance your first email got buried under urgent emails (or spam ...) and I appreciate the nudge!
- Office Hours: Mondays 11:30 - 12:25, Tuesdays 2 - 3:30, and Fridays 1:50 - 2:45
Just stop by! You don't need an appointment to drop by my office. If you want to meet over Zoom, you will need to make and keep an appointment, because I am uncomfortable sitting on Zoom with no one there. I am also available over Discord (username in the syllabus, behind the SUNY Oswego login...). Join the Math Club Discord server (link in syllabus) and send me a message! We can use the voice channels and the text channels to stay in contact. Just be aware that if you message me in Discord, I won't respond until I'm free to check my phone ... in person obligations come first. - Other times: If my office door is open then you are welcome to stop in and ask if I'm available. I may be! If I'm busy, we can make an appointment to meet up later on.
Useful Resources
- University of Toronto - Mississauga Primes Pages
- Handbook of Applied Cryptography by Menezes, van Oorschot, and Vanstone
- RFC 8017 - PKCS#1: RSA Cryptography Specifications Version 2.2
- a table of symbols and their commands in latex
- \(n = 553155169043856134736926619138550736504902732909294473306293006028446674468827747294323636810329924544020218704389\)
LaTeX Fun
You can exchange the commands in the box below for your own and render it on demand. It's kind of fun! Press the Render! button when you're ready.
\({}\)
SageMath and Tiny SageMath Programs
SageMath is free open source mathematics software that can do some pretty amazing calculations, and the software has a ton of useful libraries and built-in functions. You can download and install Sage for use on your computer through a terminal window or Juypter notebook, or you can use Sage online through CoCalc or SageMathCell. The SageMath language is built on Python, so if you know a bit of Python then you can often logic your way around SageMath. I will often use SageMathCell in class for quick examples and calculations but I prefer to use SageMath in a Juypter notebook on my computer so you might see both during the class meetings.
For really quick things, here's a SageCell box that you can try out! Change the input area to be whatever code you need, press Evaluate, and ta da!
You may prefer a different language or different software and that's great! Go ahead and use whatever you wish that will complete the same operations. SageMath has a lot of built-in programs and functions that make the programming easier, but there's something to be said for figuring out how to get the same results yourself and for learning how to do the same computations in your preferred programming language.
A few good SageMath commands to know:
- mod(x,n) returns the remainder of \(x\) modulo \(n\)
- factor(n) factors \(n\) ... but this can time out if \(n\) is big and hard enough to factor
- inverse_mod(x,n) calculates the inverse of \(x\) modulo \(n\)
- power_mod(x,i,n) gives \(x^i\) modulo \(n\)
- euler_phi(n) produces \(\varphi(n)\), the Euler totient of \(n\)
- g=mod(primitive_root(p),p) instructs Sage to select a primitive root modulo \(p\) and call it \(g\)
- p= random_prime(a, True) will return a random prime between 2 and \(a\)
- CRT_list([a1,a2,...,ak],[m1,m2,...,mk]) will solve a system of linear congruences, \(\{x \equiv a_1 \textrm{ mod } m_i \mid 1 \leq i \leq k\}\), provided that the moduli are pairwise relatively prime
- Mod(x,p).nth_root(n,all=True) asks Sage to produce a list of all remainders modulo \(p\) that, when squared, produce \(x\)
- Mod(x,p).sqrt(all=True) asks for all square roots of \(x\) modulo \(p\)