Date: Mon, 8 Mar 1999 17:47:55 -0800 (PST)
From: Jan Luehe <Jan.Luehe@Eng>
Subject: Re: CFB mode problems
To: Jan.Luehe@Eng, gvenn@vail.net
Garrison:
In your program, you initialize the cipher object for encryption
both when you write to the file and when you read from it.
You have to initialize the cipher for DECRYPTION before you read
from the file. When you do that, everything works fine.
Jan
> Basically I have reduced my problem in test code where I can replace the
> static finals representing the mode and algorithm parameters. With the
> algoritm set to Blowfish or DES, all OFB modes that I have tested (OFB8,
> OFB64) produce correct results on "decryption." CFB modes do not (CFB8,
> CFB32, CFB64). I'm assuming that I'm doing something wrong but I have no
> clue. Interestingly the CFB modes 32 and 64 correctly "decrypt" the first 32
> or 64 bits respectively. There after only garbage is produced. I have not
> test CFB8 for this pattern. The code is attached. Please remember to replace
> the package for your environment.
>
> Thanks in advance
>
> Garrison Venn
> gvenn@vail.net