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
very fine
very good. I’ll try to try with another kind of compiler and micro’s
Pingback: Types of Cryptography for a 4-8 bit microcontroller | CL-UAT
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?