In PGPainless I've implemented message decryption as a two-step process by first decrypting the session key and second using that session key to decrypt the actual message.
That way, as a library implementation, I can emit the session-key to the user upon successful decryption.
In 688a1a2 however, the PGPEncryptedData class was changed to only perform the session key quick check if decryption is done via PGPSymmetricKeyEncryptedData.
Since in my use-case, I transform the PGPSymmetricKeyEncryptedData into a PGPSessionKeyEncryptedData in step 1, the session key quick check is skipped, resulting in loads of nasty packet parsing failures down the line, which I have no clear idea for how to handle them gracefully.
What would be the best way to restore the previous behavior?
Edit: Ideally, PGPEncryptedDataList.extractSessionKeyEncryptedData() would allow the user to pass in a boolean value indicating whether they would like to retain the quick check.
In PGPainless I've implemented message decryption as a two-step process by first decrypting the session key and second using that session key to decrypt the actual message.
That way, as a library implementation, I can emit the session-key to the user upon successful decryption.
In 688a1a2 however, the
PGPEncryptedDataclass was changed to only perform the session key quick check if decryption is done viaPGPSymmetricKeyEncryptedData.Since in my use-case, I transform the
PGPSymmetricKeyEncryptedDatainto aPGPSessionKeyEncryptedDatain step 1, the session key quick check is skipped, resulting in loads of nasty packet parsing failures down the line, which I have no clear idea for how to handle them gracefully.What would be the best way to restore the previous behavior?
Edit: Ideally,
PGPEncryptedDataList.extractSessionKeyEncryptedData()would allow the user to pass in a boolean value indicating whether they would like to retain the quick check.