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.1.0

Homomorphic cryptosystems update

FunctionalityDone
ElGamal over elliptic curvesx
ElGamal over the integers
Paillier
RSA

Modules

Functions for generating random prime numbers.

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

Structs

ElGamal over the Ristretto-encoded Curve25519 elliptic curve. The curve is provided by the curve25519-dalek crate. ElGamal is a partially homomorphic cryptosystem.

ElGamal ciphertext containing curve points. The addition operator on the ciphertext is reflected as the curve operation on the associated plaintext.

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.