As part of dev3pack, I yearned for the moment when I could participate in the ZK and Privacy Bootcamp. This topic caught my attention when, as a Shefier, I learned about Midnight in the past cohort (14). Midnight is a side chain of the Cardano ecosystem, designed specifically for data protection and privacy. Midnight uses zero-knowledge proofs to strike a balance between the transparency needed in public blockchains and the handling of sensitive data, for example, personal identity. It is built so that developers can create dapps with selective disclosure.
Although the concept of zero-knowledge proofs is not new, this blew my mind, since it was new to me. If you need to prove you are over 18, instead of disclosing all the data in your identity card, the receiving party only gets to know that you are 18: Not your address, not your picture, not your eye color.
However, being a mom, I knew making it to this bootcamp would be difficult: The hours collided with pick up times, or sports activities. Also, many, many people seem to share this interest, and it was quickly filled, so I asked for the recordings.
Yesterday, in the quiet of the night, very elusive to Midnight ;), I got to play the recording. I thought the material would dive directly into ZK Proofs, but it was introductory. It was the introduction to Cryptography given by 0xMilica. Even though I couldn't attend the session live, it was very engaging. She was very passionate about Maths and Cryptography, and her enthusiasm was contagious.
She explained the Cesar Cipher, the Substitution Cipher, and the Vigenère Cipher. The prerequisite was to write the alphabet and number each letter: A ->1, B -> 2, and so on. The Cesar Cipher is about shifting each letter the same number of positions to encrypt the text. So, for example, if you shift by 3 each letter, and want to encrypt the word "HELLO", you would get "Khoor"; if you shift it by 7, it would be "Olssv".
Substitutions are basically when each letter is mapped to another one, so say H-> M, E-> O, L-> S, O -> P. Then HELLO would be encrypted as "MOSSP". This is stronger than the Cesar Cipher, but breakable with frequency analysis.
After that, the topic was the Vigenère Cipher, which I must say I didn't know of, and challenged my mind. It has a key, or word, around which you get different shifts for each letter. For example, if you have the message "hello" and your key is "cat", you're going to repeat the key to match the message's length. So you would have "catca". Then, you will turn the letters into numbers, so matching in the alphabet, as was the prerequisite. So hello would be 8,5,12,12,15. and "catca" would be 3,1,20,3,1. The next step is to add them together, per letter, and if the number is greater than 26, to wrap it (By subtracting 26 until it is smaller than 26).
In this case:
8 + 3 = 11 (k), 5 + 1 = 6 (f), 12 + 20 = 32 Wrap: 32 - 26 = 6 (f), 12 + 3 = 15 (o), 15 + 1 = 16 (p) -> "kffop"
To decrypt, we subtract instead of adding.
This method, the Vigenère Cipher, was considered unbreakable for centuries, until it was finally cracked in the 1800. I found this so interesting that I researched it and will write the next post about it (Spoiler Alert: It can be slightly related to Ada Lovelace ;)).
Watching this episode made my head hurt a little (given I was already suffering from sinusitis), but when I grasped it, it made me happy that it clicked. I am looking forward to finding time to watch the next episode and write the next blog post with an aside from the two characters that cracked this code.
Top comments (0)