Command M6 generation MAC

Mar 28, 2012 at 7:18 PM

Hello,
Please, I have a problem with the M6 command using the Thales Simulator that is what I get:

=>1234M600010003D2B28FBF155F192E00EB30323030313639373034303030303030303030303031333930303130303030303032303030303030313031303033303730323030323436333036393730343030303030303030303131323334353637383930313233343531323750414E202039373034303120202020202020202020202020202020202020202020202020202020202020202020202020202020202020202041424320202020202020202020202039373034303030303030303030303032202020202020205445535454545454542041434F554E54204E414D452020202020323030303030303136393730343030303030303030303030323030303032

<=1234M706 ( Invalid Message Length field )

When I send a message multiple of 8, it disconnects:

=>1234M600010003D2B28FBF155F192E00083032303031363937

<=DISCONNECTED

If possible send me examples of using the M6 command I will be grateful.
Thank you in advance.
Best regards!

Coordinator
Mar 28, 2012 at 8:56 PM

Can you turn on verbose logging and post the messages you get at the simulator, including hex dumps?

Mar 29, 2012 at 10:12 AM

Hi Nickntg,
I tried many times, I still get the same result if you have an examples of using the M6 command I would be grateful, Below messages :

Data Received :

127.0.0.1:49929
31 32 33 34 4D 36 30 32 | 1234M602
30 31 30 30 30 33 44 32 | 010003D2
42 32 38 46 42 46 31 35 | B28FBF15
35 46 31 39 32 45 30 30 | 5F192E00
45 42 30 32 30 30 31 36 | EB020016
39 37 30 34 30 30 30 30 | 97040000
30 30 30 30 30 30 30 31 | 00000001
33 39 30 30 31 30 30 30 | 39001000
30 30 30 32 30 30 30 30 | 00020000
30 30 31 30 31 30 30 33 | 00101003
30 37 30 32 30 30 32 34 | 07020024
36 33 30 36 39 37 30 34 | 63069704
30 30 30 30 30 30 30 30 | 00000000
30 31 31 32 33 34 35 36 | 01123456
37 38 39 30 31 32 33 34 | 78901234
35 31 32 37 50 41 4E 20 | 5127PAN
20 39 37 30 34 30 31 20 |  970401
20 20 20 20 20 20 20 20 |        
20 20 20 20 20 20 20 20 |        
20 20 20 20 20 20 20 20 |        
20 20 20 20 20 20 20 20 |        
20 20 20 20 20 20 20 20 |        
20 20 20 20 41 42 43 20 |     ABC
20 20 20 20 20 20 20 20 |        
20 20 20 39 37 30 34 30 |    97040
30 30 30 30 30 30 30 30 | 00000000
30 30 32 20 20 20 20 20 | 002    
20 20 54 45 53 54 54 54 |   TESTTT
54 54 54 20 41 43 4F 55 | TTT ACOU
4E 54 20 4E 41 4D 45 20 | NT NAME
20 20 20 20 32 30 30 30 |     2000
30 30 30 31 36 39 37 30 | 00016970
34 30 30 30 30 30 30 30 | 40000000
30 30 30 30 32              | 00002

Data Sent :

127.0.0.1:49929
31 32 33 34 4D 37 30 36 | 1234M706
*******************************************************************

Thank you in advance.
Best regards!

 

 

 

Mar 30, 2012 at 11:16 AM

Please , do you have a example for M6 command.

Thanks.

Coordinator
Mar 31, 2012 at 11:49 AM

Taking your first message:

Header = 1234

Command = M6

Mode = 0 (Only 1 block)

Input = 0 (Binary)

Mac algo = 01 (ISO 9797)

Padding = 0 (No padding)

Key type = 003 (TAK)

Key = D2B28FBF155F192E

Length = 00EB = 235 which is not a multiple of 8. Since padding=0 (no padding), all messages you send must have a length that is a multiple of 8. Otherwise, set padding to 1 (ISO 9797 padding method 1) or 2 (ISO 9797 padding method 2).

Your second message is legitimate but it throws an error because algorithm 1 is not currently implemented. You should probably get this message in the simulator window. Try using algorithm 3 which should work.

Coordinator
Mar 31, 2012 at 11:50 AM

An example of the M6 command which should work:

0000M601032003U19D25F349FD03CC3556BB05F65283CA1004072C29C2371CC9BDB65B779B8E8D37B29ECC154AA56A8799FAE2F498F76ED92F2

Apr 2, 2012 at 10:51 AM

Thank you, it works now, but if I use a key with single-length-key (D2B28FBF155F192E)   that does not pose a problem with MAC Algorithm = 03??  the result is similar?

 

Thank you in advance.
Best regards!

Coordinator
Apr 2, 2012 at 5:22 PM

You should be able to use a single-length key with the M6 command, if that's what you're asking.