Skip to content

Simple Encryption Test with PIC microcontrollers

Way back in 2007 I I had to implement an encryption technique for PIC microcontroller based communication link via RS232.

After some tests I found out Alexander Pukall’s PC1 encryption algorithm works with almost no modifications. The attached source code can be used for PIC18 microcontrollers. The code can be compiled with HI-TECH PIC18 compiler or with any other C compiler with little modifications. Here when storing large variables in pic microcontroller ram the variables are defined to be stored in different memory banks.

Download: PIC18 Encryption Example Source code

4 thoughts on “Simple Encryption Test with PIC microcontrollers

  1. suresh. says:

    very fine

    Reply
  2. Nubielab says:

    very good. I’ll try to try with another kind of compiler and micro’s

    Reply
  3. Pingback: Types of Cryptography for a 4-8 bit microcontroller | CL-UAT

  4. Andy says:

    unsigned short x1a0[8];
    unsigned char cle[17];

    for (j=0;j<=16;j++) {
    cle[j]=0;
    }
    for (j=0;j<=8;j++) {
    x1a0[j]=0;
    }

    The array initialisation of x1a0[] goes out of bounds.

    Should x1a0 be defined as 9 bytes long, or should the for() loop only be initialising a byte less?

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.