Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Rust language general purpose elliptic curve cryptography.

License

NotificationsYou must be signed in to change notification settings

ZenGo-X/curv

Repository files navigation

Build StatusLatest versionDocsLicensedependency status

Curv

Curv contains an extremely simple interface to onboard new elliptic curves.Use this library for general purpose elliptic curve cryptography.

The library has a built in support for some useful operations/primitives such as verifiable secret sharing, commitmentschemes, zero knowledge proofs, and simple two party protocols such as ECDH and coin flip. The library comes withserialize/deserialize support to be used in higher level code to implement networking.

Usage

To usecurv crate, add the following to your Cargo.toml:

[dependencies]curv-kzen ="0.9"

The crate will be available undercurv name, e.g.:

use curv::elliptic::curves::*;

Currently Supported Elliptic Curves

Curvelow level librarycurve description
Secp256k1rust-secp256k1bitcoin wiki
P-256RustCryptoNIST.FIPS.186.4
Ed25519cryptoxideBDLSY11
Ristrettocurve25519-dalekristretto group
BLS12-381bls12-381BLS12-381 For The Rest Of Us

Security

The library was audited byKudelski security on Feb19. The report can be foundhere. No critical issue were found and all issues foundwere fixed.

The code was reviewed independently by few other cryptographers. Special thanks goes toClaudio Orlandifrom Aarhus University.

In general security of the library is strongly dependent on the security of the low level libraries used. We chose onlylibraries that are used as part of other big projects and went through heavy audit/review.

The library is not immune to side channel attacks but considerable effort was given to try and catch as many suchattacks as possible (see audit report).

Build

Usecargo build to build everything including curve implementations, cryptoprimitives, BigInt, etc.

Big integer implementation

The library supports a couple of bigint implementations and can easily switch between them.You can choose any one which you prefer by specifying a feature:

  • rust-gmp-kzen, uses GMP bindings, requires GMP to be installed on a machine. Used by default.

  • num-bigint, Rust's pure implementation of big integer. In order to use it, put in Cargo.toml:

    [dependencies.curv-kzen]version ="0.8"default-features =falsefeatures = ["num-bigint"]

    Warning:num-bigint support is experimental and should not be used in production. For thisbigint implementation, we use prime numbers generator which is not considered secure.

Examples

The library includes some basic examples to get you going. To run them:cargo run --example EXAMPLE_NAME -- CURVE_NAMEfor example:cargo run --example proof_of_knowledge_of_dlog -- secp256k1

Docs

To build docs, use:

cargo docRUSTDOCFLAGS="--html-in-header katex-header.html" cargo doc --no-deps --open

License

Curv is released under the terms of the MIT license. SeeLICENSE for more information.

Development Process & Contact

This library is maintained by ZenGo-X. Contributions are highly welcomed! Besides GitHub issues and PRs, feel free toreach out by mail or join ZenGo XTelegram for discussions on code and research.


[8]ページ先頭

©2009-2025 Movatter.jp