Java for Symmetric Cryptography
Friday, 2 April 2004 12:07 EST
Cryptography—literally, secret writing—is the practice of encrypting and decrypting data. To encrypt or decrypt data, you apply an algorithm, which will be a series of transformations to the input data (the plaintext) to produce the output data (the ciphertext). Simply applying the transforms is not good enough because an attacker could simply apply the complimentary set of transforms to the ciphertext to get back the plaintext. To provide a degree of randomness to the transformation, the algorithm is seeded with a key. The ciphertext can only be decrypted if the key is known.
There are two major techniques used for cryptography: symmetric and asymmetric. In asymmetric cryptography there are two keys; one key is used to encrypt the data and the other key is necessary to decrypt (either key can be used for encryption or decryption). With symmetric cryptography there is only one key and that key is used for both encryption and decryption. Here we will look at Java's support for symmetric cryptography.
Read Full Story