I'm experimenting with various Keccak implementations for java. This implementation is the most promising so far, however I'm getting strange results. The test cases are defined here (although I'm using hex strings directly, as per the test vectors). Current (and correct) test vectors are defined here in green (I'm providing the link for convenience, to save anyone from having to download the official test vector zip file from the website).
For starters, I don't understand the correlation between the 'len' and 'msg' fields in the test vectors. 'Len' is supposed to be the length of 'msg', in bits. For example, 'len' = 5, 'msg' = "48" (a hex string), I thought 2 hex digits = 1 byte, which = 8 bits. What am I missing?
I'm only getting correct digests (as per the test vectors) for the inputs of the following lengths: 16, 24, 40, 56, 64, 72, 112, and 128 (where length corresponds to the 'len' field in the test vectors, and the input is the 'msg'). The values that I'm getting for lengths: 32, 48, 80, 88, 96, 104, however, do not match the test vectors. Can anyone make an educated guess as to why this is happening? Of course, if anyone can recommend a different implementation in Java I'd be grateful.