Author Topic: AES Library not woking with RFduino RFD22301  (Read 1559 times)

bhabrooo

  • RFduino Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
AES Library not woking with RFduino RFD22301
« on: May 05, 2016, 05:07:17 AM »
Hello people,
                     alright so after completing my project i wanted to make the communication between my RFduino and the android application secure. Hence the natural option is AES encoding in particular 256 bit encoding. i opted to used the AESLib from the following GitHub repositry:
https://github.com/DavyLandman/AESLib

now the code compiles just fine normal
but as soon the line #include <AESLib.h> is added on top the RFduino compiler doesn't compile anymore.
the following is error generated:

Code: [Select]
Warning: platform.txt from core 'RFduino Boards' contains deprecated recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {compiler.c.elf.flags} -mcpu={build.mcu} {build.extra_flags} "-T{build.variant.path}/{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" -Wl,--cref -o "{build.path}/{build.project_name}.elf" "-L{build.path}" -Wl,--warn-common -Wl,--warn-section-align -Wl,--start-group "{build.path}/syscalls.c.o" {object_files} "{build.variant.path}/{build.variant_system_lib}" "{build.variant.path}/libRFduino.a" "{build.variant.path}/libRFduinoBLE.a" "{build.variant.path}/libRFduinoGZLL.a" "{build.path}/{archive_file}" -Wl,--end-group, automatically converted to recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {compiler.c.elf.flags} -mcpu={build.mcu} {build.extra_flags} "-T{build.variant.path}/{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" -Wl,--cref -o "{build.path}/{build.project_name}.elf" "-L{build.path}" -Wl,--warn-common -Wl,--warn-section-align -Wl,--start-group "{build.path}/core/syscalls.c.o" {object_files} "{build.variant.path}/{build.variant_system_lib}" "{build.variant.path}/libRFduino.a" "{build.variant.path}/libRFduinoBLE.a" "{build.variant.path}/libRFduinoGZLL.a" "{build.path}/{archive_file}" -Wl,--end-group. Consider upgrading this core.


Warning: platform.txt from core 'RFduino Boards' contains deprecated recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} "{build.path}/{archive_file}" "{object_file}", automatically converted to recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} "{archive_file_path}" "{object_file}". Consider upgrading this core.
recipe.S.o.pattern pattern is missing

Error compiling.


Sooooo if someone could help me out with this i'd be grateful.. btw please dont say make your own encryption method (i know i can) but i'd prefer to use a tested and tried method ^_^

--
Peace out!

p.s ignore the typos if any .. too lazy to correct them  :P

bsiever

  • RFduino Full Member
  • ***
  • Posts: 89
  • Karma: +4/-0
    • View Profile
Re: AES Library not woking with RFduino RFD22301
« Reply #1 on: May 05, 2016, 07:41:25 AM »
Hi bhabrooo,

I can't give you any insight into that particular error, but the GitHub repo that you reference seems to include quite a bit of assembly code specifically for the AVR microcontroler.  The RFduino uses an ARM, and the assembly language isn't compatible. 

You might want to review it to see if either a) there are also C-level implementations of all the ASM features or b) there are ARM implementations of them.

  Bill

tolson

  • Global Moderator
  • *****
  • Posts: 870
  • Karma: +20/-0
    • View Profile
    • Thomas Olson Consulting
Re: AES Library not woking with RFduino RFD22301
« Reply #2 on: May 20, 2016, 11:04:21 PM »
Quote
Sooooo if someone could help me out with this i'd be grateful.. btw please dont say make your own encryption method (i know i can) but i'd prefer to use a tested and tried method ^_^

Like bsiever said, that library is for AVR. The Simblee/RFduino has built in AES hardware. You don't need no complicated library. But you will have to read up on the Nordic nRF51822 documentation on how and when to use the AES.

Here is some previous disccussion of about RFduino AES and CCM and example sketch. It is the best I can offer for now.
http://forum.rfduino.com/index.php?topic=811.msg2811#msg2811

The documentation says when the SoftDevice is used, users don't get to  use it.  What I want to know, is since the SoftDevice prevents users from accessing the AES  hardware, then what is it that the SoftDevice is using it for? Is it already automatically encrypting BLE traffic? If so, then why do we care. If not, then why has it taken it over? And if not, how do we tell it to go ahead and encrypt the traffic? Should just be automatic.



« Last Edit: May 22, 2016, 09:27:36 AM by tolson »