# Initial Permutation of DES

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

Plaintext: 123456ABCD132536

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?

• 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). Commented Sep 27, 2018 at 15:33

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.