fritz
New Member
Posts: 11
|
Post by fritz on Oct 26, 2019 11:05:55 GMT
Does shieldbuddy have add-on library for 128 bit AES encryption. I need to use a payout device that uses encrypted communication. Is there a way to include the AESLib.h under aurex library. I wanted to migrate from Arduino mega to Shieldbuddy. The 128bit AES was working fine in Arduino. But the library AESLib-master is not compiling in shieldbuddyTC275 board in ArduinoIDE. avr/io.h: no such file or directory is getting displayed as error message as shown in the screenshot attached: Thanks in advance FRITZ
|
|
|
Post by Admin on Oct 26, 2019 12:59:13 GMT
Does the AES library on the Arduino make use of some kind encryption hardware in the AVR 328 processor?
What AES library are you using?
If you create an empty io.h in the avr directory for the Shiedbuddy it might fix your problem.
|
|
fritz
New Member
Posts: 11
|
Post by fritz on Oct 26, 2019 13:35:27 GMT
Hi. Thanks for your quick reply. I am using AESLib-master library in Arduino. I tried empty io.h in avr/libraries but did not work. Im trying AESLib library now and getting compile error as printf_p was not declared in scope. Now Im trying to declare them and try once again. Thanks fritz
|
|
fritz
New Member
Posts: 11
|
Post by fritz on Oct 26, 2019 14:35:43 GMT
That didn't work. AESLib-master library worked well in Arduino Mega without hardware. But not getting accepted in shieldbuddy.
|
|
|
Post by Admin on Oct 26, 2019 17:07:19 GMT
Copy the attached pgmspace.h to: C:\Program Files (x86)\Arduino\hardware\aurduino\aurix\cores\aurduino\avr and; C:\Program Files (x86)\Arduino\hardware\aurduino_Dx\aurix\cores\aurduino\avr This should allow it to compile at least. pgmspace.h (1.48 KB) The printf will send characters to the default serial port SerialASC. In the sketch, you will need to change: Serial.begin(115200); to: SerialASC.begin(115200);
|
|
fritz
New Member
Posts: 11
|
Post by fritz on Oct 27, 2019 7:53:44 GMT
Thanks for the prompt response. Though my earlier used AESLib-master library failed, the AES library AESLib compiled successfully with some warnings. Will try this library for my payout device. Thanks once again
|
|
|
Post by Admin on Oct 27, 2019 8:34:08 GMT
You will also need to make some changes to AESlib.cpp and AESlib.h. The AES_DEBUG function uses a lot of Serial.print statements to output debug messages. These either need to be switched off in AESlib.h:
#ifndef AESLib_h #define AESLib_h
#include "Arduino.h" #include "AES.h" #include "base64.h"
//#define AES_DEBUG
or in AESlib.cpp, replace all the Serial. with SerialASC.
|
|
fritz
New Member
Posts: 11
|
Post by fritz on Oct 27, 2019 12:37:44 GMT
avr/io.h: no such file or directory is getting displayed as error message in AESLib-master. Is there a remedy for that?
|
|
fritz
New Member
Posts: 11
|
Post by fritz on Oct 27, 2019 13:57:45 GMT
I pasted an empty io.h file under avr/ folder but it raised other errors.
|
|
|
Post by Admin on Oct 27, 2019 16:28:00 GMT
AESlib-master contains a lot of AVR assembler code which cannot be used on the Shieldbuddy. The Tc275 is so fast that assembler coding is not necessary. AESlib will compile though. github.com/suculent/thinx-aes-lib
|
|
fritz
New Member
Posts: 11
|
Post by fritz on Nov 2, 2019 15:08:43 GMT
For those who need 128 bit Electronic code book Encryption that will compile easily in shieldbuddy with minor modifications, I am giving below a AES library link: github.com/SergeyBel/AES
|
|
|
Post by Admin on Nov 2, 2019 16:17:08 GMT
Cool!
|
|