code: public static BigInteger createAppropriateModulusForSecret(BigInteger secret)
      {
          final BigInteger ret;
          final int originalBitLength = secret.bitLength();
  
          //
          // be conservative  192 bits ->  180 cutoff
          //                  384 bits ->  370 cutoff
          //                 4096 bits -> 4024 cutoff
          //                 8192 bits -> 8120 cutoff
          //
  
          if (originalBitLength < 180)
          {
              ret = getPrimeUsedFor192bitSecretPayload();
          }
          else if (originalBitLength < 370)
          {
              ret = getPrimeUsedFor384bitSecretPayload();
          }
          else if (originalBitLength < 4024)
          {
              ret = getPrimeUsedFor4096bigSecretPayload();
          }
          else if (originalBitLength < 8120)
          {
              ret = getPrimeUsedFor8192bigSecretPayload();
          }
          else
          {
              //
              // if you make it here, you are 4000+ bits big.
              // and this call is going to be really expensive
              //
              ret = createRandomModulusForSecret(secret);
          }
          return ret;
      }
docs: http://www.cromwell-intl.com/security/crypto/diffie-hellman.html says
  "... choosing some prime p which is larger than the largest possible secret key".
  
  Sadly, "larger" is not enough for this implementation [for an unknown reason].
  
  Some test data shows:
  for a secret with 103 bits, 115 is not enough    116 is enough
  for a secret with 159 bits,                      160 is enough
  
  So - this method provides guidance on the modulus to use
  for a given secret.
  
  @param secret number
  @return a modulus that (should) work in this library.
  It may be larger than it needs to be, but it will work.