Reminder: The final exam is Friday, December 11th, 1:30–4 pm.
TBA
Reminder: The final exam is Friday, December 11th, 1:30–4 pm.
TBA
Reminder: The final exam is Friday, December 11th, 1:30–4 pm.
TBA
TBA
TBA
TBA
Reminder: Test 4 (Module 4) is in class on Wednesday, November 18th.
Test make-ups: you can still improve your Test 1 and Test 2 scores by retaking one Part B problem from each test (a written replacement problem on Canvas if you scored 7 or higher on it, or a 15-minute in-person retake booked through the calendar link on the Canvas main page if you scored 6 or lower). Details in the October 16th post.
TBA
Reminder: Test 4 (Module 4) is in class on Wednesday, November 18th.
Test make-ups: you can still improve your Test 1 and Test 2 scores by retaking one Part B problem from each test (a written replacement problem on Canvas if you scored 7 or higher on it, or a 15-minute in-person retake booked through the calendar link on the Canvas main page if you scored 6 or lower). Details in the October 16th post.
TBA
Poster reminder: the final version and report of work are due Friday, November 13th. Details on the Posters tab.
Test make-ups: you can still improve your Test 1 and Test 2 scores by retaking one Part B problem from each test (a written replacement problem on Canvas if you scored 7 or higher on it, or a 15-minute in-person retake booked through the calendar link on the Canvas main page if you scored 6 or lower). Details in the October 16th post.
TBA
Poster reminder: the final version and report of work are due Friday, November 13th. Details on the Posters tab.
Test make-ups: you can still improve your Test 1 and Test 2 scores by retaking one Part B problem from each test (a written replacement problem on Canvas if you scored 7 or higher on it, or a 15-minute in-person retake booked through the calendar link on the Canvas main page if you scored 6 or lower). Details in the October 16th post.
TBA
Poster reminder: the final version and report of work are due Friday, November 13th. Details on the Posters tab.
Test make-ups: you can still improve your Test 1 and Test 2 scores by retaking one Part B problem from each test (a written replacement problem on Canvas if you scored 7 or higher on it, or a 15-minute in-person retake booked through the calendar link on the Canvas main page if you scored 6 or lower). Details in the October 16th post.
TBA
Poster reminders: the first draft (complete, in LaTeX) is due Friday, November 6th, and the final version and report of work are due Friday, November 13th. Details on the Posters tab.
Test make-ups: you can still improve your Test 1 and Test 2 scores by retaking one Part B problem from each test (a written replacement problem on Canvas if you scored 7 or higher on it, or a 15-minute in-person retake booked through the calendar link on the Canvas main page if you scored 6 or lower). Details in the October 16th post.
Today we met the quantum Fourier transform (QFT). Since your poster drafts are due Friday, I’ll keep this daily post short, but it would be good to do a bit of basic computation with the QFT.
Chapter 6 (Quantum): roots of unity and the quantum Fourier transform.
Apply the QFT matrix to the state
Draw the th roots of unity in the complex plane and label them. You can use the th root of unity notation , but simplify so that the labels are from the set .
Write down the QFT matrix of dimension . Again, use the notation , but simplify so that the entries are all from the set . (Hang on to this; we’ll use it to run Shor’s algorithm by hand next time.)
Optional: the Visualizing Complex Numbers & QFT and QFT Amplitudes pages (under the Tools menu, Module 4) let you watch the roots of unity sum up in the QFT of a periodic state.
Poster reminders: the first draft (complete, in LaTeX) is due Friday, November 6th, and the final version and report of work are due Friday, November 13th. Details on the Posters tab.
Solutions: solutions to the daily posts due October 23rd (qubits and the / bases), October 26th (BB84 on paper, key length, catching Eve), October 30th (two-qubit states and entanglement), and November 2nd (multi-qubit measurement and single-qubit gates) are posted. All daily post solutions are collected on the Archive page.
Today we built gates on two and more qubits (CNOT, Hadamard on one qubit of a system, the reversible AND), and saw the general principle that any classical function can be computed quantumly, as long as we make it reversible. Here are some problems in those directions.
Chapter 6 (Quantum): multi-qubit gates, CNOT, the reversible AND (Toffoli) gate, and computing classical functions reversibly.
Unitary matrices.
Two-qubit gates.
Classical functions, quantumly.
Happy Almost Hallowe’en! Today we did two-qubit (and more-qubit) systems and met our first quantum gate, so here are a few problems in those directions.
Posters: don’t forget to work on your posters; check the Posters tab for the next deadline.
Chapter 6 (Quantum): multiple qubits, entanglement, measuring one qubit of a multi-qubit state, and single-qubit gates.
Quantum gates. A bit of practice with the linear algebra behind gates:
Today was Test 3. Take a breath! On Friday we continue Module 4 (Quantum) by moving from one qubit to two qubits, which is where quantum computing begins. The problems below are a warm-up for that: nothing here needs anything beyond the single-qubit rules from lecture (a state with gives outcome with probability and outcome with probability ), but by the end you will have met the main new phenomenon with your own hands.
Chapter 6 (Quantum): review single qubit states and measurement. On Friday we move on to multiple qubits.
Two qubits, measured separately. Alice prepares two qubits, one after the other, and Bob measures each one in the , basis.
Two qubits as one state. We can write a pair of qubits as a single “two-qubit state” by writing the two states side by side. For the pair in problem 1(1), that is . Multiply out as if these were ordinary products, keeping the first qubit first, and write as , as , and so on:
The four states , , , are the possible outcomes when both qubits are measured, and the squared lengths of the coefficients are the probabilities, just as for one qubit.
An unusual two-qubit state. Now take the rule from problem 2 as the definition: a two-qubit state is any
and measuring both qubits gives outcome with probability , outcome with probability , and so on. Consider the state
A state that cannot be written as a product of single-qubit states is called entangled. Its two qubits are not independent, even if they are far apart.
Normalize first. Normalize the state , then give the probabilities of the four outcomes when both qubits are measured. Is it a product state or entangled?
Reminder: Test 3 (Module 3) is in class on Wednesday, October 28th. The syllabus and review problems are on the Tests tab.
Today’s slides, Here comes the Hackpocalypse (cybersecurity in the AI era), are posted; they are also linked from the Notes/Videos page and the Archive.
Reminder: Test 3 (Module 3) is in class on Wednesday, October 28th. The syllabus on the Tests tab is now updated (elliptic curves, plus the quantum material through today: qubits, superposition, measurement, and quantum key distribution), along with review problems.
Today we finished Quantum Key Distribution (BB84)!
Lecture notes and video: my notes from today’s Zoom lecture are posted (also on the Notes/Videos page and the Archive). The link to the Zoom recording is on discord.
Chapter 6 (Quantum): quantum key distribution.
We use the encoding from lecture: in the basis, is the bit and is the bit ; in the basis, is the bit and is the bit .
Play Alice and Bob on paper. Alice sends eight photons and Bob measures them:
| Photon | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
|---|---|---|---|---|---|---|---|---|
| Alice’s basis | ||||||||
| Alice’s bit | 1 | 0 | 1 | 1 | 0 | 0 | 1 | 0 |
| Bob’s basis | ||||||||
| Bob’s measured bit | 1 | 1 | 1 | 0 | 0 | 0 | 1 | 0 |
Quantum Key Distribution in pairs! I think this will get confusing with everyone simultaneously on the #ciphertexts channel, so I want you to do this in pairs in the “QKD pairs” channel category of discord. There you will find plenty of text channels, so fill them up with two people each as you arrive, taking the first empty spot (the first person needing a partner or the first unused channel). Announce your arrival. The first person to arrive in a channel is Alice, the second person to arrive is Bob. Once two people are there, it’s full, so pick the next channel. You’ll do all communication on the channel so I can help you debug if it doesn’t work.
randint() in Sage).generate_photon in the QKD BB84 Tools page. This will create 16 integers (the photons), which you should obtain and paste into the channel as your “outgoing photon stream”.randint() in Sage). Keep this secret for now.measure_photon() in the QKD BB84 Tools page to measure them using your list of bases (first basis to measure first photon etc.) Record the measurements and keep them secret.How long is the key?
Eve intercepts. Alice sends . Eve intercepts it, measures it in the basis, and sends Bob a fresh photon in whatever state she measured. Bob measures in the basis.
Catching Eve. Now suppose Eve intercepts every photon, measures each in a randomly chosen basis, and resends what she measured.
Reminder: Class on Friday, October 23rd will again be on Zoom, due to my illness. The link is in Canvas. If you need a quiet place to join, you are welcome to use our usual classroom. The class will be recorded, but please attend synchronously if you can.
Welcome to Module 4: Quantum! Today we met complex numbers, qubits, measurement, the and bases, and the three filter experiment.
Lecture notes and video: my notes from today’s Zoom lecture are posted (also on the Notes/Videos page and the Archive). The link to the Zoom recording is on discord.
The opening of Chapter 6 (Quantum): complex numbers, single qubit states, and measurement.
Reminder: Class on Wednesday, October 21st is on Zoom. The link is in Canvas. If you need a quiet place to join, you are welcome to use our usual classroom. The class will be recorded, but please attend synchronously if you can.
Solutions: solutions to the daily posts due October 16th (elliptic curve multiples table) and October 19th (EC El Gamal chain and Pollard ) are posted. All daily post solutions are collected on the Archive page.
5.4 (Factoring with elliptic curves), including 5.4.1 (An example motivating the key idea), 5.4.2 (Pollard’s factoring algorithm) and 5.4.3 (Elliptic Curve Factoring). Review 3.8.1 (Pollard’s rho factoring method).
EllipticCurve(GF(p), [1,1])(0,1).order() computes the order of the point on modulo a prime (change the coefficients and the point if you used a different curve in problem 3). Compute this order modulo each prime factor of , and factor the answers. Use this to explain which multiple blew up in problem 3.factor() function, to see what kinds of primes it has in it. Repeat a few more times.Test make-ups: You have an opportunity to improve your grade on Test 1 and Test 2. Here’s how it works. For each test, you may retake one of the 10 point problems in Part B that you attempted. That means solving a similar problem. Your retake score replaces your original score on that problem, so you can completely make up the lost points (up to the full 10 points).
Deadlines: Test 1 make-ups must be done by the end of October (Friday, October 30th). Test 2 make-up deadline: TBA.
5.6 (Elliptic Curve Diffie-Hellman), 5.7 (Elliptic Curve El Gamal), including 5.7.1 (Placing a message on a curve) and 5.7.2 (Square roots modulo ).
P = E([3,11655832467975276266127,1]) on , which has order .sqrt. For example, sqrt(Mod(2,7)) will give you the square root of modulo (which is ). If it returns something with the string ‘sqrt’ in it, that means it failed (no square root), e.g. sqrt(Mod(3,7)) will just return sqrt3 — that means no square root.a = Mod(2,n) (it will actually work with integers but they grow so fast it isn’t efficient).ZZ around it, so like gcd(ZZ(a)-1,n).Solutions: solutions to the daily post due October 14th (projective space) are posted. All daily post solutions are collected on the Archive page.
Test 2 solutions: Test 2 (Module 2) with solutions are posted (also linked from the Tests tab).
Tools: if you want more practice adding points by hand, the Practice Problems page makes random elliptic curve addition problems, and the Elliptic Curve Tools page and the Elliptic Curve Playground will check your work.
5.5 (Elliptic Curve Discrete Logarithm Problem).
On the elliptic curve modulo , take . Its multiples are:
Every point of appears in this table. Use it for all the problems below.
Posters: your group’s poster plan is due on canvas; check the Posters tab for the date and details, and make contact with your group and make a plan.
Lecture notes: my notes from today’s lecture on projective space are posted (also on the Notes/Videos page and the Archive).
Solutions: solutions to the daily post due October 12th (elliptic curve addition) are posted. All daily post solutions are collected on the Archive page.
5.3 (Projective space).
Posters: the poster plan (title, abstract, references, group expectations) is due soon. Check the Posters tab for the dates and for what goes in the plan. Not in a poster group yet? Please come talk to me (after class, office hours, or email) so we can sort that out before the plan is due.
Lecture notes: my notes from Friday’s lecture on elliptic curves and the group law are posted (also on the Notes/Videos page and the Archive).
Solutions: solutions to the daily posts due September 28th and 30th and October 2nd, 5th and 7th are now posted (Sep 28, Sep 30, Oct 2, Oct 5, Oct 7). All daily post solutions are collected on the Archive page.
Tools: the Elliptic Curve Tools page (Sage) will add points for you, and the Elliptic Curve Playground draws the whole group as a picture. Do the problems below by hand first, then use these to check.
5.1 (What is an elliptic curve?), 5.2 (Double points).
Reading day, take some recovery time! See you Friday. I’m postponing poster project dates and will post more about that on Friday.
Reminder: Test 2 (Module 2) is in class this Wednesday, October 7th (full period). The syllabus and review problems are on the Tests tab.
Test 1 solutions: Test 1 (Module 1) with solutions are posted (also linked from the Tests tab).
New tool: the Pollard Rho Demo page walks through Pollard’s method one step at a time: the tortoise-and-rabbit table from class, the -shaped picture of the sequence, and (behind the scenes) what happens modulo each prime factor.
3.8.1 (Pollard’s rho factoring method).
Reminder: Test 2 (Module 2) is in class on Wednesday, October 7th.
3.8.3 (The role of squares in factoring).
New tool: the CRT Demo page shows the Chinese Remainder Theorem as two meshed gears (mod and mod ) turning a big mod dial, along with the table from class. Try it with and coprime, and then with and sharing a factor.
3.3 (Computing modular inverses), 3.4 (Sunzi’s Theorem (Chinese Remainder Theorem)).
3.1 (The Euclidean Algorithm), 3.2 (The Extended Euclidean Algorithm).
xgcd in the Sage Sandbox.Friday’s lecture (September 25th) is pre-recorded. Watch it before Monday:
Solutions: solutions to the daily posts due September 14th and 25th are now posted (Sep 14, Sep 25). All daily post solutions are collected on the Archive page.
2.11 (Signature Schemes), 3.6.5 (RSA Signature).
Reminder: fill out the poster group form about poster groups (the link was in the last daily post).
Today’s lecture notes: Wednesday, September 23rd (also on the Notes/Videos page) — square roots and factoring, Miller-Rabin, Fermat factoring, and the quadratic sieve.
Friday’s lecture (September 25th) is pre-recorded and already up: the video and notes are on the Notes/Videos page.
Solution to the Kolmogorov complexity proof of the infinitude of primes (last daily post): it is written up in the textbook, Section 3.7 (Primality Testing).
Solutions: solutions to the daily posts due September 16th, 18th, 21st and 23rd are now posted (Sep 16, Sep 18, Sep 21, Sep 23). All daily post solutions are collected on the Archive page.
3.7.2 (Miller-Rabin Primality Testing), 3.8 (Factoring), 3.8.3 (The role of squares in factoring), 3.8.4 (The quadratic sieve method), 3.6.3 (Short plaintext attack).
Added Sept 25: solutions to this daily post (Miller-Rabin, Fermat factoring, factoring from relations and from , the quadratic sieve, the small-message attack, and Carmichael numbers) are now posted: Solutions to Daily Due Sep 25.
Reminder: Class on Wednesday, September 23rd is also on Zoom. The link is in Canvas.
Today’s lecture notes: Monday, September 21st (also on the Notes/Videos page). I’ll post the video link on discord once Zoom finishes preparing the recording.
3.7 (Primality Testing), 3.7.1 (Fermat Primality Testing).
print('2701'). This gives a trivial upper bound on of . Explain why.Added Sept 23: solutions to this daily post (the hunt, the Ceres birthday problem, and Fermat’s test on 2001 and 2003) are now posted: Solutions to Daily Due Sep 23.
Reminder: Class on Monday, September 21st is on Zoom. The link is in Canvas.
2.12 (ElGamal Encryption), 3.6 (RSA Encryption), 3.6.1 (RSA Example).
Added Sept 23: solutions to this daily post (El Gamal malleability and the RSA ciphertext chain worked end to end) are now posted: Solutions to Daily Due Sep 21.
2.12 (ElGamal Encryption) for review.
Added Sept 23: solutions to this daily post (how factors , and the patterns in the dynamical portraits) are now posted: Solutions to Daily Due Sep 18.
Reminder: Test 1 (Module 1) is in class on Wednesday, September 16th.
2.12 (ElGamal Encryption), and everything in Module 1 for review.
Added Sept 23: solutions to this daily post (the optional El Gamal encryption chain worked end to end, plus the two challenges: breaking a key by Pohlig-Hellman and baby-step giant-step, and the repeated ephemeral key) are now posted: Solutions to Daily Due Sep 16.
Reminder: Test 1 (Module 1) is in class on Wednesday, September 16th.
2.10.3 (Index Calculus), 2.10.4 (Runtime), and for review, 2.10.1 (The Baby-Step Giant-Step Algorithm) and 2.12 (ElGamal Encryption)
Added Sept 25: solutions to this daily post (the Index Calculus for , the awkward linear system, and the runtime comparison) are now posted: Solutions to Daily Due Sep 14.
2.4.4–2.4.5 (The theorems of Euler and Fermat; Using Euler’s function), 2.7 (Runtimes and Big-Oh notation), 2.8–2.9 (The Discrete Logarithm and the Discrete Logarithm Problem), 2.10 (Parity of discrete log), 2.10.1 (The Baby-Step Giant-Step Algorithm)
Added Sept 11: solutions to this daily post (the parity of the discrete log, baby-step giant-step for , the tower , and the runtime analysis) are now posted: Solutions to Daily Due Sep 11.
2.7 (Runtimes and Big-Oh notation), 2.8–2.9 (The Discrete Logarithm and the Discrete Logarithm Problem), 2.10.1 (The Baby-Step Giant-Step Algorithm)
Added Sept 9: solutions to this daily post (the big-oh comparisons and the baby-step giant-step computation) are now posted: Solutions to Daily Due Sep 9.
2.4.7 (Summary of Multiplicative Structure in the unit group), 2.5 (Diffie-Hellman Key Exchange)
Added Sept 4: solutions to this daily post (a complete worked example of the exchange, with all the numbers) are now posted: Solutions to Daily Due Sep 4.
Added Sept 2: solutions to the daily due Aug 31 are now posted: Solutions to Daily Due Aug 31.
Today’s tasks are mostly reading and learning by reading. As you read the textbook, you will find exercises scattered through the text. Part of reading the text for full understanding is doing these exercises until you are very confident in your understanding.
Please read the full list of tasks before you begin. The final task (uploading to canvas) should happen even if you don’t finish everything else.
I’m your professor, Dr. Katherine Stange. A little about me. My job as a professor is half teaching and half research. My research is in number theory and cryptography, so I especially enjoy this course. When I’m not working, I like to cycle up Flagstaff, or anywhere that is uphill.
I hope you’re going to find this class challenging but fun and exciting. This class has some features I want to make sure you are aware of up front: