Added some writing

This commit is contained in:
jude 2023-06-03 17:28:17 +01:00
parent d30b4334d5
commit 317b216fa0
6 changed files with 48 additions and 2 deletions

6
.idea/other.xml generated Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="PySciProjectComponent">
<option name="PY_SCI_VIEW_SUGGESTED" value="true" />
</component>
</project>

View File

@ -3,3 +3,7 @@
Goldreich-Goldwasser-Halevi (GGH) is an early example of a lattice-based cryptosystem, devised in 1997.
In 1999, GGH was broken by Phong Nguyen.
## Build
`manim -qm main.py SCENE && mpv ./media/videos/main/720p30/SCENE.mp4`

Binary file not shown.

Binary file not shown.

Binary file not shown.

40
main.py
View File

@ -163,6 +163,42 @@ class LatticeProblems(Scene):
self.play(ApplyMethod(text.to_corner, UP + LEFT))
self.wait()
diagram_1 = VGroup()
diagram_1.add(Dot(ORIGIN))
diagram_1.add(Arrow(ORIGIN, [0.25, 1, 0], buff=0))
diagram_1.add(Arrow(ORIGIN, [0.5, 1, 0], buff=0))
arrow = Arrow(ORIGIN, [1, 0, 0], buff=0)
arrow.set_color(BLUE)
arrow.set_z_index(-1)
diagram_1.add(arrow)
diagram_1.shift(3 * LEFT)
label_1 = Tex("Closest Vector Problem", font_size=MEDIUM_FONT)
label_1.next_to(diagram_1, DOWN)
diagram_2 = VGroup()
diagram_2.add(Dot(ORIGIN))
diagram_2.add(Arrow(ORIGIN, [1, 1, 0], buff=0))
diagram_2.add(Arrow(ORIGIN, [-1, 0, 0], buff=0))
arrow_1 = Arrow(ORIGIN, [1, 0, 0], buff=0)
arrow_1.set_color(BLUE)
arrow_1.set_z_index(-1)
diagram_2.add(arrow_1)
arrow_2 = Arrow(ORIGIN, [0, 1, 0], buff=0)
arrow_2.set_color(BLUE)
arrow_2.set_z_index(-1)
diagram_2.add(arrow_2)
diagram_2.shift(3 * RIGHT)
label_2 = Tex("Shortest Basis Problem", font_size=MEDIUM_FONT)
label_2.next_to(diagram_2, DOWN)
self.play(Create(diagram_1), Create(diagram_2))
self.wait()
self.play(Create(label_1), Create(label_2))
self.wait()
class OrthoDefect(Scene):
def construct(self):
@ -182,7 +218,7 @@ class OrthoDefect(Scene):
diagram_1.add(Arrow(ORIGIN, [1, 0, 0], buff=0))
diagram_1.add(Arrow(ORIGIN, [0, 1, 0], buff=0))
diagram_1.shift(2 * LEFT)
diagram_1.shift(3 * LEFT)
diagram_1.set_color(GREEN)
label_1 = Tex("Defect 1", font_size=MEDIUM_FONT)
label_1.next_to(diagram_1, DOWN)
@ -192,7 +228,7 @@ class OrthoDefect(Scene):
diagram_2.add(Arrow(ORIGIN, [0.25, 1, 0], buff=0))
diagram_2.add(Arrow(ORIGIN, [0.5, 1, 0], buff=0))
diagram_2.shift(2 * RIGHT)
diagram_2.shift(3 * RIGHT)
diagram_2.set_color(RED)
label_2 = Tex(r"Defect $\approx$ 4.6", font_size=MEDIUM_FONT)
label_2.next_to(diagram_2, DOWN)