Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inquiry about JCmathlib Support for JavaCard 3.0.4 #32

Open
emvuys opened this issue Jul 5, 2024 · 3 comments
Open

Inquiry about JCmathlib Support for JavaCard 3.0.4 #32

emvuys opened this issue Jul 5, 2024 · 3 comments

Comments

@emvuys
Copy link

emvuys commented Jul 5, 2024

I have written a JavaCard application and configured the card as JCOP3_P60, which supports JCDK 3.0.4. However, I faced issues when testing with the card, particularly because I noticed that JCmathlib uses ALG_EC_SVDP_DH_PLAIN_XY and ALG_EC_PACE_GM parameters.

The card in version 3.0.5 is working properly.

Could you please clarify if JCmathlib supports JavaCard 3.0.4 cards, or if there are any specific modifications required to achieve compatibility?

@petrs
Copy link
Member

petrs commented Jul 5, 2024

Dear @emvuys ALG_EC_SVDP_DH_PLAIN_XY and ALG_EC_PACE_GM algorithms are not available in JCAPI 3.0.4 so we cannot use them if your card supports JCAPI only up to 3.0.4 (which is the case for NXP JCOP3 P60). So if you have card with support of 3.0.5 or higher, these algorithms are available to JCMathLib, otherwise they need to be emulated by significantly slower code or not supported. Look at https://www.fi.muni.cz/~xsvenda/jcalgtest/table.html to see what your card is supporting as set constants accordingly.

@emvuys
Copy link
Author

emvuys commented Jul 6, 2024

@petrs Thank you very much for your prompt response. The 3.0.4 card I tested is not on the list, but I am certain it is version 3.0.4. If slow card processing is acceptable, how does JCmathlib support version 3.0.4 cards? Thank you again for your response.

@dufkan
Copy link
Member

dufkan commented Jul 10, 2024

Hi @emvuys, NXP JCOP3 P60 is a bit special. Although it fully supports only JavaCard API 3.0.4, it can already run some algorithms added in JavaCard API 3.0.5 and we use this in its configuration in OperationSupport.

To run JCMathLib on a different 3.0.4 card, I would recommend the following approach. First, try running tests with a configuration of the older smartcards, e.g. , JCOP21 or GD70 and check if the tests passed. If not, define a new constant for your card and try varying the available options one by one until more tests pass. If you are successful, we would welcome a PR with your configuration.

However, before you do any of the described steps, be aware that certain configurations may block your card!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants