# Toy Tetragraph hash

Im trying to understand how TTH works, but have a question.

Let's take this example: ABCDEFGHIJKLMNOP

We have

A B C D
E F G H
I J K L
M N O P


Then we add each column mod 26 and add the result to the running total, mod 26, in this example, the running total is (24,2,6,10)

Round 2: Using the matrix from round 1, rotate the first row left by 1, second row left by 2, third row left by 3, and reverse the order of the fourth row. In our example.

B C D A
G H E F
L I J K
P O N M


Now , add each column mod 26 and the result to the running total. The new running total is (5,7,9.11).

This running total is now the input into the first round of the compression function for the next block of text. After the final block is processed, convert the final running total to letters. For example. If the message is ABCDEFGHIJKLMNOP, then the hash is FHJI.

So, my question is how to we use the hash FHJI for the next block of data if it exist?

Assume our data was ABCDEFGHIJKLMNOP QRSTUVWXYZABCDEF.

How will I use the runing total produced by first block of data with another, following block?

Thus in the example, the running total after processing ABCDEFGHIJKLMNOP is (5,7,9,11); it is used when processing the second block QRSTUVWXYZABCDEF, and becomes (15,21,1,7) after the first round for that block, and (8,12,16,20) after the second round. In the end it is converted to the hash IMQU.