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






Very Nice sir, I saw for the first time the Encryption and Decryption in Micro controller based. In software’s like vb and packages I saw the projects. Please tell how to start this project and what are requirements needed for this sir,
with kind regards,
S.vaidyanathan.
Comment by s.vaidyanathan — 5 June 2009 @ 9:50 pm
@s.vaidyanathan
Hi, thank you for visiting my blog. To get involved on this area you got to understade assembly programming language and you got to really understand what is really happened in register level, last you understand the algorithm and there you go.
Happy Coding
Comment by edipermadi — 8 June 2009 @ 9:35 am