All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class cryptix.provider.mode.CFB_PGP

java.lang.Object
   |
   +----java.security.IJCE_Traceable
           |
           +----java.security.Cipher
                   |
                   +----java.security.Mode
                           |
                           +----cryptix.provider.mode.FeedbackMode
                                   |
                                   +----cryptix.provider.mode.CFB
                                           |
                                           +----cryptix.provider.mode.CFB_PGP

public class CFB_PGP
extends CFB
This class implements PGP's (i.e. Zimmerman's) non-standard CFB mode. (For the standard method, see the Applied Cryptography reference below). It replaces cryptix.pgp.CFB in version 2.2, and cryptix.pgp.PGP_CFB in version Cryptix 2.2.0a.

The differences between this and standard CFB are that:

Note that it is unusual for the output of a cipher to depend on the exact boundaries between data passed to each encryption/decryption call. Normally, the lengths of data passed to each call do not matter as long as they make up the correct input when concatenated together - but this class is an exception.

As a result, using this mode with CipherInputStream and CipherOutputStream may produce unexpected output, and is not recommended.

References

  1. Bruce Schneier, "Section 9.6 Cipher Feedback Mode," Applied Cryptography, 2nd edition, John Wiley & Sons, 1996

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

$Revision: 1.5 $

Author:
Systemics Ltd, Raif Naffah, David Hopwood

Constructor Index

 o CFB_PGP()
Constructs a CFB-PGP cipher, assuming that the IV will be provided as the first getInitializationVectorLength() bytes of the stream (it will be visible as cleartext at the start of the output stream).
 o CFB_PGP(Cipher)
Constructs a CFB-PGP cipher, assuming that the IV will be provided as the first getInitializationVectorLength() bytes of the stream.

Method Index

 o engineUpdate(byte[], int, int, byte[], int)
SPI: This is the main engine method for updating data.

Constructors

 o CFB_PGP
 public CFB_PGP()
Constructs a CFB-PGP cipher, assuming that the IV will be provided as the first getInitializationVectorLength() bytes of the stream (it will be visible as cleartext at the start of the output stream).

The IV must be unique during the lifetime of the key. If it is not unique, at least the first block of the plaintext can be recovered.

 o CFB_PGP
 public CFB_PGP(Cipher cipher)
Constructs a CFB-PGP cipher, assuming that the IV will be provided as the first getInitializationVectorLength() bytes of the stream. See the previous constructor for more details.

Throws: NullPointerException
if cipher == null
Throws: IllegalBlockSizeException
if cipher.getPlaintextBlockSize() != cipher.getCiphertextBlockSize()

Methods

 o engineUpdate
 protected int engineUpdate(byte in[],
                            int inOffset,
                            int inLen,
                            byte out[],
                            int outOffset)
SPI: This is the main engine method for updating data.

Overrides:
engineUpdate in class CFB

All Packages  Class Hierarchy  This Package  Previous  Next  Index