Skip to content
Snippets Groups Projects
Verified Commit 32bd6566 authored by STEVAN Antoine's avatar STEVAN Antoine :crab:
Browse files

FIX: algebra bug

parent c9dd7eff
No related branches found
No related tags found
No related merge requests found
......@@ -67,7 +67,7 @@ pub mod linalg;
/// # }
/// ```
pub fn split_data_into_field_elements<F: PrimeField>(bytes: &[u8], modulus: usize) -> Vec<F> {
let bytes_per_element = (F::MODULUS_BIT_SIZE as usize) / 8;
let bytes_per_element = (F::MODULUS_BIT_SIZE as usize - 1) / 8;
let mut elements = Vec::new();
for chunk in bytes.chunks(bytes_per_element) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment