logoalt Hacker News

m00dy • today at 4:00 AM • 4 replies • view on HN

we don't need many crypto libraries, maybe just one for the whole world, written in Rust and then all functions are math-proofed.


Replies

uecker • today at 7:02 AM

A crypto library written in Rust would not be available everywhere, so can not be the only one. And if you formally verify the code, you can also formally verify that it is memory safe, so there is not much point to have it in Rust. Crypto has properties which may be difficult to verify though.

If you want a safe interface that does not require passing random sizes around in extra arguments, this can also be done in C.

➕ show 1 reply
_ache_ • today at 6:42 AM

It's not just "math-proofed". You need a lot more to be a crypto library.

Like time-constant, and it's hard to be time-constant in a performance optimised language like Rust. LLVM is doing some magic, and you don't want any magic in a crypto library.

td521534f12 • today at 4:04 AM

You'd probably need a second one for FIPS.

staplehorse6553 • today at 6:14 AM

Does the alpha-stage WIP code you call 'Rust' compile for 32-bit yet? No? Ok.