things4u / LoRa-LMIC-1.51

Port of LMIC-1.5 library tp Atmega 328 and ESP6822, including alternative AES encription library
81 stars 42 forks source link

Missing feature in os_aes #4

Closed abouillot closed 8 years ago

abouillot commented 8 years ago

When using the AESMINI variant, the os_aes function is not able to support the call from aes_appendMic0 or aes_verifyMic0.

aes_appendMic0 line 176 and aes_verifyMic0 line 182, call os_aes with mode set as AES_MIC|AES_MICNOAUX.

The check in os_aes is performed thru a switch statement, this lead the AES_MIC|AES_MICNOAUX not to be valid.

In original implementation, a first bit check is performed to identify the AES_MICNOAUX in order to fill AESAUX array, before performing the aes function

platenspeler commented 8 years ago

You are right. I made modifications to the code that I use in my projects. Especially OTAA needs these updates. I will post my latest l.51 libraries shortly, I'm not a git expert so hope all goes ok.

platenspeler commented 8 years ago

Just updated version to 1.2. (Hope I did this correctly, I'm not a github fan). I made several changes to the aes file and others to that the lib now works correctly when using OTAA.

Maarten