diff --git a/.idea/other.xml b/.idea/other.xml new file mode 100644 index 0000000..a708ec7 --- /dev/null +++ b/.idea/other.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/README.md b/README.md index 281d303..a2c24c6 100644 --- a/README.md +++ b/README.md @@ -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` diff --git a/__pycache__/components.cpython-310.pyc b/__pycache__/components.cpython-310.pyc new file mode 100644 index 0000000..6fe88c2 Binary files /dev/null and b/__pycache__/components.cpython-310.pyc differ diff --git a/__pycache__/consts.cpython-310.pyc b/__pycache__/consts.cpython-310.pyc new file mode 100644 index 0000000..a763c30 Binary files /dev/null and b/__pycache__/consts.cpython-310.pyc differ diff --git a/__pycache__/main.cpython-310.pyc b/__pycache__/main.cpython-310.pyc new file mode 100644 index 0000000..f50cb32 Binary files /dev/null and b/__pycache__/main.cpython-310.pyc differ diff --git a/main.py b/main.py index c29b870..cf1d787 100644 --- a/main.py +++ b/main.py @@ -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)