Skip to main content
Sensors (Basel, Switzerland) logoLink to Sensors (Basel, Switzerland)
. 2019 Dec 3;19(23):5322. doi: 10.3390/s19235322

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

Tomislav Unkašević 1,*,, Zoran Banjac 1,, Milan Milosavljević 2
PMCID: PMC6929088  PMID: 31816914

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.

Keywords: pseudo-random generator, security, wireless sensor networks, IoT, probability distribution, correlation, information leakage

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 Ik=0,1,,k1. Then with Pk we will denote a set of all bijections from Ik to Ik, and as usual, its elements will be named permutations. Set Pk is a totally ordered set by the, so called, lexicographic order and have exactly k! elements, where ! denotes factorial operation. Elements of the set Pk we will denote by Π1,Π2,,Πk!.

By PX we will denote the probability of set X.

Let S=f0,f1,,fm1Pk be a set of permutations on Ik with the following properties:

  1. For any ΠjPk,j=1,2,,k!, exists a number l>0 and set of integers i1,i2,,ilIm such that Πj=filfil1fi1, where ∘ is composition of functions.

  2. For all p,qIm if pq then fpfq.

  3. Π1=IS where I is identical permutation.

Let Ann=1 and Cnn=1 be a two sequences of independent identically distributed random variables with PAn=l=al,l=0,1,...,k1 and PCn=l=cl,l=0,1,...,m1.

Then we will define a pseudo-random sequence Znn=1 with equations

g0=ppPkgn+1=fCn+1gnn0Zn+1=gn+1An+1n0. (1)

From (1) generating algorithm for the sequence Znn=1 is obvious. As a first step we will construct the sequence of permutations gnn=0, gn Pk using sequence Cnn=1 and element Zn of the sequence Znn=1 is computed as a value of the function gn at the point An. Graphical presentation of the sequence generating process is given on the Figure 1.

Figure 1.

Figure 1

The generator graphic presentation.

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.

Figure 2.

Figure 2

The RC4 graphic presentation, all numbers and summations assumes reduction modulo 256.

In the defined generator case any set S which is generator of Pk can be used. Sequences that are used in RC4 applied transposition determination and address of permutation table position corresponds to sequences Cnn=1 and Ann=1 in our algorithm respectively. While the mentioned sequences from RC4 are precisely defined, in our case sequences Cnn=1 and Ann=1 are arbitrarily chosen and the generator is parameterized by those two sequences. Later in the paper we define sufficient conditions for sequences Cnn=1 and Ann=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 Znn=1 has a uniform distribution but relatively weak constraints demanded for the sequences Ann=1 and Cnn=1 require formal proof for the expectations. By the next theorem we will show that Znn=1 has an asymptotically uniform distribution.

Theorem 1.

If

  1. i=1kai=1andai>0for alliIk,

  2. i=0m1ci=1andci>0for alliIm,

then pseudo-random sequenceZnn=1has an asymptotically uniform distribution i.e.,

lIklimnPZn=l=1k

forlIk.

The proof of the Theorem 1 will be derived in two steps. First, using Markov chains theory, we will show that sequence gnn=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 gnn=0. It is obvious that gnPk, as a consequence of Pk, being group. Next we will show that

i1,2,,k!limnPgn=Πi=1k! (2)

To prove (2) we will observe the sequence gnn=0 as a stationary Markov chain over the set of states Pk. Indeed, according to the definition of gnn=0, transition from the gn to gn+1 doesn’t depend on the history of gn, but only on the current state gn and the value of Cn.

Denote by Gn=Pgn=Πi1×k! a row matrix whose elements are the probabilities that after n steps the chain is in the state Πi. Let tij be the probability that the chain changes state from Πi to Πj in one step and T=tijk!×k! be one step transition matrix for the Markov chain. Denote by Tn=tijnk!×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 Tn=Tn and that,

Gn=G0TnlimnGn=limnG0Tn=G0limnTn (3)

When the limit values in (3) exists. To show that limnTn exists it is sufficient to show that such n0N exists for which tijn0>0 for all i,j1,2,...,k! (see [28,29]).

Let us define numbers nij as

nij=minrr|i1,i2,,irImrfirfi2fi1=ΠjΠi1. (4)

Due to the properties of the set S it is clear that nij>0. Let n0 be maxi,j1,2,,k!nij and show that tijn0 is greater than zero. Because Pk, is group then the equation xΠi=Πj has exactly one solution, ΠjΠi1, so we can write

tijn0=i1,,in0Pfin0fi2fi1Πi=Πj=i1,,in0Pfin0fi2fi1=ΠjΠi1=i1,,in0fin0fi2fi1=Πi1Πjl=1n0PCl=il (5)

Now, to prove tijn0>0 it is sufficient to show that at least one summand in (5) is greater then zero, see [28,29]. Because nij>0 we can find a set of indices i1,i2,,inij,nijn0 such that finijfi2fi1=Πi1Πj. Because the index of identical permutation is 1, then the summand which corresponds to the set of indices i1,i2,,inij,1,1,,1n0nij is evidently greater then zero and we showed that limnTn exists. Because convergence is component wise, limntijn=tj* exists. Limit value limnTn can be determined as a solution of the system of a equations known as Champman-Kolmogorov equations.

j=1k!tj*tjl=tl*j=1k!tj*=1 (6)

It is easy to check, by substitution, that the t1*=t2*==tk!*=1k! is unique solution of the system (6).

From now on the proof is straightforward. Let lIk be arbitrary, then

PZn=l=PgnAn=l=i=1k!PgnAn=l|gn=ΠiPgn=Πi=i=1k!PΠiAn=l|gn=ΠiPgn=Πi=i=1k!j=0k1PΠij=l|An=jPAn=jPgn=Πi. (7)

Because Πij=l| and An=j are independent random variables it follows from (7) that

PZn=l=i=1k!j=0k1PΠij=l|An=jPAn=jPgn=Πi=i=1k!j=0k1PΠij=lPAn=jPgn=Πi=j=0k1PAn=ji=1k!Pgn=ΠiPΠij=l (8)

Finding limit of the both sides of the (8) it follows

limnPZn=l=limnj=0k1PAn=ji=1k!Pgn=ΠiPΠij=l=j=0k1PAn=ji=1k!PΠij=llimnPgn=Πi (9)

because PAn=j,PΠij=l do not depend on n. Using that limnPgn=Πi=1k! from (9) it follows that

limnPZn=l=j=0k1PAn=ji=1k!PΠij=llimnPgn=Πi=1k!j=0k1PAn=ji=1k!PΠij=l=1k!j=0k1PAn=jk1!=k1!k!j=0k1PAn=j=1k

which proves the theorem. □

Remark 1.

Asymptotically uniform distribution of the sequence Zn,n=1,2,..., as we have shown, is a consequence of the asymptotically uniform distribution of gnn=0. If G0=1k!,1k!,,1k!i1×k! it is easy to verify that gnn=0 has a uniform distribution and as a consequence Zn,n=1,2, has a uniform distribution too.

Theorem 2.

If the random variables An,n=1,2,... are uniformly distributed then for all zIk

PZn=z=1k

Proof. 

By the generator definition we have

PZn=z=i=1k!j=0k1PZn=z|gn=ΠiAn=j·Pgn=ΠiAn=j=i=1k!j=0k1PΠij=z·Pgn=Πi·PAn=j (10)

because An is uniformly distributed from (10) it follows that

PZn=z=i=1k!j=0k1PΠij=z·Pgn=Πi·1k=1ki=1k!j=0k1PΠij=z·Pgn=Πi=1ki=1k!Pgn=Πij=0k1PΠij=z=1k

because i=1k!Pgn=Πi=1 and j=0k1PΠij=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 An,n=1,2,... are uniformly distributed then for all a,bIk,

  1. PZn+l=bZn=a=1k2

  2. PZn+l=b|Zn=a=1k

Proof. 
  1. By the generator definition we have
    PZn+l=bZn=a=Pgn+kAn+k=bgnAn=a==i=1k!j=1k!Pgn+kAn+k=bgnAn=a|gn+k=Πign=Πj·Pgn+k=Πign=Πj=i=1k!j=1k!PΠiAn+k=bΠjAn=a·Pgn+k=Πign=Πj=i=1k!j=1k!PΠiAn+k=bΠjAn=a·Pgn+k=Πi|gn=Πj·Pgn=Πj. (11)
    Now, using notation from the Theorem 1 Pgn+k=Πi|gn=Πj is equal to ti,jk and putting it in (11) it follows that
    PZn+l=bZn=a==i=1k!j=1k!PΠiAn+k=bΠjAn=a·Pgn+k=Πi|gn=Πj·Pgn=Πj=i=1k!j=1k!PΠiAn+k=bΠjAn=a·ti,jk·Pgn=Πj. (12)
    Because Πi,Πj are permutations PΠiAn+k=bΠjAn=a is equal to PAn+k=Πi1bAn=Πj1a and using that An+k,An are independent random variables from (12) it follows that
    PZn+l=bZn=a==i=1k!j=1k!PΠiAn+k=bΠjAn=a·ti,jk·Pgn=Πj=i=1k!j=1k!PAn+k=Πi1bAn=Πj1a·ti,jk·Pgn=Πj=i=1k!j=1k!PAn+k=Πi1b·PAn=Πj1a·ti,jk·Pgn=Πj (13)
    Now, using that An+k and An are uniformly distributed independent random variables it follows from (13) that
    PZn+l=bZn=a==i=1k!j=1k!PAn+k=Πi1b·PAn=Πj1a·ti,jk·Pgn=Πj=i=1k!j=1k!1k·1k·ti,jk·Pgn=Πj=1k2i=1k!Pgn=Πij=1k!ti,jk=1k2 (14)
    because j=1k!ti,jk=1 and i=1k!Pgn=Πi=1, and statement is proved.
  2. Using statement of the Theorem 2 that PZn=a=1k by the definition of conditional probability it follows that
    PZn+l=b|Zn=a=PZn+k=bZn=aPZn=a=1k21k=1k
    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 Ann=1 and Cnn=1 with Znn=1 is considered.

Theorem 4.

Under the conditions of the Theorem 1 we have

  1. limnPZn=z|Cn=c=1k

  2. limnIZn,Cn=0

where zIk and cIm

Proof. 

  1. By the definition
    PZn=z|Cn=c==PZn=zCn=cPCn=c=PgnAn=zCn=cPCn=c=Pi=1k!gn=ΠiΠiAn=zCn=cPCn=c=Pi=1k!fCngn1=ΠiΠiAn=zCn=cPCn=c=Pi=1k!fCngn1=ΠiΠiAn=zCn=cPCn=c. (15)
    Because fCngn1=Πi and fCngn1=Πj are disjoint events for i,jIk and ij, from (15) it follows that
    PZn=z|Cn=c=Pi=1k!fCngn1=ΠiΠiAn=zCn=cPCn=c=i=1k!PfCngn1=ΠiΠiAn=zCn=cPCn=c (16)
    Now, using Bayes theorem from (16) it follows that
    PZn=z|Cn=c=i=1k!PfCngn1=ΠiΠiAn=zCn=cPCn=c=i=1k!j=0k1PfCngn1=ΠiΠiAn=zCn=c|An=j·PAn=jPCn=c=i=1k!j=0k1PfCngn1=ΠiΠij=zCn=c·PAn=jPCn=c=i=1k!j=0k1Pgn1=fCn1ΠiCn=cΠij=z·PAn=jPCn=c. (17)
    Now, because events gn1=fCn1ΠiCn=c and Πij=z are independent from (17) it follows that
    PZn=z|Cn=c==i=1k!j=0k1Pgn1=fCn1ΠiCn=cΠij=z·PAn=jPCn=c=i=1k!j=0k1Pgn1=fCn1ΠiCn=c·PΠij=z·PAn=jPCn=c (18)
    Grouping summands which depends on j from (18) it follows that
    PZn=z|Cn=c==i=1k!j=0k1Pgn1=fCn1ΠiCn=c·PΠij=z·PAn=jPCn=c=i=1k!Pgn1=fCn1ΠiCn=cj=0k1PAn=j·PΠij=zPCn=c=i=1k!Pgn1=fCn1ΠiCn=cPCn=cj=0k1PAn=j·PΠij=z=i=1k!Pgn1=fCn1Πi|Cn=cj=0k1PAn=j·PΠij=z=i=1k!Pgn1=fc1Πij=0k1PAn=j·PΠij=z (19)
    Taking the limit from the both sides in (19) it follows
    limnPZn=z|Cn=c==limnj=0k1PAn=ji=1k!Pgn1=fc1Πi·PΠij=z=j=0k1PAn=ji=1k!PΠij=z·limnPgn1=fc1Πi==j=0k1PAn=ji=1k!PΠij=z·1k!=1k!j=0k1PAn=ji=1k!PΠij=z=1k!j=0k1PAn=j·k1!==k1!k!j=0k1PAn=j=1k
    which proves the statement.
  2. By the definition of mutual information we have that
    IZn,Cn=HZnHZn|Cn (20)
    We will start with computing HZn.
    HZn=i=0k1PZn=ilog21PZn=i (21)
    Taking the limit from the both sides in (21) and using Theorem 1 we have
    limnHZn=log2k. (22)
    In the same way it follows that
    HZn|Cn=i=0m1PCn=i·HZn|Cn=i==i=0m1PCn=i·j=0k1PZn=j|Cn=cilog21PZn=j|Cn=i (23)
    Taking the limit from both sides in (23) and using part 1 of the Theorem 4 we obtain
    limnHZn|Cn==i=0m1PCn=i·j=0k1limnPZn=j|Cn=i·limnlog21PZn=j|Cn=i=i=0m1PCn=i·j=0k11klog2k=log2k·i=0m1PCn=i=log2k. (24)
    Using (22) and( 24) in ( 20) it follows that
    limnIZn,Cn=limnHZnlimnHZn|Cn=log2klog2k=0 (25)
    which proves the statement. □

Theorem 5.

Under the conditions of the Theorem 1 we have

  1. limnPZn=z|An=a=1k

  2. limnIZn,An=0

where z,aIk.

Proof. 

  1. By the definition of conditional probability it follows that
    PZn=z|An=a==PZn=zAn=aPAn=a=PgnAn=zAn=aPAn=a=Pi=1k!gn=ΠiΠiAn=zAn=aPAn=a=Pi=1k!gn=ΠiΠiAn=zAn=aPAn=a=Pi=1k!gn=ΠiΠiAn=zAn=aPAn=a. (26)
    Because gn=ΠiΠiAn=zAn=a and gn=ΠjΠjAn=zAn=a are disjoint events when ij from (26) it follows that
    PZn=z|An=a==Pi=1k!gn=ΠiΠiAn=zAn=aPAn=a=i=1k!Pgn=ΠiΠiAn=zAn=aPAn=a. (27)
    Using that PAB=PA|B·PB from (27) it follows that
    PZn=z|An=a==i=1k!Pgn=ΠiΠiAn=zAn=aPAn=a=i=1k!Pgn=Πi|ΠiAn=zAn=a·PΠia=zAn=aPAn=a=i=1k!Pgn=Πi|ΠiAn=zAn=a·PΠia=zAn=aPAn=a=i=1k!Pgn=Πi|ΠiAn=zAn=a·PΠiAn=z|An=a. (28)
    Because gn=Πi and ΠiAn=zAn=a are independent random variables from (28) it follows that
    PZn=z|An=a==i=1k!Pgn=ΠiΠiAn=zAn=aPAn=a=i=1k!Pgn=Πi|ΠiAn=zAn=a·PΠia=zAn=aPAn=a==i=1k!Pgn=Πi|ΠiAn=zAn=a·PΠiAn=z|An=a=i=1k!Pgn=Πi·PΠia=z (29)
    Taking the limits from the both sides in (29) it follows
    limnPZn=z|An=a==limni=1k!Pgn=Πi·PΠia=z=i=1k!limnPgn=Πi·PΠia=z=i=1k!1k!·PΠia=z=1k!i=1k!PΠia=z=1k!·k1!=1k
  2. In the same way as in the Theorem 4 it follows that
    limnHZn=log2k
    By the definition of conditional entropy it follows that
    HZn|An=i=0k1PAn=i·HZn|An=i=i=0k1PAn=i·j=0k1PZn=j|An=ilog21PZn=j|An=i (30)
    Taking the limit of both sides in (30) and statement of the part 1 we obtain
    limnHZn|An==i=0k1PAn=i·j=0k1limnPZn=j|An=i·limnlog21PZn=j|An=i=i=0k1PAn=i·j=0k11klog2k=log2k·i=0k1PAn=i=log2k (31)
    And finally, using the (22) and (31) in the definition for the IZn,An, it follows that
    limnIZn,An=limnHZnlimnHZn|An=log2klog2k=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, Ann=1, and Cnn=1 are periodic and denote their periods by A and B respectively. It is easy to verify that gnn=0, and Znn=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,GM are defined which improves the value of Z. For that we need a few Lemmas.

To find out period of Znn=1 we will first determine the period of the gnn=0.

Lemma 1.

Denote by l1,2,...,k! the order of the permutation i=1CfCi. Then the period of gnn=0 is lC.

Proof. 

First we have to prove that lC is a period, but it is straightforward.

gk+λlC=fC1fC2fCλlCfC1+λlCfCk+λlC

and because C is period of the Cnn=1 we have

fC1fC2fCλlCfC1+λlCfCk+λlC==fC1fC2fCCλlfC1fCk=fC1fCk=gk

Next step is to prove that lC is the fundamental period i.e., that every other period is divisible by lC.

Suppose contrary, that lC isn’t the fundamental period i.e., that the fundamental period is d,dlC and d<lC. From gk+λd=gk we have

i=k+1k+λdfCi=I,kN,k1 (32)

where I is the identical permutation. Multiplying (32) with fCk from the left we have

i=kk+λd1fCifCk+λd=fCk

and applying (32) we have

fCk+λd=fCk,k1.

From this we have

Ck+λd=Ck,k1

which means that d is a period of Cnn=1 and that C|d i.e., d=rC,r<l. Now, look at g1+λd

g1+λd=i=11+λdfCi=i=1λrCfCifC1+λrC==i=1CfCiλrfC1=fC1=g1

and we conclude that

i=1CfCiλr=I

for every λ1. Finally we have

i=1CfCir=I

and conclude that l|r which is in contradiction with r<l so we proved that lC is the fundamental period of gnn=0. □

Lemma 2.

Let G be the fundamental period of gnn=0. If G,A=1 and A1,A2,,An,=Ik then period of Znn=1 is GA.

Proof. 

By straightforward computation we can easily check that GA is a period of the Znn=1. We need only to prove that GA is fundamental period of Znn=1.

Suppose that the fundamental period isn’t GA but it is d. Then dGA and because G,A=1 we have d=d1d2,d1,d2=1 and d1|G,d2|A.

Further,

gk+λdAk+λd=gkAk (33)

for every λ1,λN. We can set λ=λ1·Gd1,λ11 in the equation above which transform it to

gk+λ1Gd2Ak+λ1Gd2=gkAk

and having in mind that G is a period of gnn=0 we obtain

gkAk+λ1Gd2=gkAk.

From the fact that gk is bijection it follows that

Ak+λ1Gd2=Ak

which means that Gd2 is a period of Ann=1 and consequently that A|Gd2. Using that G,A=1 we have that A|d2 and with d2|A we conclude that A=d2. According to former observations we have that d must be of the form d1A and rewriting of (33) yields

gk+λd1AAk+λd1A=gkAk.

This equation we can simplify to

gk+λd1AAk=gkAk

because A is a period of Ann=1. Now we put our attention to gk+nG+λd1AAk+nG+λd1A.

gk+λd1AAk+nG=gk+nG+λd1AAk+nG+λd1A==gk+nGAk+nG==gkAk+nG

so we have that functions gk+λd1A,gk are equal on the set Ak+nG|nN. Set x|k+nGAx,nN is equal IA, because G,A=1, and from the periodicity of Ann=1 follows Ak+nG|nN=Ik. Functions gk+λd1A,gk are equal on their domain so we have that

gk+λd1A=gk,λ1,λN

which means that d1A is a period of the gnn=0. In the same way as above we have that d1=G and we have that the fundamental period of the Znn=1 is GA. □

Following Corollary is a trivial consequence of the Lemma 2.

Corollary 1.

If G,A=1 then the period of the Znn=1 is greater or equal to A.

This corollary shows that with suitably chosen pseudo-random sequence Ann=1 output sequence will have the period greater or equal to period of the Ann=1.

The next theorem, the main result of this paragraph, is a straightforward application of the former Lemmas.

Theorem 6.

Let l1,2,...,k! denote the order of the permutation i=1CfCi. Then if lC,A=1 and A1,A2,,An,=Ik, the period of Znn=1 is lCA.

A statement of this theorem is a stronger variant of the Corollary 1 and it shows that with appropriately selected pseudo-random sequences Ann=1 and Bnn=1 period of the generator output sequence is significantly longer then period sequences Ann=1 and Bnn=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 Ann=1, and Cnn=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 Ann=1 and Cnn=1, through the output sequence Znn=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 Ann=1 and Cnn=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 Ann=1 and Cnn=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 Cnn=1 and Ann=1. Relatively weak constraints demanded for the probability distribution for the sequences Cnn=1 and Ann=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 Znn=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. doi: 10.3390/s18092796. [DOI] [PMC free article] [PubMed] [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. doi: 10.3390/cryptography1010004. [DOI] [Google Scholar]
  • 6.Kambourakis G., Marmol F.G., Wang G. Security and Privacy in Wireless and Mobile Networks. Future Internet. 2018;10:18. doi: 10.3390/fi10020018. [DOI] [Google Scholar]
  • 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., editor. 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. [(accessed on 28 October 2019)];2017 Available online: https://eprint.iacr.org/2017/511.
  • 12.Jing 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. doi: 10.1007/s11276-014-0761-7. [DOI] [Google Scholar]
  • 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. doi: 10.1109/JIOT.2017.2767291. [DOI] [Google Scholar]
  • 14.Xiao Y., Shen X., Sun B., Cai L. Security and Privacy in RFID and Applications in Telemedicine. IEEE Commun. Mag. 2006;44:64–72. doi: 10.1109/MCOM.2006.1632651. [DOI] [Google Scholar]
  • 15.Kumar P., Lee H.J. Security Issues in Healthcare Applications Using Wireless Medical Sensor Networks: A Survey. Sensors. 2012;12:55–91. doi: 10.3390/s120100055. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 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. doi: 10.3390/s19194312. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 17.Krishna B.V.S., Gnanasekaran T. A systematic study of security issues in Internet-of-Things (IoT); 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. [DOI] [Google Scholar]
  • 18.Carsten M. Security and privacy in the internet of things. J. Cyber Policy. 2017;2:155–184. doi: 10.1080/23738871.2017.1366536. [DOI] [Google Scholar]
  • 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. doi: 10.4103/0256-4602.55276. [DOI] [Google Scholar]
  • 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. doi: 10.3390/s17050979. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 22.Anderson B. Thank You Bob Anderson. Cypherpunks (Mailing List) [(accessed on 28 October 2019)]; Available online: http://cypherpunks.venona.com/date/1994/09/msg00304.html.
  • 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. [(accessed on 28 October 2019)]; Available online: https://en.wikipedia.org/wiki/RC4#cite_note-Rivest2014-14.
  • 25.Sen Gupta S., Maitra S., Paul G., Sarkar S. (Non-)Random Sequences from (Non-)Random Permutations—Analysis of RC4 Stream Cipher. [(accessed on 28 October 2019)]; Available online: https://eprint.iacr.org/2011/448.pdf.
  • 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]

Articles from Sensors (Basel, Switzerland) are provided here courtesy of Multidisciplinary Digital Publishing Institute (MDPI)

RESOURCES