The Hardware Side of Cryptography

31 July 2008

Enigma Railway RS232 Security Dongle using PIC16F84

Filed under: encryption — Tags: , , , , , , — edipermadi @ 12:10 pm

Security dongle is an example of implementation of cryptography. There are many ways to connect dongle to your PC, whether you use USB, paralel port, serial port or even PCI or ISA port. Here, i just extend my previous code about Enigma Railway into projects called “Enigma Railway RS232 Security Dongle”.

The concept is actually easy. First, a PIC16F84 that works at 4MHz polls data form RS232 serial prot at 9600 bps. When data received, it will automatically determine wheter the data is gonna be encoded normally using Enigma Railway Algorithm or just interpreted as an ordinary command. Commands here are a set of instruction to view or modify inner setting of Enigma Railway Security Dongle. There are basically 13 commands exist, listed below:

Enigma Railway Security Dongle Commands
[`] View Inner Setting
[1] Change Left Rotor Type
[2] Change Middle Rotor Type
[3] Change Right Rotor Type
[4] Increase Reflector Setting
[5] Increase Left Rotor Setting
[6] Increase Middle Rotor Setting
[7] Increase Right Rotor Setting
[8] Increase Reflector Offset
[9] Increase Left Rotor Setting
[0] Increase Middle Rotor Setting
[-] Increase Right Rotor Setting
[=] Reset Enigma

The uppercase alphabetical characters (A to Z) will be treated as ordinary data and it will be encoded as an enigma Railway Message. Other undefined characters are ignored.

The code here was written using MPLAB v8.0, simulated and tested using PIC simulator IDE and compared to Enigma Railway Simulator with satisfying result. Both three methods were showing the same results. Have a look those three screenshots below:

Simulated using Oshon Soft PIC Simulator IDE

Captured RS232 result using Oshon Soft PIC Simulator IDE

Simulated using Enigma Railway Simulator

I’ve tested this code using PIC16F84 development board from Innovative Electronics at 4MHz clock and 9600bps transmission speed. Where TX bit was RA0 and RX bit was RA1. The schematic is basicaly easy, so i dont need to mention it here🙂 .

Last, this code is released freely under GNU Public License v3.0 without any warranty. So take your own risk and leave some comments, so i can hear your voice🙂

RELATED STUFF

Download:
Enigma Railway RS232 Security Dongle Source Code | v1.0 | v1.1
PIC16F84 Datasheet
Mid-Range Reference Manual
MPLAB v8.0
Enigma Railway Simulator

Reference:
Enigma Machine
Enigma Rotor Details
Crypt Analysis of Enigma

Official Website
Microchip
Oshon Soft
Innovative Electronics

7 Comments »

  1. Grande blog Vous avez ici .. C’est difficile de trouver de
    haute qualité excellente écriture comme la vôtre aujourd’hui.

    J’ai vraiment gens comme vous! Prendre soin !!

    Comment by achat de graines de cannabis — 10 August 2014 @ 4:05 am

  2. WOW just what I was searching for. Came here
    by searching for live skor

    Comment by prediksi lve skor bola — 14 August 2014 @ 3:39 pm

  3. Veryy ցood article. I’m facing sone oof thesе issues as well..

    Comment by The Best LED TV Deals — 7 September 2014 @ 1:30 am

  4. Good for building fitness, endurance and heart health.

    Packing your day with none fitness related activities, and leaving no time for a workout, won’t improve
    your fitness levels. You legs should be squeezed together and put your hands towards head and lift
    you leg upward in air and straight them and hold on the position for about 3 seconds.

    Comment by more info about Andrea Albright's my bikini program here — 11 September 2014 @ 11:14 pm

  5. Moreover, the boat maker is amongst the most diversified one as far as models and variations are concerned in boats.
    The excellent packing is necessary to move the goods safely to the new location. I think i – Pad would be the most wonderful X-mas gift this year.
    Shifting vehicles to far away destinations is also very hectic and risk oriented task.
    The Nissan Altima is a good choice among midsize cars.
    This 30 day timeframe can be both good and bad for a seller.
    Internet speed at Symphony is many times your present speed and also you can download and upload your video easily.
    Those who sleep on their backs need to have the support so that their spine is not pulled out of alignment during their sleeping.
    We are repairing and installment different types of gates suchlike Actuation Steel State Doors, Mercenary Coiled Grills
    for much than 10 age. You must know what the data corruption is and how
    it occurs.

    Comment by self storage companies san diego — 18 September 2014 @ 6:39 pm

  6. Awesome post.

    Comment by cheats for angry birds epic — 25 September 2014 @ 5:04 pm

  7. I tjink this is one of the most impotant information for
    me. And i’m glad reading your article. But want to
    remark on some general things, The website styyle is perfect, the articles is really excellent
    : D. Good job, cheers

    Comment by have a peek at this website — 4 October 2014 @ 7:06 pm


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

Blog at WordPress.com.

%d bloggers like this: