Encryption of Twine cipher 80-bit key matlab code repair

Can you help me repair the code https://www.dropbox.com/s/o3od1hz8i17nzc1/encoder2 (1).rar
this is wrong with the code To start with, the following lines are incorrect:


This way, you read 2 hexadecimal digits (8 bits) from the table, then
assign the first digit (left 4 bits) to CONSTH, and the second digit
(right 4 bits) to CONSTL. However, in section 2.3 of the algorithm, it
says the round constant is 6 bits and CONSTH is the left 3 bits and
CONSTL is the right 3 bits:
CONi(6) = CONiH(3) || CONiL(3)
and then when processing both CONSTH and CONSTL are padded with a '0' on
the left side.

You work on hex digits rather than bits, which is conceptually correct,
but wrong in terms of coding


  • www.nec.co.jp/rd/media/code/research/images/twine_LC11.pdf

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


In this Discussion