RFC Errata


Errata Search

 
Source of RFC  
Summary Table Full Records

RFC 1624, "Computation of the Internet Checksum via Incremental Update", May 1994

Source of RFC: Legacy
Area Assignment: art

Errata ID: 5865
Status: Reported
Type: Technical
Publication Format(s) : TEXT

Reported By: J.A. Bezemer
Date Reported: 2019-09-25

Section 3 says:

(end of section 3 Discussion)

It should say:

(Add text after end of section 3 Discussion:)

3.1 Considerations for larger-bitsize machines

In above equations, "+" denotes 1's complement addition, in which any
high-order carry bits are added to the low-order bits of the sum, when
executed in 16-bit arithmetic.

When implementing on machines with larger bitsize words, the 1's complement
addition can be accomplished by explicity folding back the carry bits.
For this to work, all negation operations must be limited to the relevant
16 bits only, for example by means of exclusive-or by 0xFFFF. The following
routine can be used:

        HCnew = (HCorig xor 0xFFFF) + (valueorig xor 0xFFFF) + valuenew
        while (HCnew > 0xFFFF) {
                HCnew = (HCnew & 0xFFFF) + (HCnew >> 16)
        }
        HCnew = (HCnew xor 0xFFFF)

where valueorig and valuenew contain the original and new 16-bit (aligned)
payload values, and HCorig and HCnew are the 16-bit header checksum values,
all as least-significant 16 bits inside a larger-bitsize word using
corresponding arithmetic. As long as the bitsize is large enough that the
summations do not overflow, no negative values will be generated and any
binary arithmetic can be used.

Notes:

This updates the previous Errata ID: 5864 by including details on the bit-limited negation, which was probably a(nother) cause of the failing result in Errata ID: 4782.

Report New Errata



Advanced Search