RFR: 8364226: Better ECDSASignature Memory Management
Anthony Scarpino
ascarpino at openjdk.org
Thu Jul 31 16:12:55 UTC 2025
On Mon, 28 Jul 2025 19:59:49 GMT, Kevin Driver <kdriver at openjdk.org> wrote:
> Enhance the memory management/cleanup for `ECDSASignature`.
src/java.base/share/classes/sun/security/ec/ECDSASignature.java line 449:
> 447: // value for "s" when necessary
> 448: byte[] retValue = ops.signDigest(s, digest, seed);
> 449: if(extraCopyToZero) {
I believe you can avoid the change above (428-435) with `if (!priv instanceof ECPrivateKeyImpl)` here.
Also a style nit with a missing space between if "if" and "("
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26516#discussion_r2245812010
More information about the security-dev
mailing list