Our Online Store have the new products: RFID antenna board. Currently it can work with JC10M24R and JCOP4 card chips.
Compared with normal cards, the antenna board module has a smaller size and fixed holes, which is easy to integrate in the IOT(Internet Of Things) project.

I have a question about generateSecret

JavaCard Applet Development Related Questions and Answers.
BirdKing
Posts: 86
Joined: Wed Nov 04, 2015 7:23 am
Points :656
Contact:

I have a question about generateSecret

Post by BirdKing » Wed Sep 12, 2018 6:29 am

Hello,
I have a question about KeyAgreement.generateSecret.

In API specification, It descript the Throws of KeyAgreement.generateSecret as:

• CryptoException.ILLEGAL_VALUE if the publicData data format is incorrect, or if the
publicData data is inconsistent with the PrivateKey specified during initialization.
• CryptoException.INVALID_INIT if this KeyAgreement object is not initialized.

The result of generateSecret is a point. And the point maybe point-at-infinity. Or the algorithm ends in projective zero point during this operation.

My question is: Whether I should check the result point is on the curve when the API implemented?

happy123654
Posts: 35
Joined: Wed Jun 20, 2018 4:06 am
Points :218
Contact:

Re: I have a question about generateSecret

Post by happy123654 » Thu Sep 13, 2018 10:13 pm

I think you should check it.

BirdKing
Posts: 86
Joined: Wed Nov 04, 2015 7:23 am
Points :656
Contact:

Re: I have a question about generateSecret

Post by BirdKing » Fri Sep 14, 2018 6:15 am

Thanks for your answer. I think you are right. Ther error result may belong "the publicData data is inconsistent with the PrivateKey specified during initialization" .

DaHuFa
Posts: 53
Joined: Mon Jun 04, 2018 5:07 am
Points :392
Contact:

Re: I have a question about generateSecret

Post by DaHuFa » Sat Sep 15, 2018 10:58 pm

I don't think so.
The "inconsistent" may mean "the public point " not on the curve of the private key. If the result is point-at-infinity, the return value may be 0. After all, the return is "byte length of secret".
All these are my conjectures. I hope it will help you.

Post Reply Previous topicNext topic

Who is online

Users browsing this forum: Google [Bot] and 51 guests

JavaCard OS : Disclaimer