CMAC AES authentication and encryption

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

CMAC AES authentication and encryption

2,133 Views
kellylim
Contributor I

Hi all,

I am new in the community and I am doing on a project with the MC9S12XDP512 board, I  need to do CMAC AES authentication and encryption via CAN communication on the board.I have tried several AES encryption codes in C in codewarrior but it keep showing errors in the program. Can anyone help?

 

Thank you so much.

Labels (1)
0 Kudos
Reply
9 Replies

1,740 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi Kelly,

Please specify what error do you have with screenshot?


Have a great day,
Jennie Zhang

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply

1,741 Views
kellylim
Contributor I

hi Jennie,

 

The following image shows  the error, i tried adding the header file it can't work too.

error encryption.PNG

Thank you very much.

Best Regards,

Kelly Lim

0 Kudos
Reply

1,741 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi Kelly,

From your screenshot, your code can not find some header files in your project.

while the file for example stdafx.h is not included in CW install folder.

did you get it anywhere and include it in your project folder?

Best Regards

Jennie

0 Kudos
Reply

1,741 Views
kellylim
Contributor I

Hi Jennie, 

It works in visual studio. Can I create the header files in CW? so that this C++ code can work in CW as well?

Thank you.

Best Regards,

Kelly  

0 Kudos
Reply

1,741 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi Kelly,

No, CW for HCS12 is not full C++ compatible.

Some features of the C++ language are not designed for embedded controllers. There are some C++ restrictions for embedded MCU.

you should find it in {CW5.x install directory}\ Help\PDF\ Compiler_HC12.pdf:

- search doc with keyword “C++, EC++, compactC++”.

- Appendices E “Known C++ Issues in the HC(S)12 Compilers” which explains in detail, what features are not supported.


Have a great day,
Jennie Zhang

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply

1,741 Views
kellylim
Contributor I

Hi Jennie,

Thank you so much for your help. Do you know how to do authentication or encryption in Cw?

Thank you.

Best regards,

Kelly Lim

0 Kudos
Reply

1,741 Views
kellylim
Contributor I

Hi Jennie,

Thank you so much for your help. I am still trying out the examples as it don't seems to work for my board.

Thank you.

Best regards,

Kelly Lim

0 Kudos
Reply

1,741 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Kelly,

As I know, we have customer refer VKSP demo code for developing HCS12 device.

But unfortunately, we don't have demo code of that.


Have a great day,
Jennie Zhang

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply

1,741 Views
kellylim
Contributor I

Hi Jennie,

Thank you. I will continue to try.

Best Regards,

Kelly Lim 

0 Kudos
Reply