Encryption of Twine cipher 80-bit key matlab code repair - Programmers Heaven

Howdy, Stranger!

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

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Encryption of Twine cipher 80-bit key matlab code repair

jasmina2222jasmina2222 kicevoPosts: 2Member

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:

  CONST=READ_CONi(i);
  CONSTH=CONST(1);
  CONSTL=CONST(2);

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

Comments

Sign In or Register to comment.