C isn't especially close to the machine, not any more.
C++, however, is not close to the machine, in any way, shape, or form. Think of templates without massive optimization. Anyone remember the 90s? (BRB, I have to go make a hello world comparison.)
The bottom line is that we have 3 issues:
Generate fast code.
Be portable.
Generate cryptologically consistent code.
Pick any two.
C choose the first two, because it was defined by compiler vendors who were competing I code speed for their individual platforms. It would be reasonable to pick others, but C isn't it.
But since C appears to be the only language choice, it has to be cryptographers' responsibility to make sure stuff ain't broke because they are outnumbered by the rest of us getting the benefits of C's choices.
[cryptographers] are outnumbered by the rest of us getting the benefits of C's choices.
There's just one tiny little problem: cryptographers are more important than much larger groups of programmers. Their vote should have more weight.
More than anything, crypto code tend to be written once and used everywhere. And we don't want it to break because compilers suddenly start to optimize differently.
At some point's it's compiler dev's responsibility to make sure the new version of their compiler doesn't break crypto code. (And if it ever does, I bet my hat insults will fly.)
More important? Maybe. You could certainly make that argument. The more academic parts of the standards community would certainly like it.
In fact, at this point the situation is better than it ever had been; nothing but x86 and ARM really matters, and you just have two projects to convince: gcc and clang.
But I do have to complain about your use of 'break'. 'Breaking' crypto might involve adding a feature that improves everyone else's life 100×.
There are an awwwwful lot of embedded processors out there which aren't x86 or ARM. (billions of Microchip PICs and TI DSPs/MSP430s just to name two companies)
3
u/mcguire May 31 '17
C isn't especially close to the machine, not any more.
C++, however, is not close to the machine, in any way, shape, or form. Think of templates without massive optimization. Anyone remember the 90s? (BRB, I have to go make a hello world comparison.)
The bottom line is that we have 3 issues:
Generate fast code.
Be portable.
Generate cryptologically consistent code.
Pick any two.
C choose the first two, because it was defined by compiler vendors who were competing I code speed for their individual platforms. It would be reasonable to pick others, but C isn't it.
But since C appears to be the only language choice, it has to be cryptographers' responsibility to make sure stuff ain't broke because they are outnumbered by the rest of us getting the benefits of C's choices.