Why doesn't my implementation of ElGamal work for long text strings?
问题 I'm playing with the El Gamal cryptosystem, and my goal is to be able to encipher and decipher long sequences of text. El Gamal requires the plaintext to be an integer. I have turned my string into a byte[] using the .getBytes() method for Strings, and then created a BigInteger out of the byte[]. After encryption/decryption, I turn the BigInteger into a byte[] using the .toByteArray() method for BigIntegers, and then create a new String object from the byte[]. I am using a 1035 bit key, and