🗝️ Recovery Code Generator
📐 工作原理与说明
熵 = 码数 × 每码字符数 × log₂(字符表长度)
示例:10 码 × 10 字符 × 32 字符集 ≈ 500 bit
示例:10 码 × 10 字符 × 32 字符集 ≈ 500 bit
恢复码(备份码)是双因素认证失效时的兜底凭证,要求「离线可存、一次性有效、不可猜测」。本工具用密码学安全随机源生成高熵字符串,按固定长度分组便于抄写。安全要点有三:一是每码只用一次,服务端使用后立即失效;二是必须以哈希形式存储,明文泄露等同于绕过 2FA;三是提示用户打印或离线保存,而非存在同一台设备的明文文件里。生成数量通常 8–10 个即可覆盖绝大多数找回场景。
⚠️ This tool only generates random strings locally in your browser as samples for self-built systems or demos. These codes are not registered with any account service; third-party platforms (email, social, finance, etc.) will not accept them, and they cannot be used to recover a real account. Real recovery codes must be issued and registered by that service.
📚 深度解析:恢复码生成器
💡 常见使用场景
- 生成本地随机恢复码样例,供自建系统或演示使用。
- 仅用于了解恢复码格式与离线保管方式;真实账户的兜底码必须由对应服务出具并登记。
生成
10 组 `r4k9-m2x8` 格式码,用后失效。
❓ 常见问题(FAQ)
- 恢复码怎么存?
- 服务端哈希存储,用户离线保管。
- 用掉一个之后要重新生成吗?
- 不必立即重新生成,但应关注剩余数量:多数平台会在剩余较少时提示补充。若怀疑恢复码已泄露,应立即作废全部旧码并重新生成——这会让之前保存的副本全部失效。建议定期核对还能用几次,而不是等到真需要时才发现用光了。
Formula & Standard References
| Item | Formula / Note | Source / Standard |
|---|---|---|
| Entropy | recovery codes should carry at least 128 bits of entropy | NIST SP 800-63B |
| Single use | each code is single-use and invalidated after redemption | NIST SP 800-63B |
| Storage | store only hashes, never plaintext codes | NIST SP 800-63B |
⚠️ 使用说明与注意事项
- 本工具纯前端运行,数据不会上传到服务器
- 建议在主流浏览器(Chrome/Safari/Firefox/Edge)中使用
- 计算结果仅供参考,请以实际应用场景为准