0
$\begingroup$

I'm implementing DES, but I cannot understand example.

Plaintext: 123456ABCD132536
After initial permutation: 14A7D67818CA18AD

Plaintext is 64-bits hexadecimal, so each character is 4-bits. The first entry of IP(Initial Permutation) table is 58 which means 58-th binary number in the plaintext.

That number is 1 because 58-th binary number is in 3 which is before the last entry 6. Anyway, it means first binary number in plaintext after IP must be 1!

Then, how can 1 is appeared? First hex must be 1*** and it means greater than equal to 8!! What I'm wrong with this?

$\endgroup$
1
  • $\begingroup$ Without even looking at DES: hexadecimals are here used to represent the binary input block. That one hexadecimal digit equals 4 bits (a nibble) is information that is unlikely to be used in the description of DES itself. Block ciphers operate on bits (commonly grouped as 8 bit bytes or "words" of a particular size - 16, 32 or 64 bits - for practical purposes). $\endgroup$
    – Maarten Bodewes
    Sep 27, 2018 at 15:33

1 Answer 1

2
$\begingroup$

The DES specification numbers bits form 1 to 64, in reading order of big-endian data.

Bit 58 belongs to the second rightmost hex digit of the plaintext, which contains bits 57 to 60. This hex digit is 3, that is 0011 in binary, and bit 58 is the second 0 in that.

$\endgroup$

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.