File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,7 +7,29 @@ toc: true
77This page addresses a bunch of questions of the form "how do I do xyz in Cryptimeleon?".
88Consider it Stack-Overflow-style help.
99
10- # How do I set up a group?
11- # How do I compute a pairing?
12- # How do I hash something?
10+ # How do I do group operations and pairings?
11+
12+
13+ # How do I hash into \\ (\mathbb{Z}_ n\\ )?
14+ You can use ` HashIntoZn ` for this.
15+ ``` java
16+ BigInteger n = BigInteger . valueOf(99991 ); // just for the sake of example
17+ HashIntoZn hashFunction = new HashIntoZn (n);
18+ Zn . ZnElement hashVal = hashFunction. hash(" Preimage" );
19+ ```
20+
21+ # How do I hash into a group \\ (\mathbb{G}\\ )?
22+ Bilinear groups provide hash functions as follows:
23+ ``` java
24+ GroupElement hashValue = bilinearGroup. getHashIntoG1(). hash(" Preimage" );
25+ ```
26+
27+ For other groups, there may be classes like named like ` HashIntoSecp256k1 ` .
28+
29+ # How do I hash a list of group elements?
30+
31+
1332# How do I send or store a group element?
33+
34+
35+ # My benchmark produces implausibly good numbers
You can’t perform that action at this time.
0 commit comments