cryptix.pgp
Class PGPCFB

java.lang.Object
  extended bycryptix.security.StreamCipher
      extended bycryptix.security.CFB
          extended bycryptix.pgp.PGPCFB

public class PGPCFB
extends CFB

This class implements PGPs (ie. Zimmermans) non-standard CFB mode. (For standard method, see Schneier, AppCrypto 9.6).


Copyright © 1995, 1996, 1997 Systemics Ltd on behalf of the Cryptix Development Team. All rights reserved.


Field Summary
 
Fields inherited from class cryptix.security.CFB
blocksize, bytesLeft, cipher, iv, k
 
Constructor Summary
PGPCFB(BlockCipher cipher_)
           
 
Method Summary
 void decrypt(byte[] in, int in_offset, byte[] out, int out_offset, int length)
          This function decrypts a block of data.
 void encrypt(byte[] in, int in_offset, byte[] out, int out_offset, int length)
          This function encrypts a block of data.
 
Methods inherited from class cryptix.security.CFB
keyLength, next_block, reset
 
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
 

Constructor Detail

PGPCFB

public PGPCFB(BlockCipher cipher_)
Method Detail

encrypt

public void encrypt(byte[] in,
                    int in_offset,
                    byte[] out,
                    int out_offset,
                    int length)
This function encrypts a block of data. The contents of the array in will not be changed, but will instead store the result in the array out. The arrays can, however, be the same.

Overrides:
encrypt in class CFB
Parameters:
in - 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.

decrypt

public void decrypt(byte[] in,
                    int in_offset,
                    byte[] out,
                    int out_offset,
                    int length)
This function decrypts a block of data. The contents of the array in will not be changed, but will instead store the result in the array out. The arrays can, however, be the same.

Overrides:
decrypt in class CFB
Parameters:
in - 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.