File: ddv1.xml

package info (click to toggle)
libchipcard2 2.1.9-2
  • links: PTS
  • area: main
  • in suites: etch-m68k
  • size: 7,052 kB
  • ctags: 3,761
  • sloc: ansic: 53,628; xml: 11,689; sh: 8,909; makefile: 1,394; cpp: 400
file content (180 lines) | stat: -rw-r--r-- 5,484 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
<cards>
  <card name="ddv1" >

    <commands>

      <!-- Verify PIN -->
      <command name="VerifyPin" driver="cyberjack_ctapi">
        <send>
	  			<APDU >
  	    		<ELEM type="dword">0x00200081</ELEM>
	  			</APDU>
	  			<DATA>
	    			<ELEM name="pin" type="fpin2" minsize="4" maxsize="8" />
	  			</DATA>
				</send>
				<results>
      		<result sw1="0x63" sw2="0xc0" type="error" >
            Bad PIN (only one try left !)
          </result>
      		<result sw1="0x63" type="error" >Bad PIN</result>
      		<result sw1="0x63" sw2="0xc1" type="error" >
            Bad PIN (only two tries left !)
          </result>
      		<result sw1="0x63" sw2="0xc2" type="error" >
            Bad PIN (only three tries left !)
          </result>
      		<result sw1="0x69" sw2="0x83" type="error" >
            Card seems to be destroyed, this might have the following reasons:
             1) you entered a bad PIN too often
             2) the card is of a new and yet unknown type
          </result>
				</results>
      </command>

      <!-- Secure PIN verification using the reader's keypad -->
      <command name="SecureVerifyPin" target="reader" driver="cyberjack_ctapi">
        <send>
	  			<APDU>
  	    		<ELEM type="dword">0x20180100</ELEM>
	  			</APDU>
	  			<DATA>
	    			<ELEM type="bytes" storedAs="bytes" >
              52 0f 02 06 00 20 00 81 08 28 ff ff ff ff ff ff ff
            </ELEM>
          </DATA>
				</send>
				<results>
      		<result sw1="0x90" type="success" >
            PIN ok
          </result>
      		<result sw1="0x63" sw2="0xc0" type="error" >
            Bad PIN (only one try left !)
          </result>
      		<result sw1="0x63" type="error" >Bad PIN</result>
      		<result sw1="0x63" sw2="0xc1" type="error" >
            Bad PIN (only two tries left !)
          </result>
      		<result sw1="0x63" sw2="0xc2" type="error" >
            Bad PIN (only three tries left !)
          </result>
      		<result sw1="0x69" sw2="0x83" type="error" >
            Card seems to be destroyed, this might have the following reasons:
             1) you entered a bad PIN too often
             2) the card is of a new and yet unknown type
          </result>
      		<result sw1="0x64" sw2="0x00" type="error" >
            Verification aborted due to timeout
          </result>
      		<result sw1="0x64" sw2="0x01" type="error" >
            Verification aborted by user
          </result>
				</results>
      </command>

      <!-- Get keyVersion of a given key -->
      <command name="GetKeyInfo" driver="cyberjack_ctapi">
        <send>
	  			<APDU lr="0" >
  	    		<ELEM type="word">0xb0ee</ELEM>
            <ELEM type="byte">0x80</ELEM>
            <ELEM name="keyNumber" type="byte" />
	  			</APDU>
				</send>
				<responses>
	  			<response type="success">
	    			<ELEM name="keyVersion" type="byte" />
          </response>
        </responses>
      </command>
			
      <!-- Get 8 byte random number -->
      <command name="GetChallenge" driver="cyberjack_ctapi">
        <send>
	  			<APDU lr="0" >
  	    		<ELEM type="dword">0x00840000</ELEM>
	  			</APDU>
				</send>
				<responses>
	  			<response type="success">
	    			<ELEM name="challenge" type="bytes" minsize="8" maxsize="8" />
          </response>
        </responses>
      </command>

      <!-- Let card authenticate itself (used for encryption) -->
      <command name="CryptBlock" driver="cyberjack_ctapi">
        <send>
	  			<APDU lr="0" >
  	    		<ELEM type="dword">0x00880083</ELEM>
	  			</APDU>
	  			<DATA>
	    			<ELEM name="in" type="bytes" minsize="8" maxsize="8" />
          </DATA>
				</send>
				<results>
      		<result sw1="0x69" sw2="0x82" type="error" >
            You must verify then PIN before using this command
          </result>
				</results>
				<responses>
	  			<response type="success">
	    			<ELEM name="out" type="bytes" minsize="8" maxsize="8" />
          </response>
        </responses>
      </command>

      <!-- Writes the right 12 bytes of a hash to the file EF_MAC -->
      <command name="WriteHashR" driver="cyberjack_ctapi">
        <send>
	  			<APDU>
  	    		<ELEM type="dword">0x00dc01dc</ELEM>
	  			</APDU>
	  			<DATA>
	    			<ELEM name="hashR" type="bytes" size="12" />
          </DATA>
				</send>
				<results>
      		<result sw1="0x69" sw2="0x82" type="error" >
            You must verify then PIN before using this command
          </result>
				</results>
      </command>

      <!-- Writes the left 8 bytes of a hash to the file EF_MAC and retrieves
           the complete signed hash 
       -->
      <command name="SignHash" driver="cyberjack_ctapi">
        <send>
	  			<APDU lr="0" >
  	    		<ELEM type="dword">0x08b201dc</ELEM>
	  			</APDU>
	  			<DATA>
            <ELEM type="bytes">ba 0c b4 0a 87 08</ELEM>
	    			<ELEM name="hashL" type="bytes" minsize="8" maxsize="8" />
            <ELEM type="bytes">96 01 00</ELEM>
          </DATA>
				</send>
				<results>
      		<result sw1="0x69" sw2="0x82" type="error" >
            You must verify then PIN before using this command
          </result>
				</results>
				<responses>
	  			<response type="success">
            <ELEM name="trash" type="bytes" size="16" />
	    			<ELEM name="signedHash" type="bytes" size="8" />
          </response>
        </responses>
      </command>

      
    </commands>
    
    <!-- generic command responses -->
    <results>
    </results>

  </card>
</cards>