{
  "slug": "nand-data-randomization",
  "term": "NAND data randomization",
  "aliases": [
    "NAND scrambling",
    "NAND randomizer"
  ],
  "definition": "NAND data randomization reversibly transforms bit patterns before programming to reduce pattern-dependent errors, with matching settings required for readback.",
  "note": "Pattern control: Balancing bits along a wordline does not ensure balanced patterns along a vertical NAND string. A 2021 TLC study uses two linked shift registers to control both directions; its stress results concern the tested memory, not a universal endurance multiplier. [favalli2021]\n\nReadback: In the Linux v6.12 sunxi driver, state selection depends on page address and block geometry; spare-area state also depends on ECC step size. Its two-byte marker helper has address-dependent XOR masks. These software transforms are not physical marker values or a complete page decoder. [sunxi] [native]\n\nErased pages: A documented GPMI erratum distinguishes erased from programmed reads when randomization is enabled. The generic Linux erased-chunk check separately counts deviations from FF across supplied data, ECC and extra OOB; a successful check normalizes the supplied buffers. Omitting ECC can change that decision. [nxp-randomizer] [nand-core]\n\nConfiguration: Some NAND feature bits controlling randomization and its coverage return to power-on defaults. Preserve the device-specific settings with the image; matching payload bytes alone does not establish a compatible raw relocation. [macronix-randomizer]",
  "status": "shipping",
  "advantages": [],
  "limitations": [
    {
      "text": "A reversible XOR transform does not correct bit errors or establish confidentiality.",
      "citationIds": [
        "favalli2021",
        "native"
      ]
    }
  ],
  "related": [
    "nand-copyback",
    "nand-spare-area"
  ],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-11-19",
  "citations": [
    {
      "id": "favalli2021",
      "title": "Favalli et al. A Scalable Bidimensional Randomization Scheme for TLC 3D NAND Flash Memories. Micromachines 12(7):759, 2021, sections 2-4.",
      "url": "https://pmc.ncbi.nlm.nih.gov/articles/PMC8305298/",
      "accessed": "2026-11-19"
    },
    {
      "id": "sunxi",
      "title": "Linux v6.12 sunxi_nand.c: randomizer state selection and software bad-block-marker transform.",
      "url": "https://github.com/torvalds/linux/blob/adc218676eef25575469234709c2d87185ca223a/drivers/mtd/nand/raw/sunxi_nand.c",
      "accessed": "2026-11-19"
    },
    {
      "id": "nand-core",
      "title": "Linux v6.12 nand_base.c: nand_check_erased_ecc_chunk and its data/ECC/OOB budget.",
      "url": "https://github.com/torvalds/linux/blob/adc218676eef25575469234709c2d87185ca223a/drivers/mtd/nand/raw/nand_base.c",
      "accessed": "2026-11-19"
    },
    {
      "id": "nxp-randomizer",
      "title": "NXP. i.MX 6SoloX Chip Errata, Rev. 2, February 2019, ERR008650, p. 79.",
      "url": "https://www.nxp.com/docs/en/errata/IMX6SXCE.pdf",
      "accessed": "2026-11-19"
    },
    {
      "id": "macronix-randomizer",
      "title": "Macronix. AN1051 Rev. 1, 2 November 2023: randomizer configuration and coverage, sections 1, 2 and 4.",
      "url": "https://www.macronix.com/Lists/ApplicationNote/Attachments/2151/AN1051V1-The%20Introduction%20of%20Randomizer%20Feature%20on%20MX30xFxG28AD_MX35xFxG24AD.pdf",
      "accessed": "2026-11-19"
    },
    {
      "id": "native",
      "title": "Hesela. NAND randomizer: pinned source-helper execution, exact results and reproduction instructions.",
      "url": "https://hesela.dev/research/nand-randomizer/README.md",
      "accessed": "2026-11-19"
    }
  ],
  "provenance": [
    "The 2021 full paper compares randomizers under endurance and retention stress; no performance or lifetime result is reproduced. [favalli2021]",
    "NXP ERR008650 and Macronix AN1051 describe different device families. They are not general claims about current NAND products. [nxp-randomizer] [macronix-randomizer]",
    "Publishing-session replay of five pinned Linux helpers matched the frozen results. Constructed buffers are not asserted to be valid ECC codewords; no NAND hardware, whole-page decoder or copyback command was exercised. [native]"
  ]
}
