bc-java icon indicating copy to clipboard operation
bc-java copied to clipboard

OpenPGP - Partial length encoding: Enforce minimum length of the first chunk

Open vanitasvitae opened this issue 5 months ago • 1 comments

The OpenPGP specification mandates that if partial body encoding is used, the first chunk must be at least 512 bytes long. Currently, BC does not enforce this requirement (see https://tests.sequoia-pgp.org/#Tests_support_for_partial_body_encoding )

This PR adds a check for this requirement, which will throw an IOException for malformed packets.

vanitasvitae avatar Sep 06 '24 13:09 vanitasvitae