Skip to content

Commit

Permalink
simplify size
Browse files Browse the repository at this point in the history
  • Loading branch information
eaypek-tfh committed Jan 10, 2025
1 parent 9771f13 commit 6972e3a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 17 deletions.
1 change: 0 additions & 1 deletion iris-mpc-store/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ use iris_mpc_common::{
config::Config,
galois_engine::degree4::{GaloisRingIrisCodeShare, GaloisRingTrimmedMaskCodeShare},
iris_db::iris::IrisCode,
IRIS_CODE_LENGTH, MASK_CODE_LENGTH,
};
use rand::{rngs::StdRng, Rng, SeedableRng};
pub use s3_importer::{fetch_and_parse_chunks, last_snapshot_timestamp, ObjectStore, S3Store};
Expand Down
24 changes: 8 additions & 16 deletions iris-mpc-store/src/s3_importer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,22 +58,14 @@ impl S3StoredIris {
) as i64;

// parse codes and masks for each limb separately
let left_code_odd =
extract_slice(bytes, &mut cursor, IRIS_CODE_LENGTH * size_of::<u16>() / 2)?;
let left_code_even =
extract_slice(bytes, &mut cursor, IRIS_CODE_LENGTH * size_of::<u16>() / 2)?;
let left_mask_odd =
extract_slice(bytes, &mut cursor, MASK_CODE_LENGTH * size_of::<u16>() / 2)?;
let left_mask_even =
extract_slice(bytes, &mut cursor, MASK_CODE_LENGTH * size_of::<u16>() / 2)?;
let right_code_odd =
extract_slice(bytes, &mut cursor, IRIS_CODE_LENGTH * size_of::<u16>() / 2)?;
let right_code_even =
extract_slice(bytes, &mut cursor, IRIS_CODE_LENGTH * size_of::<u16>() / 2)?;
let right_mask_odd =
extract_slice(bytes, &mut cursor, MASK_CODE_LENGTH * size_of::<u16>() / 2)?;
let right_mask_even =
extract_slice(bytes, &mut cursor, MASK_CODE_LENGTH * size_of::<u16>() / 2)?;
let left_code_odd = extract_slice(bytes, &mut cursor, IRIS_CODE_LENGTH)?;
let left_code_even = extract_slice(bytes, &mut cursor, IRIS_CODE_LENGTH)?;
let left_mask_odd = extract_slice(bytes, &mut cursor, MASK_CODE_LENGTH)?;
let left_mask_even = extract_slice(bytes, &mut cursor, MASK_CODE_LENGTH)?;
let right_code_odd = extract_slice(bytes, &mut cursor, IRIS_CODE_LENGTH)?;
let right_code_even = extract_slice(bytes, &mut cursor, IRIS_CODE_LENGTH)?;
let right_mask_odd = extract_slice(bytes, &mut cursor, MASK_CODE_LENGTH)?;
let right_mask_even = extract_slice(bytes, &mut cursor, MASK_CODE_LENGTH)?;

Ok(S3StoredIris {
id,
Expand Down

0 comments on commit 6972e3a

Please sign in to comment.