Git Product home page Git Product logo

curv's Introduction

License: MIT Build Status

Curv

Curv contains an extremly 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, commitment schemes, zero knowledge proofs, and simple two party protocols such as ECDH and coin flip. The library comes with serialize/deserialize support to be used in higher level code to implement networking.

Currently Supported Elliptic Curves

Curve low level library curve description blockchain usage examples
Secp256k1 rust-secp256k1 bitcoin wiki Bitcoin, Ethereum
Ed25519 cryptoxide BDLSY11 Ripple, Tezos, Cardano
Jubjub librustzcash what is jubjub Zcash
Ristretto curve25519-dalek ristretto group not yet ;)

Security

The library was audited by Kudelski security on Feb19. The report can be found here. No critical issue were found and all issues found were fixed.

The code was reviewed independently by few other cryptographers. Special thanks goes to Claudio Orlandi from Aarhus University.

In general security of the library is strongly dependent on the security of the low level libraries used. We chose only libraries 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 such attacks as possible (see audit report).

Build

By default cargo build will build the library only for BigInt (used for example in rust-paillier). To add opertions for one of the elliptic curves a feature must be specified:

  • cargo build --features=ec_secp256k1 for secp256k1
  • cargo build --features=ec_ed25519 for ed25519
  • cargo build --features=ec_jubjub for jubjub
  • cargo build --features=ec_ristretto for ristretto

Examples

The library includes some basic examples to get you going. To run them: cargo run --example EXAMPLE_NAME --features CURVE_NAME for example: cargo run --example proof_of_knowledge_of_dlog --features ec_jubjub

Docs

Docs are built per elliptic curve, use cargo doc --no-deps --features CURVE_NAME. for example: cargo doc --no-deps --features ec_ed25519

Adding New Elliptic Curve

To add support for new elliptic curve simply fill in the ECScalar and ECPoint traits.

License

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

Development Process

We use several methods to communicate: You can open an issue, reach out by mail or join the KZen Research Telegram for discussions on code and research. Changes are to be submitted as pull requests.

Contact

For any questions, feel free to email us.

curv's People

Contributors

omershlo avatar gbenattar avatar djc avatar elichai avatar romanz avatar amanusk avatar matanguttman avatar mortendahl avatar oleiba avatar kigawas avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.