Cryptography Reference
In-Depth Information
TABLE 15.3
Algorithm
Advantages
Disadvantages
Weaknesses
Rabin
Quick encryption—only
a modular scanning is
required.
Can sign messages.
Relatively slow
decryption—correct
root must be found.
Must be padded with
redundant bits for
deciphering.
Must use strong primes.
Static cipher—salt or
CBC required.
If salt not used,
vulnerable to chosen
ciphertext attack,
adaptive chosen
ciphertext attack, and
square root attack.
Blum-
Goldwasser
Quick encryption.
Stream cipher—can
work with small quantities.
Randomization is part of
the encryption process.
Vulnerable to chosen
ciphertext attack.
Pohlig-
Hellman
Secret key cipher—
distribution of keys
difficult.
Must use safe primes.
Message may be of
low order modulo p.
Static cipher—salt or
CFB required.
Must use safe primes.
Must use a different
random value k for
each block.
El Gamal
Not a static cipher—
randomization is part of
the encryption process.
Can sign messages.
Ciphertext is at least
twice as long as the
plaintext.
RSA
Quick encryption if a
small enciphering
exponent is used.
Can sign messages.
Decryption relatively
slow due to modular
exponentiation to
large powers.
Encryption may also
be slow if a small
encryption exponent
is not used.
Must use strong primes.
Message may be of
low order modulo n.
Static cipher—salt or
CFB required.
If small encryption
exponent is used
without salt, vulnerable
to a root attack.
Vulnerable to common
modulus attack if multiple
entities choose to use
the same modulus.
To read bytes from the input stream into a byte array, we could use one of the read()
methods from DataInputStream:
byte[] buffer = new byte[100];
int numBytes = in.read(buffer);
After execution of the last statement here, the array buffer will be filled up with as many
bytes that were read, and this read() method returns how many bytes were read. You should
Search WWH ::




Custom Search