|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcryptix.security.StreamCipher
cryptix.security.CipherFeedback
Implements a byte-based stream cipher using n-bit CFB with an n-bit-sized block cipher.
The full block size of the supplied cipher is used for the Cipher Feedback Mode. The bytes supplied are processed and returned immediately.
Copyright © 1997
Systemics Ltd on behalf of the
Cryptix Development Team.
All rights reserved.
$Revision: 1.3 $
cryptix.provider.mode.CFB| Field Summary | |
protected BlockCipher |
cipher
Deprecated. |
protected int |
currentByte
Deprecated. |
protected byte[] |
ivBlock
Deprecated. |
protected int |
length
Deprecated. |
protected byte[] |
xorBlock
Deprecated. |
| Constructor Summary | |
CipherFeedback(BlockCipher cipher0,
byte[] iv0)
Deprecated. This implements variant A: a unique initial value for the feedback register must be provided in the constructor. |
|
| Method Summary | |
void |
decrypt(byte[] in,
int in_offset,
byte[] out,
int out_offset,
int length)
Deprecated. This function decrypts a block of data. |
void |
encrypt(byte[] in,
int in_offset,
byte[] out,
int out_offset,
int length)
Deprecated. This function encrypts a block of data. |
int |
keyLength()
Deprecated. This function returns the length of the key for this cipher. |
void |
reset(byte[] iv0)
Deprecated. Reset the stream feedback register with a new unique IV and sets position in stream back to zero. |
| Methods inherited from class cryptix.security.StreamCipher |
decrypt, decrypt, encrypt, encrypt |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected byte[] ivBlock
protected byte[] xorBlock
protected BlockCipher cipher
protected int currentByte
protected int length
| Constructor Detail |
public CipherFeedback(BlockCipher cipher0,
byte[] iv0)
cipher0 - the block cipher to useiv0 - the initial value for the shift register (IV)| Method Detail |
public int keyLength()
StreamCipher
keyLength in class StreamCipherpublic void reset(byte[] iv0)
iv0 - the initial value for the shift register (IV)
public void encrypt(byte[] in,
int in_offset,
byte[] out,
int out_offset,
int length)
encrypt in class StreamCipherin - the plain text to be encrypted.in_offset - the offset within the in buffer.out - where the encrypted cipher text will be stored.out_offset - the offset within the out buffer.length - the length to encrypt.
public void decrypt(byte[] in,
int in_offset,
byte[] out,
int out_offset,
int length)
decrypt in class StreamCipherin - the cipher text to be decrypted.in_offset - the offset within the in buffer.out - where the decrypted plain text will be stored.out_offset - the offset within the out buffer.length - the length to decrypt.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||