You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I'm struggeling to fully grasp the concept of barriers, since I could not find documentation on it.
Suppose I have a Jiff application and I want to measure the time taken for share distribution, computation and opening.
Would a programme structured like this be able to do this accurately?
// Setup of jiffClient omitted.// suppose that compute_parties = [1,2,3], input_parties = [4,5,6,7,8] and all_parties = [1,2,3,4,5,6,7,8]// This is the code ran by a compute party. The input parties perform no computation but only send input shares.varmean=function(X){// [conversion of X to array of shares omitted] varsum=X[0];for(vari=1;i<X.length;i++){sum=sum.sadd(X[i]);}returnsum.cdiv(X.length);};// the computation codevarcompute=function(){log("starting computation");jiffClient.wait_for(all_parties,function(){jiffClient.start_barrier();vart_start_recv=process.hrtime.bigint();log("all input parties ready");varX=jiffClient.share(null,null,compute_parties,input_parties);jiffClient.end_barrier().then(()=>{vart_end_recv=process.hrtime.bigint();log(`received all secret shares in ${Number(t_end_recv-t_start_recv)/1000000} ms`);});jiffClient.start_barrier();varstart_t=process.hrtime.bigint();varm1=mean(X);jiffClient.end_barrier().then(()=>{varend_t=process.hrtime.bigint();console.log(`Computed result in ${Number(end_t-start_t)/1000000} ms`);varstart_t_open=process.hrtime.bigint();jiffClient.open(m1,compute_parties).then((res)=>{varend_t_open=process.hrtime.bigint();console.log("res: ",res.toString());console.log(`Opened result in ${Number(end_t_open-start_t_open)/1000000} ms`);jiffClient.disconnect(true,true);});});});};// wait only for the compute parties to preprocessjiffClient.wait_for(compute_parties,function(){log("all compute parties ready");// no preprocessing: use server as crypto providerlog("skipping preprocessing, server is crypto provider");compute();});log("submitted wait_for callback...");
I'd like to be able to accurately measure the duration of secret sharing, computation and share opening, because I want to compare these numbers among different platforms. Are barriers the right tool for this?
The text was updated successfully, but these errors were encountered:
Hello,
I'm struggeling to fully grasp the concept of barriers, since I could not find documentation on it.
Suppose I have a Jiff application and I want to measure the time taken for share distribution, computation and opening.
Would a programme structured like this be able to do this accurately?
I'd like to be able to accurately measure the duration of secret sharing, computation and share opening, because I want to compare these numbers among different platforms. Are barriers the right tool for this?
The text was updated successfully, but these errors were encountered: