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. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access