All Implemented Interfaces:
CipherConstants, bob_interface
Direct Known Subclasses:
bob_elgamal

public class bob_veugen extends bob
See the papers "Improving the DGK comparison protocol" and Correction to ”Improving the DGK comparison protocol” by Thjis Veugen, You can find these in the papers directory! Represents Bob's implementation of the Veugen 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.
  • Constructor Details

    • bob_veugen

      public bob_veugen(KeyPair a, KeyPair b, KeyPair c) throws IllegalArgumentException
      Constructs a `bob_veugen` 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_veugen

      public bob_veugen(KeyPair a, KeyPair b) throws IllegalArgumentException
      Constructs a `bob_veugen` 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 Correction to "Improving the DGK comparison protocol", this implements Protocol 3. This is an improved version of Protocol 1, initially created by DGK, see original bob class This protocol involves multiple steps, including decryption, modular arithmetic, and secure communication with Alice to determine the comparison result.
      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.
      IllegalArgumentException - if the protocol constraints are violated.