From b2d9db8bbf0df4647cdb51cdb381f12997d98f91 Mon Sep 17 00:00:00 2001 From: Ben Adida <ben@adida.net> Date: Thu, 22 Dec 2011 19:18:14 -0800 Subject: [PATCH] mix in the server seed into the client entropy pool, fixes #298 --- resources/static/shared/network.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/resources/static/shared/network.js b/resources/static/shared/network.js index 305084129..ac292824a 100644 --- a/resources/static/shared/network.js +++ b/resources/static/shared/network.js @@ -132,6 +132,11 @@ BrowserID.Network = (function() { // XXX remove the ABC123 code_version = result.code_version || "ABC123"; + // seed the PRNG + // FIXME: properly abstract this out, probably by exposing a jwcrypto + // interface for randomness + require("./libs/all").sjcl.random.addEntropy(result.random_seed); + _.defer(cb); }, error: deferResponse(xhrError(onFailure, { -- GitLab