RFR: 4887998: Use Integer.rotateLeft() and rotateRight() in crypto implementations

Weijun Wang weijun at openjdk.org
Mon Jul 11 22:42:51 UTC 2022

On Mon, 11 Jul 2022 21:20:43 GMT, Mark Powers <duke at openjdk.org> wrote:

> https://bugs.openjdk.org/browse/JDK-4887998

Two comments:
1. There are many unnecessary parenthesis, like `(32 - s)` or `(Integer... + 5)`.
2. Why choose `rotateRight` and not `rotateLeft`? https://en.wikipedia.org/wiki/SHA-1 uses "circular left shift operation" to describe the rotation.


PR: https://git.openjdk.org/jdk/pull/9456

More information about the security-dev mailing list