News for hackers. Stuff that matters.
Re:A cryptographically secure bootloader for RISC-V in Rust by bangaladore on Monday August 05, 2024 @07:51PM (#41166660)
The original commenter is correct, though.

Any "unsafe" block within a rust source code potentially corrupts the entire application as undefined behavior has not bound and will/may leak right out of the unsafe block.

You are arguing something else. Enumerating all unsafe code is a good feature, but when one of the fundamental building blocks of your security is marked unsafe, it raises questions about its overall benefit.

Re:A cryptographically secure bootloader for RISC-V in Rust by AlotOfReading on Monday August 05, 2024 @11:32PM (#41167565)
I'm not addressing that because I don't think it's an interesting discussion. There's excellent tooling for validating crypto code.

I'm emphasizing the difference between rust and C here because unlike Martin, I don't agree that it's meaningfully possible to eliminate UB in C by careful analysis. You're able to do this in Rust in large part because those issues are all concentrated in a few tightly scoped blocks with clear responsibilities.

Unsafe also gives you a massive hint where to look when you're debugging.