Werner Koch (wk@isil.d.shuttle.de)
Tue, 19 May 1998 09:13:50 +0200
Nicholas Charles Brawn <ncb05@uow.edu.au> writes:
> 1. With a block cipher, when dealing with a binary file (or any file for
> that matter), how do you deal with the remaining block if it's incomplete?
Use CFB mode (cipher feed back) and you can encode arbitrary length.
Or, but the number of the filler bytes (which should be random bytes)
into the last byte of the last block; the problem here is that you
have to append one complete filler block if the plaintext is a
multiple of the block length - this makes the ciphertext larger than
the plaintext (you can you ciphertext stealing to avoid this, bit it's
somewhat more complicated to program). CFB is perfectly okay.
Werner
p.s. You should get Bruce Schneier's "Applied Cryptography" or
(better) Menezes,van Oorschot,Vanstone's "Handbook of Applied
Cryptography".
The following archive was created by hippie-mail 7.98617-22 on Fri Aug 21 1998 - 17:17:28 ADT