# Blockchain-Based Multistage Continuous Authentication for Smart Devices
## 4 System Model
### Signal segmentation  
The gait signal in the human body is periodic. The segmentation of the gait signal into sequence units facilitates the extraction of information about human gait characteristics. A gait cycle is defined as the time interval between two adjacent touches of the same foot to the ground. Using the gait cycle as a segmentation unit is a more feasible approach than dividing the gait signal based on a fixed length. It is also known that the acceleration signal reaches its maximum value when one foot touches the ground. Therefore, this paper used the maximum signal from the accelerometer as the starting point of the gait cycle. The gait signals selected for this paper are an array of six channels, including the X, Y, and Z axis signals from the accelerometer and gyroscope sensors. As the experimenter holds the smart device in his hand and swings his arm naturally during data acquisition, his Z axis direction coincides with the direction of the user's acceleration. And the Z axis  
Figure 10: Comparison of gait signal before and after filtering. Figure 9: X axis waveform of the acceleration sensor. direction is most sensitive to the perception of gait data. Therefore, the \(Z\) axis signal from the accelerometer sensor was used to complete the gait cycle detection in this paper. As shown in Figure 11 below, this paper used a sliding window segmentation technique. The length of the human gait cycle sequence is in the range of 120-140, and there are slight differences between the individual gait signals collected in this paper. In order to ensure that the sliding time window contained the entire gait cycle, this paper used a sliding window of 150 in length to segment the collected gait data into a period. The cycles are indicated by red frames in the gait signal. (3) Feature point extraction  
As the raw data from both the accelerometer and gyroscope sensors are high-dimensional, we needed to perform an effective feature extraction process for the data in this paper. In this paper, we extracted features from high-dimensional time series in the time domain. Common time domain features include maximum, minimum, mean, variance, and peak-to-peak. These time domain features all possess magnitudes and are therefore referred to as dimensioned eigenvalues. In addition, dimensionless features such as skewness, peak factor, and cliff factor can also be used. Appropriate feature selection not only improves the accuracy of authentication, but also increases the efficiency of identification and speeds up the process of identification and authentication. Therefore, in this paper, the five features of mean, kurtosis, standard deviation, peak factor, and skewness were finally selected as the basis for authentication. The sample format of the gait data feature extraction is shown in Figure 12, and the 30-dimensional data features will be used in the subsequent authentication. (4) Gait secret key  
According to the fuzzy extractor and behavioral feature extraction scheme introduced above, the key extraction process based on the gait is shown in Figure 13. In the registration phase, the user performs gait data collection and feature extraction. Then, we input the extracted features \(\omega_{i}\) into the fuzzy extractor and generate a random key \(R\) and a public string \(P\) according to the Gen algorithm. The random key \(R\) is hashed and stored in the IPFS as the gait key, while the public information \(P\) is stored on the chain. When the user is authenticated, the user's gait characteristics \(\omega_{i}\) are collected again, and \(P\) is extracted from  
Figure 11: Sliding window Method. Figure 12: Sample format of data extracted from gait features. the blockchain. If the biometric error of the two inputs is satisfied within a given range, i.e., \(dis(\omega_{i},\omega_{i^{\prime}})\leq\epsilon\), then the random key \(R^{\prime}\) can be recovered from \(\omega_{i^{\prime}}\) and \(P\). We hash the random key \(R^{\prime}\) and extract the original hash (R) stored in the IPFS.