Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

IEEE JOURNAL OF BIOMEDICAL AND HEALTH INFORMATICS, VOL. 21, NO.

3, MAY 2017 655

Multiple ECG Fiducial Points-Based Random


Binary Sequence Generation for Securing
Wireless Body Area Networks
Guanglou Zheng, Student Member, IEEE, Gengfa Fang, Rajan Shankaran, Member, IEEE,
Mehmet A. Orgun, Senior Member, IEEE, Jie Zhou, Li Qiao, and Kashif Saleem

Abstract—Generating random binary sequences (BSes) analysis, the complexity of the algorithm is comparable to
is a fundamental requirement in cryptography. A BS is a that of fast Fourier transforms. These randomly generated
sequence of N bits, and each bit has a value of 0 or 1. ECG BSes can be used as security keys for encryption or
For securing sensors within wireless body area networks authentication in a WBAN system.
(WBANs), electrocardiogram (ECG)-based BS generation
methods have been widely investigated in which interpulse Index Terms—Electrocardiogram, random binary se-
intervals (IPIs) from each heartbeat cycle are processed to quence (BS), wavelet transforms (WT), wireless body area
produce BSes. Using these IPI-based methods to generate a network.
128-bit BS in real time normally takes around half a minute.
In order to improve the time efficiency of such methods, I. INTRODUCTION
this paper presents an ECG multiple fiducial-points based
IRELESS body area networks (WBAN) have emerged
binary sequence generation (MFBSG) algorithm. The tech-
nique of discrete wavelet transforms is employed to detect
arrival time of these fiducial points, such as P, Q, R, S, and
W as a new and novel technology for managing and mon-
itoring chronic diseases, aged care, postoperative rehabilitation
T peaks. Time intervals between them, including RR, RQ, of patients, and persons with special abilities [1]. WBANs con-
RS, RP, and RT intervals, are then calculated based on this sist of miniaturized wireless sensors, wearable or implantable,
arrival time, and are used as ECG features to generate ran-
dom BSes with low latency. According to our analysis on which are capable of measuring a large number of complex
real ECG data, these ECG feature values exhibit the prop- physiological signals, e.g., electrocardiogram (ECG) and pho-
erty of randomness and, thus, can be utilized to generate toplethysmogram[2]. These signals, especially ECG, have been
random BSes. Compared with the schemes that solely rely widely investigated for securing WBANs [3]–[10].
on IPIs to generate BSes, this MFBSG algorithm uses five One ECG-based security mechanism is to generate random
feature values from one heart beat cycle, and can be up
to five times faster than the solely IPI-based methods. So, BSes from ECG signals [3]–[7]. A BS is a sequence of N bits,
it achieves a design goal of low latency. According to our and each bit has a value of 0 or 1. Normally, a pseudorandom
number generator (PRNG) is used to generate BSes. However,
this process requires a random seed coupled with complex com-
Manuscript received November 13, 2015; revised February 12, 2016;
accepted March 15, 2016. Date of publication March 24, 2016; date of putational operations. Therefore, it cannot be utilized within
current version May 3, 2017. This work was supported in part by the a WBAN sensor, which is constrained by limited resources
National Plan of Science, Technology and Innovation (MAARIFAH), King in terms of memory, battery, and computation capability [5].
Abdulaziz City for Science and Technology, Kingdom of Saudi Arabia
(12-INF2817-02). The work of G. Zheng was supported in part by a Nonetheless, it has been proposed that random BSes can be gen-
Macquarie University Research Excellence Scholarship. (Corresponding erated from ECG signals and are used for facilitating symmetric
author: Mehmet A. Orgun.) key distribution [3], [4], authentication [6], or as symmetric keys
G. Zheng and R. Shankaran are with the Department of Comput-
ing, Macquarie University, Sydney, N.S.W 2109, Australia (e-mail: guan- directly [5], [7], [11]. This ECG-based security approach ben-
glou.zheng@mq.edu.au; rajan.shankaran@mq.edu.au). efits WBANs, especially implantable medical devices (IMDs).
G. Fang is with the School of Computing and Communications, For instance, the heart-to-heart algorithm [6] uses random BSes
University of Technology, Sydney, N.S.W. 2007, Australia (e-mail:
gengfa.fang@uts.edu.au) generated from real-time ECG signals to perform authentication
M. A. Orgun is with the Department of Computing, Macquarie Uni- between an IMD and a device programmer; therefore, patients
versity, Sydney, N.S.W. 2109, Australia, and also with the Faculty of bearing IMDs, e.g., pacemakers and implantable defibrillators,
Information Technology, Macau University of Science and Technology,
Taipa 999078, Macau (e-mail: mehmet.orgun@mq.edu.au). can be cared for by any qualified medical personnel in emer-
J. Zhou is with the Department of Engineering, Macquarie University, gencies, while preventing attackers from accessing IMDs.
Sydney, N.S.W. 2109, Australia (e-mail: jie.zhou8@mq.edu.au). Currently ECG-based BSes are typically randomly generated
L. Qiao is with the School of Engineering and IT, University
of New South Wales, Canberra, A.C.T. 2610, Australia (e-mail: by processing inter-pulse intervals (IPIs) of ECG signals [3]–
l.qiao@adfa.edu.au). [7]. IPIs are defined as time intervals between two consecutive
K. Saleem is with the Center of Excellence in Information As- heartbeats and are proven to be a random source [4]. As proposed
surance, King Saud University, Riyadh 12372, Saudi Arabia (e-mail:
ksaleem@ksu.edu.sa). in [4] and [6], only the last 4 bits of each binary IPI can be
Digital Object Identifier 10.1109/JBHI.2016.2546300 regarded as random bits and are extracted to form random BSes.
2168-2194 © 2016 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission.
See http://www.ieee.org/publications standards/publications/rights/index.html for more information.

Authorized licensed use limited to: San Jose State University. Downloaded on June 09,2020 at 14:13:52 UTC from IEEE Xplore. Restrictions apply.
656 IEEE JOURNAL OF BIOMEDICAL AND HEALTH INFORMATICS, VOL. 21, NO. 3, MAY 2017

Therefore, generating a 128-bit BS requires at least 32 IPIs,


which means that the sensor node has to successfully detect at
least 33 consecutive heart beats. Considering that the heart rate
of a normal sinus rhythm is 60–100 beats per minute (b/min) for
an adult, generating a 128-bit BS would require approximately
20–30 s, which is considerably time consuming for real-time
requirements of a WBAN system. This problem is also pointed
out by Venkatasubramanian et al. [12]. Fig. 1. Fiducial points on ECG waveform. Ps and Pe are the starting
In order to reduce the latency of the ECG-based BS gener- point and the end point of a P wave, respectively, while P is the peak
ation algorithm, we have reviewed inherent characteristics of point. In QRS complex, Q, R, and S are peak points of Q, R, and S
waves, respectively. Ts, T, and Te are the starting, peak, and end points
an ECG signal and proposed a multiple fiducial point-based of a T wave, respectively. Part of the image is from [13].
binary sequence generation (MFBSG) algorithm. Besides ac-
commodating the IPI feature, the MFBSG algorithm uses other
characteristics of an ECG signal, such as RQ intervals, RS inter-
We use the fiducial points on the ECG trace to extract feature
vals, and RP and RT intervals within one heart beat cycle. This
values for random BS generation. In ECG-based authentication
is based on the fact that P wave, QRS complex, and T wave are
schemes, ECG amplitude values are used as features for
also observable within a normal sinus rhythm, and their inter-
security purposes [14]; however, the MFBSG algorithm does
vals possess characteristics of randomness. By exploiting more
not follow this approach due to the fact that amplitude values of
components of an ECG signal, the time required to generate
two synchronously measured ECG traces from different parts
random BSes is reduced significantly. The contributions of this
of the same body vary significantly, normally depending on the
paper are summarized as follows:
distance from the heart. As shown in Fig. 1, the fiducial points
1) The proposed MFBSG algorithm uses multiple fiducial
on an ECG trace include Ps, P peak, and Pe for the P wave and
points to obtain five feature values from one heart beat
Ts, T peak, and Te for the T wave. Ps, Pe, and Ts, Te are the
cycle. Compared to BS generation algorithms that are
onset and the offset of the P wave and the T wave, respectively.
solely IPI based, this scheme improves the time efficiency
In this paper, the technique of DWT is employed to detect these
of BS generation, and, thus, achieves the design goal of
fiducial points.
low-latency, a basic requirement in a WBAN system.
On the P wave, its three fiducial points, Ps, P peak, and Pe,
2) In the MFBSG algorithm, discrete wavelet transforms
are obviously correlated. So, only one of them can be selected
(DWT) are proposed to precisely detect ECG fiducial
for generating random BSes in the MFBSG algorithm. For the
points and obtain time intervals between them. We ana-
P wave, the DWT process needs to detect the P peak first, which
lyzed the complexity of the wavelet transforms (WTs),
is corresponding to the zero crossing point between a modulus
and found that it is comparable to that of fast Fourier
pair. It then searches backward from the P peak for its onset Ps,
transforms (FFT).
and forward for its offset Pe [15]–[17]. However, the detection
3) Compared with the conventional PRNG algorithm, the
of these onset and offset points may be affected by the baseline
MFBSG uses ECG signals as a natural random source.
drift and the motion artifact [16]. Therefore, the peak of each
Therefore, it does not need random seeds and complex
P wave is selected for the BS generation in our algorithm. This
computations which are essential in the PRNG.
can simplify the fiducial point detection algorithm and obtain an
The rest of the paper is organized as follows. In Section II,
accurate arrival time of the point (P peak). Similarly, the T peak
we propose and describe steps of the MFBSG algorithm. This
is selected in our algorithm. Therefore, fiducial points chosen in
algorithm uses WTs to extract ECG fiducial points and then
our algorithm are wave peaks, such as P, Q, R, S, and T.
produces random BSes. Section III presents a comprehensive
In the current heartbeat, if we define the arrival time of P,
evaluation of the algorithm on aspects of ECG WTs, random-
Q, R, S, and T peaks as Tp , Tq , Tr , Ts , and Tt , time intervals
ness of ECG features, BS randomness and distinctiveness, and
between them can be calculated by: RQ = |Tr − Tq |, RS =
complexity analysis. We discuss the potential use of the MF-
|Tr − Ts |, RP = |Tr − Tp |, and RT = |Tr − Tt |, where the
BSG algorithm in Section IV, and review the related work in
operator |.| calculates an absolute value. The RR interval is
Section V. The final section summarizes our contributions.
defined as the time difference between two successive R peaks,
as shown in Fig. 1. So, the RR interval is the same as the IPI as
II. ECG BS GENERATION ALGORITHM defined in [5]. These time intervals are used as ECG features in
the MFBSG algorithm.
This section proposes the MFBSG algorithm which uses five
features (RR, RQ, RS, RP, and RT) from one heart beat cycle
as an entropy source to generate random BSes. Normally, one A. Steps of the BS Generation Algorithm
ECG trace includes three major waves: P wave, QRS complex, Several methods were proposed to generate BSes that are
and T wave. Fiducial points are landmarks in an ECG trace that solely dependent on IPIs [3]–[5]. Based on an analysis of these
could locate these three major waves, as shown in Fig. 1. For methods, the proposed MFBSG algorithm is described, as shown
normal sinus rhythms, peak values of P, Q, S, and T waves are in Fig. 2. The algorithm samples ECG signals and removes
observable. Hence, we can conclude from the observation that sampling noise at the beginning. Then, it runs through two major
their peak values can be potentially used for WBAN security. processes.

Authorized licensed use limited to: San Jose State University. Downloaded on June 09,2020 at 14:13:52 UTC from IEEE Xplore. Restrictions apply.
ZHENG et al.: MULTIPLE ECG FIDUCIAL POINTS-BASED RANDOM BINARY SEQUENCE GENERATION FOR SECURING WBANs 657

function ψ(t), the WT of a signal f (t) ∈ L2 (R) is given by


 ∞
1 t−b
Wf (a, b) =  f (t)ψ ∗ ( )dt (1)
|a| −∞ a
where a is the scale factor and b is the translation of ψ(t). ψ ∗ (t)
denotes the complex conjugation of ψ(t). The parameters, a and
b vary continuously over the real number space. Equation (1)
represents that WT decomposes the signal f (t) by combining
a set of basis functions that are obtained by means of dilation
(a) and translation (b) of a wavelet (ψ(t)). For smaller values of
scale a, the temporal support for the wavelet decreases and the
transform coefficients give more information about the higher
frequency components of the analyzed signal, and vice versa. A
discrete WT is created when a = 2j (j ∈ Z, Z is the set of inte-
gers). A classical fast wavelet decomposition and reconstruction
Fig. 2. Block diagram of the wavelet-based ECG BS generation algo- algorithm, Mallat algorithm [19], is used in the process, denoted
rithm. The algorithm has two major parts: The ECG wavelet process and
the BS generation process. BF=Binary feature.
by,

S2 j f (n) = hk S2 j −1 f (n − 2j −1 k) (2)
k ∈Z

1) ECG Wavelet Process: The purpose of this process is W2 j f (n) = gk S2 j −1 f (n − 2j −1 k) (3)
to use the technique of WTs to process sampled ECG signals, k ∈Z
involving the following steps: QRS detection, P wave detection,
and T wave detection. WTs are based on a set of analyzing where {hk , k ∈ Z} and {gk , k ∈ Z} are coefficients of a low-
wavelets with limited duration, and allow the representation of pass filter and a high-pass filter. S2 j f (n) are approximation
temporal features of a signal at different resolutions. Since the coefficients, while W2 j f (n) are detail coefficients. S2 0 f (n) is
ECG signal is characterized by a cyclic occurrence of patterns the sampled signal f (n), and is referred to as the sampled ECG
with different frequency content (P waves, QRS complexes, and signal in our application.
T waves), it is suitable to use the WT to analyze the ECG signal Singularities normally carry the most important information
[17]. After the WT, timing information of the ECG fiducial of sampled signals. In our application, we are interested in sin-
points (peak values of P, Q, R, S, and T) is detected. Then five gularities on ECG waves (peak values of P, Q, R, S, and T
feature values from one heart beat cycle (RR, RQ, RS, RP, and waves). A quadratic spline wavelet with compact support, de-
RT intervals) are calculated and are used as inputs to the next fined by Mallat and Zhong [20], is used in our algorithm. It is
stage. the derivative of a smoothing function. According to the form of
2) BS Generation Process: The purpose of this process is the quadratic spline wavelet [19], the peaks of each wave corre-
to generate random BSes by processing five feature values from spond to zero-crossing points of a positive maximum-negative
one heartbeat cycle. After receiving ECG feature values, binary minimum pair of W2 j f (n) at different scales. This wavelet has
digits are extracted from each feature, named binary features been well studied for ECG signal processing and singularity
(BFs). These BFs are then concatenated to obtain an x-bit long detection [15], [17], [21].
BS. Randomness is a vital requirement if BSes are used for According to the analysis of equivalent responses of W2 j f (n)
WBAN security purposes. Meanwhile, generating BSes with at different scales [17] and the spectrum analysis of ECG, noise,
high timing efficiency is another important requirement for a and artifact [17], the decomposed ECG signals at scales 21
communication system. In order to balance the requirements of to 24 contain most of the energy of the QRS complex, and
randomness and timing efficiency, this process is broken down the main energy of P and T waves lies at the scales 24 and
into three steps: mean value removal, adaptive BF extraction, 25 . Since a larger scale reflects the low-frequency part of the
and BF concatenation. signal, the ECG signal at scales larger than 25 is influenced
by the baseline drifting [16], [17]. Therefore, we use scales
from 21 to 25 for ECG fiducial point detection. This process
follows wavelet algorithms proposed by Martı́nez et al. [17]
B. Stage 1: ECG Wavelet Process
and Sahambi et al. [16], with steps summarized as below.
The technique of WTs can represent features of ECG signals 1) Detection of QRS Complex and R Peaks: The QRS
at different resolutions. Therefore, it has been proposed to de- complex is the predominant part within each heartbeat cycle, so
lineate ECG waveforms and detect feature values of these peaks we detect the QRS complex and locate the R peak first. QRS
[18]. ECG feature detection includes steps of QRS complex complexes in each cycle are detected by analyzing the local
detection, P wave detection, and T wave detection. positive maximum-negative minimum pairs from large to small
WT uses a series of small wavelets with limited duration to scale [16], [17]. Since the DWT at the large scale gives more
decompose a signal. It can give a good estimation of the signal information about the low frequency of the analyzed signal,
in both the time and the frequency domains [16]. For a wavelet searching maxima pairs from large to small scale can help to

Authorized licensed use limited to: San Jose State University. Downloaded on June 09,2020 at 14:13:52 UTC from IEEE Xplore. Restrictions apply.
658 IEEE JOURNAL OF BIOMEDICAL AND HEALTH INFORMATICS, VOL. 21, NO. 3, MAY 2017

reduce the effect of high-frequency noise. Therefore, the algo- where σ(.) represents the SD of a dataset. . rounds the decimal
rithm searches modulus maxima pairs and their zero-crossing value of log 2(σ(RX)) to its nearest integer toward infinity. SDs
points at the scale 24 first, and then moves to the scale 23 , of each type of ECG features are different, and therefore, the
22 , and 21 , respectively. According to the relationship between number of extracted bits m changes accordingly. For the ith
signal singularities and its DWT, the zero-crossing points at heartbeat, the BF extracted from one ECG feature is denoted by
scale 21 are marked as R peaks.
2) Detection of Q and S Peaks: Q and S waves in QRS BFi = BFextract(RXi , m) (6)
complexes contain characteristic information of ECG signals. where BFextract(.) represents a function to extract m bits from
Positions of R peaks detected at the first step are used as ref- its input RXi .
erence points here. For the decomposed signal at the scale 22 , There are many ways to extract bits from each feature [3], [5].
there is a modulus maxima pair with opposite signs of W2 2 f (n) In this algorithm, we use the method proposed in our previous
before and after the R peak location, corresponding to the Q paper [7]. It has four steps: Simple moving average process,
peak and the S peak, respectively. The algorithm locates zero- Gray coding, removal of the least significant bit and parity check.
crossing points of these modulus maxima pairs at the scale 22 This method is to generate BSes for purposes of authentication
first, and then searches zero-crossing points at the scale 21 . The and key distribution (as described in Section IV). If the BS is
zero-crossing points before and after R peaks at the scale 21 are to be used as a secret key and distributed to other sensors by
assigned to Q and S peaks, respectively. a secure channel, then we can just convert the feature value
3) Detection of P and T Peaks: A search window of to binary and extract its last m bits directly. So, five BFs can
P waves is defined first, with its width dependent upon the be extracted from five features in the ith heartbeat, denoted
recursively calculated RR interval. On the decomposed signal by BFij (j = 1, 2, . . . , 5). This adaptive BF extraction method
at the scale 24 , we search for the local modulus maxima pair ensures the randomness of BSes based on the variation of real-
of W2 4 f (n) with opposite signs. If the local modulus maxima time measured ECG data.
pair exists, the zero crossings between them are regarded as P 3) BF Concatenation: The extracted BFs from the ith
wave peaks; otherwise, a similar process is to be performed at heartbeat, BFij (j = 1, 2, . . . , 5), are then concatenated by,
the scale 25 . The T wave and its peak value detection follows a
similar process as the P wave algorithm. BSi = BFi1  BFi2  BFi3  BFi4  BFi5 (7)
where  is a concatenation operation. BSi represents a BS gen-
C. Stage 2: BS Generation Process erated from the ith heartbeat. In order to form an x-bit BS, BSi
The BS generation process uses five types of features from generated from l consecutive heartbeats are then concatenated
each ECG heartbeat cycle. In the ith heartbeat, measured ECG by
feature values are denoted by RRi , RQi , RSi , RPi , and RTi . In
BSx = BS1  BS2 · · ·  BSl . (8)
order to simplify the algorithm for a resource-restricted wireless
sensor node, each feature follows the same process to generate The number of ECG heartbeats l varies according to the sub-
random BSes. So we use RX to represent a set of any one of ject’s ECG signals and ECG measuring equipment. Besides, we
these features from one sampled ECG trace and RXi to represent need to have the redundant ECG heartbeats so that the algorithm
one of these features in the ith heartbeat. For a series of ECG can generate intended length of a BS from one sampled ECG
features, the BS generation process is described as below. trace in most cases. In order to ensure that generated BSes sat-
1) Mean Value Removal: As analyzed in Section III, the isfy the requirement of randomness, we design a series of tests
distribution of these ECG features, although virtually following in Section III, including calculating entropy, using the National
a normal distribution, has an offset from the y-axis. Therefore, Institute of Standards and Technology (NIST) randomness test
this offset has to be removed from ECG features. According suite to test BSes and performing distinctiveness analysis.
to the properties of a normal distribution, the mean value of
features can be used to remove this offset as follows: III. EXPERIMENTS AND RESULTS
RXi = RXi − mean(RX). (4) In this section, we evaluate the MFBSG algorithm by conduct-
ing a series of experiments. Lacking the infrastructure support to
The result RXi , which represents RRi , RQi , RSi , RPi , and obtain ECG measurements in the lab, we follow an analysis ap-
RTi , is used in the next step to generate BSes. proach similar to those in [8], [10], and [12], which uses the MIT
2) Adaptive BF Extraction: Methods in [3]–[5] propose PhysioBank database (http://www.physionet.org/physiobank).
to extract a fixed number of bits from each IPI. However, the Experiments were carried out on the ECG data from 97 subjects:
variation range of ECG features changes in each dataset. In order 79 subjects from the European ST-T database [22] and 18 sub-
to reflect this variation, we propose an adaptive BF extraction jects from the MIT-BIH Normal Sinus Rhythm database [23].
method which determines the number of bits extracted from each
feature according to the standard deviation (SD) of measured A. Wavelet-Based ECG Signal Process
features, denoted by
The MFBSG algorithm uses DWTs to process ECG signals
m = log 2(σ(RX)) (5) and detect fiducial points. ECG signals are decomposed by the

Authorized licensed use limited to: San Jose State University. Downloaded on June 09,2020 at 14:13:52 UTC from IEEE Xplore. Restrictions apply.
ZHENG et al.: MULTIPLE ECG FIDUCIAL POINTS-BASED RANDOM BINARY SEQUENCE GENERATION FOR SECURING WBANs 659

Fig. 3. Examples of using WTs to detect QRS complex and P, T waves. Q, R, S, P, and T wave peaks are marked out with lines on the sampled
ECG signal f (n). (a) Algorithm detects modulus maxima pairs at scale 22 , and their zero crossings at scale 2 1 are assigned to Q, R, and S peaks,
respectively. (b) Detection processes of P peaks and T peaks are carried out at scale 24 with a similar process. (c) ECG fiducial points are detected
and marked out on the sampled ECG signal.

DWT at five levels. Examples of ECG delineation are shown in method which can determine the number of bits extracted
Fig. 3, where f (n) is the sampled ECG signal. from each feature according to their SDs, as described
Fig. 3(a) shows examples of the QRS complex and individual in (5).
wave peak detection. In principle, the QRS complex is used as Therefore, these selected ECG features possess the random-
a references for the detection of other waves and complexes. ness quality. This is a fundamental property to ensure that BSes
The detection algorithm follows steps as: 1) it determines the generated from these features are random.
QRS complex; 2) it finds significant modulus maxima at scales
22 , and locates the R peak at scale 22 and 21 ; 3) the modulus C. Randomness of Generated x-bit BSes
maxima pairs before and after the R peak are located and their
zero crossings at scale 21 are assigned to Q and S peak values, Randomness of generated BSes is a vital requirement when
respectively. applying BS generation for the WBAN security purpose. There-
Fig. 3(b) shows examples of detection of P and T wave peaks. fore, in this experiment, we generated x-bit BSes from captured
The P peak detection involves the following steps: 1) it defines a ECG features (RR, RQ, RS, RP, and RT), and then analyzed the
P wave search window which is dependent on the calculated RR randomness by calculating their entropy and running an NIST
interval; 2) within the search window, it looks for the modulus randomness test suite [24]. In our experiments, we generated
maxima pair at scale 24 , and its zero-crossing point is considered 128-bit BSes for evaluation.
as the P peak value. The T peak detection is similar to this 1) Entropy Analysis: The entropy is calculated to measure
process. the uncertainty of generated ECG BSes. For a random variable
Fig. 3(c) shows examples of ECG fiducial point detection χ = 0, 1, we can calculate the entropy of each BS using the
results. It clearly shows that P, Q, R, S, and T peaks are detected formula
correctly and marked out on the sampled ECG signal. After H(χ) = −p0 log2 p0 − p1 log2 p1 (9)
locating these peaks, their intervals, including RR, RQ, RS, RP,
and RT, are calculated and used in the BS generation process. where p0 and p1 are the probability mass functions of 0 and 1 s,
respectively. The largest entropy is 1 when it follows a uniform
distribution. The entropy results of BSes generated from about
B. Randomness of ECG Features
100 ECG samples are shown in Fig. 5. It can be seen that the
The feasibility of using selected ECG features (RR, RQ, RS, entropy values of most ECG BSes were close to 1, with the
RP, and RT) to generate random BSes is based on the fact that mean value of 0.9874. Furthermore, we conducted a two-tailed
all these ECG features possess the property of randomness. runs test in the experiment, which showed that more than 95%
In this experiment, we evaluated this randomness property by of ECG BSes passed the test with a significance level of 5%.
collecting consecutive ECG feature values and plotting their Thus, the generated ECG BSes truly exhibit the property of
histograms, with results highlighted in Fig. 4. It can be seen randomness.
from these figures that: 2) NIST Randomness Test: In order to comprehensively
1) The fluctuation of consecutive RR intervals, as shown in analyze the randomness of generated ECG BSes, we also per-
Fig. 4(a), fits into a normal distribution, which indicates formed a statistical experiment with the NIST randomness test
the randomness of RR intervals. suite [24]. The state-of-the-art NIST test suite is used for testing
2) Likewise, the distributions of RQ, RS, RP, and RT inter- random and PRNGs for cryptography. The outputs are P -values
vals, as shown in Fig. 4(b)–(e), are close to normal. Thus, which indicate the probability that the generated BSes are ran-
these features also display the property of randomness. dom or not. If the P -value is less than a threshold (normally
3) We can see from these figures that their SDs σ vary for 0.01), the hypothesis that a BS is random is then rejected. The
each feature type. Therefore, we need to use an adaptive aggregate of BSes generated from ECG recordings from the Eu-

Authorized licensed use limited to: San Jose State University. Downloaded on June 09,2020 at 14:13:52 UTC from IEEE Xplore. Restrictions apply.
660 IEEE JOURNAL OF BIOMEDICAL AND HEALTH INFORMATICS, VOL. 21, NO. 3, MAY 2017

Fig. 4. Normal distribution fitting to the fluctuation of ECG feature values. These five types of intervals fit into a normal distribution, with different
mean values μ and SDs σ. (a) For the distribution of RR intervals, μ = 259, and σ = 9. (b) For RQ intervals, μ = 18, σ = 6. (c) For RS intervals,
μ = 18, σ = 5. (d) For RP intervals, μ = 89, σ = 3. (e) For RT intervals, μ = 156, σ = 9. The unit of x-axis is 4 ms (sample rate 250 Hz).

TABLE I
NIST STATISTICAL TEST RESULTS FOR ECG BSES

Statistical test P-value Proportion Pass/Fail

Frequency 0.534146 0.9000 Pass


Block Frequency 0.122325 0.9000 Pass
Cumulative Sums+ (2) 0.167800 0.9000 Pass
Runs 0.911413 1.0000 Pass
Longest Run 0.534146 0.9000 Pass
Rank 0.066882 1.0000 Pass
FFT 0.739918 0.8000 Pass
Nonoverlapping Template+ (148) 0.1548 0.9500 Pass
Serial+ (2) 0.281897 1.0000 Pass
Linear Complexity 0.350485 0.9000 Pass

Fig. 5. Entropy of generated ECG BSes, with the mean entropy of


0.9874. The ideal entropy is 1 when it follows a uniform distribution. So
the distribution of 0 and 1 s in BSes is close to a uniform distribution. with a confidence level of 99%. Therefore, BSes generated from
this algorithm and the previous two methods can be considered
as random with a confidence level of 99%. Their performance
ropean ST-T Database is used for the test, with results shown in of randomness is comparable.
Table I. Tests that produce multiple P -values are represented by
a (+) and followed by the number of different generated values
D. Distinctiveness of Generated x-bit BSes
in parenthesis. The table displays their mean values.
The table shows that all P -values are greater than 0.01 (pass). The purpose of distinctiveness analysis is to ensure that
We compare the MFBSG algorithm with the ECG IPI-based BS ECG BSes generated from different subjects are significantly
generation method proposed by Zhang et al. [5] and the analog- different from each other. Thereby, adversaries cannot obtain
to-digital-based method proposed by Callegari et al. [25] in any information of a BS by measuring another subject’s ECG
the context of the NIST test performance. There are commonly signal. The Hamming distance (Dham ) is used as a metric to as-
executed NIST tests, including frequency test, block frequency sess the difference between any two BSes of equal length. Dham
test, runs test and longest run test. According to [5, Table IV] and is measured as the number of positions at which the correspond-
[25, Table III], P -values of tests of BSes generated from these ing bit values are different. The larger the Dham , the better the
two methods are around 0.99. As explained in [24], a P -value ≥ performance of the generated BSes. For two bits at the same
0.01 would mean that the sequence would be considered random position of two BSes ua and ub , the probability P (ua , ub ) can

Authorized licensed use limited to: San Jose State University. Downloaded on June 09,2020 at 14:13:52 UTC from IEEE Xplore. Restrictions apply.
ZHENG et al.: MULTIPLE ECG FIDUCIAL POINTS-BASED RANDOM BINARY SEQUENCE GENERATION FOR SECURING WBANs 661

Therefore, the computational complexity of DWT is comparable


to that of FFT. Because of its low-complexity energy-efficient
performance, DWT has been widely used to process ECG sig-
nals in wireless body sensor nodes[18]. The operation count of
the BS generation process depends on the number of heartbeats
l, so its complexity is O(l). Obviously, O(l) is smaller than
O(n). Therefore, the complexity of the whole MFBSG algo-
rithm is O(n). This complexity is comparable to that of FFT
and, thus, can be implemented on wireless sensor nodes.
3) Analysis of ECG Abnormalities: The normal sinus
rhythm usually has P waves, QRS complex, and T waves in
one heart beat cycle. However, sometimes abnormal ECG sig-
nals may be observed. This may happen on patients with cardiac
Fig. 6. Distribution of Hamming distances between any two 128-bit arrhythmia. Even ECG signals from healthy people may have
BSes, with the mean distance of 45.3%. The Hamming distance values a normal variation of a heart’s beat sometime. In this scenario,
between any two BSes fit into a normal distribution. some kind of waves may be missing within one heartbeat or its
peak value may not be able to be detected by the DWT. Then,
we cannot obtain all intended intervals for the BS generation
be denoted by algorithm. In this case, the MFBSG algorithm will use as many
intervals as it can obtain. For instance, it may use four intervals
P (ua , ub ) = 0.25, ua = 0, 1; ub = 0, 1. (10) (RQ, RS, RT, and RR) from the current heartbeat, and use all five
The reason is that it has the same probability of being 0 or 1 for intervals from the next beat if the ECG signal becomes normal.
any bit within a random or pseudorandom BS. Thus, the average The efficiency of the algorithm will be affected, but will still be
of Dham of a sufficiently large set of x-bit BSes is expected to be better than the solely IPI-based BS generation methods. If none
around x/2, provided that BSes are random or pseudorandom. of minor peaks (P, Q, S, and T) can be detected, the MFBSG al-
In the experiment, we sampled ECG signals on each subject gorithm will only use the RR intervals to generate random BSes,
from the European ST-T Database with over 300 random start which means that the MFBSG algorithm is degraded to be at
times and computed the Dham between any two BSes, as shown the same level as the solely IPI-based methods. In an extreme
in Fig. 6. We can see that the Hamming distances between any case, the ECG waveform may become flat when an acute heart
two BSes fit into a normal distribution, with average Dham of attack occurs, such as a myocardial infarction or a dangerous
45.3% which is close to 50%. Therefore, BSes generated from a arrhythmia. In this case, as discussed by Rostami et al. [6] and
different subject’s ECG signal are distinctive. This property can Zheng et al. [7], the security mechanism of the IMD is designed
prevent adversaries from attacking a secured WBAN by using to be open to any access from an external programmer. This is
another subject’s ECG data. because the patient’s safety is much more important than the
device security.
E. Algorithm Analysis
1) Low Latency: The time required to generate a 128-bit IV. DISCUSSION
BS in our algorithm is significantly reduced. We take experi- Random BSes generated from ECG signals have several
ments on ECG recordings (sample rate 250 Hz) shown in Fig. 4 modes of applications. For instance, BSes can be used as secret
as an example. According to rules described in (5), we can ex- keys for encryption or authentication, or be used to facilitate
tract 4 bits from each RR interval, 3 bits from each RQ and RS symmetric key distribution. Obviously, the ECG BS generation
interval, 2 bits from each RP interval, and 4 bits from each RT is a fundamental technique that underpins all these applications
interval. So we can extract 16 bits in total from one heartbeat cy- which are summarized as below.
cle. Then generating a 128-bit BS needs eight heartbeat cycles. 1) Secret Key: A generated random BS can be used as a secret
In order to have redundant information, we sampled 20% more, key for the encryption purpose. It is distributed securely to other
that is, totally ten heartbeats in one ECG trace. For a normal sensors within a WBAN and even other electronic devices that
sinus rhythm with a heart rate of 60–100 b/min, it takes around lie outside of a WBAN but require secure communications with
6–10 s, much less than the time (20–30 s) that is required for the it. Normally in the computing domain, a PRNG is used to gen-
solely IPI-based methods. Hence, this MFBSG algorithm im- erate pseudorandom BSes for cryptographic applications. The
proves the latency of the ECG-base BS generation for sensors PRNG seed has to be carefully chosen and protected. However,
within a WBAN system. using our proposed ECG BS generation algorithm, no PRNG
2) Complexity Analysis: Our complexity analysis is per- algorithm is embedded in a wireless sensor and, therefore, no
formed over the two stages of the MFBSG algorithm, respec- seeds are required and to be protected.
tively: the ECG wavelet process and the BS generation process. 2) Authentication: These generated random BSes can be
As analyzed in [26], the complexity of fast WTs is O(n), while used for authentication within a WBAN, which can determine
that of FFT is O(n log n), where n is the sampled data size. whether a target sensor belongs to the same or a different WBAN

Authorized licensed use limited to: San Jose State University. Downloaded on June 09,2020 at 14:13:52 UTC from IEEE Xplore. Restrictions apply.
662 IEEE JOURNAL OF BIOMEDICAL AND HEALTH INFORMATICS, VOL. 21, NO. 3, MAY 2017

[6]. Since the blood circulation system provides an inborn secure The ECG-based random BS generation mechanism exploits
communication channel, ECG signals measured simultaneously the characteristics of timing randomness of ECG fiducial points,
by sensors within the same WBAN have a major part in com- in which ECG signals are used as random sources to generate
mon. Thus, BSes generated synchronously from these sensors BSes [3]–[7]. This mechanism does not require a random seed
are close to each other, and can be used to identify whether these and expensive computations, and thus is suitable for WBANs
sensors are within the same WBAN or not. Rostami et al. [6] [5], [6]. However, this paper proposes to extract only the last 4
proposed to set up a secure channel using lightweight public- bits of each binary IPI to form random BSes, so generating a
key cryptography in which the generated BS is transmitted from 128-bit BS requires detecting at least 33 consecutive heartbeats.
one sensor to another for the authentication purpose. It would take close to about half a minute to measure the ECG
3) Key Distribution: The ECG BS-based symmetric key dis- signal, which is slow for a real-time communication system [12].
tribution is supported by a theory of the fuzzy commitment In order to improve its time efficiency, we propose a multiple
[27]. Two biosensors, a sender and a receiver, are deployed on feature-based BS generation algorithm, which utilizes five types
the same human body, and generate random BSes bs1 and bs1 , of ECG features from one heart beat cycle. This algorithm can
respectively, by measuring ECG signals synchronously. Since be up to five times faster than the solely IPI-based methods.
these two BSes, although generated from the same body, have Consequently, the time required to generate random BSes is
slight variations due to the uncertainty of physiological signals dramatically reduced, achieving the design goal of low latency
and errors from the measuring equipment, a technique of error for a WBAN system.
correcting codes (ECC) is employed within the fuzzy commit-
ment to tolerate the bit errors between bs1 and bs1 . The fuzzy VI. CONCLUSION
commitment based key distribution works as follows.
First, a symmetric key k in the sender is mapped to an In this paper, we have presented an ECG MFBSG algorithm
ECC codeword as k̂ = fecc (k), where fecc is an ECC mapping which exploits multiple ECG feature values, including RR, RQ,
−1 RS, RP, and RT intervals, to generate random BSes with low
function with its inverse function as fecc . The mapped key k̂ has
latency. Previous papers solely rely on IPI features in BS gen-
redundant information to correct error bits. The commitment is
eration. Since normally the last 4-bits of each binary IPI can be
defined as:
regarded as random bits and are extracted to form BSes, gen-
F (k, bs1 ) = (hash(k), k̂ ⊕ bs1 ) (11) erating a 128-bit BS normally takes around half a minute. This
is considerably time consuming for sensors within a real-time
where hash(.) is a one-way hash function and ⊕ is the bitwise WBAN system. In order to improve its time efficiency, this pa-
XOR operation. This commitment F is sent to the receiver for per investigates multiple ECG fiducial points and obtains five
the decommitment process as feature values from one heartbeat cycle which are later utilized
k  = fecc
−1
(bs1 ⊕ (k̂ ⊕ bs1 )) (12) to generate random BSes.
Compared with the solely IPI-based schemes, the time re-
where k  is the decoded key, and the inverse function fecc
−1
is used quired for generating a BS by using this algorithm is reduced
 
to correct error bits. If hash(k ) = hash(k), then k = k. The significantly, thereby achieving the key goal of low latency for
decommitment process is successful. A detailed analysis of the WBAN sensors. According to our analysis, the complexity of
fuzzy commitment is described by Juels and Wattenberg [27]. the algorithm is comparable to that of FFT. Compared with the
PRNG, the MFBSG uses ECG signals as a natural source of
V. RELATED WORK random bits, and hence does not require random seeds and com-
Random number generation is a fundamental issue in cryp- plex computations. Moreover, it avoids the protection of random
tography. Since sources of true random number sequences are seeds, a general requirement in many security systems. As dis-
hard to come by, a PRNG is normally utilized in network cryp- cussed in this paper, these random BSes can be used as security
tography. The PRNG requires a random seed and has com- keys for encryption or authentication, or be used to facilitate key
plex computations. However, since WBAN sensors have scarce distribution.
memory and limited computation capabilities, the PRNG can-
not be used for securing WBANs [5]. Recent work proposes to REFERENCES
exploit the directional symmetry of the wireless fading channel [1] G. Fang, M. A. Orgun, R. Shankaran, E. Dutkiewicz, and G. Zheng,
to generate random bits, generally called physical layer-based “Truthful channel sharing for self coexistence of overlapping medi-
key generation [28]. Specifically, the wireless channel charac- cal body area networks,” PLoS ONE, vol. 11, no. 2, Apr. 2016, Art.
no. e0148376.
teristics between two wireless nodes are symmetric and highly [2] D. He, S. Chan, and S. Tang, “A novel and lightweight system to secure
correlated, and are used as shared random sources to generate wireless medical sensor networks,” IEEE J. Biomed. Health Informat.,
a shared key. This mechanism does not require expensive com- vol. 18, no. 1, pp. 316–326, Jan. 2014.
[3] S.-D. Bao, C. Poon, Y.-T. Zhang, and L. feng Shen, “Using the timing
putation when compared to the PRNG mechanism. However, information of heartbeats as an entity identifier to secure body sensor
because the positions of sensor nodes within a WBAN remain network,” IEEE Trans. Inform. Technol. Biomed., vol. 12, no. 6, pp. 772–
relatively stationary, the channel fading characteristics between 779, Nov. 2008.
[4] F. Xu, Z. Qin, C. Tan, B. Wang, and Q. Li, “IMDGuard: Securing im-
any pair of nodes mostly remain unchanged. Therefore, this key plantable medical devices with the external wearable guardian,” in Proc.
generation mechanism is unsuitable for WBANs. IEEE INFOCOMIEEE, Apr. 2011, pp. 1862–1870.

Authorized licensed use limited to: San Jose State University. Downloaded on June 09,2020 at 14:13:52 UTC from IEEE Xplore. Restrictions apply.
ZHENG et al.: MULTIPLE ECG FIDUCIAL POINTS-BASED RANDOM BINARY SEQUENCE GENERATION FOR SECURING WBANs 663

[5] G.-H. Zhang, C. Poon, and Y.-T. Zhang, “Analysis of using interpulse in- [18] F. Rincón, J. Recas, N. Khaled, and D. Atienza, “Development and evalua-
tervals to generate 128-bit biometric random binary sequences for securing tion of multilead wavelet-based ECG delineation algorithms for embedded
wireless body sensor networks,” IEEE Trans. Inform. Technol. Biomed., wireless sensor nodes,” IEEE Trans. Inform. Technol. Biomed., vol. 15,
vol. 16, no. 1, pp. 176–182, Jan. 2012. no. 6, pp. 854–863, Nov. 2011.
[6] M. Rostami, A. Juels, and F. Koushanfar, “Heart-to-heart (H2H): Au- [19] S. Mallat, “Zero-crossings of a wavelet transform,” IEEE Trans. Inform.
thentication for implanted medical devices,” in Proc. ACM SIGSAC Conf. Theory, vol. 37, no. 4, pp. 1019–1033, Jul. 1991.
Comput. Commun. Security, 2013, pp. 1099–1112. [20] S. Mallat and S. Zhong, “Characterization of signals from multiscale
[7] G. Zheng, G. Fang, R. Shankaran, and M. Orgun, “Encryption for im- edges,” IEEE Trans. Pattern Anal. Mach. Intell., vol. 14, no. 7, pp. 710–
plantable medical devices using modified one-time pads,” IEEE Access, 732, Jul. 1992.
vol. 3, pp. 825–836, Jun. 2015. [21] A. Ghaffari, M. Homaeinezhad, M. Akraminia, M. Atarod, and M.
[8] K. Venkatasubramanian, A. Banerjee, and S. Gupta, “PSKA: Usable and Daevaeiha, “A robust wavelet-based multi-lead electrocardiogram de-
secure key agreement scheme for body area networks,” IEEE Trans. In- lineation algorithm,” Med. Eng. Phys., vol. 31, no. 10, pp. 1219–1227,
form. Technol. Biomed., vol. 14, no. 1, pp. 60–68, Jan. 2010. 2009.
[9] G. Zheng, G. Fang, M. Orgun, R. Shankaran, and E. Dutkiewicz, “Se- [22] A. Taddei et al., “The European ST-T database: Standard for evaluating
curing wireless medical implants using an ECG-based secret data sharing systems for the analysis of ST-T changes in ambulatory electrocardiogra-
scheme,” in Proc. IEEE 14th Int. Symp. Commun. Inform. Technol., 2014, phy,” Eur. Heart J., vol. 13, no. 9, pp. 1164–1172, 1992.
pp. 373–377. [23] A. L. Goldberger et al., “Physiobank, physiotoolkit, and physionet com-
[10] Z. Zhang, H. Wang, A. Vasilakos, and H. Fang, “ECG-cryptography ponents of a new research resource for complex physiologic signals,”
and authentication in body area networks,” IEEE Trans. Inform. Tech- Circulation, vol. 101, no. 23, pp. e215–e220, 2000.
nol. Biomed., vol. 16, no. 6, pp. 1070–1078, Nov. 2012. [24] A. Rukhin, J. Soto, J. Nechvatal, M. Smid, and E. Barker, “A statistical test
[11] G. Zheng, G. Fang, M. A. Orgun, and R. Shankaran, “A comparison suite for random and pseudorandom number generators for cryptographic
of key distribution schemes using fuzzy commitment and fuzzy vault applications,” Nat. Inst. Standards Technol., Gaithersburg, MD, USA,
within wireless body area networks,” in Proc. IEEE 26th Annu. Int. Symp. Tech. Rep. NIST SP 800-22 Rev 1a, 2010.
Personal, Indoor, Mobile Radio Commun., 2015, pp. 2120–2125. [25] S. Callegari, R. Rovatti, and G. Setti, “Embeddable adc-based true random
[12] K. Venkatasubramanian, A. Banerjee, and S. Gupta, “EKG-based key number generator for cryptographic applications exploiting nonlinear sig-
agreement in body sensor networks,” in Proc. IEEE INFOCOM Work- nal processing and chaos,” IEEE Trans. Signal Process., vol. 53, no. 2,
shops, Apr. 2008, pp. 1–6. pp. 793–805, Feb. 2005.
[13] A. Thompson. (2016, Feb. 1). The electrocardiogram [Online]. Available: [26] G. Strang, “Wavelet transforms versus Fourier transforms,” Bull. Am.
http://paramedicine101.blogspot.com.au/2009/09/electrocardiogram- Math. Soc., vol. 28, no. 2, pp. 288–305, 1993.
part-v.html [27] A. Juels and M. Wattenberg, “A fuzzy commitment scheme,” in Proc. 6th
[14] F. Sufi, I. Khalil, and J. Hu, “ECG-based authentication,” in Handbook of ACM Conf. Comput. Commun. Security, 1999, pp. 28–36.
Information and Communication Security. New York, NY, USA: Springer- [28] K. Zeng, “Physical layer key generation in wireless networks: Challenges
Verlag, 2010, pp. 309–331. and opportunities,” IEEE Commun. Mag., vol. 53, no. 6, pp. 33–39, Jun.
[15] C. Li, C. Zheng, and C. Tai, “Detection of ECG characteristic points using 2015.
wavelet transforms,” IEEE Trans. Biomed. Eng., vol. 42, no. 1, pp. 21–28,
Jan. 1995.
[16] J. Sahambi, S. Tandon, and R. Bhatt, “Using wavelet transforms for ECG
characterization—An on-line digital signal processing system,” IEEE Eng.
Med. Biol. Mag., vol. 16, no. 1, pp. 77–83, Jan./Feb. 1997.
[17] J. P. Martı́nez, R. Almeida, S. Olmos, A. P. Rocha, and P. Laguna, “A
wavelet-based ECG delineator: Evaluation on standard databases,” IEEE Authors’ photographs and biographies not available at the time of
Trans. Biomed. Eng., vol. 51, no. 4, pp. 570–581, Apr. 2004. publication.

Authorized licensed use limited to: San Jose State University. Downloaded on June 09,2020 at 14:13:52 UTC from IEEE Xplore. Restrictions apply.

You might also like