News for hackers. Stuff that matters.
Re:Anatomy of a pseudorandom number generator – visualising ... by IsThisObvious on Monday July 08, 2013 @11:19PM (#6010896)
I help write microcontroller code for pressure equipment management. If something goes sufficiently wrong in heating/fails to properly vent, an explosion can occur, endangering everyone in the area.

Even unrelated code is heavily audited to make sure that it can't somehow impact the main control loop and cause an invalid state.

Cryptography software should be much the same.

Re:Anatomy of a pseudorandom number generator – visualising ... by jlgreco on Monday July 08, 2013 @11:49PM (#6010989)
With normal software you can load up on the unit and integration tests to make yourself more confident with your software. When the concern is with the integrity of a cryptographic system, things are not quite so simple. You can write tests, sure, but your overall confidence afterwards is going to be much different.
Re:Anatomy of a pseudorandom number generator – visualising ... by IsThisObvious on Tuesday July 09, 2013 @12:56AM (#6011179)
We go beyond unit tests to verify that the algorithms can't create certain states by any execution path, etc.

Formal verification of software properties is an interesting field.

Re:Anatomy of a pseudorandom number generator – visualising ... by DanBC on Tuesday July 09, 2013 @10:20AM (#6012778)
A blog post about the process would be fascinating, and probably something that many on HN would be interested in.
Re:Anatomy of a pseudorandom number generator – visualising ... by foobarqux on Tuesday July 09, 2013 @12:27AM (#6011115)
The problem is no one would volunteer to write crypto code under those constraints.
Re:Anatomy of a pseudorandom number generator – visualising ... by IsThisObvious on Tuesday July 09, 2013 @12:53AM (#6011165)
I know people who write crypto software that must conform to formal verification of the algorithm, requires detailed design documentation before a single line of code, etc.
Re:Anatomy of a pseudorandom number generator – visualising ... by z-factor on Tuesday July 09, 2013 @07:10AM (#6012069)
Funny thing is that code is then compiled with a compiler was not formally verified, so it's still a 'fingers crossed' situation.
Re:Anatomy of a pseudorandom number generator – visualising ... by IsThisObvious on Tuesday July 09, 2013 @02:18PM (#6014247)
The code generator we use (at my job; not crypto) was written in Coq and formally verified to generate code with certain properties, given properties of the input.

I assume that the crypto group I know, who developed most of the code generator I use, takes similar measures to make sure that their verified "theorems" translate correctly to code.

The unverified stage is actually the hardware, which is an open problem.

Re:Anatomy of a pseudorandom number generator – visualising ... by foobarqux on Tuesday July 09, 2013 @03:50PM (#6014928)
I think in many regulated industries Coq itself would also need to be certified.

What industry is this?

Re:Anatomy of a pseudorandom number generator – visualising ... by IsThisObvious on Tuesday July 09, 2013 @06:56PM (#6016255)
Pressure equipment, specifically sort of mid-scale items for laboratory and small-batch use.

Our low level code (ie, directly controlling machines) is written in the SPARK environment. This code tends not to get updated often, and has a high level of verification to it. It's what actually handles the pressure cut-offs (ie, hard limits on the machine), turning vales, etc.

Our middleware code is based on a specially developed VM that gets code generated for it in Coq, to ensure that it doesn't choke or become unresponsive. However, it's not directly responsible for safety control and has somewhat laxer restrictions.

Coq is useful for demonstrating that the middleware analytics will complete in a given time profile and not crash out the server on erroneous input.

Re:Anatomy of a pseudorandom number generator – visualising ... by jdiez17 on Tuesday July 09, 2013 @09:38AM (#6012559)
Right, but it's much less of a leap of faith, IMHO. Besides, if you turn off optimisations you can be reasonably sure the compiler didn't do something unintended.
Re:Anatomy of a pseudorandom number generator – visualising ... by foobarqux on Tuesday July 09, 2013 @03:47PM (#6014902)
I meant volunteer to mean "not get paid".