Skip to content

Commit 1721115

Browse files
authored
Merge pull request #22 from cryptimeleon/rework
Rework of starting page and some structuring
2 parents 565924c + d9f2a4b commit 1721115

14 files changed

Lines changed: 169 additions & 286 deletions

_config.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ relative_links:
66
collections: true
77
theme: minimal-mistakes-jekyll
88
minimal_mistakes_skin: "air"
9-
title: Cryptimeleon Documentation
10-
subtitle: "Version 1.0.0"
9+
title: Cryptimeleon
10+
subtitle: Prototyping of Cryptographic Construction
11+
logo: /assets/logo.png
1112
repository: cryptimeleon/cryptimeleon.github.io
1213
locale: en
1314
description: Documentation page for the Cryptimeleon cryptography libraries.
@@ -25,6 +26,9 @@ kramdown:
2526
auto_ids: true
2627
hard_wrap: false
2728

29+
cracoversion: 2.0.0
30+
mathversion: 2.0.0
31+
2832
# exclude from jekyll site
2933
exclude:
3034
- vendor
@@ -33,4 +37,4 @@ exclude:
3337
- Gemfile.lock
3438
- README.md
3539
- Dockerfile
36-
- LICENSE
40+
- LICENSE

_data/navigation.yaml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
docs:
22
- title: Getting Started
33
children:
4-
- title: "Libraries Overview"
5-
url: /getting-started/libraries.html
6-
- title: "Installation"
7-
url: /getting-started/installation.html
4+
- title: "First Steps"
5+
url: /getting-started/first-steps.html
86
- title: "5-minute Tutorial"
97
url: /getting-started/5-minute-tutorial.html
108
- title: "Pairing Tutorial"
@@ -15,6 +13,8 @@ docs:
1513
url: /getting-started/implement-elgamal.html
1614
- title: Documentation
1715
children:
16+
- title: "How do I ...?"
17+
url: /docs/how-do-I.html
1818
- title: "Lazy Evaluation"
1919
url: /docs/lazy-eval.html
2020
- title: "Bilinear Groups"
@@ -37,5 +37,3 @@ docs:
3737
url: /contributors/composite-builds.html
3838
- title: "Contributing"
3939
url: /contributors/contributing.html
40-
- title: "Dependencies"
41-
url: /contributors/dependencies.html
155 KB
Loading

assets/logo.png

101 KB
Loading

contributors/composite-builds.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ To do this, every library that depends on some other Cryptimeleon library includ
1717
This script clones the dependency to the same directory level as the library being built and includes it as a composite build if possible.
1818
"If possible" means that the branches should follow some rules. Let `LB` be the name of the branch of the library being built and `DB` be the name of the branch of the dependency library. The composite build will only be enabled if either of the following hold:
1919

20-
- The dependency has no branch called `LB` and `DB == master`. In this case, the `master` branch of the dependency is used for the composite build.
20+
- The dependency has no branch called `LB` and `DB == main`. In this case, the `main` branch of the dependency is used for the composite build.
2121
- The dependency has a branch called `LB` and `DB = LB`. In this case, the `DB` branch of the dependency is used for the composite build.
2222

23-
To summarize, the build script will always try to use the branch with the same name as `LB` and use `master` if no such branch exists.
23+
To summarize, the build script will always try to use the branch with the same name as `LB` and use `main` if no such branch exists.
2424
Importantly, no automatic checkout of branches is done.
2525
This means that if the branches don't match, the build script will complain and fail.
2626
You can adjust this behaviour using the **useCurrentBranch** parameter as explained below.
@@ -35,7 +35,7 @@ These can either be set in the `gradle.properties` file in the top level folder
3535

3636
- **useCurrentBranch**: If defined (any value) the branch selection checking will be skipped.
3737
That means the composite build will be enabled no matter the dependency branches that are currently checked out.
38-
This can be useful for when you need a version that is not on `master` but you also do not want to create a new branch.
38+
This can be useful for when you need a version that is not on `main` but you also do not want to create a new branch.
3939
- **checkoutIfCloned**: If defined (any value), will automatically check out the corresponding
4040
dependency branch (branch with same name) given that the dependency was freshly cloned.
4141
Used by the Travis CI to automatically switch to the right dependency branch for the build.

contributors/dependencies.md

Lines changed: 0 additions & 30 deletions
This file was deleted.

docs/faq.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ If you are not sure which repository exactly the issue belongs to, just pick one
1111
## What software is required to use the libraries?
1212

1313
In general you only need Java SDK Version 8 or higher.
14-
To use the Cryptimeleon Mclwrap wrapper, you additionally need to install the Mcl Java bindings (more info on this [here]({% link getting-started/installation.md %})).
14+
To use the Cryptimeleon Mclwrap wrapper, you additionally need to install the Mcl Java bindings (more info on this [here]({% link getting-started/first-steps.md %})).
1515

1616
## Which operating systems do you support?
1717

1818
Since Java is cross-platform, the libraries should run on Linux, Mac OS and Windows.
19-
Keep in mind that we develop on Linux/Mac OS and do not necessarily test on Windows.
19+
Keep in mind that we develop on Linux/Mac OS and do not necessarily test on Windows.

docs/how-do-I.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
title: How do I ...?
3+
mathjax: true
4+
toc: true
5+
---
6+
7+
This page addresses a bunch of questions of the form "how do I do xyz in Cryptimeleon?".
8+
Consider it Stack-Overflow-style help.
9+
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+
32+
# How do I send or store a group element?
33+
34+
35+
# My benchmark produces implausibly good numbers

getting-started/5-minute-tutorial.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@
270270
"cell_type": "markdown",
271271
"metadata": {},
272272
"source": [
273-
"For more information on serialization, see [our documentation regarding `Representation`s](https://cryptimeleon.github.io/docs/representations.html)."
273+
"For more information on serialization, see [our documentation regarding `Representation`s](https://cryptimeleon.org/docs/representations.html)."
274274
]
275275
},
276276
{

getting-started/first-steps.md

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
---
2+
title: First Steps
3+
toc: true
4+
---
5+
6+
# Project structure overview
7+
Cryptimeleon is composed of several libraries.
8+
![Overview of Cryptimeleon libraries](/assets/cryptimeleon_overview_parts.png)
9+
10+
## Base libraries
11+
### Math
12+
The [Math](https://github.com/cryptimeleon/math) library contains all the basics like bilinear groups, hashing, randomness generation, and serialization.
13+
It is the basis for every other Cryptimeleon library.
14+
15+
### Craco
16+
[Craco](https://github.com/cryptimeleon/craco) (the name has historical reasons) implements various cryptographic primitives and low-level constructions. This includes reusable primitives such as accumulators, commitment schemes, signature and encryption schemes, Sigma protocols, and many more.
17+
18+
The goal of Craco is to provide common cryptographic schemes for use in more high-level protocols.
19+
20+
### Mclwrap
21+
[Mclwrap](https://github.com/cryptimeleon/mclwrap) provides an efficient BN-254 bilinear group implementation (powered by [MCL](https://github.com/herumi/mcl)).
22+
You should definitely use this if you want to run timing benchmarks.
23+
24+
### Predenc, Groupsig
25+
Implementations of various [predicate encryption schemes](https://github.com/cryptimeleon/predenc) and [group signature schemes](https://github.com/cryptimeleon/groupsig).
26+
27+
# Starting from scratch
28+
If you don't have anything right now, it's easiest to get started with our template projects.
29+
30+
- Java: [tbd]
31+
- Android: [tbd]
32+
33+
If you want to use Zero-knowledge proofs, you can generate a basic project containing your protocol with [subzero](https://cptml.org/subzero).
34+
35+
# Including our libraries into your existing project
36+
Our libraries are hosted on Maven Central.
37+
For the sake of this, we assume you want to import Math and Craco (which is usually what you need).
38+
39+
## Maven
40+
Add these dependencies to your `pom.xml`:
41+
42+
```xml
43+
<dependency>
44+
<groupId>org.cryptimeleon</groupId>
45+
<artifactId>math</artifactId>
46+
<version>{{site.mathversion}}</version>
47+
</dependency>
48+
<dependency>
49+
<groupId>org.cryptimeleon</groupId>
50+
<artifactId>craco</artifactId>
51+
<version>{{site.cracoversion}}</version>
52+
</dependency>
53+
```
54+
55+
## Gradle
56+
Add these entries to your `build.gradle`.
57+
58+
```gradle
59+
plugins {
60+
id 'java-library'
61+
}
62+
63+
repositories {
64+
mavenCentral()
65+
}
66+
67+
dependencies {
68+
implementation 'org.cryptimeleon:math:{{site.mathversion}}'
69+
implementation 'org.cryptimeleon:craco:{{site.cracoversion}}'
70+
}
71+
```
72+
73+
# Mclwrap Installation
74+
Eventually, you should probably install [mclwrap](https://github.com/herumi/mcl) because it is a _much_ more efficient bilinear group than [what is available](/docs/bilinear-groups.html) in the Math library by default.
75+
76+
To use MCL in your project, you need to (1) compile and install MCL, and then (2) add the dependency to our the Java bindings.
77+
This process is explained [here](https://github.com/cryptimeleon/mclwrap/blob/main/README.md).

0 commit comments

Comments
 (0)