[ 
https://issues.apache.org/jira/browse/CAMEL-27449?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen resolved CAMEL-27449.
---------------------------------
    Resolution: Fixed

Fixed by https://github.com/apache/camel/pull/30659, merged to main as 
bd92b86f81e2b548e6255e95434b52c2f2929b6c. OCB (AEAD) messages of GnuPG 2.4 and 
later now decrypt with requireIntegrityProtection on, and the data format page 
no longer says it implements only symmetric encryption. The port/camel-4.22.x 
and port/camel-4.18.x labels are set, so the backport bot opens the backport 
PRs.

_Claude Code on behalf of Claus Ibsen_

> camel-crypto-pgp - decrypt OCB (AEAD) messages of current GnuPG, which are 
> integrity protected
> ----------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-27449
>                 URL: https://issues.apache.org/jira/browse/CAMEL-27449
>             Project: Camel
>          Issue Type: Bug
>          Components:  camel-crypto
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Major
>             Fix For: 4.24.0
>
>
> {{PGPKeyAccessDataFormat.unmarshal}} refuses a message in the OCB (AEAD) 
> format, packet tag 20, with:
> {noformat}
> PGP message is not integrity protected
> {noformat}
> when {{integrity}} / {{requireIntegrityProtection}} is true, the default. OCB 
> is authenticated encryption, so it is integrity protected. The check only 
> accepts the integrity packet (SEIPD v1), and should also accept 
> {{pbe.isAEAD()}}.
> GnuPG 2.4 and later write OCB by default for keys made with GnuPG 2.4 or 
> later. So out of the box, Camel cannot decrypt files that current GnuPG users 
> send. With the integrity check turned off, the same message decrypts and its 
> signature verifies.
> Also:
> * The docs of the data format begin with "This data format implements only 
> symmetric (shared-key) encryption", which is wrong for PGP (public-key 
> encryption).
> Expected: OCB messages decrypt with the integrity check on; a test with a 
> message made by GnuPG in OCB format; the docs sentence fixed. The new 
> {{pgp-decrypt-action}} Kamelet (apache/camel-kamelets#3382) has a test that 
> pins today's failure, to be changed with this fix.
> Found while adding the pgp-encrypt-action and pgp-decrypt-action Kamelets 
> (apache/camel-kamelets#3374, 2026-11-23).



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to