RFC 5116 defines A_MAX and P_MAX as an inclusive range (Section 4)
Each AEAD algorithm MUST accept any plaintext with a length between
zero and P_MAX octets, inclusive, where the value P_MAX is specific
to that algorithm.
Each AEAD algorithm MUST accept any associated data with a length
between zero and A_MAX octets, inclusive, where the value A_MAX is
specific to that algorithm.
The draft algorithm high-level definitions appear to follow this convention (Section 3, 4):
However, it is clear from the algorithm pseduocode sections and how the tag is generated that this P_MAX/A_MAX must be exclusive (Links to the AEGIS-256 copies omitted for brevity).
While it is a combination of impossible/impractical/unlikely that data will every reach the length where this discrepancy actually matters, P_MAX and A_MAX should be changed to be 2^61 - 1 bytes (2^64 - 8 bits), and C_MAX should be updated accordingly.
RFC 5116 defines
A_MAX
andP_MAX
as an inclusive range (Section 4)The draft algorithm high-level definitions appear to follow this convention (Section 3, 4):
https://github.com/cfrg/draft-irtf-cfrg-aegis-aead/blob/dc1f4805eba4c4305b16f9741524dbde0ccea586/draft-irtf-cfrg-aegis-aead.md?plain=1#L362-L363
https://github.com/cfrg/draft-irtf-cfrg-aegis-aead/blob/dc1f4805eba4c4305b16f9741524dbde0ccea586/draft-irtf-cfrg-aegis-aead.md?plain=1#L698-L699
However, it is clear from the algorithm pseduocode sections and how the tag is generated that this P_MAX/A_MAX must be exclusive (Links to the AEGIS-256 copies omitted for brevity).
https://github.com/cfrg/draft-irtf-cfrg-aegis-aead/blob/dc1f4805eba4c4305b16f9741524dbde0ccea586/draft-irtf-cfrg-aegis-aead.md?plain=1#L385-L386
https://github.com/cfrg/draft-irtf-cfrg-aegis-aead/blob/dc1f4805eba4c4305b16f9741524dbde0ccea586/draft-irtf-cfrg-aegis-aead.md?plain=1#L679
While it is a combination of impossible/impractical/unlikely that data will every reach the length where this discrepancy actually matters,
P_MAX
andA_MAX
should be changed to be2^61 - 1 bytes (2^64 - 8 bits)
, andC_MAX
should be updated accordingly.