OpenMined / sycret

Function Secret Sharing library for Python and Rust with hardware acceleration
https://openmined.github.io/sycret/
Apache License 2.0
54 stars 9 forks source link

Use assembly calls for AES, optimize PRG #6

Open tholop opened 3 years ago

tholop commented 3 years ago

Try to optimize the PRG with a lightweight assembly call to AESNI instead of using the aesni crate: https://github.com/OpenMined/sycret/blob/368276c2687462a9f00496771f102e84428fb74e/src/le.rs#L142

Here is an example of a Rust crate doing that (for a slightly older edition of Rust): https://github.com/gendx/haraka-rs/blob/e487b2821bfd5485e1e3df95909bdade2f615f3a/src/haraka256.rs#L6

Any other optimization of the MMO PRG is welcome! For instance, depending on the expansion factor needed, we might be able to save a few calls to AES: https://github.com/OpenMined/sycret/blob/368276c2687462a9f00496771f102e84428fb74e/src/le.rs#L153

tholop commented 3 years ago

For reference, here is some interesting work: Lightweight Techniques for Private Heavy Hitters