{
  "id": 17994559,
  "title": "Anonymizing FIX logs without breaking them: BodyLength, CheckSum and the five traps",
  "url": "https://urgent.news/2026/11/03/anonymizing-fix-logs-without-breaking-them-bodylength-checksum-and",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-11-03T17:28:14.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/evgenii_korobkov_4ada45b7/anonymizing-fix-logs-without-breaking-them-bodylength-checksum-and-the-five-traps-51ka"
  },
  "original_language": "en",
  "account": "When a counterparty requests a log, the first step is to remove sensitive information such as client IDs, account numbers, and names. A simple find-and-replace method can be used, but it can inadvertently disrupt the session because FIX messages include two integrity fields that depend on the exact byte sequence. The BodyLength field (9) specifies the number of bytes after the SOH (Start of Header) character up to the next SOH before the 10= field. The CheckSum field (10) is the sum of each byte from the 8= field through the same SOH, modulo 256, and written as three digits. Altering 1=ACC-77812 to 1=ACCT_1 will corrupt both fields, causing the receiving engine to reject or drop the message. To compute the new values, start with the SOH character (0x01), create an encoder object for UTF-8 encoding, and map each [tag, value] pair into a string format, excluding fields 8, 9, and 10. The finalize function combines all these components to generate a complete FIX message, ensuring that the BodyLength and CheckSum fields remain accurate. The five common pitfalls to avoid are counting bytes, not characters, using consistent tokens for mapping, recalculating length-prefixed fields when modifying data, and handling repeating groups carefully, as they often contain sensitive information. SafeFIX, a free tool for up to 100 lines, provides a browser-based solution that anonymizes accounts, IDs, names, and free text while maintaining token maps and recomputing the 9 and 10 fields for every message. A synthetic log generator, fix-iso20022-samples, is available for testing any anonymization method.",
  "summary": "When a counterparty asks for \"the log\", you need to strip client IDs, account numbers and names first. Find-and-replace sounds enough, but it silently corrupts the session, because every FIX message carries two integrity fields that depend on the exact bytes. The two fields BodyLength (9) is the number of bytes after the SOH that ends the 9= field, up to and including the SOH before 10=. CheckSum…",
  "key_points": [
    "Remove sensitive information like client IDs, account numbers, and names from logs",
    "FIX messages contain BodyLength and CheckSum fields that depend on exact byte sequence",
    "SafeFIX tool anonymizes data while maintaining token maps and recomputing 9 and 10 fields"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}