crypto-fun Mathematics

3 个科学问题 · 数学 Mathematics

本页目录

身份证最后一位校验码,是用什么数学算出来的?

What math produces the last check digit of an ID number?

前17位分别乘以固定权重后求和,再对11取模,余数对应一个校验字符(0到9和X)。这样能立刻发现输错或漏一位的错误。
The first 17 digits are weighted, summed, then taken modulo 11, mapping the remainder to a check character (0–9 or X). This instantly catches single-digit or missing-digit errors.
难度 进阶 · 适合 大众 CC BY 4.0 · 已核验 · Verified 2026-08-23 · 2 条独立证据
来源 · Source

Graham, Knuth, Patashnik,《Concrete Mathematics》第2版,Addison-Wesley,1994

R. L. Graham et al., Concrete Mathematics, 2nd ed., Addison-Wesley, 1994

#生活中的密码 #校验码

超市条形码里藏着什么简单的数学?

What simple math is hidden in a supermarket barcode?

条形码用宽窄条表示0和1的二进制,并带一位奇偶校验位来发现扫描错误。它把商品编号编码成机器能快速读取的数字串。
A barcode encodes binary 0/1 with bar widths and includes a parity check digit to catch scan errors. It turns a product code into a machine-readable number string.
难度 进阶 · 适合 大众 CC BY 4.0 · 已核验 · Verified 2026-08-23 · 2 条独立证据
来源 · Source

Graham, Knuth, Patashnik,《Concrete Mathematics》第2版,Addison-Wesley,1994

R. L. Graham et al., Concrete Mathematics, 2nd ed., Addison-Wesley, 1994

#生活中的密码 #条形码

为什么密码长一位,破解难度会大很多?

Why does adding one character to a password hugely raise cracking difficulty?

若每个位置有约62种字符,n位密码有62的n次方种组合,长度加一组合就乘62。指数增长让长密码在暴力破解面前极其安全。
With about 62 possible characters per position, an n-character password has 62^n combinations; one more character multiplies that by 62. Exponential growth makes long passwords very safe against brute force.
难度 进阶 · 适合 大众 CC BY 4.0 · 已核验 · Verified 2026-08-23 · 2 条独立证据
来源 · Source

Graham, Knuth, Patashnik,《Concrete Mathematics》第2版,Addison-Wesley,1994

R. L. Graham et al., Concrete Mathematics, 2nd ed., Addison-Wesley, 1994

#生活中的密码 #组合