What's the difference between APDU and TPDU?

JavaCard Applet Development Related Questions and Answers.
BirdKing
Posts: 72
Joined: Wed Nov 04, 2015 7:23 am
Points :524
Contact:

What's the difference between APDU and TPDU?

Post by BirdKing » Thu Jan 10, 2019 2:48 am

What's the difference between APDU and TPDU for javacard ?

User avatar
Ellisun
Posts: 48
Joined: Wed May 20, 2015 3:47 am
Points :448
Contact:

Re: What's the difference between APDU and TPDU?

Post by Ellisun » Mon Jan 14, 2019 5:48 am

The TPDU (Transport Protocol Data Unit) is a message encapsulation format where there are several bytes of routing header added to the front of the payload message.
The processing overhead of the TPDU has two components: the overhead TPDU and the overhead per byte.

The APDU (Application Protocol Data Unit) is the communication unit between a reader and a card. The structure of an APDU is defined by the ISO 7816 standards.
There are two categories of APDUs: command APDUs and response APDUs.

BirdKing
Posts: 72
Joined: Wed Nov 04, 2015 7:23 am
Points :524
Contact:

Re: What's the difference between APDU and TPDU?

Post by BirdKing » Sun Jan 27, 2019 8:45 am

thanks very much.
I want to implement CCID on APDU level. But I'm confused with that how to process PCB, NAD and so on ?

owlstead
Posts: 9
Joined: Sun Jan 27, 2019 10:57 am
Points :28
Contact:

Re: What's the difference between APDU and TPDU?

Post by owlstead » Sun Jan 27, 2019 5:48 pm

Yes, things like the NAD would be part of the TPDU, not the APDU. So that's not possible.

BirdKing
Posts: 72
Joined: Wed Nov 04, 2015 7:23 am
Points :524
Contact:

Re: What's the difference between APDU and TPDU?

Post by BirdKing » Mon Jan 28, 2019 7:45 am

And I need not process S block and R block too ?
Last edited by BirdKing on Mon Jan 28, 2019 7:49 am, edited 3 times in total.

BirdKing
Posts: 72
Joined: Wed Nov 04, 2015 7:23 am
Points :524
Contact:

Re: What's the difference between APDU and TPDU?

Post by BirdKing » Mon Jan 28, 2019 7:45 am

TPDU is without PCB. The S block and the R block should be absence. Oh, I'm so foolish.
But how to process the PPS?

BirdKing
Posts: 72
Joined: Wed Nov 04, 2015 7:23 am
Points :524
Contact:

Re: What's the difference between APDU and TPDU?

Post by BirdKing » Sat Feb 16, 2019 9:53 am

On APDU level, CCID has a setParamters(0x61) command to set the GT, WT and protocol. So I think it doesn't need PPS.

BirdKing
Posts: 72
Joined: Wed Nov 04, 2015 7:23 am
Points :524
Contact:

Re: What's the difference between APDU and TPDU?

Post by BirdKing » Sat Feb 16, 2019 10:06 am

On APDU level, how to process wtx or 0x60?
In CCID specification I can see "If the ICC request time extension, by using a NULL proceduce byte (0x60) in T=0 protocol or S(wtx) in T=1 prptocol, the CCID informs the host of this request." But I annot understand very well.

BirdKing
Posts: 72
Joined: Wed Nov 04, 2015 7:23 am
Points :524
Contact:

Re: What's the difference between APDU and TPDU?

Post by BirdKing » Mon Feb 25, 2019 6:26 am

On APDU level, if the 8th word of pc_to_rdr_xfrblock is 0x0010 indicates the abData field is empty. This empty xfrblock could take place of s wtx in T=1 or T=0.

BirdKing
Posts: 72
Joined: Wed Nov 04, 2015 7:23 am
Points :524
Contact:

Re: What's the difference between APDU and TPDU?

Post by BirdKing » Mon Feb 25, 2019 6:28 am

The empty xfrblock also replace the ack in extend apdu.

Post Reply Previous topicNext topic

Who is online

Users browsing this forum: No registered users and 3 guests

JavaCard OS : Disclaimer