Commit ad0273a
CAMEL-23842: camel-pqc - use authenticated encryption (AEAD) in PQCDataFormat instead of ECB (#24348)
* CAMEL-23842: camel-pqc - use authenticated encryption (AEAD) in PQCDataFormat instead of ECB
The PQC data format encrypted payloads with a bare cipher name (e.g. "AES"),
which resolves to AES/ECB/PKCS5Padding: ECB leaks plaintext block structure and
there is no IV or integrity protection, so the ciphertext is malleable and the
DEM layer is not IND-CCA2 secure.
The symmetric layer now uses authenticated encryption: 128-bit block ciphers are
encrypted with GCM and the ChaCha20 stream cipher with ChaCha20-Poly1305. A random
12-byte nonce is written to the wire format and decryption verifies the auth tag via
Cipher.doFinal (not CipherInputStream, which can silently swallow a tag failure), so
tampered data is rejected. Only AEAD-capable symmetric algorithms are accepted; the
non-AEAD legacy/stream ciphers (RC2, RC5, CAST5, GOST28147, DESEDE, GRAIN128, HC128,
HC256, SALSA20) are rejected at startup. The DSL model enum, generated metadata,
component docs and the 4.22 upgrade guide are updated accordingly.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Andrea Cosentino <ancosen@gmail.com>
* CAMEL-23842: camel-pqc - remove dead bufferSize dataformat option and regenerate metadata
Addresses review feedback on the AEAD change:
- Remove the now-dead `bufferSize` dataformat option (it only configured the
previous streaming implementation, which authenticated encryption replaced).
Dropped from the component and core-model model (field, getter/setter, Builder)
and from the hand-written reifier; regenerated the configurer, catalog/model
metadata, XSD/YAML schemas and DSL writers/parsers. Documented in the docs and
the 4.22 upgrade guide.
- Regenerate camel-spring.xsd / camel-xml-io.xsd, which the earlier module-only
build had left stale (this was the CI failure).
- Upgrade guide: note that payloads are now processed in memory (the AEAD tag is
verified before releasing plaintext) rather than streamed.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Andrea Cosentino <ancosen@gmail.com>
---------
Signed-off-by: Andrea Cosentino <ancosen@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 19773e4 commit ad0273a
21 files changed
Lines changed: 365 additions & 235 deletions
File tree
- catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog
- dataformats
- models
- schemas
- components/camel-pqc/src
- generated
- java/org/apache/camel/component/pqc/dataformat
- resources/META-INF/org/apache/camel/component/pqc/dataformat
- main
- docs
- java/org/apache/camel/component/pqc/dataformat
- test/java/org/apache/camel/component/pqc/dataformat
- core
- camel-core-model/src
- generated/resources/META-INF/org/apache/camel/model/dataformat
- main/java/org/apache/camel/model/dataformat
- camel-core-reifier/src/main/java/org/apache/camel/reifier/dataformat
- camel-java-io/src/generated/java/org/apache/camel/java/out
- camel-xml-io/src/generated/java/org/apache/camel/xml
- in
- out
- camel-yaml-io/src/generated/java/org/apache/camel/yaml/out
- docs/user-manual/modules/ROOT/pages
- dsl/camel-yaml-dsl
- camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers
- camel-yaml-dsl/src/generated/resources/schema
Lines changed: 3 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | | - | |
26 | | - | |
| 24 | + | |
| 25 | + | |
27 | 26 | | |
28 | 27 | | |
Lines changed: 3 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | | - | |
23 | | - | |
| 21 | + | |
| 22 | + | |
24 | 23 | | |
25 | 24 | | |
Lines changed: 3 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9452 | 9452 | | |
9453 | 9453 | | |
9454 | 9454 | | |
9455 | | - | |
| 9455 | + | |
| 9456 | + | |
| 9457 | + | |
9456 | 9458 | | |
9457 | 9459 | | |
9458 | 9460 | | |
| |||
9471 | 9473 | | |
9472 | 9474 | | |
9473 | 9475 | | |
9474 | | - | |
9475 | | - | |
9476 | | - | |
9477 | | - | |
9478 | | - | |
9479 | | - | |
9480 | | - | |
9481 | | - | |
9482 | | - | |
9483 | 9476 | | |
9484 | 9477 | | |
9485 | 9478 | | |
| |||
Lines changed: 3 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8574 | 8574 | | |
8575 | 8575 | | |
8576 | 8576 | | |
8577 | | - | |
| 8577 | + | |
| 8578 | + | |
| 8579 | + | |
8578 | 8580 | | |
8579 | 8581 | | |
8580 | 8582 | | |
| |||
8593 | 8595 | | |
8594 | 8596 | | |
8595 | 8597 | | |
8596 | | - | |
8597 | | - | |
8598 | | - | |
8599 | | - | |
8600 | | - | |
8601 | | - | |
8602 | | - | |
8603 | | - | |
8604 | | - | |
8605 | 8598 | | |
8606 | 8599 | | |
8607 | 8600 | | |
| |||
Lines changed: 0 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | 25 | | |
27 | 26 | | |
28 | 27 | | |
| |||
36 | 35 | | |
37 | 36 | | |
38 | 37 | | |
39 | | - | |
40 | | - | |
41 | 38 | | |
42 | 39 | | |
43 | 40 | | |
| |||
61 | 58 | | |
62 | 59 | | |
63 | 60 | | |
64 | | - | |
65 | | - | |
66 | 61 | | |
67 | 62 | | |
68 | 63 | | |
| |||
82 | 77 | | |
83 | 78 | | |
84 | 79 | | |
85 | | - | |
86 | | - | |
87 | 80 | | |
88 | 81 | | |
89 | 82 | | |
| |||
Lines changed: 3 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | | - | |
26 | | - | |
| 24 | + | |
| 25 | + | |
27 | 26 | | |
28 | 27 | | |
0 commit comments