[Tinyos-devel] PATCH for TinySec
Naveen Sastry
nks at cs.berkeley.edu
Fri Jul 7 10:55:46 PDT 2006
Irfan Acar pointed out a bug in my old CBCMAC.nc code and so I have a
patch that I'd like to commit. Could someone please apply the following
and check it into the repository (I've lost my write access) and send me
a confirmation email?
Thanks!
cvs commit -m "Fix for mac bug reported by Irfan Acar. Block sizes are
8 bytes wide, so we should pack the block full before running the cipher."
RCS file: /cvsroot/tinyos/tinyos-1.x/tos/lib/TinySec/CBCMAC.nc,v
retrieving revision 1.2
diff -u -r1.2 CBCMAC.nc
--- CBCMAC.nc 7 Oct 2003 21:46:22 -0000 1.2
+++ CBCMAC.nc 7 Jul 2006 17:41:52 -0000
@@ -155,7 +155,7 @@
for (i = 0; i < msgLen; i++) {
// unroll
partial[pos++] ^= msg[i];
- if (pos == 7) {
+ if (pos == 8) {
if (!call BlockCipher.encrypt (&context->cc, partial,
partial)) {
return FAIL;
}
More information about the Tinyos-devel
mailing list