RFR: 8297972: Poly1305 Endianness on ByteBuffer not enforced
Kevin Driver
kdriver at openjdk.org
Mon Jan 9 21:55:57 UTC 2023
On Thu, 1 Dec 2022 18:28:21 GMT, Volodymyr Paprotski <duke at openjdk.org> wrote:
> Per rfc7539 Section 2.5, "Read the block as a little-endian number."
>
> sun.security.util.math.intpoly.IntegerPolynomial1305 enforces this on input when input is provided as `[]byte` but not when input is in `ByteBuffer`
>
> Tested with `Poly1305IntrinsicFuzzTest.java` from https://github.com/openjdk/jdk/pull/11338 which compares Poly1305 MAC between `ByteBuffer` and `[]byte`
✅
-------------
PR: https://git.openjdk.org/jdk/pull/11463
More information about the security-dev
mailing list