
Sanitization Sampling: Allocate Checks Across Drives
Short answer
A batch total of checked blocks does not tell you how well each drive was represented. Thirty checks concentrated on one device and thirty checks spread across ten devices can have very different chances of finding a localized failure. Keep the drive identity and sampling allocation with every result.
For a defined readable population, a finite sampling model can compare those designs. It cannot establish sanitization of remapped or inaccessible physical storage, supply missing completion evidence, or turn a passed sample into a probability that a drive is clean.
Who this is for
This guide is for sanitization reviewers comparing read-verification plans across multiple drives. It addresses allocation: which device receives each check. The application below is a proposed analytical comparison, not a prescribed sample size, a new scientific law or a standard-approved release rule.
Use the model only when a comparison against an expected result is meaningful for the selected technique. After a documented overwrite, a check might compare a defined readable unit with its expected pattern. Do not assume an arbitrary read after cryptographic erase or a native sanitize operation has the same interpretation. Establish the technique-specific evidence first.
Verification note: No drive was erased or read for this article, and no real device logs were available. All drive populations and failure layouts below are hypothetical. The Python example calculates probabilities; it performs no storage operations.
When to use this
Use this comparison when a batch report gives one large sample count but does not identify the contributing drives, when a fast device receives most of the checks, or when a plan promises to find an entirely untreated device without ensuring that every device is examined.
It is also useful when translating a time budget into an explicit allocation. Decide what failure layout the plan is intended to detect before deciding whether its count is adequate.
When not to use this
Do not use the model to override a failed or interrupted sanitization operation. Resolve the failure through the approved process. More successful reads elsewhere do not cancel an exception on the affected device.
Do not apply the calculation to changing data, an incomplete address list, unreadable units counted as passes, or a comparison routine whose correctness is unknown. If a virtual view hides the underlying devices, the model describes that view rather than physical drives you have not identified.
NIST SP 800-88 Rev. 2, finalized in September 2025, supersedes Rev. 1. Its assurance framework separates checking an operation's outcome from the organization's decision to accept the result and residual risk. The calculations here are supplementary analysis, not a replacement for either decision or a NIST sampling requirement.
Workflow
1. Define the units and preserve device identity
For each drive, define a finite list of non-overlapping, equally sized readable units. A unit may be a block or a larger comparison region, but use one definition consistently within that drive. Count units, not bytes, in the equations. The probabilities are dimensionless.
Record the drive identity, readable population, expected content, comparison method and number of distinct selected units. A count without that mapping cannot establish whether a device was sampled at all. Repeated reads of one address must not be counted as distinct selections without replacement.
The model assumes the contents remain fixed while checking and that reading a mismatching unit always reveals the mismatch. Those are conditions to assess, not properties established by a successful calculation.
2. Derive the per-drive miss probability
Use these definitions for drive i:
N_i = number of readable units in the defined population
K_i = number of units that would fail the comparison
n_i = number of distinct units sampled uniformly without replacement
q_i = probability of observing no mismatch, conditional on K_i
q_i = C(N_i - K_i, n_i) / C(N_i, n_i)
All three counts are integers, with N_i > 0, 0 <= K_i <= N_i and 0 <= n_i <= N_i. Here C(a, b) counts unordered selections of b objects from a; treat it as zero when b > a.
The denominator counts every equally likely sample of the chosen size. To miss all mismatches, every selected unit must come from the non-mismatching units, whose count is the population minus the mismatches. Counting only those samples gives the numerator. If the sample is larger than the non-mismatching population, missing every mismatch is impossible under this ideal model.
A crucial qualification is that the mismatch count is a hypothetical input. A sample with no failures does not reveal that input. The equation answers a conditional design question, not the probability that the device contains no residual data.
3. Compare allocations across drives
For fixed per-drive populations and mismatch counts, independently randomized selections on separate drives give:
q_batch = product of q_i over all drives
P(detect at least one mismatch) = 1 - q_batch
This multiplication concerns the random selection design, conditional on the specified failure layout. It does not assume the devices' sanitization failures occurred independently. A common fault can affect several drives. If the selection processes are coupled, do not multiply the per-drive probabilities without deriving the joint design.
An alternative design is one uniform sample from the pooled list of all drive-and-unit pairs:
N_total = sum of N_i
K_total = sum of K_i
n_total = total distinct pairs sampled
q_pooled = C(N_total - K_total, n_total) / C(N_total, n_total)
That expression follows the same counting argument over the combined population. A pooled uniform sample lets the number of checks per drive vary. It is different from setting a fixed count on every drive. A convenience sample from whichever drive responds fastest is not automatically either design.
4. Work through a localized failure example
Consider ten hypothetical drives with 100 readable units each. Exactly one drive has all 100 units mismatching; the other nine have none. Allow a total of 30 checks.
| Design | Allocation | Conditional probability of missing all mismatches |
|---|---|---|
| Concentrated checks | All 30 on a specified clean drive | 100% |
| Uniform pooled sample | 30 distinct pairs from all 1,000 pairs | About 4.035% |
| Fixed per-drive sample | 3 distinct units on each drive | 0% |
The first row conditions on the checked drive being clean; it is not an average over an unknown failed-drive location. The pooled result is C(900, 30) / C(1000, 30). For the per-drive design, at least one selected unit necessarily belongs to the fully mismatching drive, so the ideal comparison detects it.
The zero in that last row is limited to this deliberately extreme failure layout and the model's perfect detector. It is not a claim of zero residual risk after a real test.
5. Change the failure layout before accepting the design
Now keep the same ten drives and the same budget, but place just one mismatching unit on one drive. Three checks on that drive miss it with probability 97 / 100 = 97%. The other drives cannot reveal it. A pooled sample of 30 from 1,000 units also misses that single mismatch with probability 970 / 1000 = 97%.
The fixed allocation is excellent at detecting an entirely mismatching drive in the first scenario, yet weak against one isolated mismatching unit in the second. Neither result is a contradiction. The layout being tested changed.
For a single mismatch on a particular drive, the formula simplifies to:
q_i = (N_i - n_i) / N_i
This follows because each unit has selection probability equal to the sample size divided by the population size; a single bad unit is missed when it is not selected. With 100 units, reducing that conditional miss probability to at most 5% requires at least 95 distinct checks on that drive. That is an arithmetic consequence of this model, not a recommended universal verification percentage.
Verification checklist
Reproduce the toy arithmetic with Python 3.8 or later, where math.comb is available. This code uses exact integer combinations followed by floating-point division. It is intended for these small examples, not as an optimized calculator for huge address spaces.
from math import comb
def miss_probability(population, mismatches, sample):
if not (population > 0 and 0 <= mismatches <= population
and 0 <= sample <= population):
raise ValueError("invalid counts")
good = population - mismatches
if sample > good:
return 0.0
return comb(good, sample) / comb(population, sample)
print(f"Whole-drive failure, pooled: {miss_probability(1000, 100, 30):.6f}")
print(f"Whole-drive failure, per-drive: {miss_probability(100, 100, 3):.6f}")
print(f"Single mismatch, pooled: {miss_probability(1000, 1, 30):.6f}")
print(f"Single mismatch, per-drive: {miss_probability(100, 1, 3):.6f}")
Expected mathematical output, not device output:
Whole-drive failure, pooled: 0.040350
Whole-drive failure, per-drive: 0.000000
Single mismatch, pooled: 0.970000
Single mismatch, per-drive: 0.970000
For an actual approved checking plan, verify that the recorded selections follow the declared design. Keep the population definition, selection procedure, allocation and exceptions. Confirm that a read error remains an error. A correct formula cannot repair an incorrect asset identifier, stale data, comparison bug or selective omission of failures.
Resale and evidence checklist
Keep the operational completion evidence and the sampling record together, but give each its proper scope. A reviewer should be able to identify the method used on each asset, its completion result, any additional readable-area checks, and the basis for accepting or withholding release.
If a drive received no checks under a pooled design, state that fact rather than distributing the batch total evenly in the report. If the approved procedure requires per-drive evidence, a batch aggregate cannot substitute for it. Do not select a new allocation after seeing failures and report it as though it had been the original plan.
What not to publish
Keep real asset identifiers, recovered content, customer data and sensitive address maps out of public examples. A toy population can explain allocation without exposing the contents of a device. Preserve genuine internal evidence without replacing it with the example output above.
Common mistakes
A frequent mistake is calling a conditional miss probability confidence that all media are sanitized. The calculation assumes a specified mismatch layout; it does not infer that layout from a passed sample.
Another is reporting coverage in bytes when the draws actually represent unequal regions or repeated addresses. Rebuild the population definition before using a formula for equally likely units.
Finally, sampling host-readable units cannot demonstrate removal from inaccessible physical locations. Flash remapping, hidden regions, surviving keys and external copies require evidence appropriate to those boundaries. Even a full comparison of the defined readable population cannot extend the population by assertion.
CliDeck workflow fit
Keep the device-to-evidence mapping in the workflow your organization uses. If CliDeck is part of that workflow, preserve per-asset decisions rather than only a batch success total. This article does not claim an implemented sampling engine, measured performance or sanitization certification from CliDeck.
FAQ
Is checking every drive better than pooling?
It depends on the failure layout and the acceptance objective. The worked example shows why a per-drive minimum can detect an entirely untreated drive, while still being weak against sparse residual mismatches. It does not establish a universally optimal allocation.
Can I multiply results if failures share a cause?
For the conditional model, independent randomized selections can support multiplication even when the fixed mismatch layout came from a shared cause. Independent selection is different from independent failure occurrence. Uncertain or coupled selection needs a separate analysis.
Does a zero modeled miss probability authorize release?
No. That zero applies only to the specified population, layout and ideal detection assumptions. The approved sanitization method, completion evidence, exceptions and organizational acceptance decision remain necessary.