/**
 * Project ElGamal Algorithm.
 * Copyright Michał Szczygieł.
 * Created at Mar 19, 2014.
 */
package com.m4gik;

/**
 * TODO COMMENTS MISSING!
 * 
 * @author Michał Szczygieł <michal.szczygiel@wp.pl>
 * 
 */
public class ElGamal {

    public Boolean sign() {
        // TODO Auto-generated method stub
        return null;
    }

    public Boolean verify() {
        // TODO Auto-generated method stub
        return null;
    }

}

@@ -114,151 +114,1706 @@
 k;%0A%0A
-/**%0A * TODO COMMENTS MISSING!%0A * %0A * @author Micha%C5%82 Szczygie%C5%82 %3Cmichal.szczygiel@wp.pl%3E%0A * %0A */%0Apublic class ElGamal %7B%0A%0A    public Boolean sign(
+import java.math.BigInteger;%0Aimport java.security.SecureRandom;%0Aimport java.util.Random;%0A%0A/**%0A * This class represents implementation of ElGamal algorithm. This class contain%0A * operations to sign and verify documents.%0A * %0A * @author Micha%C5%82 Szczygie%C5%82 %3Cmichal.szczygiel@wp.pl%3E%0A * %0A */%0Apublic class ElGamal %7B%0A%0A    /**%0A     * The object to code/decode public key.%0A     */%0A    private BigInteger alpha;%0A%0A    /**%0A     * The filed to keep probable prime value.%0A     */%0A    private BigInteger p;%0A%0A    /**%0A     * The variable keeping the public key.%0A     */%0A    private BigInteger publicKey;%0A%0A    /**%0A     * The variable keeping the private key.%0A     */%0A    private BigInteger secretKey;%0A%0A    /**%0A     * The random instance for generating secure random values.%0A     */%0A    private Random secureRandom = new SecureRandom();%0A%0A    /**%0A     * The constructor for %7B@link ElGamal%7D class, which creates the instance.%0A     * %0A     * @param secretKey%0A     *            The private key.%0A     */%0A    public ElGamal(String secretKey) %7B%0A        setPrivateKey(secretKey);%0A        generatePublicKey(this.secretKey);%0A%0A    %7D%0A%0A    /**%0A     * This method generates public key from private key.%0A     * %0A     * @param secretKey%0A     */%0A    private void generatePublicKey(BigInteger secretKey) %7B%0A        this.p = BigInteger.probablePrime(64, this.secureRandom);%0A        this.alpha = new BigInteger(Integer.toString(secureRandom.nextInt()));%0A        this.publicKey = alpha.modPow(secretKey, p);%0A    %7D%0A%0A    /**%0A     * @param secretKey%0A     */%0A    private void setPrivateKey(String secretKey) %7B%0A        this.secretKey = new BigInteger(secretKey);%0A    %7D%0A%0A    /**%0A     * %0A     * @return%0A     */%0A    public Boolean sign(String message
 ) %7B%0A
@@ -1879,24 +1879,63 @@
 ull;%0A    %7D%0A%0A
+    /**%0A     * %0A     * @return%0A     */%0A
     public B

Create method for generating public key for given private key