校验和碰撞概率

#️⃣ Checksum Collision Probability

Estimate the undetected-error probability from checksum bit width and data volume; suitable for random errors only, not adversarial tampering.

📐 计算公式与说明

n 位校验和的随机漏检概率 ≈ 2⁻ⁿ
累计 ≈ 1 − (1 − 2⁻ⁿ)^N

仅适用于随机错误,不能防蓄意篡改。

📚 深度解析:校验和碰撞概率

💡 常见使用场景

示例:16 位校验和、10^6 包
随机错误漏检率约 1/65536 量级,但蓄意攻击者仍可控构造碰撞,故仅用于非安全场景。

❓ 常见问题(FAQ)

校验和能防篡改吗?
不能。校验和线性、易被故意构造碰撞,防篡改须用加密哈希或 MAC。
位数越多越好吗?
更多位降低随机漏检率但也增加开销,按信道误码率取舍。
与 CRC 关系?
CRC 是带多项式的校验和,对突发错误检错更强,见 CRC 检错能力估算。

Formula & Standard References

Item Formula / Rule Source / Standard
Undetected error rate A k-bit checksum misses about 2−k of random errors Peterson & Brown, Cyclic Codes for Error Detection, 1961
Single-bit errors When the generator polynomial has (x + 1) as a factor, every single-bit error is detected ISO/IEC 3309 HDLC frame structure and FCS
Burst errors Bursts of length ≤ k are always detected; longer bursts slip through at most 2−k ITU-T X.25 §2.2.7.4 Frame Check Sequence