|
| 1 | +--- |
| 2 | +title: First Steps |
| 3 | +toc: true |
| 4 | +--- |
| 5 | + |
| 6 | +# Project structure overview |
| 7 | +Cryptimeleon is composed of several libraries. |
| 8 | + |
| 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