diff --git a/src/ssp.js b/src/ssp.js index 9a98331..ec3a852 100644 --- a/src/ssp.js +++ b/src/ssp.js @@ -285,8 +285,7 @@ let SitePasswordWeb = ((function (self) { } if (which === "sitepw") { // Adjust site password for modulus bias - let m = alphabetSize - let statisticalDistance = Math.abs((256 % m)**2 - (m - 256 % m)**2)/(2*256*m); + let statisticalDistance = (256%alphabetSize)/256; // Upper bound on statistical distance guesses = Math.floor(guesses*(1 - statisticalDistance)); } return guesses;