Ben Laurie blathering

Stupid now generates correct (single-block, still) SHA-256 code in C. It has functions. We’re starting to wonder about adding structures, and the semantics of arrays – particularly whether an array passed for output can also be used for input (or vice versa). I’m inclining towards making that illegal – if you want a function that, say, fills in every second entry in an array, then you’d need to pass in the array to be filled in, and return a second array which would be the result. The function would have to copy the input array to the output before filling in the new values (or copy the parts it isn’t going to fill in). It seems to me this makes analysis simpler, but can easily be optimised by smart compilers, too.

I guess its time we started writing some of this down! I’d also like to add generators for some common scripting languages, like Perl, Python and PHP.

The thing I’m a little scared of is that eventually, if I’m going to take this seriously, we’re going to need a bignum implementation – not too hard to do if you don’t care about efficiency, I guess.

This entry was posted
on Sunday, February 7th, 2010 at 17:04 and is filed under Crypto, Open Source, Programming.
You can follow any responses to this entry through the RSS 2.0 feed.
Both comments and pings are currently closed.

I’m sorry if I’m going to come across as a wanker in some people’s minds, but … crypto is not an area we should be competing in. We have a fundamental need for this to be done well. Cryptol may be fantastic – but it is not freely available. That kills it for this purpose, as far as I am concerned, and comparing technical merits is only donating my time to the inappropriately commercial side of crypto.

Make Cryptol open and I will happily discuss its merits (and probably abandon Stupid).