Skip to content

Fails to strip 0x01 and 0x02 padding on decoding #2

@devjack

Description

@devjack

The current implementation fails to properly handle 0x00 padding in the following scenarios:

  • 0x01 is a padding delimiter for records (except when...)
  • 0x02 is a padding delimiter for the last record.

Quote, Section 2 of RFC8188 (Page 4)

Each record contains a single padding delimiter octet followed by any
number of zero octets. The last record uses a padding delimiter
octet set to the value 2, all other records have a padding delimiter
octet value of 1.

On decryption, the padding delimiter is the last non-zero-valued
octet of the record. A decrypter MUST fail if the record contains no
non-zero octet. A decrypter MUST fail if the last record contains a
padding delimiter with a value other than 2 or if any record other
than the last contains a padding delimiter with a value other than 1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions