Hi,
Going through the examples in the "Programming with GNU Crypto 2.0.0"
manual I've discovered an error. In the "Padding" section under "Padding
Example", the encryption and decryption loops encrypt and decrypt one
block too few.
The loops should be:
<code>
for (int i = 0; i + blockSize <= pt.length; i += blockSize) {
enc.update(pt, i, ct, i);
}
for (int i = 0; i + blockSize <= ct.length; i += blockSize) {
dec.update(ct, i, cpt, i);
}
</code>
The difference is the "<=" where it is originally just a "<".
I hope you can use the input. Thanks for providing the toolkit.
Reto Zimmermann
PS: The same error may be present in other examples of the encryption
loop. I haven't checked that, though.
PPS: I'm not on this mailinglist, so should you want to send me an
answer please do so at [EMAIL PROTECTED]
--
University of Zurich
Communication Systems Group
_______________________________________________
gnu-crypto-discuss mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gnu-crypto-discuss