Daniel Kahn Gillmor dkg@fifthhorseman.net writes:
sweet, i'll take a look. fwiw, i think that kind of higher-level work belongs in a separate library, so that the crypto primitives are available independently.
Right, anything large belongs elsewhere, but I think it would be useful to at least have tools for converting keys to and from openpgp format.
i do care about performance on 32-bit machines, but i care about having the functionality available more ;) optimization can come later if we want.
I just checked in an implementation of SHA 512. Basically copy and paste of the SHA 256 code, with larger datatypes and different constants...
A lot of minor things left, like HMAC and RSA using SHA 512, but I might add that shortly. And SHA 384, which is almost the same thing (is anybody using that?).
And then both the SHA256 code and the SHA512 internals should be reorganized slightly with a compression function in a separate file, just like for MD5 and SHA1, to aid later assembler hacks.
If you or anybody else have additional test vectors for SHA 512 or HMAC-SHA-512 or RSA signatures with SHA 512, I'd like to add them. Currently, I have only two test cases, extracted from the FIPS 180-2 spec.
The object IDs for the higer-level hashes are specified here:
Noted, thanks for looking it up for me.
Regards, /Niels