O'Reilly logo

Special Edition Using Java™ 2 Enterprise Edition by Mark Wutka

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Encrypting Data

If you're using JCE's built-in cryptography provider, the only ciphers available to you are symmetric key block ciphers. Recall from Chapter 32, "Introduction to Encryption Techniques," that a symmetric key algorithm uses the same key for encryption and decryption and that a block cipher works on a block of data rather than one byte at a time.

When you deal with block ciphers, there are two additional aspects of the encryption that you must specify in addition to the actual cipher. First, there is the block mode, which can be Electronic Code Book (ECB), Cipher Block Chaining (CBC), Cipher Feedback (CFB), Output Feedback (OFB), and Propagating Cipher Block Chaining (PCBC).

ECB mode means that you encrypt each block separately. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required