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 (152 lines) | stat: -rw-r--r-- 4,327 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
<cards>
  <card name="ddv1" extends="ProcessorCard" type="processor" >
    <cardinfo>
      <name>HBCICard</name>
      <descr>
        HBCI card, new style
      </descr>
      <atrs>
       <!--<atr>3b ff 18 00 ff 81 31 3c 45 65 63 0d 02 31 02 50 00 10 *</atr>
       <atr>3b ff 18 00 ff 81 31 fe 45 65 63 11 06 40 02 50 00 10 *</atr>
       -->
       <atr>3b ff 18 00 ff 81 31 ?? 45 65 63 ?? ?? ?? 02 50 00 10 *</atr>
      </atrs>
    </cardinfo>
    
    <commands>

      <!-- Verify PIN -->
      <command name="VerifyPin" >
        <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>

      <!-- Get keyVersion of a given key -->
      <command name="GetKeyInfo" >
        <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" >
        <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" >
        <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" >
        <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" >
        <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>