13:03:39 <evilaliv3> #startmeeting 13:03:39 <MeetBot> Meeting started Mon Apr 27 13:03:39 2015 UTC. The chair is evilaliv3. Information about MeetBot at http://wiki.debian.org/MeetBot. 13:03:39 <MeetBot> Useful Commands: #action #agreed #help #info #idea #link #topic. 13:03:58 <evilaliv3> hello! 13:04:42 <evilaliv3> as now usual i've opened the dayliy scrum meeting, for who is working today on globaleaks :) 13:05:15 <evilaliv3> elv, hellais here is the pad: http://piratepad.net/lH0RT3enZy 13:05:30 <evilaliv3> i'm still finishing to fill it 13:05:57 <evilaliv3> hellais can you please answer me on this comment? https://github.com/globaleaks/GlobaLeaks/commit/d490d05302c0c2f5776645316cae75ae68bedcac#commitcomment-10902566 13:06:41 <evilaliv3> i'm still thinking how we could solve the issue of generating the deterministic key inside a webworker 13:07:27 <evilaliv3> ths issue lie in the fact that the postMessage() used when working with webworkers does not allow to pass objects 13:07:58 <evilaliv3> so all should be something like a json serializable object 13:08:43 <evilaliv3> my idea so is to modify the "prnd" hook you thought in order to accept two possible types: 13:09:09 <evilaliv3> - an object (as you currently did) 13:11:13 <evilaliv3> - an array (usable with webworkers); in case an array is passed we will implement inside the worker (and so inside the openpgp new feature) the circular array as you already did 13:12:28 <evilaliv3> do you have any suggestion on this idea? i'm currently not finding any other solution to this issue 13:16:02 <elv> evilaliv3: it's not just that 13:16:24 <elv> even if you put the Seed object creation inside the web worker 13:16:45 <elv> you have the problem that Web Workers have a partial implementation on the Web Crypto API 13:17:37 <elv> have you also tested this? 13:18:01 <evilaliv3> nope as i switched on other topics 13:18:10 <evilaliv3> i'm now restarting working on it 13:21:40 <elv> oky give it a try also, so you have the whole picture 13:22:20 <elv> anyway the problem that would make the browser inresponsive during key generation, is the fact that Seed is slow 13:23:32 <elv> the official implementation takes less than a second on my machine, so probably web workers are not needed for key generation as long as we are able to optimize Seed 13:24:06 <evilaliv3> ok i see 13:24:25 <elv> that should be a task for hellais, he took a look at the internals to code Seed 13:25:42 <elv> is the new end2end branch aligned at my last commit? 13:26:03 <evilaliv3> not yet 13:26:28 <elv> I'm writing to vec about the progress of the tests so he can take a look at the code for his tasks about testing 13:26:33 <evilaliv3> can proceed on your branch for today? 13:26:48 <elv> ok i'm linking my repo for now 13:26:53 <evilaliv3> i swear that by tomorrow i'll align it all :) 13:27:54 <evilaliv3> anyway concerning the Seed(), the keygeneration for sure should be done inside webworkerrs 13:29:02 <evilaliv3> i will give a try viewing why your were not able to get the Seed() inside web workers 13:31:16 <evilaliv3> it does not use any crypto API but simply implement a circular array 13:40:10 <hellais> hi 13:40:45 <hellais> evilaliv3: can you pass strings through webworkers? 13:42:01 <evilaliv3> yep all that is json serializable i think 13:42:44 <hellais> I don't understand your proposed "array" solution 13:43:01 <evilaliv3> your seed function implement a circular array right? 13:43:18 <evilaliv3> i would implement it internally, and pass via postMessage() only the array 13:43:30 <evilaliv3> anyway: 13:43:31 <evilaliv3> aMessage 13:43:32 <evilaliv3> The object to deliver to the worker; this will be in the data field in the event delivered to the DedicatedWorkerGlobalScope.onmessage handler. This may be any value or JavaScript object handled by the structured clone algorithm, which includes cyclical references. 13:43:38 <evilaliv3> essage 13:43:39 <evilaliv3> The object to deliver to the worker; this will be in the data field in the event delivered to the DedicatedWorkerGlobalScope.onmessage handler. This may be any value or JavaScript object handled by the structured clone algorithm, which includes cyclical references. 13:43:41 <hellais> an array of what? 13:43:44 <evilaliv3> ops sorry 13:43:53 <evilaliv3> an array containing the circular array 13:44:14 <evilaliv3> the one used internally by the seed 13:44:56 <evilaliv3> anyway i'm now interested to see why the scrutctured clone argument is not able to clone the Seed object 13:45:09 <hellais> yeah ok, so it means adding notion of deterministic key generation to openpgp.js 13:45:19 <evilaliv3> yep 13:45:35 <hellais> if @tanx likes it good for me 13:45:52 <evilaliv3> do you foresee any different solution ? 13:46:35 <hellais> not really 13:46:58 <hellais> if we must use webworkers and they can only accept as parameters things that are serilizable in JSON that is very reduced subset of stuff 13:47:56 <evilaliv3> i said this thin of json serializable but i'm still not sure of that 13:48:14 <evilaliv3> i pasted the reference above: https://developer.mozilla.org/en-US/docs/Web/API/Worker/postMessage 13:48:50 <evilaliv3> https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/The_structured_clone_algorithm 13:48:58 <evilaliv3> Error and Function objects cannot be duplicated by the structured clone algorithm; attempting to do so will throw a DATA_CLONE_ERR exception. 13:49:16 <evilaliv3> so no functions can be passed at all 13:54:24 <hellais> that sucks then 13:54:29 <hellais> since you can't pass hooks and stuff like that 13:54:42 <hellais> so I think you are stuck with passing something that is reconducible to a string 13:55:02 <hellais> (an array in the end is just a string serialization) 13:56:08 <evilaliv3> yep so we have two viable solutions: 13:56:31 <evilaliv3> 1) the one i described above, that would require putting the circular array logic inside openpgp.js 13:57:20 <evilaliv3> 2) try to avoid using the webworker defined by openpgp.js but define one by ourselves 13:58:08 <elv> evilaliv3: Seed does not use Crypto API but openpgpjs internally does (I guess) 13:58:42 <evilaliv3> elv openpgp.js is able to do all openpgp.js stuff inside webworkers 13:58:49 <evilaliv3> look at: https://github.com/openpgpjs/openpgpjs/blob/master/dist/openpgp.worker.js 13:59:50 <evilaliv3> i'm now thinking that all the work done by hellais could be written inside a patched openpgp.worker.js 14:00:01 <evilaliv3> this way in the meantime we would solve two issues: 14:00:15 <elv> evilaliv3: probably the best thing is to patch openpgp.worker.js and add 'generate-deterministic-key-pair' 14:00:26 <elv> and put Seed inside the WW 14:00:29 <evilaliv3> 1) we would not need @tanx to merge the pull requests 14:00:38 <elv> hellais: anyway Seed is *VERY* slow 14:00:38 <evilaliv3> 2) we would be able to fix the Seed issue 14:01:07 <evilaliv3> elv: i've already seen the possible drawbacks of the seed and i'm able to fix it 14:01:39 <elv> good! 14:02:30 <evilaliv3> it's not a matter of simply generate deterministic keypays, but also to be able to do all the streaming work that hellais did 14:02:50 <evilaliv3> i will investigate today if this all is doable with a simple worker patch 14:05:12 <elv> those are different openpgpjs calls 14:05:25 <elv> so u have to work on them separately anyway 14:14:10 <evilaliv3> #stopmeeting 14:14:39 <evilaliv3> #endmeeting