Next Article in Journal
Computer-Aided Diagnosis of Multiple Sclerosis Using a Support Vector Machine and Optical Coherence Tomography Features
Next Article in Special Issue
Security and Privacy in Wireless Sensor Networks: Advances and Challenges
Previous Article in Journal
Location of Moving Targets in Substation Non-Line-of-Sight Environment
Previous Article in Special Issue
Crowdsourced Security Reconstitution for Wireless Sensor Networks: Secrecy Amplification
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

A Generic Model of the Pseudo-Random Generator Based on Permutations Suitable for Security Solutions in Computationally-Constrained Environments

by
Tomislav Unkašević
1,*,†,
Zoran Banjac
1,† and
Milan Milosavljević
2
1
VLATACOM Institute, 11070 Belgrade, Serbia
2
Singidunum University, 11000 Belgrade, Serbia
*
Author to whom correspondence should be addressed.
Current address: Milutina Milankovića Boulevard 5, Belgrade, Serbia.
Sensors 2019, 19(23), 5322; https://doi.org/10.3390/s19235322
Submission received: 31 October 2019 / Revised: 19 November 2019 / Accepted: 27 November 2019 / Published: 3 December 2019

Abstract

:
Symmetric cryptography methods have an important role in security solutions design in data protection. In that context, symmetric cryptography algorithms and pseudo-random generators connected with them have strong influence on designed security solutions. In the computationally constrained environment, security efficiency is also important. In this paper we proposed the design of a new efficient pseudo-random generator parameterized by two pseudo-random sequences. By the probabilistic, information-theoretic and number theory methods we analyze characteristics of the generator. Analysis produced several results. We derived sufficient conditions, regarding parameterizing sequences, so that the output sequence has uniform distribution. Sufficient conditions under which there is no correlation between parameterizing sequences and output sequence are also derived. Moreover, it is shown that mutual information between the output sequence and parameterizing sequences tends to zero when the generated output sequence length tends to infinity. Regarding periodicity, it is shown that, with appropriately selected parameterizing sequences, the period of the generated sequence is significantly longer than the periods of the parameterizing sequences. All this characteristics are desirable regarding security applications. The efficiency of the proposed construction can be achieved by selection parameterizing sequences from the set of efficient pseudo-random number generators, for example, multiple linear feedback shift registers.

1. Introduction

The expansion of communication and network technologies, as well as technological advances in the design and implementation of microprocessor devices, have led to the ability to informational connecting different devices and creation of intelligent systems capable of monitoring and managing complex processes. Communication devices utilize the Internet infrastructure and protocols to create a world of connected devices, like Wireless Sensor Networks (WSN) and Internet of Things (IoT). This technological advancement enables the progress of many technological and life processes bringing to us smart cities, autonomous vehicles, robotization and intelligent robot behavior [1,2,3,4]. In that context, information security has a very important role in compromising the integrity and privacy of data in such an integrated world can cause serious damage, even to the level of a general disaster [5,6,7,8,9]. Therefore, in addition to security mechanisms incorporated into Internet protocols, additional security mechanisms incorporated into devices and systems are used to prevent unintended behavior. Moreover, a huge number of that type of devices (sensors, cameras, surveillance systems) need to work in real time fashion so that the defined security mechanisms do not disrupt system behavior. They must be designed in such a way that it is easy to implement them both in hardware and software and their application should not disrupt system behavior i.e., they must be efficient [10,11].
There are various IoT applications, connected with different types of sensors, that have become an integral part of our lives, and most of them can be classified in common areas such as smart healthcare services, smart home, intelligent transportation, smart grid, etc. However, as a consequence of mass deployment, many IoT challenges have arisen, such as limited processing capability and memory resources, large amount of data to transmit, different operating characteristics of hardware, and heterogeneous data and networks types [12,13,14,15,16]. Moreover, personal privacy, data confidentiality and integrity are also a great challenge of IoT that must be overcome, particularly for devices with limited resources and heterogeneous technologies [13,14,17,18,19]. Cryptography can be used to protect confidentiality (or secrecy) of data and communication. It can also be used to ensure the integrity (or accuracy) of information as well as for authentication (and non-repudiation) services [20]. An important point in the IoT world is that most IoT solutions have a “closed design”, so it is often very difficult or even impossible to incorporate additional security mechanisms after the production process is completed. On the other hand, as a consequence of the limited software and hardware resources of IoT devices, the suite of cryptographic algorithms that can be implemented is narrowing, so the right measure must be found between the desired level of security and implementation capabilities, which makes the security issue even more challenging [13,16]. Different cryptographic algorithms that offer roughly the same level of security may require different power and resource consumption, so you need to choose the right one, subject to the limitations of some specific IoT application and deployed hardware [19]. Given that public-key crypto algorithms, compared to symmetric crypto algorithms, have far greater power and resource consumption due to their high processing time [21], it is a natural choice to use a symmetric algorithm in IoT security solution design. Detailed analysis and comparison of symmetric block-type algorithms such as AES, RC6, Twofish, SPECK128, LEA, and ChaCha20-Poly1305 algorithms in IoT devices are given in [16]. On the other hand, stream or sequential symmetric key ciphers are typically faster than block-type. Block ciphers, in general, require more memory resources to encrypt/decrypt larger chunks (block) of data, while sequential ciphers usually take only one or a few bits at a time, they have relatively low memory requirements and therefore are suitable to implement in limited scenarios. Stream cryptography algorithms, as a subgroup of symmetric cryptography algorithms, are among the most common cryptography data protection techniques. The idea comes from Shannon’s one-time pad system, where instead of a random sequence of encryption bits, a series of bits obtained from a pseudo-random generator is used [20]. The sequence generated by the pseudo-random generator is used for plain-text encryption and its properties determine the security of the protected data. Therefore, the basic cryptography goal in stream cryptography systems is to design pseudo-random bit/symbol generators with good cryptographic characteristics. Many ideas have been implemented in the last fifty years, with more or less success.
One of the most popular and widely used pseudo-random sequence generator is the RC4 generator defined in 1987 by Ron Rivest. The description of the algorithm was revealed by reverse engineering of the RSA INC software [22], and the correctness of the algorithm description obtained was confirmed by Rivest himself [23,24].
The RC4 algorithm owes its popularity to its simplicity and ease of implementation in both software and hardware. The high popularity and applicability has attracted the attention of the cryptanalytic community. The results of a deep and thorough analysis of this algorithm led to the detection of a number of weaknesses of the algorithm. A comprehensive review of the weaknesses identified is given in [25] where the empirically detected weaknesses are theoretically proved as well as the original results of the authors of the article. The compromitation of this algorithm was additionally contributed by the implementation methods in security protocols, so that its use in security protocols has not been recommended since 2015 [26].
On the other hand, the beauty and elegance of the idea itself suggest the possibility of its exploitation.
Our work is aimed to define low complexity and efficient generic model of the pseudo-random generator that does not suffer from the weaknesses immanent to the RC4 and which is suitable for the implementation of the security solution in the computational constrained microprocessor environments, e.g., WSN and IoT. This paper defines a pseudo-random generator that can, in some way, be considered as a generalization of ideas related to RC4 because it uses the time varying permutations, sequences for permutation changing and addressing output element from the current generator state. In order to prove plausible cryptographic properties of the proposed pseudo-random generator different mathematical techniques are used to analyze probability distribution of the output sequence, correlation properties, information leakage between the state of the generator and output sequence and periodicity.
The paper is organized in four parts. After the first part containing motivation for this work and introduction in the second part we introduce necessary notation, describe proposed pseudo-random generator and his relationship to RC4 in brief. The third part contains the analysis of the generator, some comments and remarks. The fourth part contains a summary of the paper’s results.

2. Notation and Generating Algorithm Description

Let I k = 0 , 1 , , k 1 . Then with P k we will denote a set of all bijections from I k to I k , and as usual, its elements will be named permutations. Set P k is a totally ordered set by the, so called, lexicographic order and have exactly k ! elements, where ! denotes factorial operation. Elements of the set P k we will denote by Π 1 , Π 2 , , Π k ! .
By P X we will denote the probability of set X.
Let S = f 0 , f 1 , , f m 1 P k be a set of permutations on I k with the following properties:
  • For any Π j P k , j = 1 , 2 , , k ! , exists a number l > 0 and set of integers i 1 , i 2 , , i l I m such that Π j = f i l f i l 1 f i 1 , where ∘ is composition of functions.
  • For all p , q I m if p q then f p f q .
  • Π 1 = I S where I is identical permutation.
Let A n n = 1 and C n n = 1 be a two sequences of independent identically distributed random variables with P A n = l = a l , l = 0 , 1 , . . . , k 1 and P C n = l = c l , l = 0 , 1 , . . . , m 1 .
Then we will define a pseudo-random sequence Z n n = 1 with equations
g 0 = p p P k g n + 1 = f C n + 1 g n n 0 Z n + 1 = g n + 1 A n + 1 n 0 .
From (1) generating algorithm for the sequence Z n n = 1 is obvious. As a first step we will construct the sequence of permutations g n n = 0 , g n P k using sequence C n n = 1 and element Z n of the sequence Z n n = 1 is computed as a value of the function g n at the point A n . Graphical presentation of the sequence generating process is given on the Figure 1.
Defined generator algorithm apply time-varying permutations as well as the RC4 but in RC4 fixed set of permutations, set of transpositions, is used. Graphical presentation of the RC4 algorithm is given on the Figure 2. where the summatios and numbers with denote reduction modulo 256 .
In the defined generator case any set S which is generator of P k can be used. Sequences that are used in RC4 applied transposition determination and address of permutation table position corresponds to sequences C n n = 1 and A n n = 1 in our algorithm respectively. While the mentioned sequences from RC4 are precisely defined, in our case sequences C n n = 1 and A n n = 1 are arbitrarily chosen and the generator is parameterized by those two sequences. Later in the paper we define sufficient conditions for sequences C n n = 1 and A n n = 1 to achieve good pseudo-random and security properties.

3. Analysis of the Generator

For every pseudo-random generator it is necessary to analyze its properties regarding the possibilities of output sequence prediction or reconstruction of the generator initial state. In that sense desirable properties are uniform distribution of the output sequence, nonexistence of the correlation between the output sequence and elements of the generator, nonexistence of the output sequence auto-correlation and long period of the output sequence. These features are especially important for generators used in security solutions and lack any of them usually have serious consequences on the security of the system. Different examples can be found in [20,27].

3.1. Distribution of the Generated Sequence

Intuitively one can expect that Z n n = 1 has a uniform distribution but relatively weak constraints demanded for the sequences A n n = 1 and C n n = 1 require formal proof for the expectations. By the next theorem we will show that Z n n = 1 has an asymptotically uniform distribution.
Theorem 1.
If
  • i = 1 k a i = 1 and a i > 0 for all i I k ,
  • i = 0 m 1 c i = 1 and c i > 0 for all i I m ,
then pseudo-random sequence Z n n = 1 has an asymptotically uniform distribution i.e.,
l I k lim n P Z n = l = 1 k
for l I k .
The proof of the Theorem 1 will be derived in two steps. First, using Markov chains theory, we will show that sequence g n n = 0 has asymptotically uniform distribution and after that, in the second step, using that result we will show the statement of the theorem.
Proof. 
First we will analyze the sequence of functions g n n = 0 . It is obvious that g n P k , as a consequence of P k , being group. Next we will show that
i 1 , 2 , , k ! lim n P g n = Π i = 1 k !
To prove (2) we will observe the sequence g n n = 0 as a stationary Markov chain over the set of states P k . Indeed, according to the definition of g n n = 0 , transition from the g n to g n + 1 doesn’t depend on the history of g n , but only on the current state g n and the value of C n .
Denote by G n = P g n = Π i 1 × k ! a row matrix whose elements are the probabilities that after n steps the chain is in the state Π i . Let t i j be the probability that the chain changes state from Π i to Π j in one step and T = t i j k ! × k ! be one step transition matrix for the Markov chain. Denote by T n = t i j n k ! × k ! n-step probability transition matrix of that system starting at the state Π i changes to state Π j after exactly n steps. It is well known, (see [28,29]), that T n = T n and that,
G n = G 0 T n lim n G n = lim n G 0 T n = G 0 lim n T n
When the limit values in (3) exists. To show that lim n T n exists it is sufficient to show that such n 0 N exists for which t i j n 0 > 0 for all i , j 1 , 2 , . . . , k ! (see [28,29]).
Let us define numbers n i j as
n i j = min r r | i 1 , i 2 , , i r I m r f i r f i 2 f i 1 = Π j Π i 1 .
Due to the properties of the set S it is clear that n i j > 0 . Let n 0 be max i , j 1 , 2 , , k ! n i j and show that t i j n 0 is greater than zero. Because P k , is group then the equation x Π i = Π j has exactly one solution, Π j Π i 1 , so we can write
t i j n 0 = i 1 , , i n 0 P f i n 0 f i 2 f i 1 Π i = Π j = i 1 , , i n 0 P f i n 0 f i 2 f i 1 = Π j Π i 1 = i 1 , , i n 0 f i n 0 f i 2 f i 1 = Π i 1 Π j l = 1 n 0 P C l = i l
Now, to prove t i j n 0 > 0 it is sufficient to show that at least one summand in (5) is greater then zero, see [28,29]. Because n i j > 0 we can find a set of indices i 1 , i 2 , , i n i j , n i j n 0 such that f i n i j f i 2 f i 1 = Π i 1 Π j . Because the index of identical permutation is 1, then the summand which corresponds to the set of indices i 1 , i 2 , , i n i j , 1 , 1 , , 1 n 0 n i j is evidently greater then zero and we showed that lim n T n exists. Because convergence is component wise, lim n t i j n = t j * exists. Limit value lim n T n can be determined as a solution of the system of a equations known as Champman-Kolmogorov equations.
j = 1 k ! t j * t j l = t l * j = 1 k ! t j * = 1
It is easy to check, by substitution, that the t 1 * = t 2 * = = t k ! * = 1 k ! is unique solution of the system (6).
From now on the proof is straightforward. Let l I k be arbitrary, then
P Z n = l = P g n A n = l = i = 1 k ! P g n A n = l | g n = Π i P g n = Π i = i = 1 k ! P Π i A n = l | g n = Π i P g n = Π i = i = 1 k ! j = 0 k 1 P Π i j = l | A n = j P A n = j P g n = Π i .
Because Π i j = l | and A n = j are independent random variables it follows from (7) that
P Z n = l = i = 1 k ! j = 0 k 1 P Π i j = l | A n = j P A n = j P g n = Π i = i = 1 k ! j = 0 k 1 P Π i j = l P A n = j P g n = Π i = j = 0 k 1 P A n = j i = 1 k ! P g n = Π i P Π i j = l
Finding limit of the both sides of the (8) it follows
lim n P Z n = l = lim n j = 0 k 1 P A n = j i = 1 k ! P g n = Π i P Π i j = l = j = 0 k 1 P A n = j i = 1 k ! P Π i j = l lim n P g n = Π i
because P A n = j , P Π i j = l do not depend on n . Using that lim n P g n = Π i = 1 k ! from (9) it follows that
lim n P Z n = l = j = 0 k 1 P A n = j i = 1 k ! P Π i j = l lim n P g n = Π i = 1 k ! j = 0 k 1 P A n = j i = 1 k ! P Π i j = l = 1 k ! j = 0 k 1 P A n = j k 1 ! = k 1 ! k ! j = 0 k 1 P A n = j = 1 k
which proves the theorem. □
Remark 1.
Asymptotically uniform distribution of the sequence Z n , n = 1 , 2 , . . . , as we have shown, is a consequence of the asymptotically uniform distribution of g n n = 0 . If G 0 = 1 k ! , 1 k ! , , 1 k ! i 1 × k ! it is easy to verify that g n n = 0 has a uniform distribution and as a consequence Z n , n = 1 , 2 , has a uniform distribution too.
Theorem 2.
If the random variables A n , n = 1 , 2 , . . . are uniformly distributed then for all z I k
P Z n = z = 1 k
Proof. 
By the generator definition we have
P Z n = z = i = 1 k ! j = 0 k 1 P Z n = z | g n = Π i A n = j · P g n = Π i A n = j = i = 1 k ! j = 0 k 1 P Π i j = z · P g n = Π i · P A n = j
because A n is uniformly distributed from (10) it follows that
P Z n = z = i = 1 k ! j = 0 k 1 P Π i j = z · P g n = Π i · 1 k = 1 k i = 1 k ! j = 0 k 1 P Π i j = z · P g n = Π i = 1 k i = 1 k ! P g n = Π i j = 0 k 1 P Π i j = z = 1 k
because i = 1 k ! P g n = Π i = 1 and j = 0 k 1 P Π i j = z = 1 and theorem is proved.□
By these theorems we showed that generator has at least asymptotically uniform distribution of the values in the generator output sequence. This is important security feature because it indicates impossibility of the prediction of the generator output sequence based on the probability distribution of the output sequence values.

Correlation Properties

Theorem 3.
If the random variables A n , n = 1 , 2 , . . . are uniformly distributed then for all a , b I k ,
  • P Z n + l = b Z n = a = 1 k 2
  • P Z n + l = b | Z n = a = 1 k
Proof. 
  • By the generator definition we have
    P Z n + l = b Z n = a = P g n + k A n + k = b g n A n = a = = i = 1 k ! j = 1 k ! P g n + k A n + k = b g n A n = a | g n + k = Π i g n = Π j · P g n + k = Π i g n = Π j = i = 1 k ! j = 1 k ! P Π i A n + k = b Π j A n = a · P g n + k = Π i g n = Π j = i = 1 k ! j = 1 k ! P Π i A n + k = b Π j A n = a · P g n + k = Π i | g n = Π j · P g n = Π j .
    Now, using notation from the Theorem 1 P g n + k = Π i | g n = Π j is equal to t i , j k and putting it in (11) it follows that
    P Z n + l = b Z n = a = = i = 1 k ! j = 1 k ! P Π i A n + k = b Π j A n = a · P g n + k = Π i | g n = Π j · P g n = Π j = i = 1 k ! j = 1 k ! P Π i A n + k = b Π j A n = a · t i , j k · P g n = Π j .
    Because Π i , Π j are permutations P Π i A n + k = b Π j A n = a is equal to P A n + k = Π i 1 b A n = Π j 1 a and using that A n + k , A n are independent random variables from (12) it follows that
    P Z n + l = b Z n = a = = i = 1 k ! j = 1 k ! P Π i A n + k = b Π j A n = a · t i , j k · P g n = Π j = i = 1 k ! j = 1 k ! P A n + k = Π i 1 b A n = Π j 1 a · t i , j k · P g n = Π j = i = 1 k ! j = 1 k ! P A n + k = Π i 1 b · P A n = Π j 1 a · t i , j k · P g n = Π j
    Now, using that A n + k and A n are uniformly distributed independent random variables it follows from (13) that
    P Z n + l = b Z n = a = = i = 1 k ! j = 1 k ! P A n + k = Π i 1 b · P A n = Π j 1 a · t i , j k · P g n = Π j = i = 1 k ! j = 1 k ! 1 k · 1 k · t i , j k · P g n = Π j = 1 k 2 i = 1 k ! P g n = Π i j = 1 k ! t i , j k = 1 k 2
    because j = 1 k ! t i , j k = 1 and i = 1 k ! P g n = Π i = 1 , and statement is proved.
  • Using statement of the Theorem 2 that P Z n = a = 1 k by the definition of conditional probability it follows that
    P Z n + l = b | Z n = a = P Z n + k = b Z n = a P Z n = a = 1 k 2 1 k = 1 k
    which proves the statement. □

3.2. Information Leakage

Information leakage means existence of the correlation between generator output sequence and elements of its inner state. Such type correlation may be base for the process of reconstruction of the some generator state during his generation history. Knowledge of the one state during the generator work and knowledge of the generator algorithm allows prediction of the future elements of the output sequence which is undesirable in security applications. In this part, correlation with the state element sequences A n n = 1 and C n n = 1 with Z n n = 1 is considered.
Theorem 4.
Under the conditions of the Theorem 1 we have
  • lim n P Z n = z | C n = c = 1 k
  • lim n I Z n , C n = 0
where z I k and c I m
Proof. 
  • By the definition
    P Z n = z | C n = c = = P Z n = z C n = c P C n = c = P g n A n = z C n = c P C n = c = P i = 1 k ! g n = Π i Π i A n = z C n = c P C n = c = P i = 1 k ! f C n g n 1 = Π i Π i A n = z C n = c P C n = c = P i = 1 k ! f C n g n 1 = Π i Π i A n = z C n = c P C n = c .
    Because f C n g n 1 = Π i and f C n g n 1 = Π j are disjoint events for i , j I k and i j , from (15) it follows that
    P Z n = z | C n = c = P i = 1 k ! f C n g n 1 = Π i Π i A n = z C n = c P C n = c = i = 1 k ! P f C n g n 1 = Π i Π i A n = z C n = c P C n = c
    Now, using Bayes theorem from (16) it follows that
    P Z n = z | C n = c = i = 1 k ! P f C n g n 1 = Π i Π i A n = z C n = c P C n = c = i = 1 k ! j = 0 k 1 P f C n g n 1 = Π i Π i A n = z C n = c | A n = j · P A n = j P C n = c = i = 1 k ! j = 0 k 1 P f C n g n 1 = Π i Π i j = z C n = c · P A n = j P C n = c = i = 1 k ! j = 0 k 1 P g n 1 = f C n 1 Π i C n = c Π i j = z · P A n = j P C n = c .
    Now, because events g n 1 = f C n 1 Π i C n = c and Π i j = z are independent from (17) it follows that
    P Z n = z | C n = c = = i = 1 k ! j = 0 k 1 P g n 1 = f C n 1 Π i C n = c Π i j = z · P A n = j P C n = c = i = 1 k ! j = 0 k 1 P g n 1 = f C n 1 Π i C n = c · P Π i j = z · P A n = j P C n = c
    Grou** summands which depends on j from (18) it follows that
    P Z n = z | C n = c = = i = 1 k ! j = 0 k 1 P g n 1 = f C n 1 Π i C n = c · P Π i j = z · P A n = j P C n = c = i = 1 k ! P g n 1 = f C n 1 Π i C n = c j = 0 k 1 P A n = j · P Π i j = z P C n = c = i = 1 k ! P g n 1 = f C n 1 Π i C n = c P C n = c j = 0 k 1 P A n = j · P Π i j = z = i = 1 k ! P g n 1 = f C n 1 Π i | C n = c j = 0 k 1 P A n = j · P Π i j = z = i = 1 k ! P g n 1 = f c 1 Π i j = 0 k 1 P A n = j · P Π i j = z
    Taking the limit from the both sides in (19) it follows
    lim n P Z n = z | C n = c = = lim n j = 0 k 1 P A n = j i = 1 k ! P g n 1 = f c 1 Π i · P Π i j = z = j = 0 k 1 P A n = j i = 1 k ! P Π i j = z · lim n P g n 1 = f c 1 Π i = = j = 0 k 1 P A n = j i = 1 k ! P Π i j = z · 1 k ! = 1 k ! j = 0 k 1 P A n = j i = 1 k ! P Π i j = z = 1 k ! j = 0 k 1 P A n = j · k 1 ! = = k 1 ! k ! j = 0 k 1 P A n = j = 1 k
    which proves the statement.
  • By the definition of mutual information we have that
    I Z n , C n = H Z n H Z n | C n
    We will start with computing H Z n .
    H Z n = i = 0 k 1 P Z n = i log 2 1 P Z n = i
    Taking the limit from the both sides in (21) and using Theorem 1 we have
    lim n H Z n = log 2 k .
    In the same way it follows that
    H Z n | C n = i = 0 m 1 P C n = i · H Z n | C n = i = = i = 0 m 1 P C n = i · j = 0 k 1 P Z n = j | C n = c i log 2 1 P Z n = j | C n = i
    Taking the limit from both sides in (23) and using part 1 of the Theorem 4 we obtain
    lim n H Z n | C n = = i = 0 m 1 P C n = i · j = 0 k 1 lim n P Z n = j | C n = i · lim n log 2 1 P Z n = j | C n = i = i = 0 m 1 P C n = i · j = 0 k 1 1 k log 2 k = log 2 k · i = 0 m 1 P C n = i = log 2 k .
    Using (22) and( 24) in ( 20) it follows that
    lim n I Z n , C n = lim n H Z n lim n H Z n | C n = log 2 k log 2 k = 0
    which proves the statement. □
Theorem 5.
Under the conditions of the Theorem 1 we have
  • lim n P Z n = z | A n = a = 1 k
  • lim n I Z n , A n = 0
where z , a I k .
Proof. 
  • By the definition of conditional probability it follows that
    P Z n = z | A n = a = = P Z n = z A n = a P A n = a = P g n A n = z A n = a P A n = a = P i = 1 k ! g n = Π i Π i A n = z A n = a P A n = a = P i = 1 k ! g n = Π i Π i A n = z A n = a P A n = a = P i = 1 k ! g n = Π i Π i A n = z A n = a P A n = a .
    Because g n = Π i Π i A n = z A n = a and g n = Π j Π j A n = z A n = a are disjoint events when i j from (26) it follows that
    P Z n = z | A n = a = = P i = 1 k ! g n = Π i Π i A n = z A n = a P A n = a = i = 1 k ! P g n = Π i Π i A n = z A n = a P A n = a .
    Using that P A B = P A | B · P B from (27) it follows that
    P Z n = z | A n = a = = i = 1 k ! P g n = Π i Π i A n = z A n = a P A n = a = i = 1 k ! P g n = Π i | Π i A n = z A n = a · P Π i a = z A n = a P A n = a = i = 1 k ! P g n = Π i | Π i A n = z A n = a · P Π i a = z A n = a P A n = a = i = 1 k ! P g n = Π i | Π i A n = z A n = a · P Π i A n = z | A n = a .
    Because g n = Π i and Π i A n = z A n = a are independent random variables from (28) it follows that
    P Z n = z | A n = a = = i = 1 k ! P g n = Π i Π i A n = z A n = a P A n = a = i = 1 k ! P g n = Π i | Π i A n = z A n = a · P Π i a = z A n = a P A n = a = = i = 1 k ! P g n = Π i | Π i A n = z A n = a · P Π i A n = z | A n = a = i = 1 k ! P g n = Π i · P Π i a = z
    Taking the limits from the both sides in (29) it follows
    lim n P Z n = z | A n = a = = lim n i = 1 k ! P g n = Π i · P Π i a = z = i = 1 k ! lim n P g n = Π i · P Π i a = z = i = 1 k ! 1 k ! · P Π i a = z = 1 k ! i = 1 k ! P Π i a = z = 1 k ! · k 1 ! = 1 k
  • In the same way as in the Theorem 4 it follows that
    lim n H Z n = log 2 k
    By the definition of conditional entropy it follows that
    H Z n | A n = i = 0 k 1 P A n = i · H Z n | A n = i = i = 0 k 1 P A n = i · j = 0 k 1 P Z n = j | A n = i log 2 1 P Z n = j | A n = i
    Taking the limit of both sides in (30) and statement of the part 1 we obtain
    lim n H Z n | A n = = i = 0 k 1 P A n = i · j = 0 k 1 lim n P Z n = j | A n = i · lim n log 2 1 P Z n = j | A n = i = i = 0 k 1 P A n = i · j = 0 k 1 1 k log 2 k = log 2 k · i = 0 k 1 P A n = i = log 2 k
    And finally, using the (22) and (31) in the definition for the I Z n , A n , it follows that
    lim n I Z n , A n = lim n H Z n lim n H Z n | A n = log 2 k log 2 k = 0
    which proves the statement. □

3.3. Periodicity

Every pseudo-random generator can be viewed as a finite automaton with output over the finite set of states and symbols. Because the automaton transition function is deterministic it follows that the output sequence must be periodic. So, A n n = 1 , and C n n = 1 are periodic and denote their periods by A and B respectively. It is easy to verify that g n n = 0 , and Z n n = 1 are periodic too and denote their periods G , Z respectively. In this part relations between A , C , G and Z are considered and some sufficient conditions under A , C , G M are defined which improves the value of Z. For that we need a few Lemmas.
To find out period of Z n n = 1 we will first determine the period of the g n n = 0 .
Lemma 1.
Denote by l 1 , 2 , . . . , k ! the order of the permutation i = 1 C f C i . Then the period of g n n = 0 is l C .
Proof. 
First we have to prove that l C is a period, but it is straightforward.
g k + λ l C = f C 1 f C 2 f C λ l C f C 1 + λ l C f C k + λ l C
and because C is period of the C n n = 1 we have
f C 1 f C 2 f C λ l C f C 1 + λ l C f C k + λ l C = = f C 1 f C 2 f C C λ l f C 1 f C k = f C 1 f C k = g k
Next step is to prove that l C is the fundamental period i.e., that every other period is divisible by l C .
Suppose contrary, that l C isn’t the fundamental period i.e., that the fundamental period is d , d l C and d < l C . From g k + λ d = g k we have
i = k + 1 k + λ d f C i = I , k N , k 1
where I is the identical permutation. Multiplying (32) with f C k from the left we have
i = k k + λ d 1 f C i f C k + λ d = f C k
and applying (32) we have
f C k + λ d = f C k , k 1 .
From this we have
C k + λ d = C k , k 1
which means that d is a period of C n n = 1 and that C | d i.e., d = r C , r < l . Now, look at g 1 + λ d
g 1 + λ d = i = 1 1 + λ d f C i = i = 1 λ r C f C i f C 1 + λ r C = = i = 1 C f C i λ r f C 1 = f C 1 = g 1
and we conclude that
i = 1 C f C i λ r = I
for every λ 1 . Finally we have
i = 1 C f C i r = I
and conclude that l | r which is in contradiction with r < l so we proved that l C is the fundamental period of g n n = 0 . □
Lemma 2.
Let G be the fundamental period of g n n = 0 . If G , A = 1 and A 1 , A 2 , , A n , = I k then period of Z n n = 1 is G A .
Proof. 
By straightforward computation we can easily check that G A is a period of the Z n n = 1 . We need only to prove that G A is fundamental period of Z n n = 1 .
Suppose that the fundamental period isn’t G A but it is d. Then d G A and because G , A = 1 we have d = d 1 d 2 , d 1 , d 2 = 1 and d 1 | G , d 2 | A .
Further,
g k + λ d A k + λ d = g k A k
for every λ 1 , λ N . We can set λ = λ 1 · G d 1 , λ 1 1 in the equation above which transform it to
g k + λ 1 G d 2 A k + λ 1 G d 2 = g k A k
and having in mind that G is a period of g n n = 0 we obtain
g k A k + λ 1 G d 2 = g k A k .
From the fact that g k is bijection it follows that
A k + λ 1 G d 2 = A k
which means that G d 2 is a period of A n n = 1 and consequently that A | G d 2 . Using that G , A = 1 we have that A | d 2 and with d 2 | A we conclude that A = d 2 . According to former observations we have that d must be of the form d 1 A and rewriting of (33) yields
g k + λ d 1 A A k + λ d 1 A = g k A k .
This equation we can simplify to
g k + λ d 1 A A k = g k A k
because A is a period of A n n = 1 . Now we put our attention to g k + n G + λ d 1 A A k + n G + λ d 1 A .
g k + λ d 1 A A k + n G = g k + n G + λ d 1 A A k + n G + λ d 1 A = = g k + n G A k + n G = = g k A k + n G
so we have that functions g k + λ d 1 A , g k are equal on the set A k + n G | n N . Set x | k + n G A x , n N is equal I A , because G , A = 1 , and from the periodicity of A n n = 1 follows A k + n G | n N = I k . Functions g k + λ d 1 A , g k are equal on their domain so we have that
g k + λ d 1 A = g k , λ 1 , λ N
which means that d 1 A is a period of the g n n = 0 . In the same way as above we have that d 1 = G and we have that the fundamental period of the Z n n = 1 is G A . □
Following Corollary is a trivial consequence of the Lemma 2.
Corollary 1.
If G , A = 1 then the period of the Z n n = 1 is greater or equal to A.
This corollary shows that with suitably chosen pseudo-random sequence A n n = 1 output sequence will have the period greater or equal to period of the A n n = 1 .
The next theorem, the main result of this paragraph, is a straightforward application of the former Lemmas.
Theorem 6.
Let l 1 , 2 , . . . , k ! denote the order of the permutation i = 1 C f C i . Then if l C , A = 1 and A 1 , A 2 , , A n , = I k , the period of Z n n = 1 is l C A .
A statement of this theorem is a stronger variant of the Corollary 1 and it shows that with appropriately selected pseudo-random sequences A n n = 1 and B n n = 1 period of the generator output sequence is significantly longer then period sequences A n n = 1 and B n n = 1 .

4. Conclusions

Confidentiality of different sensor networks is a very serious requirement since such networks cannot fully achieve their purpose without having the necessary security. Namely, for various IoT applications, which typically have limited processing capabilities, restricted memory capacity and power constraints, one of the key challenges is to design an efficient and reliable cryptographic generator that meets the desired security requirements. In this paper, we defined a pseudo-random generator that can, in some way, be considered as a generalization of ideas related to RC4 because it uses time varying permutations and sequences for permutation changing and addressing output element from the current permutation are considered in a general fashion. In the paper, we analyze properties of the purposed generator. The proposed pseudo-random generator can be implemented efficiently in software and hardware, for example by using output of the multiple linear shift registers as input sequences A n n = 1 , and C n n = 1 of the generator. The security characteristics considered in the paper potentiate application of the generator in the computational constrained environments security solutions.
In the first part of the proposed generator properties analysis, the generator output sequence probability distribution is considered. Theorem 1 establishes sufficient conditions for the generator output sequence have an asymptotically uniform probability distribution. Moreover, sufficient conditions are established for the distribution of the output sequence to have the exact uniform distribution, Remark 1 and Theorem 2. The generator output sequence uniform distribution indicates resistance of the generator to attacks based on output sequence elements prediction.
The second part of the generator analysis deala with the correlation properties of the generator output sequence in which it was shown, by Theorem 3, that the output sequence elements are asymptotically independent and accordingly no immanent remote correlations are detected, unlike to the RC4 generator (see [25]). This property indicates resistance to autocorrelation type atacks.
The third part of the analysis relates to the possibility of information leaking about the internal state of the generator, sequence A n n = 1 and C n n = 1 , through the output sequence Z n n = 1 . Theorems 4 and 5 show that the amount of information that flows through an output sequence tends to zero when the length of the sequence tends to infinity. In practical terms, this means that, by rejecting the initial segment of a generated sequence of a given length, the amount of information about the state of the generator flowing into the output sequence is arbitrarily small.
In the last part of the generator analysis, the period length of the output sequence is analyzed. It has been shown that if sequences A n n = 1 and C n n = 1 are chosen in a suitable manner and their periods satisfy the conditions of Theorem 6, the output sequence has a significantly longer period than the sequences A n n = 1 and C n n = 1 .
According to the performed analysis results proposed generator has provably good security characteristics.
Complexity and implementation considerations about this proposal are determined by the generation and complexity of the sequences C n n = 1 and A n n = 1 . Relatively weak constraints demanded for the probability distribution for the sequences C n n = 1 and A n n = 1 in the Theorem 1 allow implementation of the efficiently generated sequences, for example sequences generated by the multiple linear feedback shift registers.
The method described in this paper makes it possible to obtain a pseudo-random sequence with asymptotically uniform distribution and longer period using two pseudo-random sequences with irregular (non-uniform) probability distributions. Required initial conditions for two pseudo-random sequences are not serious limitations for this method because they describe natural requirements for the pseudo-random sequences, i.e., that values of their elements exhaust the set on which they are defined. An interesting question arising in this context is the speed of convergence in the Theorem 1, i.e., the number of steps after which we can use the sequence Z n n = 1 as uniformly distributed. It is not possible to answer this question generally because the matrix T is defined by the chosen set S and probability distribution of the random variable C. Consequently, for each set S and random variable C it has to be analyzed separately. In practice, this does not make any restrictions on the application of the proposed generator because in every concrete case it is possible to compute number of transition steps to achieve representation of the limit values by the desired accuracy.

Author Contributions

Conceptualization, T.U.; Formal analysis, T.U.; Supervision, Z.B. and M.M.; Writing—original draft, T.U.; Writing—review & editing, Z.B. and M.M.

Funding

This research received no external funding.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Rehman, R.A.; Khan, B. IoT Elements, Layered Architectures and Security Issues: A Comprehensive Survey. Sensors 2018, 18, 2796. [Google Scholar]
  2. Salah, K. The Era of Internet of Things, 2nd ed.; Springer: Cham, Switzerland, 2019. [Google Scholar]
  3. Rayes, A.; Samer, S. Internet of Things from Hype to Reality, 2nd ed.; Springer: Cham, Switzerland, 2019. [Google Scholar]
  4. Atlam, H.F.; Walters, R.J.; Wills, G.B. Internet of Things: State-of-the-art, Challenges, Applications, and Open Issues. IJICR 2018, 9, 928–938. [Google Scholar]
  5. Costa, D.G.; Figuerêdo, S.; Oliveira, G. Cryptography in Wireless Multimedia Sensor Networks: A Survey and Research Directions. Cryptography 2017, 1, 4. [Google Scholar] [CrossRef]
  6. Kambourakis, G.; Marmol, F.G.; Wang, G. Security and Privacy in Wireless and Mobile Networks. Future Internet 2018, 10, 18. [Google Scholar] [CrossRef] [Green Version]
  7. Ziegler, S. Internet of Things Security and Data Protection, 2nd ed.; Springer: Cham, Switzerland, 2019. [Google Scholar]
  8. Cheruvu, S.; Kumar, A.; Smith, N.; Wheeler, D.M. Demystifying Internet of Things Security: Successful IoT Device/Edge and Platform Security Deployment; Apress: Berkeley, CA, USA, 2019. [Google Scholar]
  9. Mahmood, Z. (Ed.) Security, Privacy and Trust in the IoT Environment; Springer: Cham, Switzerland, 2019. [Google Scholar]
  10. Banday, M.T. Cryptographic Security Solutions for the Internet of Things; IGI Global: Hershey, PA, USA, 2019. [Google Scholar]
  11. Biryukov, A.; Perrin, L. State of the Art in Lightweight Symmetric Cryptography. IACR Cryptology ePrint Archive. 2017. Available online: https://eprint.iacr.org/2017/511 (accessed on 28 October 2019).
  12. **g, Q.; Vasilakos, A.V.; Wan, J.; Lu, J.; Qiu, D. Security of the Internet of Things: Perspectives and challenges. Wirel. Netw. 2014, 20, 2481–2501. [Google Scholar] [CrossRef]
  13. Frustaci, M.; Pace, P.; Aloi, G.; Fortino, G. Evaluating Critical Security Issues of the IoT World: Present and Future Challenges. IEEE Internet Things J. 2017, 5, 2483–2495. [Google Scholar] [CrossRef]
  14. **ao, Y.; Shen, X.; Sun, B.; Cai, L. Security and Privacy in RFID and Applications in Telemedicine. IEEE Commun. Mag. 2006, 44, 64–72. [Google Scholar] [CrossRef] [Green Version]
  15. Kumar, P.; Lee, H.J. Security Issues in Healthcare Applications Using Wireless Medical Sensor Networks: A Survey. Sensors 2012, 12, 55–91. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  16. Saraiva, D.A.F.; Leithardt, V.R.Q.; de Paula, D.; Sales Mendes, A.; González, G.V.; Crocker, P. PRISEC: Comparison of Symmetric Key Algorithms for IoT Devices. Sensors 2019, 19, 4312. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  17. Krishna, B.V.S.; Gnanasekaran, T. A systematic study of security issues in Internet-of-Things (IoT). In Proceedings of the International Conference on I-SMAC (IoT in Social, Mobile, Analytics and Cloud) (I-SMAC), Palladam, India, 10–11 Februaty 2017; pp. 107–111. [Google Scholar] [CrossRef]
  18. Carsten, M. Security and privacy in the internet of things. J. Cyber Policy 2017, 2, 155–184. [Google Scholar] [CrossRef]
  19. Hamad, F.; Smalov, L.; James, A. Energy-aware Security in M-Commerce and the Internet of Things. IETE Tech. Rev. 2009, 26, 357–362. [Google Scholar] [CrossRef]
  20. Von zur Gathen, J. CryptoSchool; Springer: Berlin/Heidelberg, Germany, 2015. [Google Scholar]
  21. Bilal, M.; Kang, S.G. An Authentication Protocol for Future Sensor Networks. Sensors 2017, 17, 979. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  22. Anderson, B. Thank You Bob Anderson. Cypherpunks (Mailing List). Available online: http://cypherpunks.venona.com/date/1994/09/msg00304.html (accessed on 28 October 2019).
  23. Rrivest, R. 6.857 Computer and Network Security Lectures and Handouts; MIT: Cambridge, MA, USA, 2008. [Google Scholar]
  24. Rivest, R.; Schuldt, J. Spritz—A Spongy RC4-Like Stream Cipher and Hash Function. Available online: https://en.wikipedia.org/wiki/RC4#cite_note-Rivest2014-14 (accessed on 28 October 2019).
  25. Sen Gupta, S.; Maitra, S.; Paul, G.; Sarkar, S. (Non-)Random Sequences from (Non-)Random Permutations—Analysis of RC4 Stream Cipher. Available online: https://eprint.iacr.org/2011/448.pdf (accessed on 28 October 2019).
  26. Popov, A. RFC 7465 Prohibiting RC4 Cipher Suites; IETF: Fremont, CA, USA, 2015. [Google Scholar]
  27. Stamp, M.; Low, R. Applied Cryptanalysis: Breaking Ciphers in the Real World; Wiley: Hoboken, NJ, USA, 2007. [Google Scholar]
  28. Privoult, N. Understanding Markov Chains; Springer: Singapore, 2018. [Google Scholar]
  29. Sericola, B. Markov Chains—Theory, Algorithms and Applications; Wiley: Hoboken, NJ, USA, 2013. [Google Scholar]
Figure 1. The generator graphic presentation.
Figure 1. The generator graphic presentation.
Sensors 19 05322 g001
Figure 2. The RC4 graphic presentation, all numbers and summations assumes reduction modulo 256.
Figure 2. The RC4 graphic presentation, all numbers and summations assumes reduction modulo 256.
Sensors 19 05322 g002

Share and Cite

MDPI and ACS Style

Unkašević, T.; Banjac, Z.; Milosavljević, M. A Generic Model of the Pseudo-Random Generator Based on Permutations Suitable for Security Solutions in Computationally-Constrained Environments. Sensors 2019, 19, 5322. https://doi.org/10.3390/s19235322

AMA Style

Unkašević T, Banjac Z, Milosavljević M. A Generic Model of the Pseudo-Random Generator Based on Permutations Suitable for Security Solutions in Computationally-Constrained Environments. Sensors. 2019; 19(23):5322. https://doi.org/10.3390/s19235322

Chicago/Turabian Style

Unkašević, Tomislav, Zoran Banjac, and Milan Milosavljević. 2019. "A Generic Model of the Pseudo-Random Generator Based on Permutations Suitable for Security Solutions in Computationally-Constrained Environments" Sensors 19, no. 23: 5322. https://doi.org/10.3390/s19235322

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop