I am currently implementing KetjeV2 in VHDL. I have a question concerning the MonkeyWrap-Algorithm that is used in KetjeV2.

The function $wrap(A, B, l)$ is supposed to work as shown below, where $A$ is the associated data and $B$ the plaintext. $A$ and $B$ are then separated into blocks of the size $\rho$, where the block with index $i$ is written as $A_i$ and $B_i$.

Now what happens if $A$ and $B$ have the size of exactly one block, i.e. $\rho$? The first for-loop in the algorithm description below suggests that you need to have at least two blocks. However, a stream cipher works with arbitrary input length, so it should not be a problem to have input data of length $<= \rho$.

The reason I would use an input size of exactly $\rho$ is convenience, i.e. I don't need to do any padding or separating input data into blocks if the input itself already has the correct length. For real world usage this of course is not the case, but let's not worry about this for now.

enter image description here



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.