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).
- If you got 7 or higher on your problem, you will do a written replacement problem. The written retakes are posted on canvas.
- If you got 6 or lower, you will schedule to meet in person for a retake. Use the calendar link on the canvas main page for appointments (15 minute slot).
Deadlines: Test 1 make-ups must be done by the end of October (Friday, October 30th). Test 2 make-up deadline: TBA.
Relevant Textbook Sections:
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 ).
To Do:
- An Elliptic Curve El Gamal Ciphertext Chain! Today’s question: best hallowe’en costume? You will encrypt your answer. Here are the steps:
- Keep notes as you do all this. Here are the EC El Gamal Tools you can use to do this.
- As a group, we will all use the elliptic curve given by over the finite field of elements. We will furthermore use the point
P = E([3,11655832467975276266127,1])on , which has order . - You should create a private and public key pair based on the information given above. Publish your public key on the #public-keys channel on discord (note: this is a point on the curve). Keep your private key in a text document somewhere to use for decrypting later.
- You should answer the question (Best hallowe’en costume?) with a word of 6 or fewer letters. Translate this to an integer (Text to Integer tool as usual) and add three digits of “padding” “000” at the end.
- Turn your message into a point on the elliptic curve as described in class. This might mean updating the padding to “001”, “002” etc. until it works. For this step, you need to take modular square roots. The command is
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 returnsqrt3— that means no square root. - You should then obtain the most recent public key on the #public-keys channel, and encrypt your message (turned into a point on the curve) to that public key. Post your encryption to the #ciphertexts channel, @mentioning the owner of the public key it is encrypted to.
- You should then keep an eye on the channel and when someone encrypts a message to your public key (they should @mention you), you should decrypt it and announce what the plaintext was, @mentioning them back.
- When someone decrypts your message, you should give them a thumbs up to let them know it’s right (or let them know if it isn’t).
- Hand in your notes from this exercise to the canvas dropbox.
- Challenge for fun: break someone else’s message! Hint: factor the order of .
- Today we introduced Pollard’s algorithm. As a recap, to factor , we take some modulo , and create a chain , etc. At each point, we take , hoping to get a nontrivial factor. We didn’t explain why it works. Can you reason out why it might work, at least heuristically?
- Write a small Sage for loop (use the Sage Sandbox) to implement Pollard factoring. Use it to factor . Some hints so you don’t get stuck:
- remember to make into a value modulo , for example with
a = Mod(2,n)(it will actually work with integers but they grow so fast it isn’t efficient). - when you want to take a gcd of a value mod , you need to make it an integer again by putting a
ZZaround it, so likegcd(ZZ(a)-1,n). - start your loop at power (squaring), not zero.
- remember to make into a value modulo , for example with
- With perfect timing, this discovery about the history of the NIST elliptic curves was released today! https://www.anthropic.com/research/ecdsa-curve-origins