News for hackers. Stuff that matters.
Re:GnuTLS considered harmful (2008) by spiralpolitik on Wednesday March 05, 2014 @03:42PM (#7349736)
Actually C is an excellent choice for security relevant systems software because the issues for developing in C are well understood and can easily be mitigated by following 30 years worth of best practice patterns and using the correct development tools.

The issue is developers are not using the tools or following the best practices because they think they know better than 30 years worth of experience or get caught up in bikeshedding about ideology, licenses and which line the curly braces go on.

Re:GnuTLS considered harmful (2008) by betterunix on Wednesday March 05, 2014 @09:36PM (#7351520)
"Actually C is an excellent choice for security relevant systems software because the issues for developing in C are well understood and can easily be mitigated by following 30 years worth of best practice patterns and using the correct development tools."

Nevermind the copious undefined behavior, the fact that C programmers sometimes struggle to figure out what a valid C expression actually does, the fact that C programmers have to choose between code bloat and using "goto" for finalization, the fact that there are no standard error handling constructs, the fact that strings are null terminated, the lack of a standardized way to determine array lengths at runtime, etc., etc., etc. Even something as simple as this:

int f(int x, int y) { return x + y; }

Can lead to undefined behavior in C:

https://www.securecoding.cert.org/confluence/display/seccode...

Basically C should be at the bottom of the list of languages that programmers choose for cryptography or security software.

Re:GnuTLS considered harmful (2008) by serbaut on Wednesday March 05, 2014 @04:55PM (#7350221)
Can you link to the 30 years of best practice document, I must have missed it.
Re:GnuTLS considered harmful (2008) by Crito on Wednesday March 05, 2014 @08:18PM (#7351204)
Another good read (it probably does not reflect how you want to write C code, the rule about dynammic allocation is probably extreme if you are not writing code to fly spaceships, but I think it is good to read regardless): http://lars-lab.jpl.nasa.gov/JPL_Coding_Standard_C.pdf
Re:GnuTLS considered harmful (2008) by jobigoud on Thursday March 06, 2014 @04:08AM (#7352677)
C and C++ are specifically discouraged as programming languages in "Cryptography Engineering" (Niels Ferguson, Bruce Schneier, Tadayoshi Kohno, 2010).