amcl

The Apache Milagro Cryptographic Library (version 3)

5 releases

Uses old Rust 2015

0.2.0 Dec 17, 2018
0.1.3 Nov 27, 2018
0.1.2 Aug 30, 2017
0.1.1 Aug 28, 2017
0.1.0 Jun 5, 2017

#225 in Cryptography

Download history 1667/week @ 2022-08-11 1165/week @ 2022-08-18 1583/week @ 2022-08-25 1523/week @ 2022-09-01 2073/week @ 2022-09-08 1624/week @ 2022-09-15 1682/week @ 2022-09-22 2420/week @ 2022-09-29 2384/week @ 2022-10-06 1483/week @ 2022-10-13 2292/week @ 2022-10-20 1530/week @ 2022-10-27 1480/week @ 2022-11-03 1754/week @ 2022-11-10 1901/week @ 2022-11-17 1774/week @ 2022-11-24

7,070 downloads per month
Used in 8 crates (5 directly)

Apache-2.0

1MB
24K SLoC

README

NOTE: This version of the library requires Version 1.17+ of Rust for 64-bit support. Unfortunately support for the 128-bit integer type is still flagged as unstable, and so for now a nightly build of rust must be used.

NEW: 128-bit integers are now stable with version 1.26. So please use latest version.

Now AMCL version 3 is distributed as a cargo crate. To use the curve (or algorithm) that you need you have to put it as a dependency and to state a corresponding feature in your Cargo.toml.

Example:

To use BLS48:

amcl = { version = "0.2.0",  optional = true, default-features = false, features = ["bls48"]}

Then, in your main.rs or lib.rs (you don't need it if you use Rust 2018) :

extern crate amcl;

And to use primitives of needed curve:

use amcl::bls48::{ECP, ECP8}; //any primitive you need

Full list of features:

  • Elliptic Curves

    • ed25519
    • c25519
    • nist256
    • brainpool
    • anssi
    • hifive
    • goldilocks
    • nist384
    • c41417
    • nist521
    • nums256w
    • nums256e
    • nums384w
    • nums384e
    • nums512w
    • nums512e
    • secp256k1
  • Pairing-Friendly Elliptic Curves

    • bn254
    • bn254CX
    • bls383
    • bls381
    • fp256BN
    • fp512BN
    • bls461
    • bls24
    • bls48
  • RSA

    • rsa2048
    • rsa3072
    • rsa4096

No runtime deps

Features

  • ansii
  • bls24
  • bls381
  • bls383
  • bls461
  • bls48
  • bn254
  • bn254cx
  • brainpool
  • c25519
  • c41417
  • ed25519
  • fp256Bn
  • fp512BN
  • goldilocks
  • hifive
  • nist256
  • nist384
  • nist521
  • nums256e
  • nums256w
  • nums384e
  • nums384w
  • nums512e
  • nums512w
  • rsa2048
  • rsa3072
  • rsa4096
  • secp256k1