@Override public DRes<SBool> xor(DRes<SBool> left, DRes<SBool> right) { this.xorCount++; return this.delegate.xor(left, right); }
@Override public DRes<SBool> greaterThan(List<DRes<SBool>> inLeft, List<DRes<SBool>> inRight) { this.gtCount++; return this.delegate.greaterThan(inLeft, inRight); }
@Override public DRes<SBool> equal(List<DRes<SBool>> inLeft, List<DRes<SBool>> inRight) { this.eqCount++; return this.delegate.equal(inLeft, inRight); }
@Override public DRes<SBool> randomBit() { this.randBitCount++; return this.delegate.randomBit(); }
@Override public DRes<SBool> and(DRes<SBool> left, DRes<SBool> right) { this.andCount++; return this.delegate.and(left, right); }
@Override public DRes<SBool> known(boolean known) { return this.delegate.known(known); }
/** * Creates a {@link BristolCrypto} computation directory for this instance - i.e. this intended * producer. Contains various cryptographic primitives such as AES and SHA-256. * * @return The bristol crypto computation directory. */ public BristolCrypto bristol() { if (this.bristolCrypto == null) { this.bristolCrypto = this.factory.createBristolCrypto(this); } return this.bristolCrypto; }
/** * Returns a builder which can be helpful while developing a new protocol. Be very careful though, * to include this in any production code since the debugging opens values to all parties. * * @param builder The ProtocolBuilderBinary to use for constructing protocols * @return By default a standard debugger which opens values and prints them. */ default Debug createDebug(ProtocolBuilderBinary builder) { return new DefaultDebug(builder); }
/** * Creates a {@link Comparison} computation directory for this instance - i.e. this intended * producer. Contains protocols on comparing numbers in binary form. * * @return The comparison computation directory. */ public Comparison comparison() { if (this.comparison == null) { this.comparison = this.factory.createComparison(this); } return this.comparison; }
/** * Creates a {@link Binary} computation directory for this instance - i.e. this intended producer. * Contains only protocol suite native operations such as XOR and AND. Basic operations which can * be created from XOR, AND and NOT (such as XNOR, NAND) are found using {@link #advancedBinary}. * * @return The binary computation directory. */ public Binary binary() { if (this.binaryBuilder == null) { this.binaryBuilder = this.factory.createBinary(this); } return this.binaryBuilder; }
@Override public void marker(String message) { marker(message, System.out); }
/** * Creates an {@link AdvancedBinary} computation directory for this instance - i.e. this intended * producer. Contains advanced binary protocols. These protocols include, but are not limited to, * addition and multiplication of numbers represented in binary form. * * @return The advanced binary computation directory. */ public AdvancedBinary advancedBinary() { if (this.advancedBinary == null) { this.advancedBinary = this.factory.createAdvancedBinary(this); } return this.advancedBinary; }