AES anyone?

BCS ao at pathlink.com
Fri Aug 17 14:16:09 PDT 2007


Reply to Regan,

> BCS wrote:
> 

> One further consideration is upon decode you must know when you are
> processing the final/terminal block of data as only then can you unpad
> correctly, usually this means you must know the exact length of the
> encrypted data.
> 
> You cannot tell the terminal block by inspection as the case for 1
> byte of padding is the block finishing with a byte of value 0x01.
> This case is indistinguishable from a non-terminal block ending 0x01.

If you check for EOF after each block then you could detect the last block 
that way. This however might require sending an empty block if things match 
up exactly.

> 
> Regan Heath
> 





More information about the Digitalmars-d mailing list