I have a question about generateSecret
Posted: 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?
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?