1
$\begingroup$

In Simplified DES algorithm, the plain text is 8-bit & the key is 10-bit, why is that, why can't both be of 8-bits each?

$\endgroup$
  • 4
    $\begingroup$ We need a reference to this Simplified DES algorithm, as it is not a standard thing in cryptography. For example, this one has 12 bit blocks and a 9 bit key. Simplified DES is likely a teaching aid to help students learn block ciphers (likely cryptanalysis) and not something anyone would use in the real world. $\endgroup$ – mikeazo Jan 12 '16 at 18:14
  • 3
    $\begingroup$ Some data: William Stalling's Simplified DES has 8-bit plaintext and 10-bit key. The overview of appendix G of his Supplement to Cryptography and Network Security (Fifth Edition) states: "The algorithm could have been designed to work with a 16-bit key, consisting of two 8-bit subkeys, one used for each occurrence of $f_K$. Alternatively, a single 8-bit key could have been used, with the same key used twice in the algorithm. A compromise is to use a 10-bit key from which two 8-bit subkeys are generated...". $\endgroup$ – fgrieu Jan 12 '16 at 19:01
  • $\begingroup$ @mikeazo, the tag excerpt claims it is the name of a particular variant. $\endgroup$ – otus Jan 12 '16 at 19:17
  • $\begingroup$ @otus, interesting. I hadn't seen that. $\endgroup$ – mikeazo Jan 12 '16 at 19:23
  • $\begingroup$ Maybe the author wanted to show that the key size is not necessarily related to the block size. It's what I would do. anyway. Disadvantage: key wrapping and key derivation - if the key size is a multiple of the block size then the protocol may be easier to implement. I've seen issues with AES-192 in that respect. $\endgroup$ – Maarten Bodewes Jan 12 '16 at 21:48
2
$\begingroup$

If you're talking about the S-DES developed by Professor Edward Schaefer of Santa Clara University, I can try to explain you the reason.

The algorithm takes in input a 10-bit key (K) but, using a key generation algorithm, the plaintext is encrypted using two different subkeys (K1 and K2) that are generated by the algorithm.

First, you should pass the 10-bit key through a permutation phase.

To generate K1 follow the following steps:

  1. split the key in two binary string with the same length
  2. pass to a simple left shift function (shift=1) both the keys and then join them again
  3. pass the key (still 10 bits long) through a reduction-permutation function(P8) that simply picks out and permutes 8 of the 10 bits. The P8 function works according to the following rule: 6 3 7 4 8 5 10 9

An example: assuming that the output of the left shift functions is the 10-bit key 0000111000, then the output of P8 function would be 10100100.

The output of (3) is K1, the key that will be used during the first round of the encryption procedure.

Now, to find K2 the procedure is practically the same:

  • the input to (1) is not the initial key (K) nor K1, but it is the 10-bits key that comes from the left shift function used to find K1. Thus, after you've splitted this key in two equal length substrings, pass them through the left shift function (shift=2). Note the different shift value
  • after you've joined the substrings again, pass the resulting 10-bits key to the P8 function to get K2.

Note: the initial permutation phase (P10) takes in input the initial 10-bit key and get us the 10 bits permuted according to the following rule: 3 5 2 7 4 10 1 9 8 6 The difference between P10 and P8 is only that P8 permutes only some bits while, P10, permutes all the 10 bits.

Hope I was helpful!

| improve this answer | |
$\endgroup$
  • $\begingroup$ I understand how it is done but I want to know why 10-bit key, why not use a 8-bit key too? $\endgroup$ – Mark Ben Jan 13 '16 at 15:54
  • $\begingroup$ Hi! There's no reason, you can use a 8-bit key too but you have to change the key generation algorithm. In particular, you have to change the P8 function (reduction/permutation) to a function that permutes the key only (without removing bits). The S-DES algorithm was developed for educational purpose only, and thus, it doesn't provide good confidentiality. It can be simply broken trying all the 1024 (2^10) possible keys. $\endgroup$ – ssh3ll Jan 13 '16 at 16:23
  • $\begingroup$ Hmmm now I got it. Thnx $\endgroup$ – Mark Ben Jan 14 '16 at 3:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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