I am designing a set of low-power sensing motes. Each mote will communicate to a central base over RF.
I want the mote to be able to authenticate itself with the base, and send its data without being vulnerable to replay attacks while not using a lot of processing power.
Are there major flaws in the following algorithm?
- Mote A sends a 'hello' message to Base. This message contains the ID# (public key of the mote) and a random nonce [R] (HW generated) encrypted by the base's public key.
- Base decrypts the 'hello' and verifies the ID# against a whitelist.
- Base sends an 'ack' message to Mote A. This message contains [R+1] and is encrypted by the ID# (mote's public key)
- Mote A decrypts 'ack' and verifies received [R+1] matches stored [R+1].
- Mote A sends ID#, data and [R+2] to base encrypted by Base public key.
- Base decrypts and sends an 'ack' and [R+3] and is encrypted by the ID# (mote's public key)
- Mote A verifies 'ack' and Communication is Complete.
The random nonce [R, R+1, R+2, R+3] will only be valid for a short period of time (< 1 second) as the base has no memory for session storage.