RFR: 8285389: EdDSA trimming zeros
Anthony Scarpino
ascarpino at openjdk.java.net
Sun Apr 24 15:37:26 UTC 2022
On Sat, 23 Apr 2022 14:39:50 GMT, Xue-Lei Andrew Fan <xuelei at openjdk.org> wrote:
> Did you want to correct the verify testing so that it could
> accept trimmed signature? Or do not trimming the extra zeros
> of the signature any longer? I did not get the point from the
> patch.
The test is correct.
Perhaps a clear explanation is if the signature length is greater or less than expected an exception should be thrown for the length being wrong instead of trying to verify the signature. In the particular test, zeros at the end of a too long signature, can get trimmed by BigInteger and the signature checked which should have been rejected before processing.
-------------
PR: https://git.openjdk.java.net/jdk/pull/8372
More information about the security-dev
mailing list