UNPKG

keygentoolshed

Version:

Key generation utilities for cryptographic operations. QUANTUM ENCRYPTION FOLDER UPDATE!!! See its folder for all <3

15 lines (11 loc) 465 B
function validateShares(shares, originalSecret, threshold) { if (shares.length < threshold) { console.log("Not enough shares to reconstruct the secret."); return false; } const reconstructedSecret = shamir.combine(shares); const isValid = reconstructedSecret === originalSecret; console.log(`Reconstructed Secret: ${reconstructedSecret}`); console.log(`Is the reconstructed secret valid? ${isValid}`); return isValid; }