Init.
This commit is contained in:
parent
efafddbca9
commit
a11a92d3d7
14
README.md
14
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```
|
||||
|
||||
|
||||
@ -46,8 +46,9 @@ pub fn hash_gt_to_scalar(elements: &[&Gt]) -> Scalar {
|
||||
|
||||
pub fn prepare_messages_to_space(k: usize) -> Vec<Scalar>{
|
||||
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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user