package gr.duth.eece.cryptographyLesson.asymmetric.testing;

import gr.duth.eece.cryptographyLesson.asymmetric.paillier.PaillierKeyPair;

import java.math.BigInteger;

public class TestPaillier {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		PaillierKeyPair pkp = new PaillierKeyPair(1024);

		/* instantiating two plaintext msgs*/
		BigInteger m1 = BigInteger.valueOf(5);
		BigInteger m2 = BigInteger.valueOf(3);
		/* encryption*/
		BigInteger em1 = pkp.PublicKey.Encryption(m1);
		BigInteger em2 = pkp.PublicKey.Encryption(m2);
		System.out.println("c1 = "+em1);
		System.out.println("c2 = "+em2);
		
		System.out.println("decrypted c2: " + pkp.PrivateKey.Decryption(em2));
	}

}
