Implementing Simplified DES using PIC16F84
Guys, if you are looking for an implementation of Simplified DES (SDES) using microcontroller then you are lucky if you see this page. Last night, i have tried to implement a simple encryption/decryption algorithm called Simplified DES (SDES) using PIC16F84 microcontroller. Its just a piece of cake, you can implement all of this while cutting nail
. Its only 384 bytes of code.
Both of encrypting and decrypting process takes approximately 130 cycles of clock. But if you want to get faster, you just need to convert permutation process into lookup. It will takes larger memory but require less time. For example, you can can convert e/p permutation into 16 cells of lookup table. On the other hand Initial Permutation (IP) and Inverse Initial Permutation can also be done by converting each of them into 256 cells of lookup table. Surely, your application becoming memory hogg, but it going faster
Here are some screenshoot, i took it from My Own SDES Simulator and MPLAB 5.20
MPLAB 5.20
SDES Simulator
To test the code, i supplied “0×39″ as plain text and “0×2f2″ as the key. Both of MPLAB and SDES simulator gives the same cipher text result which is “0xb5″.
Links:
Download Source Code
Download SDES Simulator
Download PIC16F84 Datasheet





