# Bitslice DES decryption

I would like to implement fast DES decryption using Bitslice technique. Without bitslice DES technique, I have already done decrpytion in this source code by changing the for loop from 15 to 0.

In this source code there is no decryption function for DES. How to implement decryption function using the encyption routine? What modifications can be done?

Another source code that is written with the same approach.

s1 (r31 ^ k[47], r0 ^ k[11], r1 ^ k[26], r2 ^ k[3], r3 ^ k[13],
r4 ^ k[41], &l8, &l16, &l22, &l30);


I think the k[] indexes should be changed. At the encryption function, in first s1 box, I didn't get why the first k is selected 47, 11, 26 3, 13 ,41 and so on. If anyone tell me why, i may do it.

• DES decryption is exactly the same as DES encryption, except that the order of the subkeys are reversed. – poncho Feb 13 at 16:42
• yes i did it in first link, it worked but in the last link it didn't. The k[n] array is 56 bit key array constructed from the every single bits of the encryption key except parity bits. Therefore, there is no generated subkey in that source code. Because of that i didn't reversed. – wagese8155 Feb 13 at 17:35