diff --git a/shrine-webclient/src/main/html/js-i2b2/cells/plugins/MedCo/MedCo_ctrlr.js b/shrine-webclient/src/main/html/js-i2b2/cells/plugins/MedCo/MedCo_ctrlr.js index 8240f5ca7..1e2df8667 100644 --- a/shrine-webclient/src/main/html/js-i2b2/cells/plugins/MedCo/MedCo_ctrlr.js +++ b/shrine-webclient/src/main/html/js-i2b2/cells/plugins/MedCo/MedCo_ctrlr.js @@ -1,71 +1,73 @@ /*********************** * @ProjectDescription Secure count query for sensitive genomic and clinical data with strong privacy guarantees. * @inherits i2b2 * @namespace i2b2.MedCo * @author LCA1 EPFL * @version 0.1 * -------------------------------------------------------------------------------------------------------------------- * This plugin is based on Tutorial plugin and examples on the webclient plugin development guide. */ // hardcoded keys // public key with with the patient counts are encrypted // i2b2.MedCo.PubKey = "eQviK90cvJ2lRx8ox6GgQKFmOtbgoG9RXa7UnmemtRA="; // secret key used to decrypt the patient count i2b2.MedCo.SecKey = "iqLQz3zMlRjCyBrg4+303hsxL7F5vDtIaBxO0oc7gQA="; // aggregate key of the cothority, used encrypt the variant ids and the // other sensitive concepts // THE AGGREGATE KEY IS NOW COMPUTED DIRECTLY FORM THE group.toml. // PUT THE FILE IN /shrine-client/js-i2b2/cells/plugins/MedCo/group.toml // i2b2.MedCo.AggregateKey = "hBLI42njTgXfUBEPo+6mXphzedYm7VDQ2r+iTgqI/rk="; // 3 nodes. aggregate key //i2b2.MedCo.AggregateKey = "f5nploFz+HcNQCrVKRWfGh54GcVDUNUiUlzZpOPIiPE="; // 3 nodes. aggregate key // i2b2.MedCo.AggregateKey = "9PWOEFSnis60IlVFW/NPejodF8iPxoxGQDGqCUX5IgI="; // 6 nodes. aggregate key //i2b2.MedCo.AggregateKey = "BBWb2o4AlXK/EPTKq879Y9w14srNsJfS2vllOTlMfGg="; // 9 nodes. aggregate key //i2b2.MedCo.AggregateKey = "K2IpucjgUTj+su4nl7ERFPIGKZobO5NgQzKNI8fAeH4="; // 10 nodes. aggregate key // i2b2.MedCo.CothorityKeys = [ // "5loqdN2/oXEhkrIEhwc0WCKYm9+c9zs10Y4TZgF6490=", // "UE9/SKV6zw3PezdxzDiFXzG776pQRXT2+SyXog7k6Dc=", // "LFGVRk/ghvIeGwIFv/ZAFKtM2UWcjSypaVx0YAOdkMU="]; // paramaters for the light encrypt i2b2.MedCo.K = null; i2b2.MedCo.S = null; i2b2.MedCo.Init = function() { // POPUPS initialization i2b2.MedCo.popups.ctrlr.init(); + // Authentication todo has to be still implemented this is just a mock popup + i2b2.MedCo.popups.Authentication.show(); // manage YUI tabs i2b2.MedCo.view.yuiTabs = new YAHOO.widget.TabView("MedCo-TABS", {activeIndex: 0}); // PANELS initialization i2b2.MedCo.QT.ctrlr.init(); // store how many responses I am waiting for (I have to wait to receive all the variants before sending the query) // This variable is incremented by a popup when sending a query to retrieve some variants and is decremented every // time it receives the response. i2b2.MedCo.ctrlr.pendingVariantsQueries = 0; // initialize the parameters for the light encryption var numWorkers = 5; i2b2.MedCo.ctrlr.background.init(numWorkers, i2b2.MedCo.SecKey); // just check the crypto lib is working // var pk,sk; // var cipher, plain; // [sk, pk] = GenKey(); // cipher = EncryptStr(pk, 20); // plain = DecryptStr(cipher, sk); // alert(plain) }; i2b2.MedCo.Unload = function() { // purge old data i2b2.MedCo.model = {}; i2b2.MedCo.view = {}; i2b2.MedCo.popups.ctrlr.unload(); return true; }; \ No newline at end of file