mirror of
https://github.com/arnaucube/ark-r1cs-std.git
synced 2026-01-12 08:51:35 +01:00
Add ToConstraintField impls for some primitives
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
use crate::SignatureScheme;
|
||||
use algebra::{
|
||||
ToConstraintField,
|
||||
bytes::ToBytes,
|
||||
fields::{Field, PrimeField},
|
||||
groups::Group,
|
||||
@@ -221,3 +222,12 @@ pub fn bytes_to_bits(bytes: &[u8]) -> Vec<bool> {
|
||||
}
|
||||
bits
|
||||
}
|
||||
|
||||
impl<ConstraintF: Field, G: Group + ToConstraintField<ConstraintF>, D: Digest> ToConstraintField<ConstraintF>
|
||||
for SchnorrSigParameters<G, D>
|
||||
{
|
||||
#[inline]
|
||||
fn to_field_elements(&self) -> Result<Vec<ConstraintF>, Error> {
|
||||
self.generator.to_field_elements()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user