4 ms·
There is also ring[1] which is somewhat based on BoringSSL. May be their priorities/philosophies are different. It is nice to see more crypto libs being develop
by mrath 8y ago
There is also ring[1] which is somewhat based on BoringSSL. May be their priorities/philosophies are different. It is nice to see more crypto libs being developed for Rust.
[1]https://github.com/briansmith/ring https://github.com/briansmith/ring
- vvanders 8y agoI know it's too early to ask but it would be wonderful to see one of them totally implemented in Rust. Any time in include one of the crypto wrappers building for non-linix targets(wasm/asmjs or win32) ends up being a massive pain. The base Rust experience is so nice that it ends up spoiling you :).
- mrath 8y ago> it would be wonderful to see one of them totally implemented in Rust Yes definitely. Crypto libs are so critical that building on something like BoringSSL is still good win. There were attempts made to build pure rust crypto libs, some of them are not maintained and some are a bit granular. I think pure rust lib similar to BoringSSL is going to be quite an effort
- briansmith 8y agoWe are continuing the project of replacing C code with Rust code in ring. The pace of that effort is mostly a function of how much work time I have available to spend on ring. Day-to-day ring development happens on Windows and it was designed to "just work" on Windows (as well as Linux, macOS, Android, iOS, and other supported target operating systems). We did a huge amount of work to make the build system fully automatic to enable this, and we have a pretty extensive CI mechanism to make sure everything "just works" as much as we can. As for WebAssembly, I'm looking forward to something like https://pdfs.semanticscholar.org/3887/6d86e5e7851181efc9ed3bf15765c0b59bb1.pdf https://pdfs.semanticscholar.org/3887/6d86e5e7851181efc9ed3b.... However, you should probably use the WebCrypto API in a web app if at all possible, instead of a wasm crypto library. Unfortunately the WebCrypto API is 100% asynchronous whereas almost every other crypto API is 100% synchronous so that's easier said than done. Really browsers should add a synchronous WebCrypto API; then crypto libraries can transparently delegate to it when targetting wasm.
- amenghra 8y agoasync/await makes it pretty easy to take an async library and use it in a synchronous context.
- eridius 8y agoNo it doesn't. await doesn't make asynchronous functions synchronous. It just changes how you write the code, not how the code itself works. Notably, await can only be used from inside an async function.
- coldtea 8y agoOnce you go asynchronous (e.g. call an async function, wait for a promise) you can never go back to a synchronous context in that chain of code. async just makes asynchronous look like a synchronous code, but it's still event-based and async.