| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
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 zed@xxxxxxxxxxxxx
--
University of Zurich
Communication Systems Group
_______________________________________________
gnu-crypto-discuss mailing list
gnu-crypto-discuss@xxxxxxx
http://lists.gnu.org/mailman/listinfo/gnu-crypto-discuss
[Home] [Gnu Classpath] [Linux Kernel] [Linux Cryptography] [Fedora] [Fedora Directory] [Red Hat Development] [Red Hat 9 Bible] [Fedora Bible] [Red Hat 9] [Network Security Reading]
|
![]() |