Internet Checksum Word List Builder

Build Internet-checksum big-endian 16-bit words from explicit bytes, zero-padding the low byte of an odd final pair; does not calculate a checksum.

Description

Build Internet-checksum big-endian 16-bit words from explicit bytes, zero-padding the low byte of an odd final pair; does not calculate a checksum.

Internet-checksum words group adjacent octets in network order. An odd final octet occupies the high byte of a zero-padded word.

When to use this tool

Build Internet-checksum big-endian 16-bit words from explicit bytes, zero-padding the low byte of an odd final pair; does not calculate a checksum.

  • Prepare the supplied bytes 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 bytes. 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.words, result.padded. Interpret false, null and empty lists using the distinctions below; they can be valid outputs.

Validate bytes, combine each pair as first times 256 plus second, and substitute zero for a missing final second byte. Return words and an odd-length padded flag.1

Input fieldMeaning and representationAccepted input
bytesbytes.List of integers from 0 to 255; at most 128 bytes
Output fieldInterpretation
resultObject containing the named outputs below.
result.wordsThe words list in the ordering and representation described above.
result.paddedFlag for padded under the exact condition described above.
json
{
  "input": {
    "bytes": [
      1,
      2,
      3
    ]
  },
  "output": {
    "result": {
      "words": [
        258,
        768
      ],
      "padded": true
    }
  }
}

Limitations and assumptions

  • This constructs words only; no addition, carry folding, complement or protocol pseudoheader is supplied.
  • 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 Word List Builder — tool.io

Similar or alternative tools

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