OFFICIAL

Hi Valery (and Venkata),

I think that could work. The reason I referenced RFC 5282 specifically is that 
RFC 7383 doesn't seem to discuss the concept of the payload header at all, and 
RFC 7296 doesn't appear to distinguish between the concept of the "generic 
payload header" versus the "payload header", so defining the payload header in 
a RFC 7383 without any further context might be a little confusing. But I agree 
it would be a good thing to make the definition more generic if we can.

For what it's worth, I also agree that RFC 9424 can't really be relevant here. 
Even if it described fragment processing, it would only cover IKE_INTERMEDIATE 
messages, and IKE Fragmentation is specified for all encrypted IKE messages - 
any clarification would need to apply equally to all messages that might be 
fragmented.

Thanks,

Adam

________________________________
From: Valery Smyslov <[email protected]>
Sent: Thursday, November 05, 2026 11:57
To: Adam R <[email protected]>; 'V.K. Uppalapati' 
<[email protected]>; [email protected] <[email protected]>
Subject: RE: [IPsec] Re: Encrypted Fragment Payload: AEAD associated data, 32 
or 36 octets?


Hi Adam,



From: Adam R <[email protected]>
Sent: Wednesday, November 4, 2026 12:31 PM
To: V.K. Uppalapati <[email protected]>; [email protected]
Subject: [IPsec] Re: Encrypted Fragment Payload: AEAD associated data, 32 or 36 
octets?



OFFICIAL



I've seen the same discrepancy and had been meaning to raise an errata for RFC 
7383. Something like the following text for Section 2.5:



"The cryptographic processing of the Encrypted Fragment payload is identical to 
that described in Section 3.14 of [RFC7296], as well as documents updating such 
processing for particular algorithms or modes, such as [RFC5282]. When 
constructing the associated data of an IKE Fragment message as described in 
Section 5.1 of [RFC5282], the Payload Header of the Encrypted Fragment payload 
ends at the last octet of the payload's Total Fragments field rather than at 
the last octet of the Payload Length field."



         Perhaps it is enough just to define what the Encrypted Fragment 
Payload header is (not specially mentioning RFC 5282).



         Regards,

         Valery.



Cheers,



Adam



OFFICIAL

________________________________

From: V.K. Uppalapati <[email protected]>
Sent: 04 November 2026 00:07
To: [email protected] <[email protected]>
Subject: [IPsec] Encrypted Fragment Payload: AEAD associated data, 32 or 36 
octets?



Some people who received this message don't often get email from 
[email protected]. Learn why this is 
important<https://aka.ms/LearnAboutSenderIdentification>

Hi all,

I think there is an unresolved gap in the specification of the associated data 
(AD) boundary when an AEAD algorithm protects an Encrypted Fragment Payload 
(SKF). Implementations appear to agree on one answer; as far as I can tell, no 
document states it.

RFC 7383 Section 2.5 delegates the cryptographic processing of the Encrypted 
Fragment Payload. It "is identical to that described in Section 3.14 of 
[RFC7296], as well as documents updating such processing for particular 
algorithms or modes, such as [RFC5282]."

RFC 5282 Section 5.1 fixes the AD as ending at "the last octet of the Payload 
Header of the Encrypted Payload (i.e., the fourth octet of the Encrypted 
Payload)". Section 5.2 repeats that parenthetical.

For an Encrypted Payload (SK) the two formulations agree. The generic payload 
header is four octets (RFC 7296 Section 3.2), so AD = 28 octets of fixed IKE 
header + 4 = 32.

For an Encrypted Fragment Payload they do not agree. Its header carries 
two-octet Fragment Number and Total Fragments fields ahead of the IV. The rule 
-- through the last octet of the payload header -- gives 36 octets and places 
both counters under AEAD integrity protection. The parenthetical gloss -- "the 
fourth octet" -- gives 32 and leaves them unprotected.

Both readings are self-consistent and I cannot find a document that resolves 
which governs. RFC 7383 Section 2.5 lists the counters among the fragment 
payload's own fields, which makes 36 natural; RFC 7296 Section 3.2 fixes the 
generic payload header at four octets, which makes 32 literal. The conflict is 
invisible for the Encrypted Payload, which is presumably why it has gone 
unremarked: RFC 5282 predates IKEv2 fragmentation, and its Figure 3 draws the 
boundary on an Encrypted Payload, which has no counters.

RFC 9242 Section 3.3.2 looks as though it settles this, and I want to say why I 
do not think it does. It defines IntAuth*A over a range ending at the last 
octet of the generic header of the Encrypted payload, and states that this 
scope "is identical to the scope of Associated Data defined for the use of AEAD 
algorithms in IKEv2 (see Section 5.1 of [RFC5282])". But the same section 
requires that a fragmented message "MUST be reconstructed before calculating 
the prf as if it were received unfragmented". The payload it equates is 
therefore a reconstructed Encrypted payload, which has no fragment counters -- 
the payload whose boundary is in question never exists for that mechanism. It 
also writes the constant out, "the Encrypted payload header (four octets)", for 
a header the fragment payload extends to eight.

I checked the errata. RFC 7383 has none. Of RFC 5282's three, none concerns 
Section 5.1. RFC 9242 has two, both in Section 3.3.2 and both editorial. 
Neither RFC 7383 nor RFC 5282 has an updating or obsoleting document.

The two readings are not equally safe. RFC 7296 Section 3.14 scopes the 
Integrity Checksum Data over "the entire message starting with the Fixed IKE 
header through the Pad Length", which for a fragment includes the counters, so 
a non-AEAD SA authenticates them. Choosing 32 would leave an AEAD SA weaker 
than a non-AEAD one at exactly the fields reassembly depends on: RFC 7383 
Section 2.5.2 uses Total Fragments to separate fragment sets across PMTU probes.

Empirically, 36 is what is deployed. I tested an IKEv2 implementation of my own 
against strongSwan 6.0.7 and libreswan built from upstream commit 9f4191bd, and 
all three use 36. The two kinds of evidence differ and I would rather separate 
them than average over them. strongSwan logs its derived keys, so its messages 
can be opened and the boundary checked directly. libreswan exposes only symkey 
handles, so its agreement is established by interoperation rather than 
cryptographically: its fragments verify at 36 and it accepts fragments built 
there.

Across 21 captures for which strongSwan logged its keys, 78 encrypted messages 
were recovered and 76 opened at the boundary above -- 19 Encrypted Fragment 
payloads at 36 and 57 Encrypted payloads at 32 -with no counterexample. The two 
that did not open fail at every AD length from 0 to 63 with every logged key, 
so their keys are absent from the log rather than their boundary in dispute.

The captures, the sweep that produced those counts, and a pair of AES-GCM test 
vectors pinning both boundaries to published bytes are archived at 
https://doi.org/10.5281/zenodo.23932948. The vectors need none of my code to 
check: any AES-GCM implementation will do, and each opens at the stated length 
and no other. This work is to appear at CSET '26.

Two questions for the working group.

First, is the 36-octet reading agreed? I would value being told I have misread 
something, and that is the cheaper outcome.

Second, if it is agreed, is it worth recording somewhere normative? An erratum 
against RFC 5282 looks like the wrong instrument to me -- the text is not in 
error, it is silent about a payload that did not exist when it was written -- 
but the gap has a cost. An implementer who reads the parenthetical literally, 
chooses 32, and tests against nothing but itself will interoperate with no one, 
and will not be able to name the sentence it violated.

Thanks,

Venkata Karunakar Uppalapati
Independent Researcher

OFFICIAL
_______________________________________________
IPsec mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to