[Tinyos-help] CC2420 Security bug

Antonio Linan alinan at zolertia.com
Tue Dec 10 05:41:24 PST 2013


And encryption worked again?

--Antonio


On Tue, Dec 10, 2013 at 2:32 PM, Łukasz Szubart
<184669 at student.pwr.wroc.pl>wrote:

> I'm writing my engineering thesis about cc2420 AES encryption. I found
> that there is a problem in tos 2.1.2. Neither CC2420SecurityTest nor
> tutorial program fromhttp://
> tinyos.stanford.edu/tinyos-wiki/index.php/CC2420_Security_Tutorial
> works properly.
>
> In CC2420SecurityTest even if i changed encryption key packets were
> being received normaly while they should not. In the program from
> tutorial compiler returned the error:
>
> TOS biszkopt at biszkopt-VirtualBox:/opt/tinyos-2.1.2/apps/tests/cc2420/TestSecurity/RadioCountToLeds1$
> make telosb
> mkdir -p build/telosb
>      compiling RadioCountToLedsAppC to a telosb binary
> ncc -o build/telosb/main.exe  -Os -fnesc-separator=__ -Wall -Wshadow
> -Wnesc-all -target=telosb -fnesc-cfile=build/telosb/app.c -board=
> -DDEFINED_TOS_AM_GROUP=0x22 -DCC2420_HW_ACKNOWLEDGEMENTS
> -DCC2420_HW_SECURITY -DPACKET_LINK -DTOSH_DATA_LENGTH=115
> -I/opt/tinyos-2.1.2/tos/lib/printf -DPRINTFUART_ENABLED -I./
> -DIDENT_APPNAME=\"RadioCountToLed\" -DIDENT_USERNAME=\"biszkopt\"
> -DIDENT_HOSTNAME=\"biszkopt-Virtua\" -DIDENT_USERHASH=0x9064dbbbL
> -DIDENT_TIMESTAMP=0x52a71575L -DIDENT_UIDHASH=0x74b076f8L
>  RadioCountToLedsAppC.nc -lm
> /opt/tinyos-2.1.2/tos/chips/cc2420/lpl/DummyLplC.nc:39:2: warning:
> #warning "*** LOW POWER COMMUNICATIONS DISABLED ***"
> /opt/tinyos-2.1.2/tos/chips/cc2420/link/PacketLinkC.nc:38:2: warning:
> #warning "*** USING PACKET LINK LAYER"
> /opt/tinyos-2.1.2/tos/chips/cc2420/security/SecAMSenderP.nc: In function
> ‘SecAMSenderP__0__AMSend__send’:
> /opt/tinyos-2.1.2/tos/chips/cc2420/security/SecAMSenderP.nc:69:21: error:
> lvalue required as left operand of assignment
> /opt/tinyos-2.1.2/tos/chips/cc2420/security/SecAMSenderP.nc: In function
> ‘SecAMSenderP__0__CC2420SecurityMode__setCtr’:
> /opt/tinyos-2.1.2/tos/chips/cc2420/security/SecAMSenderP.nc:105:21: error:
> lvalue required as left operand of assignment
> make: *** [exe0] Error 1
>
> The difference between them is that in the Makefile file in
> CC2420SecurityTest there is additional line:
>
> CFLAGS+=-DTFRAMES_ENABLED.
>
> When I deleted that line compiler returned the same error as in
> tuturial example.
>
> I found the solution - change lines:
>
> #if ! defined(TFRAMES_ENABLED)
>      (uint8_t*)secHdr += 1;
> #endif
>
> to:
>
> #if ! defined(TFRAMES_ENABLED)
>      secHdr=(security_header_t*)((uint8_t*)secHdr+1);
> #endif
>
> in tinyos-2.1.2/tos/chips/cc2420/security/SecAMSenderP.nc
>
>
> Łukasz Szubart
>
> _______________________________________________
> Tinyos-help mailing list
> Tinyos-help at millennium.berkeley.edu
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help




-- 
--
Antonio Liñán Colina
R+D Engineer
@: alinan at advancare.com
@: alinan at zolertia.com
------------------------------
Advancare
Ph.: +34 935 511 403
http://www.advancare.com
http://www.zolertia.com
http://zolertia.sourceforge.net
http://webshop.zolertia.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20131210/f3269335/attachment.htm 


More information about the Tinyos-help mailing list