Hi Frank, >> This might have some small variations in the implementations. For >> instance, the Italian CNS (national almost-eID card) seems to follow >> 7816-4 where, when using SM authentication, the first block contains >> CLA, INS, P1, P2 + padding. But the padding is not 80 followed by as >> many 00's are needed to complete the block; rather, it is only 00's. I >> think that these quirks could be best handled by flags, if they are >> reasonably few. > > Could you check if thats consistent with 7816-4 6.2.3.1? I think the > sequential stage also defines the behavior which you are describing.
Almost. 7816-4 6.2.3.1 mandates 80h as the first padding byte, followed by zero or more 00h bytes until the end of the block is reached. The CNS specification, on the contrary, skips the 80h byte and only uses zero bytes until the end of the block. Why this behavior was chosen is beyond me; my best guess is that either someone misread the specs, or that one of the card manufacturers who participated in the sessions / round tables that led to the CNS specification already had such an implementation, and it was proposed for adoption. Best regards, -- Emanuele _______________________________________________ opensc-devel mailing list opensc-devel@lists.opensc-project.org http://www.opensc-project.org/mailman/listinfo/opensc-devel