See Wikipedia
+ 1. Get User Input
+ 2. Convert to 64 Bit Blocks
- 3. Initial Permutation
+ 4. Split Block
! 5. Feistel
! 5.1. Sub Key Generation (Key Schedule)
+ 5.2. Expansion
- 5.3. Key Mixing
- 5.4. Substitution
- 5.5. Permutation
+ 6. XOR L ^ R
+ 7. Add X & R
To run this demo:
python3 des.py
As you may notice, the encrypted is exactly the same as the decrypted, which is because of the missing feistel algorithm.