I am trying to use the hardware encryption on the CC2420, using tinyOS-1.x with 
Tmote Sky nodes.  So far, I have managed to use the in-line modes successfully 
(CTR, CBC-MAC and CCM).  What I am having a little trouble with is using the 
in-line operations for higher layer protocol operations, i.e. 

Write to the TXFIFO, CTR encrypt without sending and read TXFIFO back to the MCU
Write to the RXFIFO, start CTR decryption cycle and read RXFIFO back to the MCU

Both cycles appear to work, however as the volume of packets on the radio 
increaces, packets start to be incorrectly decrypted.  I think the packets I am 
writing via the SPI interface to the RX buffer may be being overwritten (or 
partially overwritten) by incoming packets from the air interface as they are 
being decrypted.  I have tried to switch off the receiver during decryption 
operations (using the CC2420_SRFOFF command before filling RXBUF, and 
CC2420_SRXON after the read) however this does not seem to help.

Has anyone managed to get this style of operation to work?  The CC2420 
datasheet is a bit light on this feature, simply stating that you should not 
write to the RXFIFO via the SPI interface except for "debugging or higher layer 
security operations".

I did start out tyrying to implement this using the stand alone encryption 
until I discovered that there appears to be no corresponding decryption 
facility.

I'd be interested to know if anyone has attempted this before, thanks for any 
input,

 

Andrew

_______________________________________________
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to