## 7 Weak Authentication
\begin{table}
\begin{tabular}{p{142.3 pt} p{142.3 pt}} \hline
**Security Principle** & **Technique Used in Seluge++** \\ \hline Confidentiality & SkipJack block cipher with CBC mode is chosen \\ \hline Authentication & TinyECC library in which an ECC library is highly adapted for WSN is used \\ \hline Integrity & Hash dependency technique of the original Seluge is used for data packets, and for hash packets in page 0, a message authentication code is used \\ \hline Availability (DoS Attack Resilience) and Authentication Delay Problem & Immediate verification provided by hash dependency in data packets and MAC verification in hash packets together with the message-specific puzzle feature, which can be disabled and then re-enabled during an attack, which will mitigate DoS attacks against Seluge++ \\ \hline Replay Attack Resilience & Inserting a constant and unique number for each version to be comparable for each node to detect repeated data (version number \(V_{n}\) defined in Section 6.4) \\ \hline Worm-Hole Attack Resilience & A temporary and unique session key per each communication link will protect Seluge++ from Wormhole attacks against dissemination of the code update \\ \hline Battery-Drain Attack Resilience & Using weak authentication on packets that have expensive computations on the time of reception (e.g., Message-Specific Puzzle); an auto-halting system that will partially protect the system from resource exhaustion \\ \hline \end{tabular}
\end{table} 
Table 7: Security features of Seluge++. CBC, cipher-block chaining. ### Performance Evaluation

TOSSIM is an event-based simulator, which operates on this TinyOS [47] platform. This can be used to simulate radio communications, as well as protocol implementations. There is an extension provided to it named PowerTOSSIM [48], which is used to simulate the power consumption of TinyOS applications. In TOSSIM, the same as TinyOS, the programming language is neSC [49], a dialect of the C language, which is optimized for resource constraint networks, like WSNs. TOSSIM and PowerTOSSIM have been used to evaluate Seltge++ for some energy consumption and also radio communications in terms of the time taken to disseminate all the update data. ATMEL Studio is a development tool with a built-in simulator provided by the ATMEL Company for its AVR microcontrollers. Since some WSN nodes, like Mica2, use ATMEL products (ATMEGA128L), therefore for the calculation of the CPU clocks of the security primitives, ATMEL Studio is used. Mica2 is the target of our simulations, and some useful information from the Mica2 datasheet [50] is provided in Table 8.

#### 8.3.1 SkipJack

The SkipJack algorithm has been used to provide confidentiality in the Seltge++ design. Its performance has been tested to show its execution time in a network. ATMEL Studio is used to test eight bytes of data on an ATMega128 microcontroller. Since ATMega128 is used, the results of this simulation are the same as if the source code were run on a Mica2 mote. The implementation of SkipJack is tested on a non-optimized assembly code. Table 9 describes the results of this simulation. Based on the results provided in Table 9, the encryption of a single 64-bit block with an 80-bit key in a mote running a 16 Mhz CPU clock will take approximately 3.6 \(\mu\)S, which gives us a reasonable energy \begin{table}
\begin{tabular}{l l} \hline
**Function** & **Corresponding Value** \\ \hline Input Voltage & 2.7–3.3 V \\ \hline Current Draw & 8 mA \\ \hline Configuration EEPROM & 4 Kbytes \\ \hline Transmission Current Draw & 27 mA \\ \hline \end{tabular}
\end{table} 
Table 8: Mica2 mote specification [50]. \begin{table}
\begin{tabular}{l l l} \hline Program Memory Usage & 1,464 bytes & \\ \hline Data Memory Usage & 27 bytes & \\ \hline CPU Cycles & Encryption & 5780 \\ \cline{2-3}  & Decryption & 5736 \\ \hline \end{tabular}
\end{table} 
Table 9: Performance analysis of SkipJack.