The Hardware Side of Cryptography

13 May 2008

The Implementation of Caesar Cipher on PIC16F84

Caesar cipher is a classic and simple encryption scheme. It works based on alphabet shifting. Cipher text is generated by shifting plain text by “key” unit which is secret. For example, if shifting key is 2, “A” becoming “C”, “B” becoming “D” and so on. The process is really easy to understand.

Besides software implementation, Caesar Cipher also applicable to programmable embedded hardware such microcontroller. I have coded a program of Caesar Cipher on PIC16F84. The code is shown on Download section. The simulation is done using MPLAB 8.0 from Microchip. Feel free to use it under the term of GPL 3.0😀 . As an example have a look this example:

Example:

  • Plain Text : YOU KNOW, MY BOSS IS A REAL JERK I CAN NOT BELIEVE HE ASSIGNED ME A HELL OF PROJECT
  • Key : 2
  • Cipher Text : AQW MPQY, OA DQUU KU C TGCN LGTM K ECP PQV DGNKGXG JG CUUKIPGF OG C JGNN QH RTQLGEV

Take a look on both two pictures below, it describes you how Plain text procesed into Cipher text.

Plain Text

Cipher Text

This is cipher is really insecure, never use this for sensitive data🙂 .

RELATED STUFF

Download:
Source Code | v1.0 | v1.1
PIC16F84 Datasheet
Mid-Range Reference Manual
MPLAB v8.0

Reference:
Caesar Cipher

Official Website:
Microchip

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: