Skip to content

Shamir 秘密共享

将秘密拆分为 N 份,任意 K 份即可重建——少于 K 份不会泄露任何信息。基于 GF(256) 上的 Shamir 门限方案。

Privacy & Security
cosmodev ~/tools/secret-sharing-

通过 Web Crypto 100% 在浏览器中运行 — 秘密及其份额绝不会离开你的设备。

Send to AI
Write a Python implementation of Shamir's Secret Sharing over GF(256) that interoperates with these share strings: each share is the two-digit hex x-coordinate, a dash, then one hex byte per secret byte (e.g. "01-a3b2c1"). It must split a secret into 5 shares with threshold 3, and reconstruct from any 3 of them. Use the AES reduction polynomial 0x11B and rejection-free crypto-random coefficients.