AnsweredAssumed Answered

mmCau lib, Encrypt on Computer side, decrypt on Kinetis side

Question asked by arnogir on Jun 23, 2015
Latest reply on Aug 4, 2015 by Bob Paddock



i'm on a K60 which have an mmCAU unit.


So I'm using the mmCau lib provided by freescale and start with AN4307 exemple.


The Exemple crypt a string with AES128, AES192, AES256, compare with a pre entered string and then decrypt to get original string.


As said above, the crypted string is compared with an Pre entered crypted string.

Comment indicate that this expected crypted string is obtened with python:

/*FSL: taken from python using pycrypto-2.3*/


For my final application, my need is to generate a crypted string send via ethernet from computer to Kinetis, Kinestis decrypt this string.

So I need on computer side a software which take a file and crypt it with the same Key and same "Init vector" for Xor CBC than used inside the Kinetis.


I'm not familiar with python, but my final need is to have a "a turnkey solution" which take a file and generate the corresponfing crypted file.

I think I will use Visual studio to do it.

For that I use a specific library.

I make many try (with some exemple here: C# AES 256 bits Encryption Library with Salt - CodeProject ) but without success.


I'm not sure the CBC is identical, I don't know if the "Init vector" correspond to the "Salt" in the visual exemple.

I don't know which key provide: if the wanted Key is the initial key or key optened after call "cau_aes_set_key"....



Just in case, there would not he somewhere an example of code to do the same thing that do AN4307 which is executed in Kinetis? (an easy end user solution which not require to install some software like python)