I'm making documentation for an ethernet gateway that using Lantronix xPortEDGE module. It can encrypt/decrypt in AES 128, 192 and 256 bits. I'm struggling to get more information from the manufacturer to better understand how it works. This is an aes-128-cfb mode
I'm trying to decrypt a clear text that i send from a ZigBee network :
hello_word_xbee_that_me What's happening:
- The module connects to the server
- Module send the initial IV one time during the session, 16 bytes coded
- ZigBee network send
hello_word_xbee_that_meagain and again encrypted through my module to server
In JavaScript, i have a code to decipher this encrypted text.
I'm very frustrated because i'm able to decrypt the first ciphertext using the initial IV, but impossible from the second.
I think i undertood that the first ciphertext becomes the next IV to decipher the next ciphertext etc... As the number of plain characters corresponds to the same number of encrypted characters, and not knowing what else to do, I select the first 16 bytes in order to obtain the following IV.
But from the 2nd decryption, it doesn't work, the plain text is unreadable.
In plus with my server, i'm testing here :
... to test what i receive by the following datas :
To be more clear, there is my testing current work :
My module send every 10 seconds "hello_world_xbee_that_meX" where X is incremented +1 from 0.
I give you exactly that i received :
key: 61616161616161616161616161616161 iv: b18af59605c157d10b6282572485fbd0 [original and unique first IV] enc: 5727866a4669878bf4561b964e9b3510a02154806fbd12ab56 dec: hello_world_xbee_that_me0 iv: ? enc: 83c52ba9feab174e56dd7d97e51c7c95b2b232883f880a8beb dec: hello_world_xbee_that_me1 iv: ? enc: ee5dd05c437bc3649348996f9cf8d55f4be1e324ac284153d1 dec: hello_world_xbee_that_me2 iv: ? enc: 090410f2546e7a9f89dbb002dfd3c87b800568e4106a545274 dec: hello_world_xbee_that_me3 You can see the first IV and i can decipher the first message hello_world_xbee_that_me0.
But now, i don't understand how can i build the second IV etc ... I tested several combinations with the first 'enc' ciphertext and nada.
Can anyone explain me please ?
What didn't I understand?
Thank you in advance for your help,
Syl
iv) truncated? $\endgroup$