'Changing A JavaCard's ATR

I am researching uses for Javacards and smartcards utilizing different ATRs. I want to change these card's ATRs via python to be different from the OEM ATR that comes on these cards as default. I figured out a way to change the card's atr, however, it is utilizing a script online - which really doesn't help.

Below is the script I found to change the ATR using PyResMan script mode, however, it is only set to one atr, which is a bank and I have no use for it.

The Script I found Online: { (Beginning numbers show line numbers)

  1. 00A4040010********************************

  2. 00F00000

  3. C0D6029A02F807

  4. C0D601240108

  5. C0D601470108

  6. C0D601260403600000

  7. C0D601490403600000

  8. C0D6012201FE

  9. C0D601360E0D80318065B0893501F183009000

  10. C0D601590E0D80318065B0893501F183009000

  11. C0D603010101

  12. C0D6030510404142434445464748494A4B4C4D4E4F

  13. C0D6031d0101

  14. C0D6032110404142434445464748494A4B4C4D4E4F

  15. C0D603390101

  16. C0D6033D10404142434445464748494A4B4C4D4E4F

}

The problem with this script is that I only know what the first 2 lines do, and that lines 9&10 are the lines that actually contain the data for the ATR changing process. I need to know how I can change the ATR using the ATR in regular expression form.

If anyone knows a way to decode this script, and be able to edit it, or knows an easier way to change the ATR of an Unfused or non pre-presonialized javacard, please let me know! I've been researching those for over a month now, and cannot find an answer that actually works.



Solution 1:[1]

Setting the ATR for a smartcard is not primarily the domain of Javacard specification. Today there is no generic specification or method to set the ATR for all smartcards, as there is no universal way to initialize or personalize the smartcard itself and this is mostly vendor specific.

The script that you found online belongs to an NXP Javacard, this information is not standardized and is also not intended for public use to my knowledge, therefore is removed some sensible information. Please contact your card vendor to get information on how to change the ATR(it might not be possible or easy).

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Paul Bastian