I'm going through the ISO-7816 documentation and having trouble interpreting the CLA scheme under section 5.4.1, Table 9:
b4 b3 b2 b1 | Meaning |
---|---|
x x - - | Secure messaging (SM) Format |
0 x - - | No SM or SM not according to 1.6 |
0 0 - - | No SM or no SM indication |
0 1 - - | Proprietary SM format |
What I understand so far is that if CLA = 8X, then the above nibble represents the various patterns that "X" can take on. What do the symbols "x" (lowercase) and "-" imply in terms of the value of the bit at that position? More concretely, what would a CLA of "80" mean? How is 0000 different from xxxx or ---- ?
CLA=80 corresponds to the proprietary class, because "Bit b8 set to 1 indicates the proprietary class". Table in section 5.4.1 specifies interindustry class, i.e. where bit 8 set to 0.
You can treat mark 'x' as wildchar (any value), mark '-' as "bit is not used in this case", and 0 and 1 as exact values for bit place. So, xx-- is just a bit mask. It tells that bit 4 and bit 3 indicate what SM format is used int the command and bit 2 and bit 1 are used for something different .
0x-- can be 00-- or 01--.
Bits 2 and 1 are described with an other line of the table.