Extended APDU support

http://pcsclite.alioth.debian.org/ccid_extended_apdu.html

To be able to use an extended APDU you need to have:

  • A T=1 card
  • A smart card reader working in TPDU or Extended APDU

A smart card reader can work using 4 different exchange levels:

  • Character
  • TPDU
  • Short APDU
  • Short and extended APDU

The exchange level of a reader is contained in the dwFeatures field of the CCID descriptor.

You can get this information using the parse command included in the driver source code.

Character level: Only very few readers work using this method. I don't know if/how they support extended APDU.

TPDU level: With this exchange level a lot of the work is done in the driver. In particular support of extended APDU is managed by the driver and the CCID driver implements it.

Short APDU: These readers are easy to use at a driver point of view but are then limited to short APDU only. Support of extended APDU is then not possible.

Some readers claim they support short APDU only but can use extended APDU when used with the manufacturer Windows driver. Maybe the Windows driver switches the reader in TPDU mode or something similar. That is not a documented CCID feature and so is not used in my CCID driver. If you can get information on this from the reader manufacturer I may include support of extended APDU for the reader in my driver.

Short and extended APDU: Support of extended APDU is offered by the reader.

 

you can send Extended APDU in T=0 as well but for that your card must be supported "javacardx.apdu". Please refer javadoc link

Here is method to know what is supported by your card.

00 A4 04 00 <length of Card manager AID> <AID> [Select card manager]

00 20 00 00 08 <Card manager PIN> [verify card manager PIN]

00 80 F2 20 00 02 4F 00 - [get status command with P1 20] and [Executable Load Files and Executable Modules 4F00]

You will get all the package AID in response of this command then search for AID

"A0000000620209".

if available then javacardx.apdu is supported.

For more info abt "Get status" command please refer GP 2.2.1

An extended APDU is an APDU (command) with data and/or response of more than 256 bytes and up to 65536 bytes. See ISO 7816-4 for more details.

The CCID driver supports extended APDU. But this support may be limited by the smart card reader itself.

 

posted @   IAmAProgrammer  阅读(868)  评论(0编辑  收藏  举报
(评论功能已被禁用)
编辑推荐:
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
阅读排行:
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 【自荐】一款简洁、开源的在线白板工具 Drawnix
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 园子的第一款AI主题卫衣上架——"HELLO! HOW CAN I ASSIST YOU TODAY
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
历史上的今天:
2013-06-28 正则表达式语法
点击右上角即可分享
微信分享提示