You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: getting-started/implement-elgamal.md
+3-6Lines changed: 3 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,8 +4,8 @@ mathjax: true
4
4
tpc: true
5
5
---
6
6
7
-
In this document, we show to to use the Cryptimeleon Craco and Cryptimeleon Math library to implement an example scheme, the Elgamal encryption scheme [Elg85].
8
-
Compared to the other tutorials, we also aim to showcase the class structure for a full implementatio (as opposed to "just" a toy implementation).
7
+
In this document, we show how to use the Cryptimeleon Craco and Cryptimeleon Math library to implement an example scheme, the Elgamal encryption scheme [Elg85].
8
+
Compared to the other tutorials, we also aim to showcase the class structure for a full implementation (as opposed to "just" a toy implementation).
9
9
10
10
First, let's review how ElGamal encryption works:
11
11
@@ -75,15 +75,12 @@ public static void main(String[] args) {
75
75
}
76
76
```
77
77
78
-
To follow along, check out [https://github.com/cryptimeleon/java-demo](our Java demo project) and create a new class `ElGamalEncryptionScheme` as outlined above.
79
-
80
78
## Implementing the Scheme fully with data classes and interfaces
81
79
Even though the implementation above can be considered complete, you may want to properly encapsulate the artifacts (keys, ciphertexts, etc.) into corresponding data classes.
82
80
For a simple construction such as ElGamal, this is a somewhat useless exercise. However, for larger constructions with more complicated key structures, this step makes a lot of sense.
83
81
For this reason, we showcase this step here.
84
82
85
-
We assume you have set up a new project in your IDE already, and added Craco as a dependency.
86
-
Craco already includes the math library so you don't need to add that explicitly.
83
+
To follow along, check out [our Java demo project](https://github.com/cryptimeleon/java-demo) and create a new class `ElGamalEncryptionScheme` as outlined above.
87
84
88
85
To represent the different parts of the scheme, we start off by creating some classes.
0 commit comments