IronCoreLabs / recrypt-rs

A set of cryptographic primitives for building a multi-hop Proxy Re-encryption scheme, known as Transform Encryption.
https://crates.io/crates/recrypt
GNU Affero General Public License v3.0
144 stars 23 forks source link

Attempt to get library building without the Rust standard library #88

Closed ernieturner closed 4 years ago

ernieturner commented 5 years ago

We should see how much work it would take to try and get recrypt to compile without the Rust standard library. This would make it much more portable and let it work in environments such as Alpine linux. Probably a feature flag and not something we'd do by default. This ticket will just be the investigation work and we'll write up subsequent tickets on things to change if the investigation goes well.

skeet70 commented 5 years ago

I built gridiron no_std successfully in no_std and no_std_flag. Benchmarking showed some (2-5%) change but repeated benchmarks seemed to vary so that may not have been a real issue.

Moving to recrypt revealed that the Error type requires std as do alternatives. This means quick_error can't be no_std, and we're using that a lot. The rust standard library Mutex also requires std, though there are alternative implementations that seem to be quality. Both of these problems are pretty large effort to get past so I'm going to stop working on this for now, but if we decide we want to do the work it should be possible. Also pushed a branch with this attempt in its current state.