Crate scicrypt[−][src]
Expand description
WARNING: WHILE THIS LIBRARY MAKES SOME EFFORT FOR SECURE IMPLEMENTATIONS, IT SHOULD NOT BE USED FOR ANY PRACTICAL APPLICATIONS. THE CODE IS NOT AUDITED. WE MAKE NO GUARANTEES ABOUT THE CODE’S CORRECTNESS NOR SECURITY.
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).
Current features
Currently, the library implements the following homomorphic cryptosystems and the associated homomorphic operations:
- ElGamal over Curve25519 (Ristretto-encoded) and two threshold versions
- ElGamal over safe prime groups and two threshold versions
- Paillier and threshold Paillier
- RSA
In addition, the library implements safe prime generation, which is faster than the same functionality implemented in other crates. The code is benchmarked between every version to ensure we do not increase run time and to compare against other implementations.
Check the table below for a run time comparison (in milliseconds) for safe prime generation:
Crate | Number of bits | 128 | 192 | 256 | 320 | 384 |
glass_pumpkin | 52.160 | 157.70 | 319.03 | 772.41 | 1328.3 |
scicrypt | 12.609 | 53.627 | 150.05 | 321.11 | 468.07 |
Updated: 10 Aug 2021 by GitHub Actions
Upcoming features
These are the upcoming minor versions and the functionality they will add.
Ease of use update (~Week 38)
Functionality | Done |
Encoding signed ints | |
Discrete log lookup tables | |
Debugging tools |
Secret sharing update (~Week 36)
Functionality | Done |
Additive secret sharing | |
Multiplicative secret sharing | |
Shamir's secret sharing |
Oblivious transfer update (~Week 35)
Functionality | Done |
OT & extensions | |
OPRF | |
OPPRF |
Re-exports
pub use scicrypt_numbertheory;
pub use scicrypt_traits;
Modules
Partially homomorphic cryptosystems with one key.
Partially homomorphic threshold cryptosystems that require multiple parties to decrypt.