Crate scicrypt[][src]

Expand description

Lightweight cryptographic building blocks for proof of concept implementations in applied cryptography.

While many libraries implementing cryptographic building blocks exist, many fall in one of two categories:

  • Fast but rigid [like many written in C++]
  • Slow but flexible [like many written in python]

This library attempts to find a balance between speed and flexibility, to ease the process of implementing proof of concepts of cryptographic protocols, such as those in the field of multi- party computation (MPC).

Upcoming features

These are the upcoming minor versions and the functionality they will add.

Version 0.2.0

Threshold homomorphic cryptosystems update

FunctionalityDone
Threshold Paillier
Threshold ElGamal

Version 0.1.0

Homomorphic cryptosystems update

FunctionalityDone
ElGamal over elliptic curvesx
ElGamal over the integersx
Paillierx
RSAx

Modules

Implementation of the ElGamal cryptosystem over an elliptic curve.

Implementation of the ElGamal cryptosystem over a safe prime group.

Functions for generating random prime numbers.

Implementation of the Paillier cryptosystem.

Random number generation that is consistent with the dependencies’ requirements.

Implementation of the RSA cryptosystem.

Structs

Rich representation of a ciphertext that associates it with the corresponding public key. This allows for performing homomorphic operations using operator overloading, among others.

Traits

An asymmetric cryptosystem is a system of methods to encrypt plaintexts into ciphertexts, and decrypt those ciphertexts back into plaintexts. Anyone who has access to the public key can perform encryptions, but only those with the secret key can decrypt.

Some cryptosystems do not require the public key to decrypt, as all the necessary information is stored within the ciphertext and the secret key. For example, ElGamal when its group is hard-coded.

Functionality to easily turn a ciphertext into a rich ciphertext