Summer of Math Exposition

Presented by 3Blue1Brown 3blue1brown

Elgamal encryption and the mathematics behind secret communication

Audience:

In this video, I explain ElGamal encryption from the mathematical side rather than treating it as just another cryptographic algorithm.

The video starts with the idea that some mathematical operations are easy to perform but extremely difficult to reverse. From there, I build toward the discrete logarithm problem and show how that asymmetry can be used to create a public-key encryption system.

To make the idea more intuitive, the explanation is framed around a battlefield communication problem involving a general, a subordinate, and an interceptor who can observe what is being transmitted.

The main question is not whether the interceptor can see the communication, but whether seeing it is enough to recover the original message.

We then go through a complete ElGamal example step by step, including how the keys are formed, how a message is encrypted, what information is publicly visible, and how the intended receiver is still able to recover the original message.

The final section explains why the decryption process actually works mathematically, rather than simply accepting the algorithm as a formula.

This video is part of my attempt to explain mathematics visually and rigorously, with the goal of making the underlying ideas understandable instead of reducing them to procedures to memorize.

The main mathematical reference used while developing this video was David M. Burton’s Elementary Number Theory.

Production note

This video is human-authored and AI-assisted.

The mathematics, explanation, script, examples, lesson structure, visual ideas, animation design, and overall direction were created by me.

AI tools were used during production to help implement the animation designs in code and to assist with certain supporting assets such as the thumbnail.

The AI tools did not determine the mathematical explanation or structure of the lesson. They were used primarily as production and implementation tools, while the educational content and creative direction remained mine.



Analytics

5 Overall score*
87 Rank
14 Votes
11 Comments

Comments

7.1

Wow, I loved the intro and pacing of the video. Very interesting topic. Keep up making such videos 👍

5

I disliked the music. (No music would be better.) I felt this was a bit vague and would have liked a full example.

Motivation : 2 / 3 Clarity : 1.5 / 3 Novelty : 1.5 / 3

7.4

Nice video. I liked the animations and the battlefield context. I found the background music to be a little too much.

6.4

The video is very clear to understand and i especially lived the opening of the video it really draws the watchers attention.Good work!!

7

I liked this a lot, very well explained and perfectly structured. A few suggestions for making this (or your next video) even better:

  • the thumbnail has a very different visual style from the video itself, that makes it feel a bit misleading, even though it does cover the contents of the video well. I would recommend making sure that there is a visual match too though, so you don’t raise any expectations in the thumbnail that aren’t met in the video
  • the mood of the video as a whole was a bit sombre. I guess that matches the battlefield theme, but I would have welcomed some lighter and more playful music, and perhaps some lighter (background) colours here and there.
6.5

Good storytelling.

5

Your voice sounds a litlle monotome.

7.4

The narrative was compelling, although I think the intro got a little distracted talking too much about the enigma and computers. I was slightly confused which direction we were heading in at that point. Perhaps spending more time on ElGamal’s biography or the context in which he invented this algorithm. I’ve heard of all these concepts before separately, but not so well put together. I felt that at every point where I had a question, it was almost immediately asked and answered. This is to say you led the audience of me very well. I liked that you separated the video into a more conceptual and more traditionally proof-driven part, although I think the separation could have been clearer and perhaps indicated at the beginning of the video. There were a lot of steps to the algorithm, though, and I think it would have been nice to remind viewers of cumulative steps as you were explaining it. Either an ordered list of what we’ve done or a reminder of where variables like “a” came from would have been nice. My main contention with the video was the voice. It sounds AI generated. There are weird pauses and skips in places. Also, the script at times seems to follow common AI tropes of writing. While I feel like the video serves it’s purpose as an explainer of ElGamal encryption well, it lacks the “wow factor” that takes a video from solid to memorable.

3.9

Overall, the video serves as an adequate introduction to ElGamal. Specifically, the intro to modular arithmetic is great in terms of intuition (though using clocks as an analogy does not add much to the novelty of the video), while the comparison between 810963(mod23)8^{10} \equiv 9^6 \equiv 3 \pmod{23} serves as the moment of memorability for the video. The animation is also smooth and consistent. There are also questionable moments and choices, though. The animation attempts to pack too much information in each frame, making it seem cramped and difficult to read, a quality exascerbated by the small font size. Finally, the biggest opportunity for improvement lies in selecting what to treat rigorously. The video spends substantial time proving that the encryption and decryption work, while borrowing or skipping other arguably more interesting segments, like why a hacker can’t efficiently undo the encryption.

1

Mostly fine, but when you got to “The Honest Hinge”, it was clear that you used Claude for the script.

4

This was a nice explainer. The example of the generals used throughout the video was strong and motivated the need for the cryptosystem effectively.

I thought the production quality was high - music, audio and clean animations. And, I liked the way you asked rhetorical questions towards the start to keep the viewer engaged.

I did have some feedback.

Firstly, I wasn’t sure the presentation felt overly fresh. I think it would be worthwhile to try and find a unique style - what makes your video different from other Elgamal explainers? Making a bit more of a connection with viewers could improve it.

Secondly, I don’t think you took full advantage of the video format. At times it felt more like reading aloud from a book. The benefit of the video format is that you have the opportunity to show the proofs visually.

On that note if you do have a lot of equations and values on the screen, it would have been easier to follow if you labelled them more clearly and kept reminding the viewer of their source.

And a final piece of feedback. It would have been nice to see each step motivated a little more clearly. At times the steps felt a little bit random - you could answer why each step is taking place.

Keep in mind that these are just my opinions of what I think could help you. Thanks for submitting this entry, I hope you keep making videos in the future as you had solid foundations here!! :)