Reputation: 115
I'm sending this apdu command to write data to a smart card:
0xFF, 0xD6, 0x00, 0x01, 0x10, 0xc, 0xc, 0xc, 0xc, 0xc, 0xc, 0xc, 0xc, 0xc, 0xc, 0xc, 0xc, 0xc, 0xc, 0xc,0xc
This is the part of the command where the data is:
0xc, 0xc, 0xc, 0xc, 0xc, 0xc, 0xc, 0xc, 0xc, 0xc, 0xc, 0xc, 0xc, 0xc, 0xc,0xc
Now how do I go about writing a larger amount of data..? for instance lets say I have a byte array of an image.. how do I write that to the smart card..?
Upvotes: -1
Views: 397
Reputation: 5333
The technical issue is well addressed by the linked question given by @vlp, (rehash: LC has to signal extended length, so it is transmitted as long-indicator 0, hi-lc, lo-lc, followed by command data field, followed by le-high, le-low) so I step a bit back.
The more basic question is: what benefit would you have storing a picture on the smart card? For a passport card surely an image and some fingerprints are useful and the tight access control for reading and modifying the picture (if allowed at all) is an essential property.
But this is a special case. Smart cards are complicated to handle and have neither exactly high communication bandwidth nor storage capacity, so an SD-type memory card may be a more appropriate approach. If security is an issue, you could store the picture in encrypted form in the cloud and use the smart card just for access to the corresponding key.
There are many similar real-world issues, like generating a digital signature over a huge data blob. While the card could compute the hash value and sign it, this approach requires to send the whole blob to the card. Most often, however, the hash is computed outside and the card just computes the signature for performance reasons.
Upvotes: 0