gnu.crypto.mode

Class CBC

public class CBC extends BaseMode implements Cloneable

The Cipher Block Chaining mode. This mode introduces feedback into the cipher by XORing the previous ciphertext block with the plaintext block before encipherment. That is, encrypting looks like this:

Ci = EK(Pi ^ Ci-1

Similarly, decrypting is:

Pi = Ci-1 ^ DK(Ci)

Version: $Revision: 1.3 $

Constructor Summary
CBC(IBlockCipher underlyingCipher, int cipherBlockSize)
Package-private constructor for the factory class.
Method Summary
Objectclone()
voiddecryptBlock(byte[] in, int i, byte[] out, int o)
voidencryptBlock(byte[] in, int i, byte[] out, int o)
voidsetup()
voidteardown()

Constructor Detail

CBC

CBC(IBlockCipher underlyingCipher, int cipherBlockSize)
Package-private constructor for the factory class.

Parameters: underlyingCipher The cipher implementation. cipherBlockSize The cipher's block size.

Method Detail

clone

public Object clone()

decryptBlock

public void decryptBlock(byte[] in, int i, byte[] out, int o)

encryptBlock

public void encryptBlock(byte[] in, int i, byte[] out, int o)

setup

public void setup()

teardown

public void teardown()
Copyright © 2001, 2002, 2003 Free Software Foundation, Inc. All Rights Reserved.