gnodet commented on PR #31032: URL: https://github.com/apache/camel/pull/31032#issuecomment-7225019664
Thanks @davsclaus for the thorough review. All points addressed in the amended commit: 1. **Wire version/format type** — updated to `WIRE_VERSION = 0x02` and `FORMAT_TYPE_KEM = 0x03` to align with the shared hybrid format spec. `pqc-hybrid.adoc` now has the `0x03` row in the format-type table. 2. **AAD binding** — `cipher.updateAAD(header)` added on both encrypt and decrypt paths (v2 only; v1 path passes `null`). The header is built as a `byte[]` before encryption so the exact same bytes are used for both writing and AAD. Additionally, explicit algorithm-ID mismatch checks fire before `decryptPayload()` with a clear IOException message. 3. **Docs** — `pqc-dataformat.adoc` updated with the v2 layout. `pqc-hybrid.adoc` NOTE removed (CAMEL-27548 is now done). Both catalog copies regenerated. 4. **Upgrade guide** — changed to "4.22 and 4.23", added rolling-upgrade order (readers before writers), placed next to the existing hybrid v2 entry. 5. **`readNBytes` fix** — `pbIn.readNBytes(2)` replaces the partial-read-vulnerable `pbIn.read(peek, 0, 2)`. 6. **DSTU7624/GOST3412-2015 IDs** — added as `0x050C`/`0x050D` in `PQCAlgorithmId`. 7. **New tests** — 7 new error-path tests in `PQCDataFormatWireFormatTest`: tampered header, truncated 1/2/7 bytes, bad version, bad format type, KEM algorithm mismatch. 8. **`fmt.stop()` in finally** — all 3 existing tests now wrapped in try/finally. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
