The intermediate KAT values are generated by a modified version of the genKat.c program provided by NIST. It expects 4 input files in the current directory, one for each hash length, their names being IntermediateValuesKATInput_.txt. The files are in the format established for the ShortMsgKat. Running the program will generate 4 files, named IntermediateValuesKat_.txt. Steps: 1) Compile genIntermediateKat.c and the associated files. 2) Run the program in a directory containig the input files. ==Intermediate values for 224 and 256 bit versions== As explained in the specification, the algorithm is a chaining hash using a block cipher with 16 rounds in each iteration. We print below, at the start of each call to the encryption algorithm, what are the left and right keys. (recall that, except for the last iteration, the left key is the current message block and the right key is the previous block. In the last iteration the left key is the xor of the current block with the hash state). Then we print the state for each round. As in the specification, we divide the 256 state into four sixty-bit words A,C,E and G. The contents of this words are written in hexadecimal. We could have written the state say,after each round, but since the round itself is complex, we show some more intermediate states. We split the round into four parts: 1) The state at the beginning of the round (=state at the end of previous round) (this is written to the left of Start) 2) The state after the mix with the rounds keys is done, and the xor of C into G is also done. (this is written to the left of keymix+CxorG) 3) The state after A,C,E have passed through the Sboxes and PHTX has been applied to G. (this is written to the left of sbox+phtx(G)) 4) The state after the rest of the round is completed except for the rotation A,C,E,G-->C,E,G,A, (this is written to the left of end wout rot). The state after the rotation is the same as the starting step of the next round, so we do not print it. (for the last round, see below). After all 16 round are completed, we print the final state. Then, we print the result of doing the Davies-Meyer update, and are ready to start the next iteration. After the last iteration, we print the hash. ==Intermediate values for 384 and 512 bit versions== As explained in the specification, the algorithm is a chaining hash using a block cipher with 16 rounds in each iteration. We print below, at the start of each call to the encryption algorithm, what are the left and right keys. (recall that, except for the last iteration, the left key is the current message block and the right key is the previous block. In the last iteration the left key is the xor of the current block with the hash state). Then we print the state for each round. As in the specification, we divide the 512 state into eight sixty-bit words A,B,C,D,E,F,G. The contents of this words are written in hexadecimal, A above E, B above F, etc. We could have written the state say,after each round, but since the round itself is complex, we show some more intermediate states. We split the round into four parts: 1) The state at the beginning of the round (=state at the end of previous round) (this is written to the left of Start) 2) The state after the mix with the rounds keys is done, and the xor of C into G and D into H is also done. (this is written to the left of kymx+CDxorGH) 3) The state after A,C,E have passed through the Sboxes and PHTX has been applied to G. (this is written to the left of sbx+phtx(GH)) 4) The state after the rest of the round is completed except for the rotation A,B,C,D,E,F,G,H-->C,D,E,F,G,H,A,B, (this is written to the left of end wout rot). The state after the rotation is the same as the starting step of the next round, so we do not print it. (for the last round, see below). After all 16 round are completed, we print the final state. Then, we print the result of doing the Davies-Meyer update, and are ready to start the next iteration. After the last iteration, we print the hash.