Skip to content

Shamir's Secret Sharing

Split a secret into N shares where any K shares can reconstruct it — but fewer than K reveal nothing. Based on Shamir's threshold scheme over GF(256).

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

Runs 100% in your browser via Web Crypto - the secret and its shares never leave your device.

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.