Remix.run Logo
▲ m00dy 5 hours ago

>>I am really worried about the negative return value being added. Existing third party callers might not be ready to handle this correctly (i.e. if they cast the return to size_t without checking). Could we instead return 0? (In all the added error returns in this PR.)

Rust fixes it.

▲sippingabonedry 4 hours ago | parent [-]

Be sure to let us know when your equivalent Rust crypto library is available.

▲m00dy 4 hours ago | parent | next [-]

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

▲uecker 43 minutes ago | parent | next [-]

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.

▲_ache_ an hour ago | parent | prev | next [-]

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 4 hours ago | parent | prev | next [-]

You'd probably need a second one for FIPS.

▲staplehorse6553 2 hours ago | parent | prev [-]

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

▲cyberax 3 hours ago | parent | prev [-]

You rang?

https://github.com/rustls/rustls

▲jo-m 10 minutes ago | parent [-]

If I am not mistaken, the default backend is aws-lc [1] which is... a C library (still better than having the frontend in C as well, though).

Meanwhile, ring [2] carries an explicit disclaimer of "This is an experiment".

[1] https://github.com/aws/aws-lc

[2] https://github.com/briansmith/ring