[Mono-dev] crypto API

Lauren Del Giudice lauren.bedoule at gmail.com
Sat Jan 6 05:57:02 EST 2007


Concerning the closed bug 80439, rev70491;
By reducing the input count, you will loose the last block for next
decryption. You first decryption will succeed, but the next one will fail.

Test it and let me know if it succeeds:
Let say you decrypt 56 bytes (CBC, default padding), you will obtain 48
bytes. Iterate and obtain again 48 bytes. The last 48 bytes will depend on
the buffered block from the first decryption.

When you decrypt from 56 bytes and obtain 48 bytes, there is no critical
issue (well don't consider memory as a critical issue for a moment), since
you don't really throw the last decrypted block but rather you have to
buffer it.
This buffered decrypted block will be injected at the next decryption
process, in the output array as the first block.

And also, watch out with overlapping input/output...

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20070106/67a04325/attachment.html 

More information about the Mono-devel-list mailing list