|
The
last 8 bytes (same as the block size) are padding. They pad the encrypted
data until it becomes an even multiple of 8. The value of the padding
bytes (they are all the same value) is the count of padding bytes. When
then the data is an even multiple of 8, then the padding still exists, but equal
to 8. 8 as in binary 0x08 and not ASCII 8.
When
decrypting, read the final byte to determine the number of padding characters,
then subtract from the data size.
Paul Rony
|
- DES CBC encryption Michael Brown
- RE: DES CBC encryption Colin Viebrock
- Paul Rony
