mirror of
https://github.com/pezkuwichain/bizinikiwi-bn.git
synced 2026-06-22 01:01:08 +00:00
Making bn no_std. Exposing miller_loop_batch and final_exponentiation. (#16)
This commit is contained in:
committed by
Nikolay Volf
parent
b1611b623e
commit
635c4cdd56
+4
-4
@@ -1,12 +1,12 @@
|
||||
use alloc::vec::Vec;
|
||||
use core::ops::{Add, Mul, Neg, Sub};
|
||||
use rand::Rng;
|
||||
use std::ops::{Add, Mul, Neg, Sub};
|
||||
use super::FieldElement;
|
||||
use fields::FieldElement;
|
||||
use arith::{U256, U512};
|
||||
|
||||
#[cfg(feature = "rustc-serialize")]
|
||||
use rustc_serialize::{Decodable, Decoder, Encodable, Encoder};
|
||||
|
||||
use arith::{U256, U512};
|
||||
|
||||
macro_rules! field_impl {
|
||||
($name:ident, $modulus:expr, $rsquared:expr, $rcubed:expr, $one:expr, $inv:expr) => {
|
||||
#[derive(Copy, Clone, PartialEq, Eq, Debug)]
|
||||
|
||||
+2
-3
@@ -1,7 +1,6 @@
|
||||
use fields::{const_fq, FieldElement, Fq, Fq2, Fq6};
|
||||
use std::ops::{Add, Mul, Neg, Sub};
|
||||
use core::ops::{Add, Mul, Neg, Sub};
|
||||
use rand::Rng;
|
||||
|
||||
use fields::{const_fq, FieldElement, Fq, Fq2, Fq6};
|
||||
use arith::U256;
|
||||
|
||||
fn frobenius_coeffs_c1(power: usize) -> Fq2 {
|
||||
|
||||
+2
-3
@@ -1,7 +1,6 @@
|
||||
use fields::{const_fq, FieldElement, Fq};
|
||||
use std::ops::{Add, Mul, Neg, Sub};
|
||||
use core::ops::{Add, Mul, Neg, Sub};
|
||||
use rand::Rng;
|
||||
|
||||
use fields::{const_fq, FieldElement, Fq};
|
||||
use arith::{U256, U512};
|
||||
|
||||
#[cfg(feature = "rustc-serialize")]
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
use fields::{const_fq, FieldElement, Fq, Fq2};
|
||||
use std::ops::{Add, Mul, Neg, Sub};
|
||||
use core::ops::{Add, Mul, Neg, Sub};
|
||||
use rand::Rng;
|
||||
|
||||
fn frobenius_coeffs_c1(n: usize) -> Fq2 {
|
||||
|
||||
+2
-2
@@ -5,8 +5,8 @@ mod fq12;
|
||||
|
||||
use arith::U256;
|
||||
use rand::Rng;
|
||||
use std::ops::{Add, Mul, Neg, Sub};
|
||||
use std::fmt::Debug;
|
||||
use core::ops::{Add, Mul, Neg, Sub};
|
||||
use alloc::fmt::Debug;
|
||||
|
||||
pub use self::fp::{const_fq, Fq, Fr};
|
||||
pub use self::fq2::{Fq2, fq2_nonresidue};
|
||||
|
||||
Reference in New Issue
Block a user