Andrew, This is something I have never tried to do with the CC2420 so take anything I say with a grain of salt...
One reason the packets could be decrypted incorrectly when the volume increases is that the counter/nonce used at the sender and receiver becomes out of sync, using this mode you're in trouble after even just one dropped packet. You could watch for this using packet sequence numbers and adjust the counter in the CC2420 accordingly. You say you're not using the stand alone encryption because of the lack of a decryption facility. So why don't you just use a mode of operation that doesn't need a decryption function, such as output feedback, cipher feedback or counter modes. The counter mode would be the same as what you are trying to do with the CC2420 but you'll just have to maintain the counter yourself. Using these modes are (relatively) cheap seeing as how they just require a few extra XORs and possibly another 16 bytes of RAM (depending on your implementation this could be an extra 32 bytes of RAM for OFB mode). Mike On 8/14/07, Andrew Jamieson <[EMAIL PROTECTED]> wrote: > > 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 > [email protected] > https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help >
_______________________________________________ Tinyos-help mailing list [email protected] https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
