All Implemented Interfaces:
CipherConstants, bob_interface

public class bob_joye extends bob
Represents Bob's implementation of the Joye and Salehi protocol for secure comparison. This class extends the base `bob` class and provides methods for secure computation using homomorphic encryption schemes such as DGK and Paillier. See the paper "Private yet Efficient Decision Tree Evaluation" paper link
  • Constructor Details

    • bob_joye

      public bob_joye(KeyPair a, KeyPair b, KeyPair c) throws IllegalArgumentException
      Constructs a `bob_joye` instance with three key pairs.
      Parameters:
      a - the first key pair (Paillier or DGK).
      b - the second key pair (DGK or Paillier).
      c - the third key pair (optional, e.g., ElGamal).
      Throws:
      IllegalArgumentException - if the provided key pairs are invalid or mismatched.
    • bob_joye

      public bob_joye(KeyPair a, KeyPair b) throws IllegalArgumentException
      Constructs a `bob_joye` instance with two key pairs.
      Parameters:
      a - the first key pair (Paillier or DGK).
      b - the second key pair (DGK or Paillier).
      Throws:
      IllegalArgumentException - if the provided key pairs are invalid or mismatched.
  • Method Details

    • Protocol2

      public boolean Protocol2() throws IOException, ClassNotFoundException, HomomorphicException
      See the paper "Private yet Efficient Decision Tree Evaluation" paper link Read Section 3.2 of the paper/Figure 2 for Bob Executes Protocol 2 for secure comparison of encrypted values. This protocol involves multiple steps, including decryption, modular arithmetic, and secure communication with Alice to determine the comparison result. I should note, Protocol1 bob does NOT change from the original DGK or Veugen protocol for Bob, hence no need to reimplement the methods here.
      Specified by:
      Protocol2 in interface bob_interface
      Overrides:
      Protocol2 in class bob
      Returns:
      true if the comparison result indicates x >= y, false otherwise.
      Throws:
      IOException - if an I/O error occurs during communication.
      ClassNotFoundException - if a class cannot be found during deserialization.
      HomomorphicException - if an error occurs during homomorphic operations.