The Hardware Side of Cryptography

15 July 2008

Implementing Enigma M3 Cipher Machine on PIC16F84

Filed under: encryption — Tags: , , , , , , — edipermadi @ 10:01 am

Enigma was a machine used to encrypt and decrypt messages during World War II. Enigma M3 or Funkschlüssel M is one of Engima Machine derivation used by Germany Army.
Enigma M3 has 5 type of rotors and 2 type of reflectors. Each of those rotors and reflectors characteristics are shown below.

Enigma M3 Rotors

Enigma M3 Reflectors

Enigma Machine

In addition, i wrote code for emulating enigma M3 using PIC16F84 microcontroller. The code was written and simulated on MPLAB v8.0. Not only that, I’ve tested this implementation against test vectors and compared the results to Enigma Simulator written by Geoff Sullivan. Guess What, i got exactly the same results. That was nice🙂 .

Example:
– Rotor offset : AAA
– Rotor config : UKW-B/I/II/III
– Rotor Setting : AAA
– Plain Text : AAAAAAAAAAAAAAAA
– Cipher Text : BDZGOWCXLTKSBTMC

Enigma M3 Simulator Screenshot

Enigma M3 Simulator Inner Settings

Enigma M3 Plain Text

Enigma M3 Cipher Text

The Implementation of Enigma M3 here was divided into two versions. Version 1.x denotes Basic Enigma M3 (3 slots, 5 rotors) and version 2.x denotes enhanced Enigma M3(3 slots, 8 Rotors)

RELATED STUFF

Download:
Source Code Enigma M3 (Basic) | v1.0 | v1.1 | v1.2
PIC16F84 Datasheet
Mid-Range Reference Manual
MPLAB v8.0
Enigma M3 Simulator

Reference:
Enigma Machine
Enigma Rotor Details
Crypt Analysis of Enigma

30 Comments »

  1. I notice you have the ‘ringstellung’ but that is for the start points of the rotors.
    It is not for the Letter Entry Ring positions.
    Do you not even incorporate that feature?

    Comment by Marcus — 29 October 2009 @ 5:54 am

  2. Is there a hardware implementation of this?

    Comment by Nikko — 3 July 2012 @ 10:22 pm

  3. you are in reality a excellent webmaster.
    The website loading pace is incredible. It seems that you are doing any distinctive trick.
    Furthermore, The contents are masterpiece. you have
    performed a excellent task on this topic!

    Comment by baratza encore review — 2 August 2014 @ 12:54 am

  4. Hello I am so excited I found your website, I really found you by mistake, while
    I was researching on Bing for something else,
    Nonetheless I am here now and would just like to say many
    thanks for a marvelous post and a all round interesting blog
    (I also love the theme/design), I don’t have time to go through it all
    at the moment but I have saved it and also added
    your RSS feeds, so when I have time I will be back to read much more,
    Please do keep up the excellent jo.

    Comment by boston carpet cleaners — 2 August 2014 @ 6:13 pm

  5. That’s why you need this article during your time handling the case.
    You need to know you can communicate and deal well with your personal
    injury attorney Fremont. If you are physically injured, take
    pictures before you receive treatment.

    Comment by Fremont car accident lawyers — 3 August 2014 @ 3:51 pm

  6. Excellent post however I was wondering if you could write a litte
    more on this topic? I’d be very thankful if you could elaborate
    a little bit further. Many thanks!

    Comment by feminine tattoos — 6 August 2014 @ 4:30 pm

  7. Hi! I’m at work browsing your blog from my
    new apple iphone! Just wanted to say I love reading through your blog and
    look forward to all your posts! Keep up the superb work!

    Comment by Chicken Coop ideas — 7 August 2014 @ 4:50 am

  8. Ciao ​​a tutti, come è tutto, penso che ognuno sta diventando sempre
    di più da questo sito, e le vostre opinioni sono gradevole a sostegno di nuovi utenti.

    Comment by ministryofcannabis.com — 15 August 2014 @ 5:33 pm

  9. hello!,I love your writing so much! share we keep up a correspondence extra approximately your post
    on AOL? I need an expert in this space to resolve my problem.
    May be that is you! Having a look forward to peer you.

    Comment by kitchenaid blade coffee grinder — 17 August 2014 @ 12:23 pm

  10. Touche. Great arguments. Keep up the great
    effort.

    Comment by eefforkids.org — 17 August 2014 @ 10:14 pm

  11. In the event you haven’t been in a position to search out
    significantly or any information on the subject, I’ll provide you with an easy consider it.
    And anyone who does this phase is never in it for the health benefits of being active
    and strong. The fact is, it one of several few agencies that literally have a giant
    price range to advertise on television.

    Comment by Beachbody — 28 August 2014 @ 7:28 pm

  12. Wonderful site. Lots of useful info here. I’m sending it to several
    buddies ans also sharing in delicious. And obviously, thanks for your effort!

    Comment by Pedro — 30 August 2014 @ 1:02 am

  13. I’m not positive the place you’re getting your info,
    however great topic. I needs to spend some
    time finding out much more or figuring out more.
    Thank you for great info I used to be searching for this information for my mission.

    Comment by www.youtube.com — 9 September 2014 @ 7:03 pm

  14. Have you ever considered about including a little bit more than just your
    articles? I mean, what you say is fundamental and everything.
    But think about if you added some great visuals or videos to give your posts more,
    “pop”! Your content is excellent but with pics and videos, this website could
    undeniably be one of the very best in its field.
    Fantastic blog!

    Comment by 90 Second Fat Loss — 11 September 2014 @ 6:55 pm

  15. It is a time saving idea to look for a house through an agent as these professionals have sound knowledge about the area in which they function. It
    seems that the trend for buy-to-let properties in Scotland is predicted to continue.
    In Edinburgh you can find a property letting if you are serious on earning
    huge returns of your investment.

    Comment by letting agents Glasgow — 12 September 2014 @ 7:12 am

  16. These folks, wh’re searching for a straightforward funding,
    attempt Binary choices a strive. Even though there is some
    threat attached because the trade to a particular extent is nevertheless open, but loss of danger on the shares sold is reduced.
    Say we try a different tack and re-invest our profit with our initial capital.

    Comment by optionbit — 14 September 2014 @ 10:41 am

  17. First of all I would like to say superb blog! I had
    a quick question which I’d like to ask if you do not
    mind. I was curious to know how you center yourself and clear your
    head before writing. I have had a tough time clearing my
    thoughts in getting my thoughts out there. I truly do take pleasure
    in writing but it just seems like the first 10 to 15 minutes tend to be lost just trying to figure out how to begin. Any recommendations
    or hints? Thank you!

    Comment by locksmith north london — 16 September 2014 @ 4:45 pm

  18. Write more, thats all I have to say. Literally, it seems as though you relied on the video to make your
    point. You clearly know what youre talking about, why waste your
    intelligence on just posting videos to your site when you
    could be giving us something informative to read?

    Comment by flipping opportunities — 23 September 2014 @ 8:40 am

  19. I’m not sure why but this site is loading very slow for me.
    Is anyone else having this issue or is it a issue on my end?
    I’ll check back later on and see if the problem still exists.

    Comment by Caitlin — 23 September 2014 @ 10:50 am

  20. Hi! I’ve been reading your web site for a long time now and finally got the bravery to go
    ahead and give you a shout out from Humble Tx! Just wanted to say keep up the good work!

    Comment by click here to waste 2 seconds of your life — 28 September 2014 @ 5:48 pm

  21. The faster you act with the drying process the less chance
    mold will have to grow and spread. It is by these reasons why it is
    essential to deal with this type of problem as immediately as possible to avoid further loss and harm
    and so as to save whatever you can. Pool water contains chlorine,
    which is also highly corrosive.

    Comment by water damage houston — 1 October 2014 @ 8:14 am

  22. You may find the best solution is to simply have the buyer send the item back to you and refund their money.
    One can only question if Microsoft will be aware of consideration and put into action any of this in outlook games.
    To install SAM – as well as any other applications you download – you’ll need to make sure you phone is configured to allow side-loading.

    Comment by compte xbox live — 2 October 2014 @ 5:31 am

  23. If your policy only allows 20 physical therapy visits each year, it may be helpful to have a
    small amount of med-pay coverage to ensure that additional therapy visits will
    not have to be paid out-of-pocket. Your return on your juicing investment will
    be considerable. We also prefer her children to
    be living in the home.

    Comment by dedicated prepper — 3 October 2014 @ 2:07 pm

  24. After I initially commented I appear to have clicked on the -Notify
    me when new comments are added- checkbox and now whenever a comment is added I get 4 emails with
    the exact same comment. Perhaps there is a way you are able to remove
    me from that service? Thanks a lot!

    Comment by clik here link — 4 October 2014 @ 6:13 pm

  25. Try to meet in person and talk to the seller at least over the phone.
    Some of the agents providing paperless bus ticket called as m-ticket.
    Many artists will advise their fans in advance about the date and time
    that the tickets will be released to the public, so you can make sure you are
    ready and waiting to make the transaction.

    Comment by espn zone — 8 October 2014 @ 8:48 am

  26. It’s an amazing post in support of all the web people; they
    will get benefit from it I am sure.

    Comment by this — 12 October 2014 @ 9:56 am

  27. Good article! We will be linking to this particularly great content on our site.
    Keep up the good writing.

    Comment by for more information — 14 October 2014 @ 9:04 pm

  28. It’s going to be ending of mine day, however before ending
    I am reading this impressive paragraph to improve my knowledge.

    Comment by click here to waste 7 seconds of your life — 21 October 2014 @ 2:08 pm

  29. Hi there outstanding website! Does running a blog like this take a large
    amount of work? I’ve absolutely no knowledge of coding however I
    was hoping to start my own blog in the near future.
    Anyways, should you have any recommendations or
    techniques for new blog owners please share. I understand this
    is off topic however I just wanted to ask. Thank you!

    Comment by what is linkedin — 24 October 2014 @ 2:44 am


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: