Internet Checksum Carry Fold Trace

Trace exact Internet-checksum end-around carry folding of an unsigned integer sum without complementing it or reading packet fields.

Description

Trace exact Internet-checksum end-around carry folding of an unsigned integer sum without complementing it or reading packet fields.

End-around carry reduces an accumulated sum to 16 bits by adding overflow bits back into the low word. A trace makes repeated folds visible.

When to use this tool

Trace exact Internet-checksum end-around carry folding of an unsigned integer sum without complementing it or reading packet fields.

  • Prepare the supplied sum fields for this operation.
  • Compare the complete example with the representation used by your own input before carrying the result into another step.

How to use the tool and how it works

  1. Enter sum. Use the exact text syntax, units and index conventions explained below.
  2. Run the tool. If input validation fails, correct the supplied fields before interpreting any result.
  3. Read result.folded, result.trace. Interpret false, null and empty lists using the distinctions below; they can be valid outputs.

Parse sum as a nonnegative exact integer. While above 65,535, replace it by (sum AND 65,535) plus (sum shifted right 16). Return the final number and decimal-text trace including the input.1

Input fieldMeaning and representationAccepted input
sumExact decimal integer text; keep it quoted in JSON rather than converting through a floating-point number.Optional leading + or - and 1 to 256 decimal digits; no whitespace
Output fieldInterpretation
resultObject containing the named outputs below.
result.foldedThe folded value under the stated formula or text convention.
result.traceThe trace list in the ordering and representation described above.
json
{
  "input": {
    "sum": "131071"
  },
  "output": {
    "result": {
      "folded": 1,
      "trace": [
        "131071",
        "65536",
        "1"
      ]
    }
  }
}

Limitations and assumptions

  • The tool does not complement the folded result or assemble protocol words and pseudoheaders.
  • All declared input fields are required and unexpected top-level fields are rejected. Numbers must be finite; lists are limited to 128 entries and ordinary text fields to 8,192 UTF-16 code units, with tighter limits where stated.
  • JSON text inputs must parse within bounded nesting and size limits. Numeric outputs outside the safe finite range are rejected; large exact integer results use decimal strings. Indexes and half-open spans are zero-based unless a rank is explicitly described as one-based.

Alternative or Complementary methods

Use the complete specified checksum algorithm and independent test vectors when verifying a payload. Field packing, parameter shape and arithmetic agreement are separate checks; none supplies cryptographic authenticity.

References

  1. Tool behavior and example: Internet Checksum Carry Fold Trace — tool.io

Similar or alternative tools

  • Internet Checksum Complement Tool

    Take the bounded ones-complement of one explicit 16-bit Internet-checksum word; this is not a packet checksum calculation.

  • Internet Checksum Residue Check

    Verify an explicit Internet-checksum word list including its checksum against all-one folded residue; no packet-field or protocol coverage assumptions.

Don't forget to set a bookmark for tool.io!
Privacy | Imprint | Cookies