diff --git a/README.md b/README.md index 62138f6..6b5e50b 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,23 @@ # OPHE Test Implementation - ## Requirements Rust 1.59.0+ stable +### Notes +- Relies on the (security of) bls12_381 crate (This crate has been forked to include a few serialization methods: https://github.com/Kradxn/bls12_381) +- Every cryptographic operation should run in constant time +- Every major(time consuming) math operation is parallalized using rusts par_iter and should leverage all available cores +- Modules: + - Core: Core cryptographic primtives + - Proofs: Same DLog NiZK + - Shamir: Shamir Secret sharing implemented for Scalar and Gt Elements + - Utils: Common util code e.g. generation a random element, building the message space and encoding a message + - Serializers: Code for Automatic serialization of Scalars and Gt Elements + - Cryptoservice: Code for the rudimentary cryptoservice implementation + - Ophe: Code for the rudimentary webclient implementation + # Running the cryptoservice ```ROCKET_PORT=9999 cargo run --release --bin cryptoservice``` diff --git a/src/utils.rs b/src/utils.rs index c59fe16..f442b00 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -46,8 +46,9 @@ pub fn hash_gt_to_scalar(elements: &[&Gt]) -> Scalar { pub fn prepare_messages_to_space(k: usize) -> Vec{ let mut m = Vec::new(); - for j in 0..1 << k { - let current_m = Scalar::from_raw([(j + 1) as u64, 0, 0, 0]); + for _j in 0..1 << k { + //let current_m = Scalar::from_raw([(j + 1) as u64, 0, 0, 0]); + let current_m = random_scalar(); m.push(current_m); } m