SmartCard API for .NET

SmartCardAPI Version History

This section contains important information about SmartCardAPI version history.  Minor releases and hot fixes are not listed here.

The current version of SmartCard API (Professional) is: 5.0.17.x

Version 5.0.17.602 (rev 02JUN2017)

  • replaces public release 4.9.6.0811
  • new: all assemblies are built against .NET framework version 4
  • new: HelloCard.Console sample to make it even easier to become familiar with SmartCardAPI
  • new: CardModule.MemoryCard to access synchronous cards on HID OMNIKEY readers (Xchip and Aviator support)
  • new: CardModule.NfcTag to access Mifare Ultralight, NTAG
  • new: HID iCLASS support via OMNIKEY 5022 and OMNIKEY 5×27 CK readers (avail. upon request)
  • new: move CAC specific sample code to HelloCAC sample code
  • new: Windows Help file now also available as PDF document “SmartCardApi.ApiDoc.pdf”
  • new: version info reflects year, month and day it was built; 5.0.17.602 stands for version 5.0 built 02JUN2017

Version 4.9.6.0811 (rev.18AUG2015)

  • replaces public release 4.9.3.1030
  • fix: broken links to CardModule and SmartCardAPI references in HelloPIV sample code
  • fix: introduce ReaderModules, DataModules, SecurityModules for better code separation
  • new: ReaderModule.Omnikey to support memory cards and iCLASS cards via OMNIKEY proprietary DLLs & APDUs
  • new: DataModule.Wiegand for greatly improved PACS card decoding of raw Wiegand data
  • new: CardModule.HID.PROX to access HID PROX cards on HID OMNIKEY readers
  • new: CardModule.HID.ICLASS to access HID iCLASS cards on HID OMNIKEY 5×21 readers (upon request)
  • new: CardModule.Mifare to access NXP Mifare classic cards on PC/SC part 3 compliant contactless card readers
  • fix: introduce 0x648x SW for readers that respond with I/O errors to unsupported commands
  • new: all modules are built with strong names
  • new: sample: HelloiCLASS (upon request)
  • new: GetInstructionName() supports PC/SC part 3 instruction name
  • change: HelloSyncAPI renamed to HelloMemoryCard
  • change: new installer
  • new: using Doxygen to generate API documentation
  • new: API documentation available in PDF format

Version 4.9.3.1030 (rev.30OCT2014)

  • replaces public release 4.9.2.0
  • fix: support card terminals that return unexpected PC/SC errors with some attribute requests
  • new: CardModule.xxx built with strong names

Version 4.9.2.0 (rev.02JAN2014)

  • replaces public release 4.9.0.1
  • fix: EndTransaction accepts if card or reader handle are already null (no more exception thrown)
  • new: iCLASS PACS bit access via OMNIKEY 5×21 and sync API
  • new: sample code with transaction protection
  • new: sample programs handle reader, smart card service recovery
  • new: HelloProx support for OMNIKEY 5427 CK multi frequency reader

Version 4.9.0.1 (rev.21NOV2013)

  • replaces public release 4.8.1.0
  • new: Smartcard.dll with new terminal found event
  • new: Smartcard.dll terminal polling after singleton start until at least one terminal found
  • new: Smartcard.dll offers transaction protection
  • new: HelloPIV with protected card access
  • new: HelloProx support for OMNIKEY 5025 PROX card reader in CCID mode

Version 4.8.1.0 (rev.05AUG2013)

  • replaces public release 4.8.0.0
  • fix: Smartcard.dll: CardHex.FromArray() truncates LSB bytes causing invalid raw Wiegand data
  • new: HelloProx with CardModule.CLICS integration for PC/SC Part 3 compliant reader access

Version 4.8.0.0 (rev.15MAY2013)

  • replaces public release 4.7.2.3
  • new: Smartcard.dll: CardPcscPart3 and PCSC_PART3_XYZ constants for PC/SC 2.01 Part 3 compliant card system access
  • new: HelloPIV: GetData() now supports T=1 cards that don’t return data with the first response APDU
  • new: CardModule.CLICS with card edge for PC/SC compliant contactless storage cards. Ideal for Mifare Classic, Ultralight
  • new: HelloMifare: sample code for Mifare card now accesses care reader via CardModule.CLICS

Version 4.7.2.3 (rev.06FEB2013)

  • replaces public release 4.7.2.2
  • HelloPIV: add X509 certificate access, card capability container
  • CardModule.PIV: add PivCardCertificate() class to read and display X509 certificates
  • CardModule.PIV: add PivCardCapability() class to read and display card capability container
  • CardModule.PIV: add BER-TLV tags for PIV data all containers

Version 4.7.2.2

  • replaces public release 4.7.2.1
  • smartcard.dll: supports systems that don’t allow creation of registry.xml configuration file

Version 4.7.2.1

  • replaces public release 4.7.2.0
  • HelloPIV: DoD CACv2 support
  • CardModule.PIV/CAC: change SelectCardApplication() to SelectApplet() to be in line with PIV/CAC specs
  • setup: add HelloProx
  • setup: add link to run HelloProx
  • setup: smartcard.dll: add method to extract bit sequence from byte array to support cards with Wiegand data

Version 4.7.2.1

  • replaces public release 4.7.1.6
  • HelloPIV: DoD CAC support
  • SmartCard.dll: move PIV related code to CardModule.PIV
  • CardModule.PIV: introduce SelectCardApplication() to allow PIV module to explore TWIC/CAC cards
  • setup: fix link to SmartCardAPI documentation
  • setup: add link to run HelloCard

Version 4.7.1.6

  • replaces public release 4.7
  • HelloPIV: demonstrate PIN and printed info access
  • SmartCard.dll: stopping scardsvr triggers terminal lost event
  • HelloXYZ: SmartCard.dll reference to lib fo

Version 4.7

  • replaces public release 4.6
  • PIV card support: CHUID, FASCN, GUID,GUID
  • Sample names start with Hello
  • Add HelloCard Sample (C#, VB.NET)
  • Rename MctTrivial to HelloMct
  • Rename SimTrivial to HelloSim
  • Rename Taschenkartenleser to HelloGeldkarte

Version 4.6

No major changes. Copyrights transferred to CardWerk Technologies.

  • replaces public release 4.5

Version 4.5

  • replaces public release 4.3
  • Extended the MctTrivia sample application to also handle the new German eGK Gesundheitskarte.

Version 4.3

  • replaces public release 4.2
  • Added CardPcScTerminalBase.ATR property for easier access to the connected card’s ATR.
  • Removed methods that launch the CardTerminalConfigurator.exe.
  • Fixed problems wit MCARD API 4.0 and later.

Version 4.2

  • Ireplaces public release 4.1
  • new: property CardPcScTerminal.SharedAccess controls whether the native PC/SC card connection will be Shared or Exclusive.
  • new: REG_SZ registry value [HKLM] SharedAccess controls the default access mode. If, and only if, this registry value is “1”, then the default access mode is Shared access.

Version 4.1

  • replaces public release 4.0
  • improved: Greatly simplified the CardTerminalSlot state tracking. Now the CardTerminalSlotState enumeration only has the states Empty, Inserted and Accepted. This improves the realiability of the Card Inserted and Card Removed events. Now these events are also reliably fired when a card reader is physically disconnected or connected.
  • removed: fRetryCards parameter from CardTerminalManager.RequestCard method as this is no longer needed by the simplified card reader state tracking.
  • improved: ATR handling and added CardHandle.GetHistoricalBytes method.
  • new: CardHandle.SelectDirectory method.
  • new: overloaded CardCommandAPDU.AddData(byte) method.
  • Improved automatic GET RESPONSE handling in CardHandle class in order to deal with GSM SIM cards.
  • fix: GSM SIM status codes are correctly interpreted in CardResponseAPDU class.
  • improved CardTerminalRegistry.AutoRegisterPcSc method such that it now also automatically eliminates any entries of smart card readers that no longer exist in the system.

Version 4.0

This is a major update which new features a complete rework of the code base. The most prominent new feature is the support for PC/SC Workgroup specification 2.0.1 part 10, which includes Secure PIN Entry (SPE).

  • replaces public release 3.3
  • Support for secure PIN entry according to the PC/SC Workgroup specification 2.0.1 part 10. Secure PIN entry is supported through all means defined in this specification.
  • The previously internal class CardTerminalSlot is now public and is now the primary means for acquiring a CardHandle. Events have been changed to supply a CardTerminalSlot reference instead of a ICardTerminal reference and a slot number. Generally this makes handling card insertions and removals much more convenient and straightforward.
  • The CardCriteria class has been removed completely. Instead the CardTypes value is passed to AcquireCard and RequestCard.
  • Proprietary ACR-80 support has been removed completely. Instead it is recommended to use the standard PC/SC interface for it.
  • The CardHandle methods ReadBinary and ReadRecord now handle the SW codes 0x61xx and 0x6Cxx automatically by issuing a GET RESPONSE or re-issuing the command with the correct length byte.
  • All DLLs that make up the SmartCard API (Professional) have now been merged into a single SmartCard.dll. This eases deployment and development.
  • Many small improvements that increase the robustness.

Version 3.3

For release 3.3 the SmartCard API was made security aware. This means that it is no longer required to always have a fully trusted caller in order to access the SmartCard API. To achive this goal the following individual changes have been made:

  • replaces public release 3.2
  • new: Added AllowPartiallyTrustedCallers attribute to all assemblies and also added security permission assertions for the following permissions whereever these permissions are needed: UnmanagedCode; Reflection; FileIO access to the card terminal configuration XML file. As a result it is now possible to use the SmartCard API from .NET applications that have been deployed through the Intranet or Internet, and even from applications that are hosted inside the Internet Explorer. To make this work all assemblies of the SmartCard API must be either added to the Global Assembly Cache, or must be granted full trust based on their string name using the Microsoft .NET Configuration tool.
  • new: The card terminal registry file has been moved from the LocalApplicationData to the CommonApplicationData folder. This means that all settings are now applicable to all users. This also means that a system administrator can now set up the card readers for his users.
  • new: SmartCard API itself now only demands and asserts read access to the card terminal registry file. Only the CardTerminalConfigurator demands and asserts write access. This means that the configuration can now be protected by appropriate security policies.
  • new: CardTerminalConfigurator logging is now directed to the CommonApplicationData folder instead of “C:\”. Also, if the logging file yould not be created, then the CardTerminalConfigurator simply continues without logging.
  • fix: MCardHandle.Connect method leaves MCardHandle in an unusable state when the connection failed.
  • fix: CardTerminalRegistry.LoadRegistry does not work with empty files – XML errors in the registry file are ignored for more robust code
  • fix: The SCardException now maps the Windows error code ERROR_UNRECOGNIZED_MEDIA to SCardResponseCode.UnresponsiveCard. The error code ERROR_UNRECOGNIZED_MEDIA is returned by some readers when a card is inserted the wrong way.
  • new: CT-API card terminal number (CTN) can now be configured in the CardTerminalConfigurator.

Version 3.2

  •  replaces last public release 3.0.0.3
  • Improved compatibility with .NET Framework 2.0.
  • new: support for additional memory cards.
  • Improved CardDataObject
  • new: add CardDataObjectList for better and easier parsing of BER-TLV encoded card data.
  • Improved MctTrivia sample application.