سؤال

I am new to java card development.so far i have developed java card applet which can encrypt data using RSA algorithm. So basically i followed Application selection and send data.But now i want to reset java card before selecting the java card.Can anyone give me some brief idea how to do that??thanks Sajith.

هل كانت مفيدة؟

المحلول

There is no such thing as a RESET APDU command. Generally speaking, you can reset using a lower level API (which may not be available to you) or by disconnecting the card entirely. Or you can of course remove the power supply entirely by removing the card from the reader.


There may be reader specific commands (also called proprietary commands) that can be accessed through a CLA=FF escape. For instance the ACR122U ACR reader specifies:

  1. The antenna can be switched off in order to save the power.

    • Turn off the antenna power: FF 00 00 00 04 D4 32 01 00h

    • Turn on the antenna power: FF 00 00 00 04 D4 32 01 01h

Here FF 00 00 00 is the escape header, 04 is the length byte Lc and D4 32 01 00 or D4 32 01 01 is the proprietary command.

This is just a some reader I found using an internet search.


Notes

  • using getATR() in the Java javax.smartcardio libraries does not reset the card - it just returns the previously received ATR if the card is already powered on;
  • there is no method to reset the card in the Java Card API either.
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top