
<apps>
  <app name="ddv1">
  
    <crypttoken typeName="ddvcard" subTypeName="ddv1" name="DDV1Card">

      <flags>
        <flag>manages_signseq</flag>
        <flag>predef_context_only</flag>
      </flags>
  
      <signinfos>
        <signinfo>
          <id>1</id>
          <hashalgo>rmd160</hashalgo>
          <paddalgo>none</paddalgo>
        </signinfo>
      </signinfos>
      
      <cryptinfos>
        <cryptinfo>
          <id>1</id>
          <cryptalgo>des_3k</cryptalgo>
          <paddalgo>none</paddalgo>
        </cryptinfo>
      </cryptinfos>
      
      <keyinfos>
        <keyinfo>
          <keyId>1</keyId>
          <keySize>16</keySize>
          <minKeySize>16</minKeySize>
          <maxKeySize>16</maxKeySize>
          <chunksize>8</chunksize>
          <cryptalgo>des_3k</cryptalgo>
          <keyDescription>Signkey</keyDescription>
          <keyFlags>
            <flag>canSign</flag>
            <flag>canVerify</flag>
            <flag>hasSignSeq</flag>
          </keyFlags>
        </keyinfo>
        
        <keyinfo>
          <keyId>2</keyId>
          <keySize>16</keySize>
          <minKeySize>16</minKeySize>
          <maxKeySize>16</maxKeySize>
          <chunksize>8</chunksize>
          <cryptalgo>des_3k</cryptalgo>
          <keyDescription>Cryptkey</keyDescription>
          <keyFlags>
            <flag>canEncrypt</flag>
            <flag>canDecrypt</flag>
          </keyFlags>
        </keyinfo>
      </keyinfos>
  
      <contexts>
        <!-- There only is one context, and it is the context for HBCI -->
        <context>
          <id>1</id>
          <description>Context for HBCI operations</description>
          
          <signkeyinfo id="1" />
          <verifykeyinfo id="1" />
          <signinfo id="1" />
  
          <encryptKeyInfo id="2" />
          <decryptKeyInfo id="2" />
          <cryptinfo id="1" />
          
        </context>
      </contexts>
      
    </crypttoken>
  
  
    <files>
      <ef name="EF_KEY" sid="0x0010" 
          type="record" mode="linear" 
          size="17" minnum="1" maxnum="254"
          inAnyDF="1" >
        <record>
          <ELEM name="keynum" type="byte"/>
          <ELEM name="keydata" type="bytes" size="16" />
        </record>
      </ef>
  
      <ef name="EF_KEYD" sid="0x0013" 
          type="record" mode="linear" 
          minnum="1" maxnum="254"
          inAnyDF="1" >
        <record recnum="1" name="AdminKey" >
          <ELEM name="keyData" type="tlv" maxnum="0" >
            <tlv id="0x93" >
              <ELEM name="keyNumber" type="byte" />
              <ELEM name="keyVersion" type="byte" />
            </tlv>
            <tlv id="0x90" >
              <ELEM name="errorsLeft" type="byte" />
            </tlv>
            <tlv id="0xc0" >
              <ELEM name="keyType" type="byte" />
              <ELEM name="keyLength" type="byte" />
            </tlv>
          </ELEM>
        </record>
        <record recnum="2" name="SignKey" >
          <ELEM name="keyData" type="tlv" maxnum="0" >
            <tlv id="0x93" >
              <ELEM name="keyNumber" type="byte" />
              <ELEM name="keyVersion" type="byte" />
            </tlv>
            <tlv id="0x90" >
              <ELEM name="errorsLeft" type="byte" />
            </tlv>
            <tlv id="0xc0" >
              <ELEM name="keyType" type="byte" />
              <ELEM name="keyLength" type="byte" />
            </tlv>
          </ELEM>
        </record>
        <record recnum="3" name="CryptKey" >
          <ELEM name="keyData" type="tlv" maxnum="0" >
            <tlv id="0x93" >
              <ELEM name="keyNumber" type="byte" />
              <ELEM name="keyVersion" type="byte" />
            </tlv>
            <tlv id="0x90" >
              <ELEM name="errorsLeft" type="byte" />
            </tlv>
            <tlv id="0xc0" >
              <ELEM name="keyType" type="byte" />
              <ELEM name="keyLength" type="byte" />
            </tlv>
          </ELEM>
        </record>
        <record >
          <ELEM name="keyData" type="tlv" maxnum="0" >
            <tlv id="0x93" >
              <ELEM name="keyNumber" type="byte" />
              <ELEM name="keyVersion" type="byte" />
            </tlv>
            <tlv id="0x90" >
              <ELEM name="errorsLeft" type="byte" />
            </tlv>
            <tlv id="0xc0" >
              <ELEM name="keyType" type="byte" />
              <ELEM name="keyLength" type="byte" />
            </tlv>
          </ELEM>
        </record>
      </ef>
  
      <ef name="EF_PWDD" sid="0x0015" 
          type="record" mode="linear" 
          size="3" minnum="1" maxnum="1"
          inAnyDF="1" >
        <record>
          <ELEM name="passwdData" type="tlv" maxnum="0" />
        </record>
      </ef>

      <ef name="EF_FBZ" sid="0x0016"
          type="record" mode="linear" 
          size="2" minnum="1" maxnum="1"
          inAnyDF="1" >
        <record>
          <ELEM name="maxErrors" type="byte" />
          <ELEM name="errorsLeft" type="byte" />
        </record>
      </ef>

      <ef name="EF_RULE" sid="0x0030"
          type="record" mode="linear" 
          minnum="1" maxnum="8" 
          inAnyDF="1" >
        <record>
          <ELEM name="rules" type="tlv" maxnum="0" >
            <tlv id="0x80" >
              <ELEM name="accessType" type="bytes" />
            </tlv>
            <tlv id="0x83" >
              <ELEM name="keyRef" type="bytes" />
            </tlv>
            <tlv id="0x90" >
              <ELEM name="accessRights" type="bytes" />
            </tlv>
            <tlv id="0x93" >
              <ELEM name="passwdRef" type="bytes" />
            </tlv>
            <tlv id="0x95" >
              <ELEM name="usageQualifier" type="bytes" />
            </tlv>
            <tlv id="0xa4" >
              <ELEM name="at" type="bytes" />
            </tlv>
            <tlv id="0xaf" >
              <ELEM name="AndTemplate" type="bytes" />
            </tlv>
            <tlv id="0xb4" >
              <ELEM name="cct" type="bytes" />
            </tlv>
            <tlv id="0xb8" >
              <ELEM name="ct" type="bytes" />
            </tlv>
          </ELEM>
        </record>
      </ef>

  
      <df name="DF_BANKING_20" lid="d27600002548420200">

        <pins>
          <pin name="ch_pin" encoding="fpin2" id="0x81" 
               minlen="4" maxlen="12" allowChange="0" />
        </pins>

        <files>

          <ef name="EF_BNK" sid="0x0301"
              type="record" mode="linear" 
              size="88" minnum="1" maxnum="5">
            <record>
              <ELEM name="bankName" type="ascii"   
                    size="20" filler="32" condense="1" />
              <ELEM name="bankCode" type="bcd" size="4" />
              <ELEM name="comService" type="byte" bcd="1" />
              <ELEM name="comAddress" type="ascii"  
                    size="28" filler="32" condense="1" />
              <ELEM name="comSuffix" type="ascii"   
                    size="2" filler="32" condense="1" />
              <ELEM name="country" type="ascii"
                    size="3" filler="32" condense="1" />
              <ELEM name="userId" type="ascii"      
                    size="30" filler="32" condense="1" trust="3" />
            </record>
          </ef>
  
          <ef name="EF_MAC" sid="0x0302"
              type="record" mode="linear" 
              size="12" minnum="1" maxnum="1">
          </ef>
  
          <ef name="EF_SEQ" sid="0x0303"
              type="record" mode="linear" 
              size="2" minnum="1" maxnum="1">
            <record>
              <ELEM name="seq" type="word" />
            </record>
          </ef>
          
        </files>
      </df>

      <ef name="EF_ID" sid="0x0003"
          type="record" mode="linear" 
          size="24" minnum="1" maxnum="1">
        <record>
          <ELEM name="branchKey" type="byte" bcd="1"  />
          <ELEM name="shortBankCode" type="bcd" size="3" >
            <DESCR>
              First byte (BCD) shows the group:
                21: oeffentlich-rechtliche und private banken
                22: Privat- und Geschaeftsbanken
                25: Sparkassen
                26, 29: Genossenschaftsbanken
            </DESCR>
          </ELEM>
          <ELEM name="cardNumber" type="bcd" size="5" />
          <ELEM name="checksum" type="byte" bcd="1" />
          <ELEM name="validUntil" type="bytes" size="2">
            <DESCR> YYMM (BSD)</DESCR>
          </ELEM>
          <ELEM name="validSince" type="bytes" size="3" >
            <DESCR> YYMMDD (BCD)</DESCR>
          </ELEM>
          <ELEM name="country" type="word" bcd="1" />
          <ELEM name="currency" type="ascii" 
                size="3" filler="32" condense="1"  />
          <ELEM name="factor" type="byte" >
            <DESCR>
              Binary coded:
                01: 10^-2
                02: 10^-1
                04: 10^0
                08: 10^1
                10: 10^2
                20: 10^3
            </DESCR>
          </ELEM>
          <ELEM name="chipversion" type="byte" />
          <ELEM name="filler" type="byte" >
            <DESCR>This value MUST be 0, otherwise this is bad data</DESCR>
          </ELEM>
          <ELEM name="OSVersion" type="byte" >
            <DESCR>This value MUST be !=0, otherwise this is bad data</DESCR>
          </ELEM>
        </record>
      </ef>

      <ef name="EF_LOG" sid="0x0004"
          type="record" mode="cyclic" 
          size="10" minnum="1" maxnum="3">
        <record>
          <ELEM name="CLA" type="byte" />
          <ELEM name="INS" type="byte" />
          <ELEM name="SW1" type="byte" />
          <ELEM name="SW2" type="byte" />
          <ELEM name="path" type="bytes" size="6">
            <DESCR> Left-filled with F </DESCR>
          </ELEM>
        </record>
      </ef>
      
    </files>
  </app>
</apps>



