test_class.declarator: OT_BATCH_SIZE = 16000
test_class.modifier: private static final
test_class.original_string: private static final int OT_BATCH_SIZE = 16000;
test_class.type: int
test_class.var_name: OT_BATCH_SIZE
test_class.declarator: COMPUTATIONAL_SECURITY = 128
test_class.modifier: private static final
test_class.original_string: private static final int COMPUTATIONAL_SECURITY = 128;
test_class.type: int
test_class.var_name: COMPUTATIONAL_SECURITY
test_class.declarator: STATISTICAL_SECURITY = 40
test_class.modifier: private static final
test_class.original_string: private static final int STATISTICAL_SECURITY = 40;
test_class.type: int
test_class.var_name: STATISTICAL_SECURITY
test_class.declarator: noPlayers = 2
test_class.modifier: private final
test_class.original_string: private final int noPlayers = 2;
test_class.type: int
test_class.var_name: noPlayers
test_class.file: demos/psi/src/test/java/dk/alexandra/fresco/demo/TestPrivateSetDemo.java
test_class.identifier: TestPrivateSetDemo
test_case.body: @Test(expected = IllegalArgumentException.class)
    public void testPSICmdLineNoKey() throws Exception {
      PrivateSetDemo.main(new String[]{
          "-i", "2", "-p", "1:localhost:8081", "-p", "2:localhost:8082", "-s",
          "dummyBool", "-in", "2,3,4,6,7,12,14"});
      fail();
    }
test_case.class_method_signature: TestPrivateSetDemo.testPSICmdLineNoKey()
test_case.full_signature: @Test(expected = IllegalArgumentException.class) public void testPSICmdLineNoKey()
test_case.identifier: testPSICmdLineNoKey
test_case.invocations: main fail
test_case.modifiers: @Test(expected = IllegalArgumentException.class) public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testPSICmdLineNoKey()
focal_class.declarator: inKey
focal_class.modifier: private final
focal_class.original_string: private final Boolean[] inKey;
focal_class.type: Boolean[]
focal_class.var_name: inKey
focal_class.declarator: inSet
focal_class.modifier: private final
focal_class.original_string: private final int[] inSet;
focal_class.type: int[]
focal_class.var_name: inSet
focal_class.declarator: id
focal_class.modifier: private final
focal_class.original_string: private final int id;
focal_class.type: int
focal_class.var_name: id
focal_class.declarator: BLOCK_SIZE = 128
focal_class.modifier: private static final
focal_class.original_string: private static final int BLOCK_SIZE = 128;
focal_class.type: int
focal_class.var_name: BLOCK_SIZE
focal_class.declarator: INPUT_LENGTH = 32
focal_class.modifier: private static final
focal_class.original_string: private static final int INPUT_LENGTH = 32;
focal_class.type: int
focal_class.var_name: INPUT_LENGTH
focal_class.file: demos/psi/src/main/java/dk/alexandra/fresco/demo/PrivateSetDemo.java
focal_class.identifier: PrivateSetDemo
focal_class.interfaces: implements Application<List<List<Boolean>>, ProtocolBuilderBinary>
focal_class.class_method_signature: PrivateSetDemo.PrivateSetDemo(int id, Boolean[] key, int[] set)
focal_class.full_signature: public  PrivateSetDemo(int id, Boolean[] key, int[] set)
focal_class.identifier: PrivateSetDemo
focal_class.modifiers: public
focal_class.parameters: (int id, Boolean[] key, int[] set)
focal_class.signature:  PrivateSetDemo(int id, Boolean[] key, int[] set)
focal_class.class_method_signature: PrivateSetDemo.main(String[] args)
focal_class.full_signature: public static void main(String[] args)
focal_class.identifier: main
focal_class.modifiers: public static
focal_class.parameters: (String[] args)
focal_class.return: void
focal_class.signature: void main(String[] args)
focal_class.class_method_signature: PrivateSetDemo.arrayFromString(String input)
focal_class.full_signature: private static int[] arrayFromString(String input)
focal_class.identifier: arrayFromString
focal_class.modifiers: private static
focal_class.parameters: (String input)
focal_class.return: int[]
focal_class.signature: int[] arrayFromString(String input)
focal_class.class_method_signature: PrivateSetDemo.buildComputation(ProtocolBuilderBinary producer)
focal_class.full_signature: @Override public DRes<List<List<Boolean>>> buildComputation(ProtocolBuilderBinary producer)
focal_class.identifier: buildComputation
focal_class.modifiers: @Override public
focal_class.parameters: (ProtocolBuilderBinary producer)
focal_class.return: DRes<List<List<Boolean>>>
focal_class.signature: DRes<List<List<Boolean>>> buildComputation(ProtocolBuilderBinary producer)
focal_method.body: public static <T extends ResourcePoolImpl> void main(String[] args) throws IOException {
      CmdLineUtil<T, ProtocolBuilderBinary> util = new CmdLineUtil<>();
      Boolean[] key;
      int[] inputs;
  
      util.addOption(Option.builder("key")
          .desc("The key to use for encryption. " + "A " + INPUT_LENGTH
              + " char hex string. Required for player 1 and 2. "
              + "For both players this is interpreted as the AES key. ")
          .longOpt("key").hasArg().build());
  
      util.addOption(Option.builder("in")
          .desc("The list of integers to use as input for the set intersection problem. "
              + "A comma separated list of integers. Required for player 1 and 2. "
              + "The lists must be of equal length for each player. ")
          .longOpt("input").hasArg().build());
  
      CommandLine cmd = util.parse(args);
      NetworkConfiguration networkConfiguration = util.getNetworkConfiguration();
  
      // Get and validate the AES specific input.
      if (networkConfiguration.getMyId() == 1 || networkConfiguration.getMyId() == 2) {
        if (!cmd.hasOption("in")) {
          throw new IllegalArgumentException("Player 1 and 2 must submit inputs");
        }
        if (!cmd.hasOption("key") || cmd.getOptionValue("key").length() != INPUT_LENGTH) {
          throw new IllegalArgumentException("Player 1 and 2 must submit keys "
              + "(hex string of length " + INPUT_LENGTH + ")");
        }
        key = ByteAndBitConverter.toBoolean(cmd.getOptionValue("key"));
  
        for (Option o : cmd.getOptions()) {
          System.out.println("option: " + o.getOpt() + " : " + o.getValue());
        }
        inputs = arrayFromString(cmd.getOptionValue("in"));
  
      } else {
        throw new IllegalArgumentException("Only 2 parties are supported");
      }
  
      // Do the secure computation using config from property files.
      PrivateSetDemo privateSetDemo = new PrivateSetDemo(networkConfiguration.getMyId(), key, inputs);
      ProtocolSuite<T, ProtocolBuilderBinary> psConf = util.getProtocolSuite();
      SecureComputationEngine<T, ProtocolBuilderBinary> sce =
          new SecureComputationEngineImpl<>(psConf, util.getEvaluator());
  
      List<List<Boolean>> psiResult;
      T resourcePool = util.getResourcePool();
      psiResult = sce.runApplication(privateSetDemo, resourcePool, util.getNetwork());
      util.closeNetwork();
      // Print result.
      System.out.println("The resulting ciphertexts are:");
      boolean[][] res = new boolean[psiResult.size()][BLOCK_SIZE];
      for (int j = 0; j < psiResult.size(); j++) {
        for (int i = 0; i < BLOCK_SIZE; i++) {
          res[j][i] = psiResult.get(j).get(i);
        }
        System.out.println("result(" + j + "): " + ByteAndBitConverter.toHex(res[j]));
      }
  
    }
focal_method.class_method_signature: PrivateSetDemo.main(String[] args)
focal_method.full_signature: public static void main(String[] args)
focal_method.identifier: main
focal_method.invocations: addOption build hasArg longOpt desc builder addOption build hasArg longOpt desc builder parse getNetworkConfiguration getMyId getMyId hasOption hasOption length getOptionValue toBoolean getOptionValue getOptions println getOpt getValue arrayFromString getOptionValue getMyId getProtocolSuite getEvaluator getResourcePool runApplication getNetwork closeNetwork println size size get get println toHex
focal_method.modifiers: public static
focal_method.parameters: (String[] args)
focal_method.return: void
focal_method.signature: void main(String[] args)