Hi Team,
Can anyone help me on this?
How to decrypt AES-ECB-Nopadding Encrypted frame?
I am not getting desired output. In fact, I am not getting how to proceed in this case.
Hi,
Original post is not very clear from my point of view so let's summarize it:
If I understand it correctly nRF51 HW and SD API supports encryption only. However (and this is I guess hinted in the quoted thread, but I do see it neither properly implemented nor explained) there are "modern" methods how to bypass such limitation and use another stream function which is basic XOR to make it working both ways. One example of this concept is called AES Counter (CTR) mode where you use AES encryption only to generate intermediate "stream" which is then applied with XOR (stream cipher) on clear data. And because inverse function to XOR is again XOR on the other side you do exactly the same on top of cipher text to get clear data.
Please note that while this is elegant it does not necessary mean that it is immediately secure and that you cannot screw it up during implementation (e.g. if you do not apply also integrity check by independent key/method, if you cannot guarantee unique usage off each counter with given key etc.). For details see e.g. en.wikipedia.org/.../Block_cipher_mode_of_operation or other specialized crypto articles.
Cheers Jan
Update 03-06-2015
Reaction to repeated question down this thread:
Hi Dave, you are actually incorrect in the same way Milan was. See another post with very same question and another variant of "NO" answer here: devzone.nordicsemi.com/.../ .
To make the allegory even simpler let's imagine AES encryption as basic addition ("+") mathematical function and decryption as subtraction ("-"):
Cheers Jan
Hi,
Original post is not very clear from my point of view so let's summarize it:
If I understand it correctly nRF51 HW and SD API supports encryption only. However (and this is I guess hinted in the quoted thread, but I do see it neither properly implemented nor explained) there are "modern" methods how to bypass such limitation and use another stream function which is basic XOR to make it working both ways. One example of this concept is called AES Counter (CTR) mode where you use AES encryption only to generate intermediate "stream" which is then applied with XOR (stream cipher) on clear data. And because inverse function to XOR is again XOR on the other side you do exactly the same on top of cipher text to get clear data.
Please note that while this is elegant it does not necessary mean that it is immediately secure and that you cannot screw it up during implementation (e.g. if you do not apply also integrity check by independent key/method, if you cannot guarantee unique usage off each counter with given key etc.). For details see e.g. en.wikipedia.org/.../Block_cipher_mode_of_operation or other specialized crypto articles.
Cheers Jan
Update 03-06-2015
Reaction to repeated question down this thread:
Hi Dave, you are actually incorrect in the same way Milan was. See another post with very same question and another variant of "NO" answer here: devzone.nordicsemi.com/.../ .
To make the allegory even simpler let's imagine AES encryption as basic addition ("+") mathematical function and decryption as subtraction ("-"):
Cheers Jan