0% found this document useful (0 votes)
42 views

Samcrypto Functions: Manual

This manual is a supplement document for OBID® classic-pro ID CPR40.xx-xx and ID CPR44.0x-xx reader family and describes the functionality of SAMCrypto functions which simplifies the data ex-change of encrypted data with NXPs mifare DESFire transponder in connection with mifare SAM.

Uploaded by

Robur Pace
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views

Samcrypto Functions: Manual

This manual is a supplement document for OBID® classic-pro ID CPR40.xx-xx and ID CPR44.0x-xx reader family and describes the functionality of SAMCrypto functions which simplifies the data ex-change of encrypted data with NXPs mifare DESFire transponder in connection with mifare SAM.

Uploaded by

Robur Pace
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 55

MANUAL

SAMCrypto Functions
Desktop Reader:
ID CPR40.30-SUSB

Reader Module:
ID CPR44.01-4SCUSB
ID CPR44.02-4SCUSB

Supported Transponder
mifare DESFire

Up from Firmware Version 02.00.00

final
confidential
2011-04-06
H01111-0e-ID-B.doc
OBID® classic-pro Manual SAMCrypto Functions

FEIG ELECTRONIC GmbH Page 2 of 55 H01111-0e-ID-B.doc


OBID® classic-pro Manual SAMCrypto Functions

Note

Copyright 2011 by
FEIG ELECTRONIC GmbH
Lange Strasse 4
D-35781 Weilburg-Waldhausen (Germany)
Tel.: +49 6471 3109-0
http://www.feig.de

With the edition of this manual, all previous editions become void. Indications made in this manual may be changed with-
out previous notice.

Copying of this document, and giving it to others and the use or communication of the contents thereof are forbidden with-
out express authority. Offenders are liable to the payment of damages. All rights are reserved in the event of the grant of a
patent or the registration of a utility model or design.

Composition of the information in this manual has been done to the best of our knowledge. FEIG ELECTRONIC GmbH
does not guarantee the correctness and completeness of the details given in this manual and may not be held liable for
damages ensuing from incorrect or incomplete information. Since, despite all our efforts, errors may not be completely
avoided, we are always grateful for your useful tips.

The installation instructions given in this manual are based on advantageous boundary conditions. FEIG ELECTRONIC
GmbH does not give any guarantee promise for perfect function in cross environments.

FEIG ELECTRONIC GmbH assumes no responsibility for the use of any information contained in this manual and makes
no representation that they free of patent infringement. FEIG ELECTRONIC GmbH does not convey any license under its
patent rights nor the rights of others.
® ®
OBID and OBID i-scan is a registered trademark of FEIG ELECTRONIC GmbH.
®
mifare is a registered trademark of NXP Electronics N.V.
All cited brand names, product names, or trademarks belong to their respective holders.

General information's regarding this manual

If bits within one byte are filled with "-", these bit spaces are reserved for future extensions or for internal
testing- and manufacturing-functions. These bit spaces must not be changed, as this may cause faulty op-
eration of the Reader.

The following figure formats are used:


0...9: for decimal figures
0x00...0xFF: for hexadecimal figures,
b0...1 for binary figures.

The hexadecimal value in brackets "[ ]" indicates a command.

#: A command which supports Advanced Protocol-Length is marked with “#”.


The #-Sign indicates that the location of the first data byte in a protocol, which follows to the STATUS byte
th th
could be vary between the 5 and the 7 byte.

FEIG ELECTRONIC GmbH Page 3 of 55 H01111-0e-ID-B.doc


OBID® classic-pro Manual SAMCrypto Functions

Content

Revision History of documentation 6

1. Introduction 7

2. [0xC3] Flexible commands for DESFire Communication with SAM 8


2.1. SECURITY RELATED COMMANDS................................................................................. 12
2.1.1. [0xC3] [0xFA] DESFire Authent ................................................................................. 12
2.1.2. [0xC3] [0x54] DESFire Change Key Settings ............................................................. 14
2.1.3. [0xC3] [0x45] DESFire Get Key Settings .................................................................... 15
2.1.4. [0xC3] [0xC4] DESFire Change Key .......................................................................... 16
2.2. PICC LEVEL COMMANDS ............................................................................................... 18
2.2.1. [0xC3] [0xCA] DESFire Create Application ................................................................ 19
2.2.2. [0xC3] [0xDA] DESFire Delete Application ................................................................. 22
2.2.3. [0xC3] [0x6A] DESFire Get Application IDs ................................................................ 23
2.2.4. [0xC3] [0x6D] DESFire Get DF Names ...................................................................... 24
2.2.5. [0xC3] [0x5A] DESFire Select Application .................................................................. 25
2.2.6. [0xC3] [0xFC] DESFire Format PICC ......................................................................... 26
2.2.7. [0xC3] [0x60] DESFire Get Version............................................................................ 27
2.2.8. [0xC3] [0x6E] DESFire Free Mem .............................................................................. 28
2.2.9. [0xC3] [0x5C] DESFire Set Configuration .................................................................. 29
2.2.10. [0xC3] [0x51] DESFire Get Card UID ....................................................................... 31
2.3. APPLICATION LEVEL COMMANDS ................................................................................ 32
2.3.1. [0xC3] [0x6F] DESFire Get File IDs ........................................................................... 33
2.3.2. [0xC3] [0x61] DESFire Get ISO File IDs .................................................................... 34
2.3.3. [0xC3] [0xF5] DESFire Get File Settings .................................................................... 35
2.3.4. [0xC3] [0x5F] DESFire Change File Settings ............................................................. 36
2.3.5. [0xC3] [0xCD] DESFire Create Standard Data File .................................................... 37
2.3.6. [0xC3] [0xCB] DESFire Create Backup Data File ....................................................... 38
2.3.7. [0xC3] [0xCC] DESFire Create Value File .................................................................. 39
2.3.8. [0xC3] [0xC1] DESFire Create Linear Record File ..................................................... 41
2.3.9. [0xC3] [0xC0] DESFire Create Cyclic Record File ...................................................... 42
2.3.10. [0xC3] [0xDF] DESFire Delete File ........................................................................... 43
2.4. DATA MANIPULATION COMMANDS .............................................................................. 44
2.4.1. [0xC3] [0xBD] DESFire Read Standard Data ............................................................. 45
2.4.2. [0xC1] [0x3D] DESFire Write Standard Data ............................................................. 46
2.4.3. [0xC3] [0x6C] DESFire Get Value .............................................................................. 47
2.4.4. [0xC3] [0x0C] DESFire Credit .................................................................................... 48
2.4.5. [0xC3] [0xDC] DESFire Debit ..................................................................................... 49

FEIG ELECTRONIC GmbH Page 4 of 55 H01111-0e-ID-B.doc


OBID® classic-pro Manual SAMCrypto Functions

2.4.6. [0xC3] [0x1C] DESFire Limited Credit ........................................................................ 50


2.4.7. [0xC3] [0x3B] DESFire Write Records ....................................................................... 51
2.4.8. [0xC3] [0xBB] DESFire Read Records ....................................................................... 52
2.4.9. [0xC3] [0xEB] DESFire Clear Record File .................................................................. 53
2.4.10. [0xC3] [0xC7] DESFire Commit Transaction ............................................................ 54
2.4.11. [0xC3] [0xA7] DESFire Abort Transaction ................................................................ 55

FEIG ELECTRONIC GmbH Page 5 of 55 H01111-0e-ID-B.doc


OBID® classic-pro Manual SAMCrypto Functions

Revision History of documentation

Revision Description
Described Firmware: 02.00.00
0 First edition

FEIG ELECTRONIC GmbH Page 6 of 55 H01111-0e-ID-B.doc


OBID® classic-pro Manual SAMCrypto Functions

1. Introduction

®
This manual is a supplement document for OBID classic-pro ID CPR40.xx-xx and ID CPR44.0x-xx
reader family and describes the functionality of SAMCrypto functions which simplifies the data ex-
change of encrypted data with NXPs mifare DESFire transponder in connection with mifare SAM.
The SAMCrypto functions supporting SAM based authentication, ciphering and deciphering and se-
curity functions of mifare DESFire. The advantage of SAMCrypto firmware is the firmware internally
processing and handling of crypto functions between mifare DESFire and mifare SAM.

SAMCrypto functions are designated for the following transponder chips:


mifare DESFire (MF3 IC D40)
mifare DESFire EV1 (2k: MF3 IC D21, 4k: MF3 IC D41, 8k: MF3 IC D81)

SAMCrypto functions are designated for the following SAM chips:


mifare SAM AV1 (MF3 IC D40)
mifare SAM AV2 (MF3 IC D40)

The common firmware functionality is described in manual


H71100-#e-ID-B for ID CPR40.xx reader
H90700-xe-ID-B for ID CPR44.0x reader.
For data transfer with the host computer the ISO-host mode (polling) is available with ID CPR4X.xx
firmware.

NOTICE:
This manual doesn't and cannot explain the functionality of mifare DESFire or mifare SAM.
For a better understanding of this manual the documentation from NXP has to be present to
get background knowledge.

FEIG ELECTRONIC GmbH Page 7 of 55 H01111-0e-ID-B.doc


OBID® classic-pro Manual SAMCrypto Functions

2. [0xC3] Flexible commands for DESFire Communication with SAM

In the following chapters the Host commands for communication with a DESFire Transponder are
described. Most of the commands have the same structure. Only the content of REQUEST-DATA
can vary depending on DESFIRE-COMMAND.

NOTICE:
The commands for DESFire communication can be performed only if the DESFire Trans-
ponder is selected by the standard ISO Host Command [0x25] Select .

Host Reader
1 2 3 4 5
DESFire-
n COM-ADR [0xC3] MODE 
COMMAND

6 7 (8 ... n-2) n-1, n


 REQUEST-
SLOT TIMEOUT CRC16
DATA

FEIG ELECTRONIC GmbH Page 8 of 55 H01111-0e-ID-B.doc


OBID® classic-pro Manual SAMCrypto Functions

Host Reader
Depending on the DESFIRE-COMMAND and the success of the command the structure of
the reader response can vary:
STATUS = 0x00 - successful operation
1 2 3 4 (5...n-2) n-1, n
n COM-ADR [0xC3] STATUS (RESPONSE-DATA) CRC16

STATUS = 0x97 (Crypto Processing Error) - failed operation


1 2 3 4 5 7...8 9, 10
ERROR ERROR
10 COM-ADR [0xC3] STATUS CRC16
SOURCE CODE

STATUS = all other values - failed operation


1 2 3 4 5, 6
6 COM-ADR [0xC3] STATUS CRC16

DESFIRE-COMMAND
This Sub-Command specifics the operation which shall be performed by the reader for data
exchange.
The command bytes are in most cases similar to the original DESFire commands.

MODE:
Bit: 7 6 5 4 3 2 1 0
Function 0 0 0 0 0 0 0 SAM

SAM:
b1: SAM is used for Encryption/Decryption

SLOT:
This parameter specifies the Slot Number where the SAM is connected.

TIMEOUT:
This parameter specifies a global timeout in steps of 100 ms. This value must be less
than the Host Interface Timeout.

FEIG ELECTRONIC GmbH Page 9 of 55 H01111-0e-ID-B.doc


OBID® classic-pro Manual SAMCrypto Functions

REQUEST-DATA
The content of the REQUEST-DATA field may vary depending on the DESFIRE-
COMMAND and is described for each DESFIRE-COMMAND separate.
The following fields are part of REQUEST-DATA of many commands and are not separate
described for each command.

AID
3 byte DESFire Application ID.
DESFire KEY-NO (0x0...0xE)
Defines the number of the key to which the authentication shall be processed on
the DESFire to get access to the data. The KEY-No on DESFire is specified in the
access rights for each file.
0x0....0xD:
DESFire Key no for enciphered access
If a data exchange with a enciphered or MACed file shall be processed
the respective KEY-NO has to used here
0xE:
DESFire Key No for free access.
This setting is possible for "read", "write" and "read&write" access rights
for each file on the card. If this setting is used for "read&write" access
rights a different key setting for "read" access rights or "write" access
rights becomes obsolete.
NOTICE:
Depending on the DESFire KEY-NO and FILE-COMM-SETTINGS different se-
curity conditions can be configured. The following table shows the possible
combinations and how the security functions are influenced by this settings.

FILE- file access conditions


DESFire
COMM- valid authentication
KEY-NO data exchange
SETTINGS required
0x00 plain
0x0...0xD 0x01 yes plain + MAC
0x03 enciphered
0x00
0xE 0x01 no plain
0x03

FILE-NO:
No of the file which should be read, written or otherwise manipulated.

FEIG ELECTRONIC GmbH Page 10 of 55 H01111-0e-ID-B.doc


OBID® classic-pro Manual SAMCrypto Functions

ISO7816 FILE ID
ISO File IDs are used for ISO/IEC 7816-4 file systems. The ISOFile ID will be used
to select the application with the ISO SELECT command, file option. The parame-
ter is optional.

FILE-COMM-SETTINGS
coding of the communication mode of the dedicated file.
0x00: plain communication
0x01: plain communication secured by MACing
0x03: fully enciphered communication

RESPONSE-DATA
The content and length of RESPONSE-DATA are varying depending on the DESFIRE-
COMMAND.
In case of read commands from ciphered files the response data are deciphered data with-
out padding bytes or CRC.
In case of MACed data the MAC is checked by the firmware. The response data doesn't in-
clude the MAC value.

ERROR-SOURCE
This byte displays the reason where a error occurred while command processing
1: Transponder:
The recognized error occurred while transponder communication.
2: SAM:
The recognized error occurred while SAM communication. The ERROR-CODE is
generated by the SAM.

ERROR-CODE:
see ANNEX A1: Crypto Processing Error, of respective reader manual.

FEIG ELECTRONIC GmbH Page 11 of 55 H01111-0e-ID-B.doc


OBID® classic-pro Manual SAMCrypto Functions

2.1.SECURITY RELATED COMMANDS

2.1.1. [0xC3] [0xFA] DESFire Authent

This command can be used to process an explicit authentication.


Host Reader
REQUEST-DATA
(1) (1) (1) (1) (1) (1) (8/16)
SAM
DESFire DESFire SAM SAM KEY
SAM KEY NO DIVINPUT DATA-LEN
AUTH MODE KEY-NO AUTH MODE VERSION
LEN

DESFire AUTH MODE


Authentication Method: 0x0A (Native DES), 0x1A (TDES/3KTDES) or 0xAA (AES)

DESFire KEY-NO
see chapter 2. [0xC3] Flexible commands for DESFire Communication with SAM

SAM AUTH MODE


Bit: 7 6 5 4 3 2 1 0
Function - - - - EncRnds - KeySel KeyDiv

KeyDiv:
b0: no key diversification
b1: key diversified with 8 or 16 bytes SAM DIVINPUT
KeySel:
b0: key selection by key entry number
b1: key selection by DESFire key number
EncRnds:
b0: diversifying using two encryption rounds [only 3DES Key]
b1: diversifying using one encryption round [only 3DES Key]
b0: RFU (reserved for future use) for 3keyTDES Key or AES Key.

FEIG ELECTRONIC GmbH Page 12 of 55 H01111-0e-ID-B.doc


OBID® classic-pro Manual SAMCrypto Functions

SAM KEY NO
SAM_SelectApplication sent before:
DESFire key number (0x00…0x0D)
No SAM_SelectApplication sent before:
key reference number of key entry (0x00…0x7F)

SAM KEY VERSION


key version of keyNo (0x00…0xFF)

SAM DIVINPUT LEN


Length of the following diversification input: 8 (3DES) or 16 (AES).

SAM DIVINPUT
8 (3DES) or 16 (AES) bytes diversification input.

FEIG ELECTRONIC GmbH Page 13 of 55 H01111-0e-ID-B.doc


OBID® classic-pro Manual SAMCrypto Functions

2.1.2. [0xC3] [0x54] DESFire Change Key Settings

The DESFire Change Key Settings command changes the master key configuration settings de-
pending on the addressed AID. Depending on the used parameters the reader performs ciphering,
padding and all further calculations which are necessary to write ciphered or MACed data.
Host Reader
REQUEST-DATA
(1)
NEW KEY
SETTINGS

NEW-KEY-SETTINGS
This parameter contains the new key settings of the via AID addressed application.
Depending on the selected AID the PICC master key setting or the application master key
settings can be changed.
AID = 0 The PICC Masterkey can changed.
AID > 0 The address application master key settings can changed.

FEIG ELECTRONIC GmbH Page 14 of 55 H01111-0e-ID-B.doc


OBID® classic-pro Manual SAMCrypto Functions

2.1.3. [0xC3] [0x45] DESFire Get Key Settings

This command can be used to get configuration information about the PICC and Application Master
Key Settings. In addition the maximum number of keys which can be stored within the selected ap-
plication is returned.
Host Reader
REQUEST-DATA
NO REQUEST-DATA NECESSARY

FEIG ELECTRONIC GmbH Page 15 of 55 H01111-0e-ID-B.doc


OBID® classic-pro Manual SAMCrypto Functions

2.1.4. [0xC3] [0xC4] DESFire Change Key

The DESFire Change Key command allows to change any key stored on the DESFire. Depending
on the used parameters the reader performs the authentication, ciphering, padding and all further
calculations which are necessary to write ciphered or MACed data.
Host Reader
REQUEST-DATA
(1) (1) (1) (1) (1) (1) (1) (8/16)
SAM KEY
SAM KEY SAM KEY NO SAM KEY SAM KEY SAM
VERSION SAM
COMP SAM CFG CURRENT NO NEW VERSION DIVINPUT
CURRENT DIVINPUT
METHOD KEY KEY NEW KEY LEN
KEY

SAM KEY COMP METHOD


key compilation method (0x00…0x1F)

SAM CFG
Bit: 7 6 5 4 3 2 1 0
Function - - - CMK KEY-NO-TB-CHANGED

CMK: b0: any other key, but not the DESFire8 card master key
shall be changed.
b1: the DESFire8 card master key shall be changed
KEY-NO-TB-CHANGED: Number of DESFire key to be changed

SAM KEY NO CURRENT KEY


1 byte unsigned key entry holding the current key (0x00…0x7F)

SAM KEY VERSION CURRENT KEY


1 byte unsigned key version of the current key (0x00…0xFF)

SAM KEY NO NEW KEY


1 byte unsigned key entry holding the new key (0x00…0x7F)

SAM KEY VERSION NEW KEY


1 byte unsigned key version of the new key (0x00…0xFF)

FEIG ELECTRONIC GmbH Page 16 of 55 H01111-0e-ID-B.doc


OBID® classic-pro Manual SAMCrypto Functions

SAM DIVINPUT LEN


Length of the following diversification input: 8 (3DES) or 16 (AES).

SAM DIVINPUT
8 (3DES) or 16 (AES) bytes diversification input.

FEIG ELECTRONIC GmbH Page 17 of 55 H01111-0e-ID-B.doc


OBID® classic-pro Manual SAMCrypto Functions

2.2.PICC LEVEL COMMANDS

PICC LEVEL FLAGS:

Bit: 7 6 5 4 3 2 1 0
Function - - - - - - ISO7816 ISO7816
DF NAME FILE ID

ISO7816 FILE ID: 0: No ISO7816 File ID used


1: ISO7816 File ID used

ISO 7816 DF NAME: 0: No ISO7816 DF Name used


1: ISO7816 DF Name used

FEIG ELECTRONIC GmbH Page 18 of 55 H01111-0e-ID-B.doc


OBID® classic-pro Manual SAMCrypto Functions

2.2.1. [0xC3] [0xCA] DESFire Create Application

This command allows to create new applications on the DESFire PICC.


Host Reader
REQUEST-DATA

(1) (3) (1) (1)


PICC LEVEL KEY KEY 
AID
FLAGS SETTINGS 1 SETTINGS 2
LSB MSB

(2) (1) (1…16)


ISO7816 FILE ISO7816 DF ISO 7816 DF

ID NAME LEN NAME
[optional] [optional] [optional]

PICC LEVEL FLAGS


see chapter 2.2.PICC LEVEL COMMANDS
AID
see chapter 2. [0xC3] Flexible commands for DESFire Communication with SAM

KEY SETTINGS 1
Application Master Key Settings
Bit: 7 6 5 4 3 2 1 0
Function CHANGE KEY ACCESS RIGHTS CFG FREE FREE PMK
CHANGE CREATE_ DIRECTO CHANGE
ABLE DELETE RY ABLE
ACCESS
Bit 3 Bit 0

CHANGE KEY ACCESS RIGHTS:


0x0: Application master key authentication is necessary to change any key (de-
fault setting).
0x1…0xD: Authentication with the specified key is necessary to change any
key. A change Key or a PICC master key can only be changed after au-
thentication with the master key. For keys other than the master or the
change key, an authentication with the same key is needed.
0xE: Authentication with the key to be changed (same keyNo) is necessary to
change a key.
0xF: All keys (except application master key, see Bit0) within this application
are frozen.

FEIG ELECTRONIC GmbH Page 19 of 55 H01111-0e-ID-B.doc


OBID® classic-pro Manual SAMCrypto Functions

PICC Master Key Settings


Bit: 7 6 5 4 3 2 1 0
Function - - - - CFG FREE FREE PMK
CHANGE CREATE_ DIRECTO CHANGE
ABLE DELETE RY ABLE
ACCESS

CFG CHANGEABLE:
b0: configuration not changeable anymore (frozen)
b1: this configuration is changeable if authenticated with the PICC master key
(default setting)
FREE CREATE_DELETE:
b0: Create Application / Delete Application is permitted only with PICC master
key authentication.
b1: Create Application is permitted without PICC master key authentication.
Delete Application requires an authentication with PICC master key or ap-
plication master key. (default setting)
FREE DIRECTORY ACCESS:
b0: Successful PICC master key authentication is required for executing the
GetApplicationIDs and KetKeySettings commands.
b1: GetApplicationIDs, GetDFNames and GetKeySettings commands suc-
ceed independently of a preceding PICC master key authentication. (de-
fault setting)
PMK CHANGEABLE:
b0: PICC Master Key is not changeable anymore (frozen).
b1: PICC Master Key is changeable (authentication with the current PICC
master key necessary) default setting)

KEY SETTINGS 2
Bit: 7 6 5 4 3 2 1 0
Function CRYPT ISO7816 - NO OF KEYS

CRYPT:
b00: specifies DES and 3DES operation for the whole application
b01: specifies 3K3DES operation for the whole application
b10: specifies AES operation for the whole application
ISO7816:
b00: NO 2 Byte File Identifiers for files within the application supported
b01: 2 Byte File Identifiers for files within the application supported

FEIG ELECTRONIC GmbH Page 20 of 55 H01111-0e-ID-B.doc


OBID® classic-pro Manual SAMCrypto Functions

NO OF KEYS:
Number of keys that can be stored within the application for cryptographic purpos-
es. A maximum of 14 keys can be stored within an application of DESFire.

ISO7816 FILE ID
see chapter 2. [0xC3] Flexible commands for DESFire Communication with SAM
ISO7816 DF NAME LEN
Length of the ISO7816 DF NAME (0.00…0x10). The parameter is optional.

ISO7816 DF NAME
DF-name is used in ISO7816 mode in combination with the ISO SELECT command. The
parameter is optional.

FEIG ELECTRONIC GmbH Page 21 of 55 H01111-0e-ID-B.doc


OBID® classic-pro Manual SAMCrypto Functions

2.2.2. [0xC3] [0xDA] DESFire Delete Application

This command allows to permanently deactivate applications on the DESFire PICC.


Host Reader
REQUEST-DATA
(1) (3)
PICC LEVEL
AID
FLAGS
LSB MSB

PICC LEVEL FLAGS


see chapter 2.2.PICC LEVEL COMMANDS
AID
see chapter 2. [0xC3] Flexible commands for DESFire Communication with SAM

FEIG ELECTRONIC GmbH Page 22 of 55 H01111-0e-ID-B.doc


OBID® classic-pro Manual SAMCrypto Functions

2.2.3. [0xC3] [0x6A] DESFire Get Application IDs

This command returns the Application Identifiers of all active applications on the DESFire PICC.
Host Reader
REQUEST-DATA
(1)
PICC LEVEL
FLAGS

PICC LEVEL FLAGS


see chapter 2.2.PICC LEVEL COMMANDS

FEIG ELECTRONIC GmbH Page 23 of 55 H01111-0e-ID-B.doc


OBID® classic-pro Manual SAMCrypto Functions

2.2.4. [0xC3] [0x6D] DESFire Get DF Names

This command returns the ISO/IEC 7816-4 DF-Names of all active applications on the DESFire
PICC.
Host Reader
REQUEST-DATA
(1)
PICC LEVEL
FLAGS

PICC LEVEL FLAGS


see chapter 2.2.PICC LEVEL COMMANDS

FEIG ELECTRONIC GmbH Page 24 of 55 H01111-0e-ID-B.doc


OBID® classic-pro Manual SAMCrypto Functions

2.2.5. [0xC3] [0x5A] DESFire Select Application

This command allows to select one specific application for further access.
Host Reader
REQUEST-DATA
(1) (3)
PICC LEVEL
AID
FLAGS
LSB MSB

PICC LEVEL FLAGS


see chapter 2.2.PICC LEVEL COMMANDS

AID
see chapter 2. [0xC3] Flexible commands for DESFire Communication with SAM

FEIG ELECTRONIC GmbH Page 25 of 55 H01111-0e-ID-B.doc


OBID® classic-pro Manual SAMCrypto Functions

2.2.6. [0xC3] [0xFC] DESFire Format PICC

This command can be used to release the user memory of the DESFire PICC.
Host Reader
REQUEST-DATA
(1)
PICC LEVEL
FLAGS

PICC LEVEL FLAGS


see chapter 2.2.PICC LEVEL COMMANDS

FEIG ELECTRONIC GmbH Page 26 of 55 H01111-0e-ID-B.doc


OBID® classic-pro Manual SAMCrypto Functions

2.2.7. [0xC3] [0x60] DESFire Get Version

This command can be used to get the manufacturing related data of the DESFire PICC.
Host Reader
REQUEST-DATA
(1)
PICC LEVEL
FLAGS

PICC LEVEL FLAGS


see chapter 2.2.PICC LEVEL COMMANDS

FEIG ELECTRONIC GmbH Page 27 of 55 H01111-0e-ID-B.doc


OBID® classic-pro Manual SAMCrypto Functions

2.2.8. [0xC3] [0x6E] DESFire Free Mem

This command can be used to get the free memory in bytes of the DESFire PICC.
Host Reader
REQUEST-DATA
(1)
PICC LEVEL
FLAGS

PICC LEVEL FLAGS


see chapter 2.2.PICC LEVEL COMMANDS

FEIG ELECTRONIC GmbH Page 28 of 55 H01111-0e-ID-B.doc


OBID® classic-pro Manual SAMCrypto Functions

2.2.9. [0xC3] [0x5C] DESFire Set Configuration

Master Key authentication on card level needs to be performed prior to the command. This com-
mand can be used to set the configuration of the DESFire PICC.
Host Reader
REQUEST-DATA
(1) (1)
PICC LEVEL OPTION
FLAGS

(1)
OPTION: 0x00
CONFIG

0x01 (1) (24)


DEFAULT KEY DEFAULT KEY
VERSION

0x02 (5…20)
USER DEFINED ATS

PICC LEVEL FLAGS


see chapter 2.2.PICC LEVEL COMMANDS

CONFIG
Bit: 7 6 5 4 3 2 1 0
Function - - - - - - RANDOM FORMAT
ID CARD

RANDOM ID:
0: Format Card enabled
1: Format Card disabled (cannot be reset)
FORMAT CARD:
0: Random UID disabled
1: Random UID enabled (cannot be reset)

DEFAULT KEY VERSION


Default Key Version

FEIG ELECTRONIC GmbH Page 29 of 55 H01111-0e-ID-B.doc


OBID® classic-pro Manual SAMCrypto Functions

DEFAULT KEY
Default key, if shorter than 24 bytes only the left most bytes will be used.

USER DEFINED ATS


User defined ATS parameter; the ATS string that is returned after the RATS excluding the
ATS CRC1 and CRC2 bytes. Only the length of the string is checked (20); but no other ve-
rification of the ATS string is performed. Therefore the data string must be formatted in the
following: TL T0 TA TB TC + Historical Bytes.

FEIG ELECTRONIC GmbH Page 30 of 55 H01111-0e-ID-B.doc


OBID® classic-pro Manual SAMCrypto Functions

2.2.10. [0xC3] [0x51] DESFire Get Card UID

This command is only applicable if the DESFire PICC uses random UIDS.
An authentication with any key needs to be performed prior to the command. This command returns
the UID and gives the opportunity to retrieve the UID, even if the random ID is used.
Host Reader
REQUEST-DATA
(1)
PICC LEVEL
FLAGS

PICC LEVEL FLAGS


see chapter 2.2.PICC LEVEL COMMANDS

FEIG ELECTRONIC GmbH Page 31 of 55 H01111-0e-ID-B.doc


OBID® classic-pro Manual SAMCrypto Functions

2.3.APPLICATION LEVEL COMMANDS

APPLICATION LEVEL FLAGS:

Bit: 7 6 5 4 3 2 1 0
Function - - - - - - CHANGE ISO 7816
ACCESS FILE ID
RIGHTS
KEY

ISO7816 FILE ID:


0: No ISO7816 File ID used
1: ISO7816 File ID used

CHANGE ACCESS RIGHTS KEY:


0: Valid authent Key
1: Free Access

FEIG ELECTRONIC GmbH Page 32 of 55 H01111-0e-ID-B.doc


OBID® classic-pro Manual SAMCrypto Functions

2.3.1. [0xC3] [0x6F] DESFire Get File IDs

This command returns the File Identifiers of all active files within the currently selected application.
Host Reader
REQUEST-DATA
(1)
APPLICATION
LEVEL FLAGS

APPLICATION LEVEL FLAGS


see chapter 2.3.APPLICATION LEVEL COMMANDS

FEIG ELECTRONIC GmbH Page 33 of 55 H01111-0e-ID-B.doc


OBID® classic-pro Manual SAMCrypto Functions

2.3.2. [0xC3] [0x61] DESFire Get ISO File IDs

This command returns the 2 byte ISO/IEC 7816-4 File Identifiers of all active files within the current-
ly selected application.
Host Reader
REQUEST-DATA
(1)
APPLICATION
LEVEL FLAGS

APPLICATION LEVEL FLAGS


see chapter 2.3.APPLICATION LEVEL COMMANDS

FEIG ELECTRONIC GmbH Page 34 of 55 H01111-0e-ID-B.doc


OBID® classic-pro Manual SAMCrypto Functions

2.3.3. [0xC3] [0xF5] DESFire Get File Settings

This command allows to get information on the properties of a specific file. The information provided
by this command depends on the type of the file which is queried.
Host Reader
REQUEST-DATA
(1) (1)
APPLICATION FILE NO
LEVEL FLAGS

APPLICATION LEVEL FLAGS


see chapter 2.3.APPLICATION LEVEL COMMANDS

FILE NO
see chapter 2. [0xC3] Flexible commands for DESFire Communication with SAM

FEIG ELECTRONIC GmbH Page 35 of 55 H01111-0e-ID-B.doc


OBID® classic-pro Manual SAMCrypto Functions

2.3.4. [0xC3] [0x5F] DESFire Change File Settings

The DESFire Change File Settings command changes the access rights to an existing file. Depend-
ing on the used parameters the reader performs the ciphering, padding and all further calculations
which are necessary to write ciphered or MACed data.
Host Reader
REQUEST-DATA
(1) (1) (1) (2)
NEW- NEW-FILE-
APPLICATION
FILE-NO FILE-COMM- ACCESS-
LEVEL FLAGS
SETTINGS RIGHTS
LSB MSB

APPLICATION LEVEL FLAGS


see chapter 2.3.APPLICATION LEVEL COMMANDS

FILE-NO:
see chapter 2. [0xC3] Flexible commands for DESFire Communication with SAM

NEW-FILE-COMM-SETTINGS
New coding of the communication mode of the dedicated file
0x00: plain communication
0x01: plain communication secured by MACing
0x03: Fully enciphered communication

NEW-FILE-ACCESS-RIGHTS
Byte (1) (1)
Bit: 7...........................4 3...........................0 7...........................4 3...........................0
KEY-NO Read&Write Access Change Access Read Access Write Access
Rights Rights Rights Rights

KEY-NO (0x0...0xF)
Assigns the key with which an access to the dedicated operation shall permitted.
0x0....0xD:
Key no which shall used for authentication to get the respective access.
0xE free access (no authentication is necessary to get access)
0xF: deny access (the access in denied)

FEIG ELECTRONIC GmbH Page 36 of 55 H01111-0e-ID-B.doc


OBID® classic-pro Manual SAMCrypto Functions

2.3.5. [0xC3] [0xCD] DESFire Create Standard Data File

This command is used to create files for the storage of plain unformatted user data within an exist-
ing application on the PICC.
Host Reader
REQUEST-DATA
(1) (1) (2) (1) (2) (3)
FILE- FILE-
APPLICATION ISO7816
FILE-NO COMM- ACCESS- FILE SIZE
LEVEL FLAGS FILE ID
SETTINGS RIGHTS
[optional] LSB MSB LSB MSB

APPLICATION LEVEL FLAGS


see chapter 2.3.APPLICATION LEVEL COMMANDS

FILE-NO
see chapter 2. [0xC3] Flexible commands for DESFire Communication with SAM

ISO7816 FILE ID
see chapter 2. [0xC3] Flexible commands for DESFire Communication with SAM

FILE-COMM-SETTINGS
see chapter 2. [0xC3] Flexible commands for DESFire Communication with SAM

FILE-ACCESS-RIGHTS
see chapter 2. [0xC3] Flexible commands for DESFire Communication with SAM

FILE SIZE
This parameter specifies the size of the file in bytes.

FEIG ELECTRONIC GmbH Page 37 of 55 H01111-0e-ID-B.doc


OBID® classic-pro Manual SAMCrypto Functions

2.3.6. [0xC3] [0xCB] DESFire Create Backup Data File

This command is used to create files for the storage of plain unformatted user data within an exist-
ing application on the PICC, additionally supporting the feature of an integrated backup mechanism.
Host Reader
REQUEST-DATA
(1) (1) (2) (1) (2) (3)
FILE- FILE-
APPLICATION ISO7816
FILE-NO COMM- ACCESS- FILE SIZE
LEVEL FLAGS FILE ID
SETTINGS RIGHTS
[optional] LSB MSB LSB MSB

APPLICATION LEVEL FLAGS


see chapter 2.3.APPLICATION LEVEL COMMANDS

FILE-NO
see chapter 2. [0xC3] Flexible commands for DESFire Communication with SAM

ISO7816 FILE ID
see chapter 2. [0xC3] Flexible commands for DESFire Communication with SAM

FILE-COMM-SETTINGS
see chapter 2. [0xC3] Flexible commands for DESFire Communication with SAM

FILE-ACCESS-RIGHTS
see chapter 2. [0xC3] Flexible commands for DESFire Communication with SAM

FILE SIZE
This parameter specifies the size of the file in bytes.

FEIG ELECTRONIC GmbH Page 38 of 55 H01111-0e-ID-B.doc


OBID® classic-pro Manual SAMCrypto Functions

2.3.7. [0xC3] [0xCC] DESFire Create Value File

This command is used to create files for the storage and manipulation of 32bit signed integer values
within an existing application on the PICC.
Host Reader
REQUEST-DATA
(1) (1) (1) (2) (4) (4) (4) (1)
FILE- FILE- LIMITED
APPLICATION LOWER UPPER
FILE-NO COMM- ACCESS- VALUE CREDIT
LEVEL FLAGS LIMIT LIMIT
SETTINGS RIGHTS ENABLED
LSB MSB LSB MSB LSB MSB LSB MSB

APPLICATION LEVEL FLAGS


see chapter 2.3.APPLICATION LEVEL COMMANDS

FILE-NO
see chapter 2. [0xC3] Flexible commands for DESFire Communication with SAM
FILE-COMM-SETTINGS
see chapter 2. [0xC3] Flexible commands for DESFire Communication with SAM

FILE-ACCESS-RIGHTS
see chapter 2. [0xC3] Flexible commands for DESFire Communication with SAM

LOWER LIMIT
The lower limit marks the boundary which must not be passed by a Debit calculation on the
current value. The LOWER LIMIT is a 4 byte signed integer and thus may be negative too.

UPPER LIMIT
The lower limit marks the boundary which must not be passed by a Credit calculation on the
current value. The UPPER LIMIT is a 4 byte signed integer and thus may be negative too.

VALUE
VALUE is a 4 byte signed integer and specifies the initial value.

LIMITED CREDIT ENABLED


Bit: 7 6 5 4 3 2 1 0

FEIG ELECTRONIC GmbH Page 39 of 55 H01111-0e-ID-B.doc


OBID® classic-pro Manual SAMCrypto Functions

Function FREE LIMITED


GET CREDIT
VALUE

LIMITED CREDIT: b0: Limited Credit feature disabled


b1: Limited Credit feature enabled
FREE GET VALUE: b0: Free Get Value feature disabled
b1: Free Get Value feature enabled

FEIG ELECTRONIC GmbH Page 40 of 55 H01111-0e-ID-B.doc


OBID® classic-pro Manual SAMCrypto Functions

2.3.8. [0xC3] [0xC1] DESFire Create Linear Record File

This command is used to create files for multiple storage of structural data, for example for loyality
programs, within an existing application on the PICC. Once the file is filled completely with data
records,further writing to the file is not possible unless it is cleared, see “DESFire Clear Records”
command.
Host Reader
REQUEST-DATA
(1) (1) (2) (1) (2) (3) (3)
FILE- FILE- MAX NUM
APPLICATION ISO7816 RECORD
FILE-NO COMM- ACCESS- OF
LEVEL FLAGS FILE ID SIZE
SETTINGS RIGHTS RECORDS
[optional] LSB MSB LSB MSB LSB MSB

APPLICATION LEVEL FLAGS


see chapter 2.3.APPLICATION LEVEL COMMANDS

FILE-NO
see chapter 2. [0xC3] Flexible commands for DESFire Communication with SAM

ISO7816 FILE ID
see chapter 2. [0xC3] Flexible commands for DESFire Communication with SAM

FILE-COMM-SETTINGS
see chapter 2. [0xC3] Flexible commands for DESFire Communication with SAM

FILE-ACCESS-RIGHTS
see chapter 2. [0xC3] Flexible commands for DESFire Communication with SAM

RECORD SIZE
This parameter specifies the size of one single record in bytes.

MAX NUM OF RECORDS


This parameter specifies the number of records.

FEIG ELECTRONIC GmbH Page 41 of 55 H01111-0e-ID-B.doc


OBID® classic-pro Manual SAMCrypto Functions

2.3.9. [0xC3] [0xC0] DESFire Create Cyclic Record File

This command is used to create files for multiple storage of structural data, for example for logging
transactions, within an existing application on the PICC. Once the file is filled completely with data
records, the PICC automatically overwrites the oldest record with the latest written one.
Host Reader
REQUEST-DATA
(1) (1) (2) (1) (2) (3) (3)
FILE- FILE- MAX NUM
APPLICATION ISO7816 RECORD
FILE-NO COMM- ACCESS- OF
LEVEL FLAGS FILE ID SIZE
SETTINGS RIGHTS RECORDS
[optional] LSB MSB LSB MSB LSB MSB

APPLICATION LEVEL FLAGS


see chapter 2.3.APPLICATION LEVEL COMMANDS

FILE-NO
see chapter 2. [0xC3] Flexible commands for DESFire Communication with SAM

ISO7816 FILE ID
see chapter 2. [0xC3] Flexible commands for DESFire Communication with SAM

FILE-COMM-SETTINGS
see chapter 2. [0xC3] Flexible commands for DESFire Communication with SAM

FILE-ACCESS-RIGHTS
see chapter 2. [0xC3] Flexible commands for DESFire Communication with SAM

RECORD SIZE
This parameter specifies the size of one single record in bytes.

MAX NUM OF RECORDS


This parameter specifies the number of records.

FEIG ELECTRONIC GmbH Page 42 of 55 H01111-0e-ID-B.doc


OBID® classic-pro Manual SAMCrypto Functions

2.3.10. [0xC3] [0xDF] DESFire Delete File

This command permanently deactivates a file within the file directory of the currently selected appli-
cation.
Host Reader
REQUEST-DATA
(1) (1)
APPLICATION FILE NO
LEVEL FLAGS

APPLICATION LEVEL FLAGS


see chapter 2.3.APPLICATION LEVEL COMMANDS

FILE NO
see chapter 2. [0xC3] Flexible commands for DESFire Communication with SAM

FEIG ELECTRONIC GmbH Page 43 of 55 H01111-0e-ID-B.doc


OBID® classic-pro Manual SAMCrypto Functions

2.4.DATA MANIPULATION COMMANDS

DATA MANIPULATION FLAGS:

Bit: 7 6 5 4 3 2 1 0
Function - - - - - - - FREE
ACCESS

FREE ACCESS: 0: Valid authentication necessary


1: Free access to file without previous authentication

FEIG ELECTRONIC GmbH Page 44 of 55 H01111-0e-ID-B.doc


OBID® classic-pro Manual SAMCrypto Functions

2.4.1. [0xC3] [0xBD] DESFire Read Standard Data

The DESFire Read Standard Data command allows the read form DESFire standard data files or
backup data files. Depending on the used parameters the reader performs CRC and CMAC check-
ing and deciphering of the data to be read as well as chaining.
Host Reader
REQUEST-DATA
(1) (1) (1) (3) (3)
DATA
FILE-COMM-
MANIPULATI FILE-NO FILE-OFFSET DATA-LEN
SETTINGS
ON FLAGS
LSB MSB LSB MSB

DATA MANIPULATION FLAGS


see chapter see chapter 2. [0xC3] Flexible commands for DESFire Communication with
SAM
2.4.DATA MANIPULATION COMMANDS

FILE-NO:
see chapter 2. [0xC3] Flexible commands for DESFire Communication with SAM

FILE-COMM-SETTTINGS
see chapter 2. [0xC3] Flexible commands for DESFire Communication with SAM

FILE-OFFSET
Defines the byte position within the file where the read process shall start.

DATA-LEN (1 ... 1024 Byte):


Defines the number of bytes which shall be read.

FEIG ELECTRONIC GmbH Page 45 of 55 H01111-0e-ID-B.doc


OBID® classic-pro Manual SAMCrypto Functions

2.4.2. [0xC1] [0x3D] DESFire Write Standard Data

The DESFire Write Standard Data command allows to write to DESFire standard data files or back-
up data files. Depending on the used parameters the reader performs ciphering, padding and all
further calculations which are necessary to write ciphered or MACed data as well as chaining.
To write data to a backup data file the DESFire commit transaction command has to be performed
by the user application after DESFire Write Standard Data command.
Host Reader
REQUEST-DATA
(1) (1) (1) (3) (3) (1…1024)
DATA
FILE-COMM-
MANIPULATI FILE-NO FILE-OFFSET DATA-LEN DATA
SETTINGS
ON FLAGS
LSB MSB LSB MSB

DATA MANIPULATION FLAGS


see chapter see chapter 2. [0xC3] Flexible commands for DESFire Communication with
SAM
2.4.DATA MANIPULATION COMMANDS

FILE-NO:
see chapter 2. [0xC3] Flexible commands for DESFire Communication with SAM

FILE-COMM-SETTTINGS
see chapter 2. [0xC3] Flexible commands for DESFire Communication with SAM

FILE-OFFSET
Defines the byte position within the file where the write process shall start.

DATA-LEN (0...1024)
Defines the number of bytes which shall be written.

DATA:
Data to be written.
NOTICE:
The no of data bytes to be written shall correspond with DATA-LEN.

FEIG ELECTRONIC GmbH Page 46 of 55 H01111-0e-ID-B.doc


OBID® classic-pro Manual SAMCrypto Functions

2.4.3. [0xC3] [0x6C] DESFire Get Value

The DESFire Get Value command allows to read the currently stored value from a value file. De-
pending on the used parameters the reader performs CRC and CMAC checking and deciphering of
the data to be read.
Host Reader
REQUEST-DATA
(1) (1) (1)
DATA
FILE-COMM-
MANIPULATI FILE-NO
SETTINGS
ON FLAGS

Host Reader
(4)
RESPONSE-DATA
LSB MSB

DATA MANIPULATION FLAGS


see chapter see chapter 2. [0xC3] Flexible commands for DESFire Communication with
SAM
2.4.DATA MANIPULATION COMMANDS

FILE-NO:
see chapter 2. [0xC3] Flexible commands for DESFire Communication with SAM

FILE-COMM-SETTTINGS
see chapter 2. [0xC3] Flexible commands for DESFire Communication with SAM

FEIG ELECTRONIC GmbH Page 47 of 55 H01111-0e-ID-B.doc


OBID® classic-pro Manual SAMCrypto Functions

2.4.4. [0xC3] [0x0C] DESFire Credit

The DESFire Credit command allows to increase the value stored in a value file. Depending on the
used parameters the reader performs ciphering, padding and all further calculations which are ne-
cessary to write ciphered or MACed data.
Host Reader
REQUEST-DATA
(1) (1) (1) (4)
DATA
FILE-COMM-
MANIPULATI FILE-NO CREDIT-VALUE
SETTINGS
ON FLAGS
LSB MSB

DATA MANIPULATION FLAGS


see chapter see chapter 2. [0xC3] Flexible commands for DESFire Communication with
SAM
2.4.DATA MANIPULATION COMMANDS

FILE-NO:
see chapter 2. [0xC3] Flexible commands for DESFire Communication with SAM

FILE-COMM-SETTTINGS
see chapter 2. [0xC3] Flexible commands for DESFire Communication with SAM

CREDIT-VALUE
Value which shall added to the value stored in the value file.

FEIG ELECTRONIC GmbH Page 48 of 55 H01111-0e-ID-B.doc


OBID® classic-pro Manual SAMCrypto Functions

2.4.5. [0xC3] [0xDC] DESFire Debit

The DESFire DEbit command allows to decrease the value stored in a value file. Depending on the
used parameters the reader performs ciphering, padding and all further calculations which are ne-
cessary to write ciphered or MACed data.
Host Reader
REQUEST-DATA
(1) (1) (1) (4)
DATA
FILE-COMM-
MANIPULATI FILE-NO DEBIT-VALUE
SETTINGS
ON FLAGS
LSB MSB

DATA MANIPULATION FLAGS


see chapter see chapter 2. [0xC3] Flexible commands for DESFire Communication with
SAM
2.4.DATA MANIPULATION COMMANDS

FILE-NO:
see chapter 2. [0xC3] Flexible commands for DESFire Communication with SAM

FILE-COMM-SETTTINGS
see chapter 2. [0xC3] Flexible commands for DESFire Communication with SAM

DEBIT-VALUE
Value which shall subtracted from the value stored in the value file.

FEIG ELECTRONIC GmbH Page 49 of 55 H01111-0e-ID-B.doc


OBID® classic-pro Manual SAMCrypto Functions

2.4.6. [0xC3] [0x1C] DESFire Limited Credit

The DESFire Credit command allows a limited increase of a value stored in a value file without hav-
ing full Read&Write permissions to the file. Depending on the used parameters the reader performs
ciphering, padding and all further calculations which are necessary to write ciphered or MACed data.
Host Reader
REQUEST-DATA
(1) (1) (1) (4)
DATA
FILE-COMM-
MANIPULATI FILE-NO CREDIT-VALUE
SETTINGS
ON FLAGS
LSB MSB

DATA MANIPULATION FLAGS


see chapter see chapter 2. [0xC3] Flexible commands for DESFire Communication with
SAM
2.4.DATA MANIPULATION COMMANDS

FILE-NO:
see chapter 2. [0xC3] Flexible commands for DESFire Communication with SAM

FILE-COMM-SETTTINGS
see chapter 2. [0xC3] Flexible commands for DESFire Communication with SAM

CREDIT-VALUE
Value which shall added to the value stored in the value file.

FEIG ELECTRONIC GmbH Page 50 of 55 H01111-0e-ID-B.doc


OBID® classic-pro Manual SAMCrypto Functions

2.4.7. [0xC3] [0x3B] DESFire Write Records

The DESFire Write Records command allows to write data to a record in a cyclic or linear record file.
Depending on the used parameters the reader performs ciphering, padding and all further calcula-
tions which are necessary to write ciphered or MACed data.
Host Reader
REQUEST-DATA
(1) (1) (1) (3) (3) (1…1024)
DATA
FILE-COMM-
MANIPULATI FILE-NO FILE-OFFSET DATA-LEN DATA
SETTINGS
ON FLAGS
LSB MSB LSB MSB

DATA MANIPULATION FLAGS


see chapter see chapter 2. [0xC3] Flexible commands for DESFire Communication with
SAM
2.4.DATA MANIPULATION COMMANDS

FILE-NO:
see chapter 2. [0xC3] Flexible commands for DESFire Communication with SAM

FILE-COMM-SETTTINGS
see chapter 2. [0xC3] Flexible commands for DESFire Communication with SAM

FILE-OFFSET
Defines the byte position within the file where the write process shall start.

DATA-LEN (0...1024)
Defines the number of bytes which shall be written.

DATA:
Data to be written.

NOTICE:
The no of data bytes to be written shall correspond with DATA-LEN.

FEIG ELECTRONIC GmbH Page 51 of 55 H01111-0e-ID-B.doc


OBID® classic-pro Manual SAMCrypto Functions

2.4.8. [0xC3] [0xBB] DESFire Read Records

The DESFire Read Read Records command allows the read out a set of complete records form
cyclic or linear record file. Depending on the used parameters the reader performs CRC and CMAC
checking and deciphering of the data to be read as well as chaining.
Host Reader
REQUEST-DATA
(1) (1) (1) (3) (3) (3)
DATA
FILE-COMM- RECORD- NO- OF- RECORD-
MANIPULATI FILE-NO
SETTINGS OFFSET RECORDS SIZE
ON FLAGS
LSB MSB LSB MSB LSB MSB

DATA MANIPULATION FLAGS


see chapter see chapter 2. [0xC3] Flexible commands for DESFire Communication with
SAM
2.4.DATA MANIPULATION COMMANDS

FILE-NO:
see chapter 2. [0xC3] Flexible commands for DESFire Communication with SAM

FILE-COMM-SETTTINGS
s see chapter 2. [0xC3] Flexible commands for DESFire Communication with SAM

RECORD-OFFSET
Defines the record number within the file where the read process shall start.

NO-OF-RECORDS:
Defines the number of records which shall be read.

RECORD-SIZE
Defines the number of byte of one record which shall be read.

NOTICE:
The NO-OF-RECORDS multiplied with RECORD-SIZE shall be less than 1024 Byte.
(NO-OF-RECORDS * RECORD-SIZE 1024)

FEIG ELECTRONIC GmbH Page 52 of 55 H01111-0e-ID-B.doc


OBID® classic-pro Manual SAMCrypto Functions

2.4.9. [0xC3] [0xEB] DESFire Clear Record File

The DESFire Clear Record File command allows to reset a cyclic or linear record file to the empty
state.
Host Reader
REQUEST-DATA
(1) (1) (1)
DATA
FILE-COMM-
MANIPULATI FILE-NO
SETTINGS
ON FLAGS

DATA MANIPULATION FLAGS


see chapter see chapter 2. [0xC3] Flexible commands for DESFire Communication with
SAM
2.4.DATA MANIPULATION COMMANDS

FILE-NO:
see chapter 2. [0xC3] Flexible commands for DESFire Communication with SAM

FILE-COMM-SETTTINGS
see chapter 2. [0xC3] Flexible commands for DESFire Communication with SAM

FEIG ELECTRONIC GmbH Page 53 of 55 H01111-0e-ID-B.doc


OBID® classic-pro Manual SAMCrypto Functions

2.4.10. [0xC3] [0xC7] DESFire Commit Transaction

The DESFire Commit Transaction command allows to validate all previous write access on Backup
Data Files, Value Files and Record Files within one application.
Host Reader
REQUEST-DATA
(1)
DATA
MANIPULATI
ON FLAGS

DATA MANIPULATION FLAGS


see chapter see chapter 2. [0xC3] Flexible commands for DESFire Communication with
SAM
2.4.DATA MANIPULATION COMMANDS

FEIG ELECTRONIC GmbH Page 54 of 55 H01111-0e-ID-B.doc


OBID® classic-pro Manual SAMCrypto Functions

2.4.11. [0xC3] [0xA7] DESFire Abort Transaction

The DESFire Abort Transaction command allows to invalidate all previous write access on Backup
Data Files, Value Files and Record Files within one application.
Host Reader
REQUEST-DATA
(1)
DATA
MANIPULATI
ON FLAGS

DATA MANIPULATION FLAGS


see chapter see chapter 2. [0xC3] Flexible commands for DESFire Communication with
SAM
2.4.DATA MANIPULATION COMMANDS

FEIG ELECTRONIC GmbH Page 55 of 55 H01111-0e-ID-B.doc

You might also like