decaf377/
lib.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#![no_std]
//! `decaf377` [instantiates Decaf over the BLS12-377 scalar
//! field](https://penumbra.zone/crypto/primitives/decaf377.html).
//!
use cfg_if::cfg_if;

pub mod fields;
pub use fields::{fp::Fp, fq::Fq, fr::Fr};
mod sign;

mod error;
pub use error::EncodingError;

cfg_if! {
    if #[cfg(feature = "arkworks")] {
        mod ark_curve;

        pub use ark_curve::{Element, Encoding, ZETA};

        pub use ark_curve::bls12_377::Bls12_377;

        #[cfg(feature = "r1cs")]
        pub use ark_curve::r1cs;


    } else {
        mod min_curve;

        pub use min_curve::{Element, Encoding, ZETA};
    }
}