s32k148 CSE ASE-CMAC

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

s32k148 CSE ASE-CMAC

Jump to solution
1,229 Views
Shivanand
Contributor II

Hello  Nxp community,

Im trying to use CSE module in s32k148 , i found an example project which is using RAM Key for encryption and Decryption using ASE ECB , so im trying to develop secure bootloader using ASE CMAC is the RTD version 32K1_RTD_2_0_0 compatible to use  CMAC beacuse i found the RTD incomplete. And also is there any example project to use CMAC?

0 Kudos
Reply
1 Solution
1,185 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi @Shivanand 

 

I’m not aware of any other examples written in RTD 2.0.0 besides those found in this folder:

..\PlatformSDK_S32K1_S32M24\RTD\Crypto_TS_T40D2M20I0R0\examples\

 

If you want to use CMAC and NVM keys, just use following API:

Csec_Ip_LoadKey

Csec_Ip_GenerateMac

Csec_Ip_VerifyMac

Csec_Ip_GenerateMacAddrMode

Csec_Ip_VerifyMacAddrMode

 

Notice that Csec_Ip_LoadKey function requires the key in M1-M5 format.

 

You can take a look at this application note to see how to calculate M1-M5 values:

https://www.nxp.com/webapp/Download?colCode=AN5401&location=null

https://www.nxp.com/webapp/Download?colCode=AN5401SW&location=null

 

There’s also set of examples which can help to understand how CSEc works.

 

Regards,

Lukas

View solution in original post

0 Kudos
Reply
2 Replies
1,186 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi @Shivanand 

 

I’m not aware of any other examples written in RTD 2.0.0 besides those found in this folder:

..\PlatformSDK_S32K1_S32M24\RTD\Crypto_TS_T40D2M20I0R0\examples\

 

If you want to use CMAC and NVM keys, just use following API:

Csec_Ip_LoadKey

Csec_Ip_GenerateMac

Csec_Ip_VerifyMac

Csec_Ip_GenerateMacAddrMode

Csec_Ip_VerifyMacAddrMode

 

Notice that Csec_Ip_LoadKey function requires the key in M1-M5 format.

 

You can take a look at this application note to see how to calculate M1-M5 values:

https://www.nxp.com/webapp/Download?colCode=AN5401&location=null

https://www.nxp.com/webapp/Download?colCode=AN5401SW&location=null

 

There’s also set of examples which can help to understand how CSEc works.

 

Regards,

Lukas

0 Kudos
Reply
1,076 Views
Shivanand
Contributor II

There’s also set of examples which can help to understand how CSEc works.

@lukaszadrapa  Can you help me find teh examples?

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2264482%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3Es32k148%20CSE%20ASE-CMAC%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2264482%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%26nbsp%3B%20Nxp%20community%2C%3C%2FP%3E%3CP%3EIm%20trying%20to%20use%20CSE%20module%20in%20s32k148%20%2C%20i%20found%20an%20example%20project%20which%20is%20using%20RAM%20Key%20for%20encryption%20and%20Decryption%20using%20ASE%20ECB%20%2C%20so%20im%20trying%20to%20develop%20secure%20bootloader%20using%20ASE%20CMAC%20is%20the%20RTD%20version%2032K1_RTD_2_0_0%20compatible%20to%20use%26nbsp%3B%20CMAC%20beacuse%20i%20found%20the%20RTD%20incomplete.%20And%20also%20is%20there%20any%20example%20project%20to%20use%20CMAC%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2266313%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20s32k148%20CSE%20ASE-CMAC%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2266313%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CSPAN%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F246536%22%20target%3D%22_blank%22%3E%40Shivanand%3C%2FA%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EI%E2%80%99m%20not%20aware%20of%20any%20other%20examples%20written%20in%20RTD%202.0.0%20besides%20those%20found%20in%20this%20folder%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E..%5CPlatformSDK_S32K1_S32M24%5CRTD%5CCrypto_TS_T40D2M20I0R0%5Cexamples%5C%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EIf%20you%20want%20to%20use%20CMAC%20and%20NVM%20keys%2C%20just%20use%20following%20API%3A%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3ECsec_Ip_LoadKey%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3ECsec_Ip_GenerateMac%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3ECsec_Ip_VerifyMac%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3ECsec_Ip_GenerateMacAddrMode%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3ECsec_Ip_VerifyMacAddrMode%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3ENotice%20that%20Csec_Ip_LoadKey%20function%20requires%20the%20key%20in%20M1-M5%20format.%20%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EYou%20can%20take%20a%20look%20at%20this%20application%20note%20to%20see%20how%20to%20calculate%20M1-M5%20values%3A%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fwww.nxp.com%2Fwebapp%2FDownload%3FcolCode%3DAN5401%26amp%3Blocation%3Dnull%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.nxp.com%2Fwebapp%2FDownload%3FcolCode%3DAN5401%26amp%3Blocation%3Dnull%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fwww.nxp.com%2Fwebapp%2FDownload%3FcolCode%3DAN5401SW%26amp%3Blocation%3Dnull%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.nxp.com%2Fwebapp%2FDownload%3FcolCode%3DAN5401SW%26amp%3Blocation%3Dnull%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EThere%E2%80%99s%20also%20set%20of%20examples%20which%20can%20help%20to%20understand%20how%20CSEc%20works.%20%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3ERegards%2C%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3ELukas%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2267408%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20s32k148%20CSE%20ASE-CMAC%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2267408%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CSPAN%3EThere%E2%80%99s%20also%20set%20of%20examples%20which%20can%20help%20to%20understand%20how%20CSEc%20works.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F37795%22%20target%3D%22_blank%22%3E%40lukaszadrapa%3C%2FA%3E%26nbsp%3B%20Can%20you%20help%20me%20find%20teh%20examples%3F%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E