[Cryptography] Ada vs Rust vs safer C

Kent Borg kentborg at borg.org
Sat Sep 17 14:36:34 EDT 2016

[Jamey: A thread on the moderated Cryptography List is talking about the 
dangers of C, and Rust comes up, and I am now mentioning your Corrode 
project--so I added you to the CC. Hope that's okay. The thread might be 
getting long-in-the tooth, so this might just end up being an FYI. -kb]

On 09/16/2016 06:46 PM, Alfie John wrote:
> Having made safe-C, you're still going to have that same mammoth 
> effort to upgrade to unsafe-C, as it's essentially a new language. So 
> if you're going to move to a new language, why duplicate effort?
> Rust... It comes without footguns.

There is at least one (seems active) project, "Corrode", to 
automagically convert C code to Rust.


The developer, Jamey Sharp, seems to think it could be useful. From my 
ignorant position I fear the output is going to range from horrible to 
won't-compile. Maybe it would be a good starting point in porting old 
code. Turning its output into "real" Rust code could be a lot of work, 
but it might easier than starting from scratch: a way of checking you 
have reproduced all the feature points (and figured out which of them 
are actually bugs to be discarded).

If one of the "features" of C is its latent bugs, then, though a 
mechanical translation might eliminate segfaults, it seems the bugs will 
still be in any faithful translation. Maybe the biggest benefit would 
see where the C code is too groady to translate at all--might be a lot 
of code.


More information about the cryptography mailing list