gnu.crypto.mode
Class CFB
- Cloneable, IBlockCipher, IMode
The cipher feedback mode. CFB mode is a stream mode that operates on
s bit blocks, where 1 <=
s <=
b, if
b is the underlying cipher's block size. Encryption is:
I[1] = IV
I[j] = LSB(b-s, I[j-1]) | C[j-1] for j = 2...n
O[j] = CIPH(K, I[j]) for j = 1,2...n
C[j] = P[j] ^ MSB(s, O[j]) for j = 1,2...n
And decryption is:
I[1] = IV
I[j] = LSB(b-s, I[j-1]) | C[j-1] for j = 2...n
O[j] = CIPH(K, I[j]) for j = 1,2...n
P[j] = C[j] ^ MSB(s, O[j]) for j = 1,2...n
CFB mode requires an initialization vector, which need not be kept
secret.
References:
- Bruce Schneier, Applied Cryptography: Protocols, Algorithms,
and Source Code in C, Second Edition. (1996 John Wiley and Sons)
ISBN 0-471-11709-9.
-
Recommendation for Block Cipher Modes of Operation Methods and Techniques,
Morris Dworkin.
Version:
CFB(IBlockCipher underlyingCipher, int cipherBlockSize) - Package-private constructor for the factory class.
|
Object | clone()
|
void | decryptBlock(byte[] in, int inOffset, byte[] out, int outOffset)
|
void | encryptBlock(byte[] in, int inOffset, byte[] out, int outOffset)
|
void | setup() - The initialisation phase of the concrete mode implementation.
|
void | teardown() - The termination phase of the concrete mode implementation.
|
blockSizes , clone , currentBlockSize , decryptBlock , defaultBlockSize , defaultKeySize , encryptBlock , init , keySizes , name , reset , selfTest , setup , teardown , update |
CFB
(package private) CFB(IBlockCipher underlyingCipher,
int cipherBlockSize)
Package-private constructor for the factory class.
underlyingCipher
- The cipher implementation.cipherBlockSize
- The cipher's block size.
decryptBlock
public void decryptBlock(byte[] in,
int inOffset,
byte[] out,
int outOffset)
- decryptBlock in interface IBlockCipher
- decryptBlock in interface BaseMode
encryptBlock
public void encryptBlock(byte[] in,
int inOffset,
byte[] out,
int outOffset)
- encryptBlock in interface IBlockCipher
- encryptBlock in interface BaseMode
setup
public void setup()
The initialisation phase of the concrete mode implementation.
- setup in interface BaseMode
teardown
public void teardown()
The termination phase of the concrete mode implementation.
- teardown in interface BaseMode
Copyright © 2001, 2002, 2003
Free Software Foundation,
Inc. All Rights Reserved.