DES-MAC calculation with SAM AV2

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

DES-MAC calculation with SAM AV2

1,127 Views
nazar_pelykh
Contributor I

Hi,

 

We are working on solution using SAM AV2 for DES-MAC calculation that uses cipher block chaining (CBC) mode.

To do it we have tried to store the following types of keys: "(011) 3 key TDEA ISO 10116" and "(110) TDEA ISO 10116 (8-byte MAC)". Then we have used Offline Crypto commands: SAM_ActivateOfflineKey and SAM_Generate_MAC. But we do not have any success.

Note: In this way we can successfully calculate TDEA-CMAC using "(011) 3 key TDEA ISO 10116" key.

We have some examples with results calculated by DES-MAC (CBC) algorithm. But our results calculated by SAM AV2 are different.

Examples:

MAC key (64 b): 01 23 45 67 89 AB CD EF

Note: This DES key we stored twice to form a 2 key TDEA key where the 2 keys are identical.

Sample 1:

Input (28 B): 37 36 35 34 33 32 31 20 4e 6f 77 20 69 73 20 74 68 65 20 74 69 6d 65 20 66 6f 72 20

MAC value (16 b): F1 D3

MAC value (32 b): F1 D3 0F 68

MAC value (48 b): F1 D3 0F 68 49 31

MAC value (64 b): F1 D3 0F 68 49 31 2C A4

Sample 2:

Input (8 B): B2 3D 1C A6 57 E9 F0 48

MAC value (16 b): 08 73

MAC value (32 b): 08 73 27 20

MAC value (48 b): 08 73 27 20 5F 9D

MAC value (64 b): 08 73 27 20 5F 9D 08 D7

We assume that there is a problem with wrong type of key because we have found the folowing information from documentation:

"DES and TDEA MACs for key types 0 and 1 (bit 3 to 5 in SET are 000b or 001b are CBC-MACs"
"DES and TDEA MACs for key types 3 and 6 (bit 3 to 5 in SET are 011b or 110b) are CMACs."

Could you please help us with instruction how to calculate DES-MAC (CBC)?

Also if there is document that can be useful please provide its name.

 

If these questions can not be answered in public forum please send us instructions where it can be done.

Our company has valid NDA with NXP and access to docstore.nxp.com

 

Thank you in advance

 

Best regards,

Nazar Pelykh

Edvantis Software Inc.

0 Kudos
Reply
2 Replies

864 Views
nazar_pelykh
Contributor I

Hello Jonathan,

Thank you for the reply. I have created the internal case.

Best regards,

Nazar

0 Kudos
Reply

864 Views
Jonathan_Iglesias
NXP TechSupport
NXP TechSupport

Dear Nazar Pelykh,

hope you are doing great, the information regarding the SAM AV2 is secured under NDA, and the information should be shares using secured communication channel, please  create an internal case  to help you with this question.

if you have any questions please let me know.

Have a great day !!

BR

Jonathan

0 Kudos
Reply