Closed koblas closed 3 years ago
The following test program will return faulty 90% of the time. Reverting back to 0.7.6 return working.
faulty
const _sodium = require("libsodium-wrappers-sumo"); async function libsodium() { await _sodium.ready; return _sodium; } async function main() { const s = await libsodium(); const p = s.crypto_core_ristretto255_scalar_random(); const valid = s.crypto_core_ristretto255_is_valid_point(p); if (!valid) { console.log("sodium install is faulty"); } else { console.log("sodium install is working"); } } main().then(() => true);
crypto_core_ristretto255_scalar_random()
You're generating a scalar.
crypto_core_ristretto255_is_valid_point()
But checking a group element, not a scalar.
The following test program will return
faulty
90% of the time. Reverting back to 0.7.6 return working.