mardi 10 février 2015

What kind of DES algorithm does my card support?



I have a NXP JCOP java card , that it is written in its Security Target that it is supporting DES cryptography algorithms as follow :



FCS_COP.1.1/ DESMAC


The TSF shall perform [assignment: 8 byte MAC generation and verification] in accordance with a specified cryptographic algorithm [assignment: Triple-DES in outer CBC MAC Mode without padding or with padding method 1 or method 2] and cryptographic key sizes [assignment: 112, 168 Bit] that meet the following: [assignment: : ISO9797-1 MAC Algorithm 1 without Padding; MAC Algorithm 1 with padding Method 1 or Method 2; MAC Algorithm 3 with padding Method 1 or Method 2 [24] ].



Take a deeper look at the last 2 lines, that says my card is support



ISO9797-1 MAC Algorithm 1 without Padding; MAC Algorithm 1 with padding Method 1 or Method 2; MAC Algorithm 3 with padding Method 1 or Method 2 [24] ].



I want to check if the card is really support this algorithms or not.So I tried to write a program that uses the methods of these algorithms.I take a look at Java Card 3.0.1 API specifications (My card is capable with this version), But I can't find any method that explicitly indicate that it is for Algorithm 1 or Algorithm 3 ! It is just mentioned that it is for DES MAC generation algorithm :



static byte ALG_DES_MAC4_ISO9797_1_M2_ALG3


static byte ALG_DES_MAC4_ISO9797_M1


static byte ALG_DES_MAC4_ISO9797_M2


static byte ALG_DES_MAC4_NOPAD


static byte ALG_DES_MAC4_PKCS5


static byte ALG_DES_MAC8_ISO9797_1_M2_ALG3


static byte ALG_DES_MAC8_ISO9797_M1


static byte ALG_DES_MAC8_ISO9797_M2


static byte ALG_DES_MAC8_NOPAD


static byte ALG_DES_MAC8_PKCS5 236



How can I recognize with algorithm (Algorithm 1 or Algorithm 3) does my card support? (The algorithms that it mentioned in its security target.)





Aucun commentaire:

Enregistrer un commentaire