2 releases

0.0.0 Aug 6, 2019
0.0.0-sol15 Jul 27, 2019
0.0.0-sol13 Jul 26, 2019

#30 in #libra

24 downloads per month
Used in 17 crates (2 directly)

Apache-2.0

115KB
2K SLoC


id: crypto title: NextGen Crypto custom_edit_url: https://github.com/libra/libra/edit/master/crypto/nextgen_crypto/README.md

NextGen

The nextgen folder hosts the future version of the Libra crypto API and several algorithms that will be used in the upcoming versions.

Overview

Nextgen contains the following implementations:

  • traits.rs introduces new abstractions for the crypto API.
  • Ed25519 performs signatures using the new API design based on ed25519-dalek library with additional security checks (e.g. for malleability).
  • BLS12381 performs signatures using the new API design based on threshold_crypto library. BLS signatures currently undergo a standardization process.
  • ECVRF implements a verifiable random function (VRF) according to draft-irtf-cfrg-vrf-04 over curve25519.
  • SLIP-0010 implements universal hierarchical key derivation for Ed25519 according to SLIP-0010.

How is this module organized?

nextgen_crypto/src
├── bls12381.rs         # Bls12-381 implementation of the signing/verification API in traits.rs
├── ed25519.rs          # Ed25519 implementation of the signing/verification API in traits.rs
├── lib.rs
├── slip0010.rs         # SLIP-0010 universal hierarchical key derivation for Ed25519
├── test_utils.rs
├── traits.rs           # New API design and the necessary abstractions
├── unit_tests/         # Tests
└── vrf/                
    ├── ecvrf.rs        # ECVRF implementation using curve25519 and SHA512
    ├── mod.rs
    └── unit_tests      # Tests

Dependencies

~9MB
~157K SLoC