Crates.io | scicrypt |
lib.rs | scicrypt |
version | 0.7.1 |
source | src |
created_at | 2021-07-02 18:33:20.267062 |
updated_at | 2022-09-14 13:56:54.20255 |
description | Lightweight cryptographic building blocks for proof of concept implementations in multi-party computation |
homepage | https://crates.io/crates/scicrypt |
repository | https://github.com/jellevos/scicrypt |
max_upload_size | |
id | 417947 |
size | 6,859 |
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:
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).
Currently, the library implements the following homomorphic cryptosystems and the associated homomorphic operations:
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 an average run time comparison (in milliseconds) for safe prime generation:
Crate | Number of bits | 128 | 192 | 256 | 320 | 384 |
glass_pumpkin | 52.5 | 170 | 402 | 652 | 1530 |
openssl | 3.95 | 11.1 | 21.9 | 53.6 | 79.8 |
scicrypt | 2.20 | 7.02 | 20.1 | 37.5 | 72.5 |
Updated: 31 Mar 2022 from GitHub Actions
You can run this benchmark yourself by executing cargo bench --bench prime_gen
. By default, this benchmark is turned off because it can take up to 15 minutes to run. In other words, it will not run when you simply run cargo bench
. Note that on my personal laptop, OpenSSL slightly outperforms scicrypt on average, so results can differ based on hardware.
These are the upcoming minor versions and the functionality they will add.
Functionality | Done |
Encoding signed ints | |
Discrete log lookup tables | |
Debugging tools |
Functionality | Done |
Additive secret sharing | |
Multiplicative secret sharing | |
Shamir's secret sharing |
Functionality | Done |
OT & extensions | |
OPRF | |
OPPRF |
Functionality | Done |
Polynomial arithmetic | |
BGV (no bootstrapping) |