davsclaus opened a new issue, #3246:
URL: https://github.com/apache/camel-kamelets/issues/3246

   `crypto-encrypt-action` and `crypto-decrypt-action` take the algorithm name 
alone, such as `AES`, because the same value also names the secret key; a full 
transformation such as `AES/CBC/PKCS5Padding` fails each message. With `AES` 
alone, Java uses ECB mode: the same text with the same key always gives the 
same encrypted bytes, and equal blocks of the data give equal encrypted blocks, 
so repeats in the data can be seen in the encrypted messages. There is no way 
to choose another mode.
   
   Change: a new optional `mode` option on both actions. With `mode` set to 
`CBC`, the actions use `<algorithm>/CBC/PKCS5Padding`, and each message is 
encrypted with a new random initialization vector that is put in front of the 
encrypted data (the `inline` option of the crypto data format), so the decrypt 
action reads it from there. Without `mode` nothing changes, so data encrypted 
by earlier versions is still decrypted. The descriptions say that `AES` alone 
means ECB, and recommend `mode: CBC`.
   
   _Claude Code on behalf of Claus Ibsen_
   


-- 
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]

Reply via email to