I am trying to encrypt a plaintext using DES in C. I read about the algorithm and how it works, but when i came to write the code i struggled. I hope that you could help me by answering the following questions for me:
How to locate the lowest 8-bits in a 64-bit key ?
How to shuffle the plaintext according to the algorithm description ?
(I read about bitwise operations, but i still cannot understand how i can use them to transfer for example the 5th bit to the location of the 30th bit)
Left shifting the key would not wrap the bits, so i just bitwise or with a mask that will add the bits that did not wrap around ?
Any information would be appreciated, thanks.