Cosmian / abe_gpsw

ABE GPSW scheme using BLS pairing implemented in Rust.
Other
15 stars 1 forks source link

Use optimised version of ABE encryption and decryption #25

Closed Manuthor closed 2 years ago

Manuthor commented 2 years ago

should be done in :

This optimization is actually the use of a EncryptionCache or DecryptionCache: see src/interfaces/ffi/hybrid_gpsw_aes.rs. Play with bench.rs in order to monitor perfs.

Before using this cache, it could be interesting to understand why the public key deserialization is slow (shoud we replace from_bytes with serde?)

Manuthor commented 2 years ago

The deserialization process is slow du to deserialization of group Gt elements. During this deserialization, cryptographic verifications are done to ensure than Gt elements are what they claim to be : the function is_gt_element, added to guaranty this property, consumes around 40% of time of this process.

Another remark concerns the WASM binaries: extract of Not So Fast: Analyzing the Performance of WebAssembly vs. Native Code: