First Steps

Project structure overview

Cryptimeleon is composed of several libraries. Overview of Cryptimeleon libraries

Base libraries

Math

The Math library contains all the basics like bilinear groups, hashing, randomness generation, and serialization. It is the basis for every other Cryptimeleon library.

Craco

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.

The goal of Craco is to provide common cryptographic schemes for use in more high-level protocols.

Mclwrap

Mclwrap provides an efficient BN-254 bilinear group implementation (powered by MCL). You should definitely use this if you want to run timing benchmarks.

Predenc, Groupsig

Implementations of various predicate encryption schemes and group signature schemes.

Starting from scratch

If you don’t have anything right now, it’s easiest to get started with our template projects.

If you want to use Zero-knowledge proofs, you can generate a basic project containing your protocol with subzero.

Including our libraries into your existing project

Our libraries are hosted on Maven Central. For the sake of this, we assume you want to import Math and Craco (which is usually what you need).

Maven

Add these dependencies to your pom.xml:

<dependency>
    <groupId>org.cryptimeleon</groupId>
    <artifactId>math</artifactId>
    <version>[3.0,)</version>
</dependency>
<dependency>
    <groupId>org.cryptimeleon</groupId>
    <artifactId>craco</artifactId>
    <version>[3.0,)</version>
</dependency>

Gradle

Add these entries to your build.gradle.

plugins {
  id 'java-library'
}

repositories {
  mavenCentral()
}

dependencies {
  implementation 'org.cryptimeleon:math:3.+'
  implementation 'org.cryptimeleon:craco:3.+'
}

Mclwrap Installation

Eventually, you should probably install mclwrap because it is a much more efficient bilinear group than what is available in the Math library by default.

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. This process is explained here.