All Projects → ZenGo-X → class

ZenGo-X / class

Licence: GPL-3.0 license
Rust library for building IQC: cryptography based on class groups of imaginary quadratic orders

Programming Languages

c
50402 projects - #5 most used programming language
TeX
3793 projects
Roff
2310 projects
rust
11053 projects
shell
77523 projects
perl
6916 projects

Projects that are alternatives of or similar to class

Math
考研数学,数学一,包括高等数学、线性代数、概率统计
Stars: ✭ 300 (+455.56%)
Mutual labels:  math
commons-statistics
Statistics
Stars: ✭ 35 (-35.19%)
Mutual labels:  math
perl-scripts
A nice collection of day-to-day Perl scripts.
Stars: ✭ 92 (+70.37%)
Mutual labels:  math
mml-book-chinese
mml-book-chinese《Mathematics For Machine Learning》机器学习中的数学 中文版
Stars: ✭ 113 (+109.26%)
Mutual labels:  math
noteworthy
Markdown editor with bidirectional links and excellent math support, powered by ProseMirror. (In Development!)
Stars: ✭ 178 (+229.63%)
Mutual labels:  math
langtons-ant
Langton’s Ant macOS screen saver written in Swift
Stars: ✭ 12 (-77.78%)
Mutual labels:  math
DataToken
Decentralized access control middleware for data exchange and monetization
Stars: ✭ 17 (-68.52%)
Mutual labels:  blockchain-technology
bewl
A DSL for the internal language of a topos
Stars: ✭ 41 (-24.07%)
Mutual labels:  math
manim
A community-maintained Python framework for creating mathematical animations.
Stars: ✭ 12,657 (+23338.89%)
Mutual labels:  math
VsTeXCommentsExtension
TeX comments rendering inside Visual Studio.
Stars: ✭ 48 (-11.11%)
Mutual labels:  math
speedy-math
An application which allows user (small kids) to practice basic Mathematics operations
Stars: ✭ 28 (-48.15%)
Mutual labels:  math
topologic
Visualiser for basic geometric primitives and fractals in arbitrary-dimensional spaces
Stars: ✭ 39 (-27.78%)
Mutual labels:  math
alokmenghrajani.github.com
Alok Menghrajani's Blog
Stars: ✭ 64 (+18.52%)
Mutual labels:  math
block-chain-article
📙📗📘《睡前学点区块链》系列文章。推荐使用Gitbook阅读:https://wangbicong.github.io/block-chain-article/
Stars: ✭ 20 (-62.96%)
Mutual labels:  blockchain-technology
blockchain-VCoin
Simple Implementation Proof of Work blockchain coin.
Stars: ✭ 16 (-70.37%)
Mutual labels:  blockchain-technology
radiator
Hive Ruby API Client
Stars: ✭ 49 (-9.26%)
Mutual labels:  blockchain-technology
SCNMathExtensions
Math extensions for SCNVector3, SCNQuaternion, SCNMatrix4
Stars: ✭ 32 (-40.74%)
Mutual labels:  math
abacus
📐 C# cross precision 3D maths library.
Stars: ✭ 35 (-35.19%)
Mutual labels:  math
VSCode-LaTeX-Inkscape
✍️ A way to integrate LaTeX, VS Code, and Inkscape in macOS
Stars: ✭ 62 (+14.81%)
Mutual labels:  math
Upsurge
Multi-dimensional Swift math
Stars: ✭ 180 (+233.33%)
Mutual labels:  math

Class

Rust library for building IQC: cryptography based on class groups (Cl) of imaginary quadratic orders.

Background

Cls are easy to generate. Their most interesting and useful property is that finding the group order is considered hard. In recent years we see more and more cryptographic primitives instantiated using Cls. We recommend [6,7,8] to learn more about Cls in practice.

Group Element Representation

Group Element can be represented as (a,b,c) or (a,b,Δ) triple (correspond to BinaryQF and ABDeltaTriple structures respectively). We also support compression from the paper (see BinaryQFCompressed structure).

Primitives

Contributions for implementing new primitives or improving existing ones are welcome. See open issues first. Existing primitives can be found in the primitives folder :

  1. PoE: Proof of exponantiation: The prover can efficiently convince a verifier that a large exponentiation was done correctly. Statement is (x,u,w), verifier accept if w = u^x.

  2. Polynomial commitment: The following algorithms are implemented ([1] subsection 4.2 and 4.3):

    • Setup: generate public parameters
    • Commit: commit to a polynomial
    • Open: open and verify a commitment
    • Encode: stand alone code to encode a polynomial as an integer
    • Decode: converts integer to a unique polynomial
    • Eval_prover: NI proof that y = f(z) for a committed polynomial f()
    • Eval_verify: NI verifier for eval_proof.
  3. VDF: Verifiable Delay Function. Based on Wesolowski protocol [4,5]. The following interface is implemented. The same setup can be used for multiple proofs. time(Eval) >> time(Verify):

    • Setup: generate public key
    • Eval: using the public key generate a vdf statement (y,pi)
    • Verify: verify the statement using the public key
  4. Encryption scheme: Linearly homomorphic encryption scheme and a ZK proof. interface includes: Keygen, Encrypt, Decrypt, Prove, Verify. The encryption scheme is taken from [2] Theorem 2. The zero knowledge proof is a non interactive version of the proof given in [3] figure 8. The proof Statement includes a public elliptic curve point Q = xG and proves that a given ciphertext is encrypts x. The ZK proof has another, experimental variant. This construcction is in use in 2P-ECDSA. To make to proof more efficient we use the LCM trick. see dl_cl_lcm.rs.

Build

Use Cargo build.

PARI build

The library uses bindings to PARI c library. Running Cargo build for the first time will take PARI from the depend folder and install it on the machine. It was tested on MacOS and Linux. If you encounter a problem with installation of PARI, please open an issue and try to install it manually. Bindings are generated automatically on the fly which might slow down the build procces by a few seconds.

Test

Tests in rust are multi-thearded if possible. However, PARI configuration supports a single thread. Therefore to make sure all tests run with defined behaviour please use cargo test -- --test-threads=1.

Usage

We use tests to demonstrate correctness of each primitive: At the end of each primitive .rs file there is a test to show the correct usage of the primitive. There is usually one test or more to show soundness of the implementation, i.e. not knowing a witness will fail a PoK. For all tests we assume 128bit security (conservatively translates into 1600bit Discriminant).

Security

Security assumptions can differ between primitives and are discussed in the relevant papers. They should be understood well before using any primitive. The code is not audited and we did not attempted to make it constant time. Do not use this library in production system.

Contact

Feel free to reach out or join ZenGo X Telegram for discussions on code and research.

Hall of Fame

We would like to thank Fabien Laguillaumie, Guilhem Castagnos, Ida Tucker, Claudio Orlandi and Ben Fisch for their support and on-going help. We extend our gratitude to CoBloX research lab and Lloyd Fournier for contributing code, making this library more secure and fast.

References

[1] https://eprint.iacr.org/2019/1229.pdf

[2] https://eprint.iacr.org/2018/791.pdf

[3] https://eprint.iacr.org/2019/503.pdf

[4] https://eprint.iacr.org/2018/623.pdf

[5] https://eprint.iacr.org/2018/712.pdf

[6] Book: Binary quadratic forms: An algorithmic approach

[7] https://www.michaelstraka.com/posts/classgroups

[8] https://github.com/Chia-Network/vdf-competition/blob/master/classgroups.pdf

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].