Class ElGamalParametersGenerator


  • public class ElGamalParametersGenerator
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int certainty  
      private static java.math.BigInteger ONE  
      private java.security.SecureRandom random  
      private int size  
      private static java.math.BigInteger TWO  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      ElGamalParameters generateParameters()
      which generates the p and g values from the given parameters, returning the ElGamalParameters object.
      void init​(int size, int certainty, java.security.SecureRandom random)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • size

        private int size
      • certainty

        private int certainty
      • random

        private java.security.SecureRandom random
      • ONE

        private static java.math.BigInteger ONE
      • TWO

        private static java.math.BigInteger TWO
    • Constructor Detail

      • ElGamalParametersGenerator

        public ElGamalParametersGenerator()
    • Method Detail

      • init

        public void init​(int size,
                         int certainty,
                         java.security.SecureRandom random)
      • generateParameters

        public ElGamalParameters generateParameters()
        which generates the p and g values from the given parameters, returning the ElGamalParameters object.

        Note: can take a while...