JavacardOS will not accept order any more, please contact our partner Feitian online Store:
https://ftsafe.en.alibaba.com/index.html
https://ftsafe.en.alibaba.com/index.html
I have a question about generateSecret
I have a question about generateSecret
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?
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?
-
- Posts: 35
- Joined: Wed Jun 20, 2018 4:06 am
- Points :218
- Contact:
Re: I have a question about generateSecret
I think you should check it.
Re: I have a question about generateSecret
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" .
Re: I have a question about generateSecret
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.
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.
Who is online
Users browsing this forum: No registered users and 30 guests