# REISCH: Incorporating Lightweight and Reliable Algorithms into Healthcare Applications of WSNs
## 4 The Proposed Data Collection Scheme
### REISCH's Scheme
#### 4.3.5 REISCH's Protocols  
The REISCH scheme consists of three protocols. During these protocols, REISCH provides reliable data collection processes to protect collected patients' data. Protocol 1 between \(SN\)s and \(CH\)s:  
This protocol performs the data collection process (Figure 6 shows the first protocol processes between \(SN_{i}\) and \(CH_{i}\) in the data collection). The process is as follows:  
\(SN_{i}\) Side  
* At the beginning of each round, each \(SN_{i}\) receives a one-time passcode (\(LS_{OTP_{i}}\)) and a random number (\(SN_{RN_{i}}\)). This \(LS_{OTP_{i}}\) contains an ephemeral random value (\(SigLsE_{i}\)) of the same length as the signature. \(SN_{i}\) extracts \(SigLS_{i}(SN_{Pseud})\) from the dataset and executes \(\oplus\) to extract the secret value \(SigLsEi\). Figure 5: Camouflage signature. * Then, \(SN_{i}\) executes the \(Parity\) (as shown in Section 4.3.3) process based on \(SigLsEi\) to get the temporary signature (\(SigSmT_{1}\)). * After that, \(SN_{i}\) generates an ephemeral random value (\(SigSnE_{i}\)) with the same signature length and uses it with \(SigSmT_{1}\) to compute the \(SigSmT_{2}\) value. * Next, \(SN_{i}\) computes the \(Dif\) value that represents the subtraction value of the distance between \(CH_{i}\) and \(SN_{i}\) (\(S_{N}C_{H}D\)) and the distance between \(LS\) and \(SN_{i}\) (\(S_{N}L_{S}D\)). \(Dif\) specifies that \(SN_{i}\) is within the HWSN framework (1000 m \(\times\) 1000 m). * Additionally, \(SN_{i}\) computes a new timestamp (\(SN_{TS}\)) and one time passcode (\(SN_{OTP}\)). \(SN_{i}\) also performs a hidden process for \(SN_{TS}\) and \(SN_{OTP}\) at a temporary value (\(SN_{TS_{i}}\)) with the addition of a value of only seconds (\(SS\)) at the end of the \(SN_{TS_{i}}\). * Furthermore, \(SN_{i}\) uses \(SN_{p}\) to concatenate secret parameters such as \(SN_{TS_{i}}\), \(SN_{OTP}\), \(SN_{RN_{i}}\), \(SN_{Pseud}\) and \(SN_{SL}\) to match them at the \(LS\). To protect both \(SN_{p}\) and \(SigSnE_{i}\), \(SN_{i}\) uses the \(\oplus\) operation to hide them by calculating the temporary values of \(SigSnT_{3}\) and \(SigSnT_{4}\). At this point, \(SN_{i}\) computes the message (\(SN_{m}\)) and sends it to \(CH_{i}\) which is a sequence of \(SigSnT_{3}\), \(SigSnT_{4}\), \(SN_{RN_{i}}\), \(Dif\), \(SN_{TS_{i}}\) and data collection. \(CH_{i}\) Side
* \(CH_{i}\) also receives \(LS_{OTP_{i}}\) of the \(LS\) and \(SN_{m}\) of \(SN_{i}\). * Afterwards, \(CH_{i}\) truncates \(Dif_{i}\) and tests its value within the HWSN framework by computation \(Dif_{i}\leq\) Maximum value, where the Maximum value should be less than or equal to 707.1068. * Then, \(CH_{i}\) computes the timestamp (\(CH_{TS_{1}}\)) to prevent late messages. * \(CH_{i}\) truncates \(SS\) from \(SN_{TS_{i}}\) to obtain \(SN_{TS_{i}}\). If the difference between \(CH_{TS_{1}}\) and \(SN_{TS_{i}}\) is less than the \(\triangle T\) delay rate (we assumed that \(\triangle T=3\)), namely, that the message is fresh. Protocol 2 between \(CH\)s and \(LS\):  
This protocol performs the data aggregation process (Figure 7 shows the second protocol processes between \(CH_{i}\) and \(LS\) in the data aggregation). The process is as follows:  
Figure 6: Data collection protocol. \(CH_{i}\) Side
* Each \(CH_{i}\) receives temporary signatures, random numbers and collected data from its \(SN_{i}\) followers. * Then, \(CH_{i}\) executes the signature process \(SigCH\) for the temporary signatures received (\(SigSnT_{3_{s}}\)) of its \(SN_{i}\) followers. * Thereafter, \(CH_{i}\) extracts the \(SigLsE_{i}\) unique value from \(LS_{OTP_{i}}\) similar to the first protocol based on \(SigLS_{i}(CH_{Pseud})\) stored. * Next, \(CH_{i}\) Performs \(CH_{Parity}\) process based on \(SigLsE_{i}\) extracted (as described in Section 4.3.3) to compute \(SigChT_{1}\). Moreover, \(CH_{i}\) computes \(SigChT_{2}\) depending on the \(SigChT_{1}\oplus SigLsE_{i}\) operation. * After that, \(CH_{i}\) generates \(CH_{TS_{2}}\) and \(CH_{OTP}\) to prevent the problem of replaying messages later.