I'll raise an errata using Valery's suggested text. A draft would be overkill I think - you'd expect this to have come to the list sooner if it was causing real world interop problems, and it's not like there are existing test vectors for IKE Fragmentation that need correcting.
Thanks, Adam ________________________________ From: V.K. Uppalapati <[email protected]> Sent: Monday, November 30, 2026 03:59 To: Adam R <[email protected]> Cc: Valery Smyslov <[email protected]>; [email protected] <[email protected]> Subject: Re: [IPsec] Re: Encrypted Fragment Payload: AEAD associated data, 32 or 36 octets? Hi Valery, Adam, Thanks, both. Between the two of you this is a good deal clearer than it was when I started the thread. Both formulations give 36, and between them they close the gap from both ends. Valery, that is the root cause, and I hadn't got to it. I had the conflict between the rule and the parenthetical; you have why it exists. For the Encrypted Payload the parenthetical does the work the base specification never did, since RFC 7296 defines no header either. For the Encrypted Fragment Payload there is no parenthetical and RFC 7383 defines no header, so nothing supplies the boundary. Adam, putting it in Section 2.5 answers the one thing I was going to raise. Section 2.5 is what sends an implementer to RFC 5282, and the sentence they land on names the fourth octet without telling them the payload in front of them has a longer header. A definition placed anywhere else doesn't reach a reader who has already jumped. Fixing the boundary at the point the pointer leaves from puts the correction where that reader is, and it holds without needing RFC 5282 in hand. So I have no remaining concern about the substance. On the generic wording versus the one anchored in RFC 5282's context I don't have a strong preference, and I'd defer to whichever of the two reads better to you. Either closes it. Your scope point reaches the vectors as well. The fragment vector I have is from an IKE_INTERMEDIATE exchange, because that is what the capture produced, but nothing in the boundary depends on the exchange type: the header is the same eight octets wherever fragmentation is used. I'd say that in the text rather than leave a reader to generalize from one exchange, and I can add a vector from a fragmented IKE_AUTH if the working group would rather have the pair. What I don't think has been settled is who writes it. Adam mentioned having meant to raise an erratum, which was before the text moved into Section 2.5, and the thread has been quiet since. I'd be glad to write a short draft updating RFC 7383: the definition of the Encrypted Fragment Payload header, the associated data boundary that follows from it, and the two AES-GCM vectors as test vectors, so an implementer can check an implementation rather than only read a sentence. I'd rather not start if the fix is already going somewhere else, though, so I am asking first. If either of you intends to carry it, or if it belongs in a document already in flight, just say so and the captures and vectors are yours to use. Uppalapati On Thu, Nov 5, 2026 at 5:17 AM Adam R <[email protected]<mailto:[email protected]>> wrote: 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]<mailto:[email protected]>> Sent: Thursday, November 05, 2026 11:57 To: Adam R <[email protected]<mailto:[email protected]>>; 'V.K. Uppalapati' <[email protected]<mailto:[email protected]>>; [email protected]<mailto:[email protected]> <[email protected]<mailto:[email protected]>> Subject: RE: [IPsec] Re: Encrypted Fragment Payload: AEAD associated data, 32 or 36 octets? Hi Adam, From: Adam R <[email protected]<mailto:[email protected]>> Sent: Wednesday, November 4, 2026 12:31 PM To: V.K. Uppalapati <[email protected]<mailto:[email protected]>>; [email protected]<mailto:[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]<mailto:[email protected]>> Sent: 04 November 2026 00:07 To: [email protected]<mailto:[email protected]> <[email protected]<mailto:[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]<mailto:[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]
