mirror of
https://github.com/logos-storage/plonky2.git
synced 2026-01-07 08:13:11 +00:00
fmt
This commit is contained in:
parent
493f516fac
commit
b62fa3f608
@ -1,4 +1,4 @@
|
|||||||
use crate::curve::curve_types::{AffinePoint, base_to_scalar, Curve, CurveScalar};
|
use crate::curve::curve_types::{base_to_scalar, AffinePoint, Curve, CurveScalar};
|
||||||
use crate::field::field_types::Field;
|
use crate::field::field_types::Field;
|
||||||
|
|
||||||
pub struct ECDSASignature<C: Curve> {
|
pub struct ECDSASignature<C: Curve> {
|
||||||
|
|||||||
@ -160,10 +160,11 @@ impl<F: RichField + Extendable<D>, const D: usize> CircuitBuilder<F, D> {
|
|||||||
let t = b.target;
|
let t = b.target;
|
||||||
|
|
||||||
BigUintTarget {
|
BigUintTarget {
|
||||||
limbs: a.limbs
|
limbs: a
|
||||||
.iter()
|
.limbs
|
||||||
.map(|&l| U32Target(self.mul(l.0, t)))
|
.iter()
|
||||||
.collect(),
|
.map(|&l| U32Target(self.mul(l.0, t)))
|
||||||
|
.collect(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -135,7 +135,7 @@ impl<F: RichField + Extendable<D>, const D: usize> CircuitBuilder<F, D> {
|
|||||||
|
|
||||||
for &bit in bits.iter() {
|
for &bit in bits.iter() {
|
||||||
let not_bit = self.not(bit);
|
let not_bit = self.not(bit);
|
||||||
|
|
||||||
let result_plus_2_i_p = self.curve_add(&result, &two_i_times_p);
|
let result_plus_2_i_p = self.curve_add(&result, &two_i_times_p);
|
||||||
|
|
||||||
let new_x_if_bit = self.mul_nonnative_by_bool(&result_plus_2_i_p.x, bit);
|
let new_x_if_bit = self.mul_nonnative_by_bool(&result_plus_2_i_p.x, bit);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user