public void sendFirst() {
    System.out.println("-- Alice --");
    if (betray) {
      System.out.println("ACHTUNG: Betrugsmodus aktiv!!!");
    }

    int n = 2; // n in {1,...,10}

    // Part 0 ---------------------------------------------------------------

    // Hard coded ElGamal
    BigInteger El_p_A = new BigInteger("7789788965135663714690749102453072297748091458564354001035945418057913886819451721947477667556269500246451521462308030406227237346483679855991947569361139");
    BigInteger El_g_A = new BigInteger("6064211169633122201619014531987050083527855665630754543345421103270545526304595525644519493777291154802011605984321393354028831270292432551124003674426238");
    BigInteger El_y_A = new BigInteger("3437627792030969437324738830672923365331058766427964788898937390314623633227168012908665090706697391878208866573481456022491841700034626290242749535475902");
    // private:
    BigInteger El_x_A = new BigInteger("3396148360179732969395840357777168909721385739804535508222449486018759668590512304433229713789117927644143586092277750293910884717312503836910153525557232");
    // Objekt initialisieren mit priv key
    ElGamal elGamal_A = new ElGamal(El_p_A, El_g_A, El_y_A, El_x_A);

    // Alice sendet ElGamal public key an Bob
    Com.sendTo(1, elGamal_A.p.toString(16)); // S1
    Com.sendTo(1, elGamal_A.g.toString(16)); // S2
    Com.sendTo(1, elGamal_A.y.toString(16)); // S3

    // Alice empfängt Bobs ElGamal pub key
    BigInteger El_p_B = new BigInteger(Com.receive(), 16); // R1
    BigInteger El_g_B = new BigInteger(Com.receive(), 16); // R2
    BigInteger El_y_B = new BigInteger(Com.receive(), 16); // R3
    // ElGamal Objekt ohne priv key bauen
    ElGamal elGamal_B = new ElGamal(El_p_B, El_g_B, El_y_B);

    // Vertrag einlesen
    String vertrag_A = vertragString(new File("vertrag.txt"));

    BigInteger p_A = computePrime();

    BigInteger M = computeMessage(p_A);

    // Sende n, p_A, M an Bob
    Com.sendTo(1, Integer.toHexString(n)); // S4
    Com.sendTo(1, p_A.toString(16)); // S5
    Com.sendTo(1, M.toString(16)); // S6

    // Alice empfängt p_B
    BigInteger p_B = new BigInteger(Com.receive(), 16); // R4

    if (!p_B.isProbablePrime(100)) {
      System.out.println("Bobs p_B is keine Primzahl!");
      System.exit(1);
    }

    // Part 1 ---------------------------------------------------------------

    // Arrays bauen
    BigInteger[][] A = getDoubleArray(n, p_A);
    System.out.println("Alice:");
    BigInteger[] C_A = get_C_Array(M, A, p_A);

    BigInteger[] C_B = new BigInteger[2 * n];
    for (int i = 0; i < C_A.length; i++) {
      Com.sendTo(1, C_A[i].toString(16)); // Si
      System.out.println("Send C_A[i]: " + C_A[i].toString(16));
      C_B[i] = new BigInteger(Com.receive(), 16); // Ri
      System.out.println("Receive C_B[i]: " + C_B[i].toString(16));
    }

    System.out.println("Alice:");
    for (int i = 0; i < C_A.length; i++) {
      System.out.println("C_A[i] = " + C_A[i]);
    }

    for (int i = 0; i < C_B.length; i++) {
      System.out.println("C_B[i] = " + C_B[i]);
    }

    String erklaerung_A = erklaerungAlice(C_A);
    String text_A = erklaerung_A + vertrag_A;
    BigInteger H_A = computeSHA(text_A);
    BigInteger H_A_signed = elGamal_A.sign(H_A);

    // Sende erklärung, text, signed hash
    Com.sendTo(1, erklaerung_A); // S5
    Com.sendTo(1, vertrag_A); // S6
    Com.sendTo(1, H_A_signed.toString(16)); // S7

    // Empfange erklärung, text und signed hash von bob
    String erklaerung_B = Com.receive(); // R5
    String vertrag_B = Com.receive(); // R6
    BigInteger H_B_signed = new BigInteger(Com.receive(), 16);

    System.out.println("Erklaerung_B: " + erklaerung_B);
    System.out.println("vertrag_B: " + vertrag_B);
    System.out.println("H_B_signed: " + H_B_signed);

    // check sig
    BigInteger H_B = computeSHA(erklaerung_B + vertrag_B);

    if (elGamal_B.verify(H_B, H_B_signed)) {
      System.out.println("Jo is signed!");
      Com.sendTo(1, "0");
    } else {
      System.out.println("Is nich signed, Exit!");
      Com.sendTo(1, "1");
      System.exit(1);
    }

    if (Com.receive() == "1") {
      System.out.println("Bobs bricht ab!");
      System.exit(1);
    }

    // Geheimnisprotokoll
    BigInteger[][] B = geheimnisAlice(n, 4, 51, A);
    System.out.println("Alice: Checking Arrays !-o-o-o-o-o-!");
    BigInteger[] C2_B = get_C_Array(M, B, p_B);
    if (check(C_B, C2_B)) {
      System.out.println("Alice: Alles klar!");
    } else {
      System.out.println("Alice: FUUUUUUUUU");
      System.exit(0);
    }

  }