@@ -12826,7 +12826,7 @@ <h2 id="asimpleexample4bitlogicaland">A Simple Example: 4-bit Logical And</h2>
1282612826# 2 and 3 are the evaluator's
1282712827# 6 is the output wire
1282812828
12829- # gates
12829+ # gates
12830128302 1 0 1 4 AND # 4 = 0 AND 1
12831128312 1 2 3 5 AND # 5 = 2 AND 3
12832128322 1 4 5 6 AND # 6 = 4 AND 5
@@ -12848,12 +12848,12 @@ <h2 id="asimpleexample4bitlogicaland">A Simple Example: 4-bit Logical And</h2>
1284812848<p>Now that we have the circuit, it is time to write the code for the parties and the server. JIGG requires minimal configurations.
1284912849All we have to do is provide the JIGG parties with the address of the server, the circuit, and the inputs.</p>
1285012850<p>The computation is asynchronous because it involves communication. The output is made available through a promise.
12851- Additionally, a listener may be set to keep track of the progress of the computation. </p>
12851+ Additionally, a listener may be set to keep track of the progress of the computation.</p>
1285212852<pre><code class="neptune[frame=2,scope=server,title=Server,env=server] language-neptune[frame=2,scope=server,title=Server,env=server]">// Create new JIGG Server, this server runs whenever httpServer is running
1285312853const jiggServer = new JIGG.Server(httpServer);
1285412854Console.log('JIGG Server created');
1285512855</code></pre>
12856- <pre><code class="neptune[frame=2,scope=garbler1,title=Garbler,env=browser] language-neptune[frame=2,scope=garbler1,title=Garbler,env=browser]">const inputs = [0, 1];
12856+ <pre><code class="neptune[frame=2,scope=garbler1,title=Garbler,env=browser,offline=false ] language-neptune[frame=2,scope=garbler1,title=Garbler,env=browser,offline=false ]">const inputs = [0, 1];
1285712857const circuit = getAnd4Circuit();
1285812858
1285912859// in node.js, use new JIGG.Client(...)
@@ -12873,7 +12873,7 @@ <h2 id="asimpleexample4bitlogicaland">A Simple Example: 4-bit Logical And</h2>
1287312873// start
1287412874agent.start();
1287512875</code></pre>
12876- <pre><code class="neptune[frame=2,scope=evaluator1,title=Evaluator,env=browser] language-neptune[frame=2,scope=evaluator1,title=Evaluator,env=browser]">const inputs = [0, 1];
12876+ <pre><code class="neptune[frame=2,scope=evaluator1,title=Evaluator,env=browser,offline=false ] language-neptune[frame=2,scope=evaluator1,title=Evaluator,env=browser,offline=false ]">const inputs = [0, 1];
1287712877const circuit = getAnd4Circuit();
1287812878
1287912879// in node.js, use new JIGG.Client(...)
@@ -12904,7 +12904,7 @@ <h2 id="inputoutputencoding32bitaddition">Input/output encoding: 32-bit Addition
1290412904The circuit behaves as you would expect. For every two bits at the same position in the input, the circuit XORs these bits and the carry bit (initially 0)
1290512905to find the output bit in the corresponding position, the circuit then determines the next carry by checking if
1290612906any two of the input bits and previous carry wires are 1.</p>
12907- <pre><code class="neptune[frame=3,scope=garbler3,title=Garbler,env=browser] language-neptune[frame=3,scope=garbler3,title=Garbler,env=browser]">const input = 154;
12907+ <pre><code class="neptune[frame=3,scope=garbler3,title=Garbler,env=browser,offline=false ] language-neptune[frame=3,scope=garbler3,title=Garbler,env=browser,offline=false ]">const input = 154;
1290812908const circuit = getAdd32Circuit();
1290912909
1291012910// in node.js, use new JIGG.Client(...)
@@ -12924,7 +12924,7 @@ <h2 id="inputoutputencoding32bitaddition">Input/output encoding: 32-bit Addition
1292412924// start
1292512925agent.start();
1292612926</code></pre>
12927- <pre><code class="neptune[frame=3,scope=evaluator3,title=Evaluator,env=browser] language-neptune[frame=3,scope=evaluator3,title=Evaluator,env=browser]">const input = 310;
12927+ <pre><code class="neptune[frame=3,scope=evaluator3,title=Evaluator,env=browser,offline=false ] language-neptune[frame=3,scope=evaluator3,title=Evaluator,env=browser,offline=false ]">const input = 310;
1292812928const circuit = getAdd32Circuit();
1292912929
1293012930// in node.js, use new JIGG.Client(...)
@@ -12969,7 +12969,7 @@ <h2 id="serverasagarblerevaluator">Server as a Garbler/Evaluator</h2>
1296912969// start
1297012970agent.start();
1297112971</code></pre>
12972- <pre><code class="neptune[frame=4,scope=evaluator3,title=Evaluator,env=browser] language-neptune[frame=4,scope=evaluator3,title=Evaluator,env=browser]">const input = '202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f'; // hex input
12972+ <pre><code class="neptune[frame=4,scope=evaluator3,title=Evaluator,env=browser,offline=false ] language-neptune[frame=4,scope=evaluator3,title=Evaluator,env=browser,offline=false ]">const input = '202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f'; // hex input
1297312973const circuit = getSha256Circuit();
1297412974
1297512975// in node.js, use new JIGG.Client(...)
@@ -14974,15 +14974,13 @@ <h1 id="additionalresources">Additional Resources</h1>
1497414974
1497514975},{}],20:[function(require,module,exports){
1497614976
14977-
1497814977var BlobBuilder = typeof BlobBuilder !== 'undefined' ? BlobBuilder :
1497914978 typeof WebKitBlobBuilder !== 'undefined' ? WebKitBlobBuilder :
1498014979 typeof MSBlobBuilder !== 'undefined' ? MSBlobBuilder :
1498114980 typeof MozBlobBuilder !== 'undefined' ? MozBlobBuilder :
1498214981 false;
1498314982
1498414983
14985-
1498614984var blobSupported = (function() {
1498714985 try {
1498814986 var a = new Blob(['hi']);
@@ -14993,7 +14991,6 @@ <h1 id="additionalresources">Additional Resources</h1>
1499314991})();
1499414992
1499514993
14996-
1499714994var blobSupportsArrayBufferView = blobSupported && (function() {
1499814995 try {
1499914996 var b = new Blob([new Uint8Array([1,2])]);
@@ -15004,13 +15001,11 @@ <h1 id="additionalresources">Additional Resources</h1>
1500415001})();
1500515002
1500615003
15007-
1500815004var blobBuilderSupported = BlobBuilder
1500915005 && BlobBuilder.prototype.append
1501015006 && BlobBuilder.prototype.getBlob;
1501115007
1501215008
15013-
1501415009function mapArrayBufferViews(ary) {
1501515010 return ary.map(function(chunk) {
1501615011 if (chunk.buffer instanceof ArrayBuffer) {
@@ -21933,19 +21928,16 @@ <h1 id="additionalresources">Additional Resources</h1>
2193321928},{}],55:[function(require,module,exports){
2193421929
2193521930
21936-
2193721931if (typeof module !== 'undefined') {
2193821932 module.exports = Emitter;
2193921933}
2194021934
2194121935
21942-
2194321936function Emitter(obj) {
2194421937 if (obj) return mixin(obj);
2194521938};
2194621939
2194721940
21948-
2194921941function mixin(obj) {
2195021942 for (var key in Emitter.prototype) {
2195121943 obj[key] = Emitter.prototype[key];
@@ -21954,7 +21946,6 @@ <h1 id="additionalresources">Additional Resources</h1>
2195421946}
2195521947
2195621948
21957-
2195821949Emitter.prototype.on =
2195921950Emitter.prototype.addEventListener = function(event, fn){
2196021951 this._callbacks = this._callbacks || {};
@@ -21964,7 +21955,6 @@ <h1 id="additionalresources">Additional Resources</h1>
2196421955};
2196521956
2196621957
21967-
2196821958Emitter.prototype.once = function(event, fn){
2196921959 function on() {
2197021960 this.off(event, on);
@@ -21977,7 +21967,6 @@ <h1 id="additionalresources">Additional Resources</h1>
2197721967};
2197821968
2197921969
21980-
2198121970Emitter.prototype.off =
2198221971Emitter.prototype.removeListener =
2198321972Emitter.prototype.removeAllListeners =
@@ -22009,7 +21998,6 @@ <h1 id="additionalresources">Additional Resources</h1>
2200921998};
2201021999
2201122000
22012-
2201322001Emitter.prototype.emit = function(event){
2201422002 this._callbacks = this._callbacks || {};
2201522003 var args = [].slice.call(arguments, 1)
@@ -22026,14 +22014,12 @@ <h1 id="additionalresources">Additional Resources</h1>
2202622014};
2202722015
2202822016
22029-
2203022017Emitter.prototype.listeners = function(event){
2203122018 this._callbacks = this._callbacks || {};
2203222019 return this._callbacks['$' + event] || [];
2203322020};
2203422021
2203522022
22036-
2203722023Emitter.prototype.hasListeners = function(event){
2203822024 return !! this.listeners(event).length;
2203922025};
@@ -32742,7 +32728,6 @@ <h1 id="additionalresources">Additional Resources</h1>
3274232728
3274332729},{"./aesid.json":134,"./asn1":135,"./fixProc":137,"browserify-aes":26,"pbkdf2":142,"safe-buffer":173}],139:[function(require,module,exports){
3274432730
32745-
3274632731exports.encode = function (obj) {
3274732732 var str = '';
3274832733
@@ -32757,7 +32742,6 @@ <h1 id="additionalresources">Additional Resources</h1>
3275732742};
3275832743
3275932744
32760-
3276132745exports.decode = function(qs){
3276232746 var qry = {};
3276332747 var pairs = qs.split('&');
@@ -32770,7 +32754,6 @@ <h1 id="additionalresources">Additional Resources</h1>
3277032754
3277132755},{}],140:[function(require,module,exports){
3277232756
32773-
3277432757var re = /^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/;
3277532758
3277632759var parts = [
@@ -39712,7 +39695,6 @@ <h1 id="additionalresources">Additional Resources</h1>
3971239695 return token.trim();
3971339696 });
3971439697 });
39715- console.log(rows);
3971639698
3971739699 const wireCount = parseInt(rows[0][1]);
3971839700 const inputs = rows[1].slice(1);
0 commit comments