Not all operations of JCMathLib are supported on all cards. If executed, some operations will fail or may even block the card (e.g., n_mod_exp on JCOP3 J3H145G see https://github.com/OpenCryptoProject/JCMathLib/issues/13). Currently, developer must remove these operations manually from the code.
Solution:
Add simple java file CardSupportCfg.java containing true/false param for each method supported by JCMathLib. The parameter is controlled in runtime and if false, then method is not executed (exception) despite being present in code.
For new card, developer can select pre-prepared CardSupportCfg for tested smartcards or create own using simple testing tool
Not all operations of JCMathLib are supported on all cards. If executed, some operations will fail or may even block the card (e.g., n_mod_exp on JCOP3 J3H145G see https://github.com/OpenCryptoProject/JCMathLib/issues/13). Currently, developer must remove these operations manually from the code.
Solution: Add simple java file CardSupportCfg.java containing true/false param for each method supported by JCMathLib. The parameter is controlled in runtime and if false, then method is not executed (exception) despite being present in code.
For new card, developer can select pre-prepared CardSupportCfg for tested smartcards or create own using simple testing tool