[Mono-dev] crypto API

Sebastien Pouliot sebastien.pouliot at gmail.com
Sat Jan 6 11:40:40 EST 2007


Hello Lauren,

On Sat, 2007-01-06 at 11:57 +0100, Lauren Del Giudice wrote:
> Sebastien, 
> 
> 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.

Yes... 

> Test it and let me know if it succeeds: 

but unit tests (added in r70493) shows that, under MS, the next
decryption fails.

> 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.

Please provide a (working on MS runtime / failing under Mono) test case,
mine simply fails in this case, and attach it to a new bug report.

> 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...

That was an issue long ago (before SymmetricalTransform) but now data is
copied. Again if you have a specific issue please provide a test case.

> HTH.
> Lauren.
> 
> 
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list




More information about the Mono-devel-list mailing list