What is the recommended data field size in APDU for Java maps? From the book Zhiqun Chen Java Card Technology for Smart Cards: Architecture and Programmer Guide he mentions that the Le field allows a maximum of 255.
We must interpret this as following the APDU command:
|<----------------------- 255 Bytes total ------------------------>| |<- CLA -><- INS -><- P1 -><- P2 -><- Lc -><---- DATA ----><- Le ->|
So, if CLA, INS, P1, P2, Lc, Le are all 1 bytes each, should we assume that we can safely set only 249 bytes in the DATA area?
For an APDU response, we need to understand:
|<----------------------- 258 Bytes total ------------------------>| |<-------------------------- DATA ------------------------><- SW ->|
Can the response data be safely set to 256 bytes with 2 bytes of SW and the whole response consisting of the data response, and SW - 258 bytes?
What other considerations are safe to send and receive data in chunks, given that we have to deal with situations where the chain may not be possible, and we have to manually process the data stream manually?
source share