In the testbench, the state and key change. Why are there two different states and keys? Does it mean that there are two messages? Also, the output of the testbench produces 6 different outputs. Which one is the cypher text? Why are there more than one output? In the description it says that it can work in different modes, how do you define which mode is operating on? It also says that the same hardware can be used for decryption, how would the decryption be implemented with the code provided?
Thank you,
Type your text here
I am not the designer of that block but I used it for simulations. To decipher it's enough to push the ciphered data with the same state & key used when it was ciphered. Hope it's clear. As far as I understand this block is based built on CTR mode:
https://en.wikipedia.org/wiki/Blockcipher_mode_of_operation#Counter(CTR)