+ All Categories
Home > Documents > Lightweight Stream Cipher Scheme for Resource-Constrained IoT … · 2020-07-20 · the limitations...

Lightweight Stream Cipher Scheme for Resource-Constrained IoT … · 2020-07-20 · the limitations...

Date post: 02-Aug-2020
Category:
Upload: others
View: 0 times
Download: 0 times
Share this document with a friend
9
HAL Id: hal-02402876 https://hal.archives-ouvertes.fr/hal-02402876 Submitted on 10 Dec 2019 HAL is a multi-disciplinary open access archive for the deposit and dissemination of sci- entific research documents, whether they are pub- lished or not. The documents may come from teaching and research institutions in France or abroad, or from public or private research centers. L’archive ouverte pluridisciplinaire HAL, est destinée au dépôt et à la diffusion de documents scientifiques de niveau recherche, publiés ou non, émanant des établissements d’enseignement et de recherche français ou étrangers, des laboratoires publics ou privés. Lightweight Stream Cipher Scheme for Resource-Constrained IoT Devices Hassan Noura, Raphael Couturier, Congduc Pham, Ali Chehab To cite this version: Hassan Noura, Raphael Couturier, Congduc Pham, Ali Chehab. Lightweight Stream Cipher Scheme for Resource-Constrained IoT Devices. International Conference on Wireless and Mobile Computing, Networking and Communications, Oct 2019, Barcelona, Spain. hal-02402876
Transcript
Page 1: Lightweight Stream Cipher Scheme for Resource-Constrained IoT … · 2020-07-20 · the limitations of resource-constrained IoT devices, nor for real-time requirements of some IoT

HAL Id: hal-02402876https://hal.archives-ouvertes.fr/hal-02402876

Submitted on 10 Dec 2019

HAL is a multi-disciplinary open accessarchive for the deposit and dissemination of sci-entific research documents, whether they are pub-lished or not. The documents may come fromteaching and research institutions in France orabroad, or from public or private research centers.

L’archive ouverte pluridisciplinaire HAL, estdestinée au dépôt et à la diffusion de documentsscientifiques de niveau recherche, publiés ou non,émanant des établissements d’enseignement et derecherche français ou étrangers, des laboratoirespublics ou privés.

Lightweight Stream Cipher Scheme forResource-Constrained IoT Devices

Hassan Noura, Raphael Couturier, Congduc Pham, Ali Chehab

To cite this version:Hassan Noura, Raphael Couturier, Congduc Pham, Ali Chehab. Lightweight Stream Cipher Schemefor Resource-Constrained IoT Devices. International Conference on Wireless and Mobile Computing,Networking and Communications, Oct 2019, Barcelona, Spain. �hal-02402876�

Page 2: Lightweight Stream Cipher Scheme for Resource-Constrained IoT … · 2020-07-20 · the limitations of resource-constrained IoT devices, nor for real-time requirements of some IoT

Lightweight Stream Cipher Scheme forResource-Constrained IoT Devices

Hassan NouraElectrical and Computer Engineering

American University of BeirutBeirut, Lebanon

Raphael CouturierFEMTO-ST Institute,

Univ. Bourgogne Franche-Comte,Belfort, France

Congduc PhamUniversity of Pau, LIUPPA laboratory

Pau, France

Ali ChehabElectrical and Computer EngineeringAmerican University of Beirut (AUB)

Beirut, Lebanon

Abstract—The Internet of Things (IoT) systems arevulnerable to many security threats that may have drasticimpacts. Existing cryptographic solutions do not cater forthe limitations of resource-constrained IoT devices, nor forreal-time requirements of some IoT applications. Therefore,it is essential to design new efficient cipher schemes withlow overhead in terms of delay and resource requirements.In this paper, we propose a lightweight stream cipherscheme, which is based, on one hand, on the dynamickey-dependent approach to achieve a high security level,and on the other hand, the scheme involves few simpleoperations to minimize the overhead. In our approach,cryptographic primitives change in a dynamic lightweightmanner for each input block. Security and performancestudy as well as experimentation are performed to validatethat the proposed cipher achieves a high level of efficiencyand robustness, making it suitable for resource-constrainedIoT devices.

Index Terms—Lightweight cryptography; key-dependentencryption, security, IoT.

I. INTRODUCTION

The Internet of Things (IoT) systems introduced newsmart applications such as smart houses/ buildings/cities, environment monitoring, traffic monitoring, andhealth monitoring, among others. For most of IoT ap-plications, the devices are resource-constrained and areused to monitor and to collect data from the physicalenvironment.

IoT systems are constantly facing dangerous securityand privacy threats. The different types of threats targetvarious security services such as confidentiality (dataconfidentiality and privacy), integrity (device systemintegrity) and authentication (device/user and data ori-gin authentication), as well as availability (data andsystem). Therefore, in order to ensure the appropriatesecurity measures, two types of solutions are considered,

cryptographic and non-cryptographic. In general, dataconfidentiality, data integrity, and data origin authenti-cation are ensured by cryptographic algorithms. On theother hand, user/device authentication can be ensuredby using a cryptographic protocol that can be basedon cryptographic algorithms such as an encryption algo-rithm or a hash function. When IoT applications com-municate sensitive information, confidentiality may besimply breached via eavesdropping and traffic analysis.The eavesdropper will be able to extract the messagecontents, while the traffic analysis is able to recoveruseful information (privacy issues) from the traffic suchas source and destination from the header of the com-municated messages.

A. Problem Formulation

Based on the characteristics of IoT devices and appli-cations, the existing security solutions are not suitablefor delay-sensitive applications, nor for tiny devices thathave a limited battery lifetime and limited computa-tional power. Moreover, different IoT applications havestringent QoS requirements. As such, there is a criticalneed for new security solutions that are compatible withthe limitations and requirements of IoT devices andapplications.

B. Related Work

Traditional cryptographic algorithms such as the Ad-vanced Encryption Standard (AES) [1] require severaliterations over a round function, which introduces rela-tively a large overhead in terms of latency and requiredresources. The minimum required number of roundsfor a traditional block cipher is 4 as it is for theHummingbird2 cipher [2]. Therefore, such cryptographic

Page 3: Lightweight Stream Cipher Scheme for Resource-Constrained IoT … · 2020-07-20 · the limitations of resource-constrained IoT devices, nor for real-time requirements of some IoT

algorithms would result into a poor performance in thecontext of IoT networks. Recently, several lightweightciphers such as Simon and Speck [3] have been pro-posed and they require less computation and resourcescompared to AES. Speck has a lower overhead comparedto Simon and it was shown to be suitable for tiny devices.However, Speck still uses the multi-round structure,although the round function is simple and optimized.

On the other hand, the chaotic cryptographic al-gorithms also suffer from different limitations suchas floating-point computations and conversion opera-tions, finite periodicity and complex hardware imple-mentation [4]. Also, they are based on the multi-round structure. Accordingly, a new paradigm emergedfor cryptographic algorithms, which are referred to as”lightweight” since they exhibit low latency and over-head [5], [6]. Lightweight cryptographic algorithms thatare based on the dynamic key approach have beenproposed in [2], [7]–[9]. The cipher schemes describedin [7]–[9] require two iterations of a round function,while [2] requires a single iteration of a round function,and it processes 2 blocks at a time, which makes itfaster than the one in [7]–[9]. These solutions use thedynamic key-dependent approach to reduce the requiredcomputations and resources while preserving a highsecurity level.

C. Motivation and Contributions

This paper focuses on the design of a new efficientcipher scheme for IoT devices; it requires a single iter-ation and it provides a better performance and securitylevel compared to the previous dynamic key-dependentciphers and recent static lightweight ciphers [3].

The proposed solution follows the same logic andresults in a flexible, simple lightweight stream cipherscheme (LSC) with 2 simple functions, a round functionand an update function that are iterated only once toproduce a key-stream. These functions are designed withthe minimum possible number of operations to preservethe desirable cryptographic performance. To accomplishthis objective, a new dynamic key is generated for eachinput message, which can be an audio, an image oreven a video message. The dynamic key is producedas a function of a secret key and a nonce, which makesthe cryptographic primitives non-static and unknown toattackers and hence, introducing a higher complexity forsuch attackers. The substitution and permutation tablesare dynamic and key-dependent, and they are basedon the methods proposed in [2]. They are respectivelybased on the Key Setup Algorithm (KSA) and modifiedKSA of RC4. These techniques have been validated toensure a good cryptographic performance in a dynamic

manner according to [2]. Having said that, the noveltyof this work stems from the encryption algorithm andhow it makes use of the dynamic key and cryptographicprimitives. The advantages of LSC compared to [2] arerelated to the excellent balance between the security leveland performance for IoT devices:

1) Minimum effect of error propagation: LSC encrypts1 block at a time instead of 2 blocks to reduce theeffect of error propagation

2) Low overhead: LSC requires fewer operations anddoes not apply the block permutation operation toreduce delay and memory consumption. LSC alsoavoids chaining and diffusion operations to furtherreduce the computational complexity.

3) Simpler implementation: [2] cannot be applied toresource-constrained tiny devices, such as Arduinoboards, due to the need for a large memory capacity.

4) Variable cipher primitives: LSC updates the cryp-tographic primitives after each encrypted/decryptedblock to provide a higher security level.

D. Organization of the paper

The rest of the paper is organized as follows. The pro-posed key derivation algorithm along with the proposedcipher construction primitives are described in Section II.Section III presents the proposed lightweight streamcipher (LSC) scheme. Then, extensive security analysisis performed in Section IV to prove the robustness ofthe scheme. Section V investigates the immunity ofLSC against different kinds of existing attacks. Theeffectiveness of LSC is then validated in Sections VIand VII. Conclusions are derived in Section VIII.

II. PROPOSED KEY DERIVATION FUNCTION

In this section, the proposed key derivation function isdescribed. All the notations used are shown in Table I.Figure 1 shows all the steps of the proposed dynamickey generation technique, where the input is a sharedsecret session key (SK) between two legal entities. Thissession key can be renewed after each new session,depending on the IoT application. Key managementamong IoT devices are beyond the scope of this paperand readers can refer to [10] for more details aboutpossible key management approaches in IoT systems.

A dynamic key (DK) is produced for each new inputmessage by hashing the secret key SK with a nonce thatcan be produced in a synchronous manner between bothentities. This procedure allows any secure cryptographichash function to be used at this step. In this paper,SHA-512 [11] is used and the output dynamic key is64 bytes long: DK = hashSHA−512(SK ⊕ nonce).The produced dynamic key is therefore different for

2

Page 4: Lightweight Stream Cipher Scheme for Resource-Constrained IoT … · 2020-07-20 · the limitations of resource-constrained IoT devices, nor for real-time requirements of some IoT

Table I: Table of notations

Symbol DefinitionSK A shared secret Session Keynonce A dynamic nonce which can be changed for each input

messageDK A Dynamic Key that is updated for each input messagekS1 and kS2 First and second substitution sub-KeysS1 and S2 First and second dynamic substitution tablesπ Dynamic permutation tablekRM Seed for a stream cipher to produce RM and IMRM and IM Two pseudo-random blockskPRM A permutation sub-Key and it is used to produce the permu-

tation table πRM

len length of input message after reshaped to a table form.nb Number of blocks in one input message and it is equals to

e lenh

dh Number of bytes in one block messageM The original messagemi The ith original plain blockC The encrypted messageci The ith encrypted block

Figure 1: Proposed dynamic key derivation function andconstruction cipher primitives

each input message and the secure cryptographic hashfunction ensures a high resistance against collision. Inour approach, the dynamic key is divided into four sub-keys: DK = {kRM , kPRM , kS1, kS2}. Each sub-key hasa length of 128 bits (16 bytes). These sub-keys will beemployed for different purposes:

• Pseudo-Random Key kRM consists of the firstmost significant 16 bytes and is used to constructa pseudo-random vector RM and an initial vectorIM . Both have a length equal to h2 bytes. Thesetwo matrices can be generated by using any streamcipher scheme. In this paper, we use RC4 [12] withkRM as a seed to produce 2×h2 bytes key-stream.The first h2 bytes and the next h2 bytes are reshapedto respectively form the RM and IM vector.

• Permutation sub-key kPRM consists of the nextmost significant 16 bytes of DK and is used toconstruct a flexible permutation table πRM of lengthh2 by using the modified key setup algorithm ofRC4 which was presented in [2]. The values of theelements in the permutation table πRM range from1 to h2.

• Substitution sub-key kS1 consists of the next 16

bytes of DK and is used to construct the first substi-tution table S1 by using the key setup algorithm ofRC4 as described in [2]. The substitution operationis done at the byte level and the elements in tableS1 have values between 0 and 255.

• Substitution sub-key kS2 consists of the next 16bytes of DK and is used to construct the secondsubstitution table S2 similar to S1.

By construction, all cipher primitives are related toany bit of difference in the secret key or nonce, and willprovide a different dynamic key. Therefore, LSC ensureshigh key sensitivity since all cipher primitives are relatedto the dynamic key.

III. LIGHTWEIGHT STREAM CIPHER SCHEME (LSC)

LSC is based on the dynamic key dependence ap-proach which means that a different dynamic key isused for each input message, increasing randomness ofciphertext and making cryptanalysis approaches moredifficult to be applied. Therefore, for each input messagethe various cipher primitives are updated to encrypt thenext message. The encryption and decryption algorithmswill be described in the next paragraphs.

A. Encryption algorithm

The input message M is divided into nb blocksM = m1, m2, . . . , mnb, where each block has a lengthof h bytes. h can be configured according to the IoTapplications. A smaller value of h is preferable for real-time applications.

LSC produces a new keystream block for each it-eration as the different stream cipher primitives arechanged for each input message. The ith ciphertext blockci = mi ⊕ Ri of each message is obtained by mixingthe ith keystream block Ri with the ith plain block mi

and i = {1 , 2, . . . , nb}.To recover the original ith block we compute m′i =

ci ⊕ Ri where the ith ciphertext block ci is ”XORed”with the same Ri.

As explained previously, LSC is divided intotwo sub-functions: RoundFunction (RF ) andUpdate− RM− vectorFunction (URM ). RF isiterated to produce a required key-stream block Ri.However, this requires that RM is updated which canbe achieved by calling the URM .

RoundFunction (RF )

RF produces the ith keystream block by applying thefollowing five steps:

1) Update the pseudo-random vector RM as describedbelow.

3

Page 5: Lightweight Stream Cipher Scheme for Resource-Constrained IoT … · 2020-07-20 · the limitations of resource-constrained IoT devices, nor for real-time requirements of some IoT

2) Iterate the selected Pseudo-Random Generator(PRG) for only once. Any Pseudo-random numbergenerator (PRNG) can be used at this step. In thispaper, a XorShift64 PRNG is used to produce hbytes for each iteration. The output of XorShift64is a 64 bits word so XorShift64 should be iteratedfor dh8 e. For example, for h=16 or 32, XorShift64will be respectively iterated for 2 and 4 times. ThePRNG is iterated in a recursive manner where theoutput IC becomes the next input.

3) Mixing the updated RM with the PRNG output andthe initial vector M through the use of XOR.

4) Substitute the output by using the two substitutiontables (S1 and S2) to produce the ith keystreamRi. In this step, the proposed substitution techniqueuses the second substitution table S2 to substitutethe bytes with odd indexes and the first substitutiontable S1 to substitute the bytes with even indexes.

5) Initial vector IM is updated and becomes equal toRi.

These steps to produce the ith keystream block Ri areillustrated in Figure 2 and described in Eq. 1.

IC = XorShift64(IC)

RM = updateRM(RM,S1, S2, πRM )

Ri = S(IV ⊕RM ⊕ IC)IM = Ri

(1)

Figure 2: LSC architecture

All plain blocks will be encrypted to form the en-crypted message C, which will be securely sent to thedesired destination, or to be safely stored locally. TheURM function is now presented to explain how RM isupdated.

Update− RM− vectorFunction (URM )

RM is updated first before being permuted by usingthe permutation table πRM . Then, the output will besubstituted by using the first table S1 to substitute thebytes with even indexes and the second table S2 tosubstitute the bytes with odd indexes.

Figure 3: Updating RM for each iteration

Xorshift PRNG

Xorshift is a PRNG class that represents linear-feedback shift registers (LFSRs) such as the one de-scribed in Algorithm 1. In addition, Xorshift allows anefficient implementation without the need of excessivelyusing sparse polynomials. This makes them extremelyfast on any modern computer architecture. Similar toLFSRs, the parameters must be chosen with extremecautiousness in order to achieve a long period [13].However, Xorshift generators do not have non-linearsteps which can make some statistical tests to fail [13].Otherwise, Xorshift generators do have numerous ad-vantages including a lower execution time with a verysimple implementation.

Algorithm 1 Xorshift64 code

d e v i c e i n l i n eu long x o r s h i f t 6 4 ( u long t ){

u long x = t ;x ˆ= x >> 1 2 ;x ˆ= x << 2 5 ;x ˆ= x >> 2 7 ;r e t u r n x ;

}

B. Decryption algorithm

The decryption algorithm uses the same steps toproduce the same key-stream sequence and recover theoriginal message by mixing the key-stream with thecipher-text.

IV. SECURITY ANALYSIS

The proposed cipher scheme should resist differentkinds of analytic attacks such as statistical and algebraic

4

Page 6: Lightweight Stream Cipher Scheme for Resource-Constrained IoT … · 2020-07-20 · the limitations of resource-constrained IoT devices, nor for real-time requirements of some IoT

attacks, as well as brute-force attacks [14], [15]. We usethe security tests already applied in [2] to validate thecryptographic level and consequently the immunity ofLSC against crypatanalysis attacks. We consider inputmessages filled with zeros.

A. Resistance against statistical analysis

Statistical attacks can be prevented if the encryptedmessage reaches a high randomness and uniformitylevel in addition to a high periodicity [14]. Severalhard statistical tests were carried out (TestU01 [16]and practrand [17]) on the produced keystream tovalidate that it reaches the required uniformity andrandomness properties. The most difficult scenario wherewe use the same message with constant values is testedand we found that the produced keystream successfullypassed all the tests of TestU01 and practrandwith more than 100 different seed values. It is worthmentioning that these statistical tests are the hardestones. We also found that the produced keystream reachesthe required uniformity and randomness levels. Theseresults are summarized in Figure 4-a-b-c to show theprobability density function and the uniform distributionof the produced keystream. More details on these testscan be found in [2], [18].

(a) KS (b) NS

Figure 5: Key (a) and nonce (b) sensitivity against 1,000random keys.

B. Key Sensitivity Test

The sensitivity test is used to validate the keyavalanche effect by quantifying the difference (percent-age) between the produced keystream for a given differ-ence in the secret key or nonce. If one bit differs in thesecret key or nonce, this will produce a new dynamickey, and consequently different cipher primitives anddifferent keystreams. The desired value is 50% differenceat the bit level. Figure 5 shows the key and noncesensitivity for 1,000 random runs. We can see that

the difference between produced keystreams for bothsensitivity tests is very close to the desired value.

C. High periodicity

LSC is based on the dynamic key dependence ap-proach and can be considered as a perturbation techniquesince different cipher primitives are updated. Moreover,as the nonce has a long periodicity in addition to updat-ing initial and random matrices in a recursive mannerLSC exhibits high periodicity.

V. DISCUSSIONS ON ANALYTIC AND BRUTE FORCEATTACKS

We discuss in this section on how LSC can resistto some well-known attacks. First, LSC proposes anew way of designing stream cipher and to reach thedesired cryptographic properties such as confusion anddiffusion. We found above that LSC reaches a highlevel of randomness and uniformity according to hardstatistical tests such as TestU01 and practrand. Inaddition, the independence among produced keystreamsis ensured.

Then, as both dynamic key’s sensitivity and nonce’ssensitivity are achieved as shown in Figure 5, thismakes key-related attacks much more difficult to suc-ceed. Furthermore, as the dynamic key changes for eachinput message, algebraic, linear and differential attackswill also become very hard to succeed. Each collectedmessage is encrypted differently with a different dynamickey, and consequently with different cipher primitivesmaking LSC harder to break. All analytic attacks willbe unable to break LSC since they are designed to breakstatic ciphers with static cipher primitives.

Finally, the size of the secret key can be set to 128,196, or 256 bits, whereas the size of the nonce anddynamic key is 512 bits. These sizes are large enoughto make brute force attacks unfeasible.

VI. PERFORMANCE ANALYSIS

In this section, we analyze the performance of theproposed cipher scheme towards quantifying its effec-tiveness. Two important metrics are presented in details,which are the effect of error propagation and the asso-ciated encryption/decryption time.

A. Effect of error propagation

The effect of any bit error in the encrypted block ciwill only affect its corresponding bits in the decryptedblock.

5

Page 7: Lightweight Stream Cipher Scheme for Resource-Constrained IoT … · 2020-07-20 · the limitations of resource-constrained IoT devices, nor for real-time requirements of some IoT

(a) (b) (c)

Figure 4: Amplitude variation of the produced keystream (a) in addition to its corresponding probability densityfunction (b), recurrence for a random key and for h = 16.

B. Encryption/Decryption time

The main objective of the proposed cipher approachis to reach a high level of security with the minimumnumber of operations. This requires reducing the com-putational complexity, encryption/decryption time andresources (especially energy) for the data confidentialityprocess. The execution time of the proposed cipher withand without chaining operation mode, is presented andquantified. To assess the total associated overheads, wequantify several delays as follows:

1) TS denotes the required substitution execution timefor a block of N bytes.

2) Txor denotes the required ”XOR” execution timebetween two blocks of N bytes.

3) TPRNG denotes the required time to iterate theemployed PRNG.

4) TP denotes the required time to permute a block ofbytes.

Therefore, the total Computational Delay (CD) of theproposed scheme to encrypt one block is:

CD = 3× TS + 2× Txor + TPRNG + TP (2)

while the total computation delay of the standard AESdescribed in [1] to encrypt one block is:

CDAES = rTS +(r+1)Txor +(r−1)TD + rTSR (3)

where TD represents the required delay for the AES“mix-column” operations (for all 4 columns), which hasa very high delay compared to other AES operations.TSR represents the required delay for the AES “shift-rows” operations, and r represents the number of rounds.The minimum value of r is 10 for 128 bits secret key

and the minimum AES computation delay is given by:

CDAES(r=10) = 10TS + 11Txor + 9TD + 10TSR (4)

Consequently, the AES computation time is largercompared to our proposed solution with or withoutrelying on the chaining operation mode. In addition, ourproposed solution avoids any diffusion operation suchas the “mix-column” operations of AES in order toreduce the delay: the delay of the XOR and substitutionoperations are far less than that of the “mix-column”diffusion of AES. Accordingly, our proposed schemerequires a lesser computational complexity compared tothe AES standard cipher with 128 bits length secret key.For 192-bit and 256-bit secret keys, r are equal to 12and 14 respectively which requires much more executiontime compared to the 128-bit secret key.

VII. EXPERIMENTATIONS

In this section we present results from additionalexperimentations conducted on real hardware platformsused in many IoT deployments: low-cost 8-bit AVRATmega328P MCU at 8MHz (which is used on the well-known Arduino ProMini board and many other similarboards) and a 32-bit Cortex-M4 (MK20DX256VLH7)ARM MCU at 48MHz (which is used on the Teensy32board for instance). We implemented LSC and integratedit into our LoRa IoT framework [19]. In all the tests, wecompared the encryption time of LSC with an efficientimplementation of 128-bit AES for resource-constraineddevices [20] and Speck. We varied the message size from16 bytes to 240 bytes.

Figure 6 compares the encryption time of our LSCalgorithm with AES and Speck. On the ProMini, LSCoutperforms both AES and Speck. On the Teensy32, LSC

6

Page 8: Lightweight Stream Cipher Scheme for Resource-Constrained IoT … · 2020-07-20 · the limitations of resource-constrained IoT devices, nor for real-time requirements of some IoT

also outperforms AES but is slightly slower than Speck,probably due to higher optimization of bit rotation op-erations on Cortex architecture. In Figure 6(bottom), thedata tags from 10us to 115us are for LSC while the tagsfrom 8us to 109us are for Speck. Figure 7 shows thecorresponding encryption time ratio of AES and Speckcompared to LSC.

264 472 704 928 1160 1376 1608 1832 2040 2264 2496 2736 2952 3168 3392

2496 4968 7464 9944 121461491217392

1987222352

2483227304

2978432280

3476037256

1984 3944 5784 7616 9472 11312131761499216832

18680205442238424216

2607227888

0

10000

20000

30000

40000

16 32 48 64 80 96 112

128

144

160

176

192

208

224

240Encryptio

ntim

einus

Messagesizeinbytes

LSCvsAESvsSpeckonArduinoProMiniEncryption time

LSC AES SPECK

10 18 26 32 41 48 55 63 71 78 86 93 101 108 115287574

8571143

14271715

19982283

25682855

31393426

37093995

4282

8 15 22 30 37 44 50 61 66 73 80 87 95 101 109010002000300040005000

16 32 48 64 80 96 112

128

144

160

176

192

208

224

240Encryptio

ntim

einus

Messagesizeinbytes

LSCvsAESvsSpeckonTeensy32Encryptiontime

LSC- 48MHz AES- 48MHz SPECK- 48MHz

Figure 6: Encryption time

Even if the encryption time may not be importantfor some IoT applications because of non real-timeconstraint, a higher encryption time also means a higherenergy consumption. As there is an increasing interestin multimedia IoT, especially image IoT, where smallimages can be transmitted from IoT devices, we devel-oped a long-range image sensor using LoRa radio anda Teensy32 board for surveillance applications [21] asshown in Figure 8.

When transmitting 1 image every hour (about 8packets of 240 bytes per image) and a mean powerconsumption of 35mA while in active state and 5µA indeep sleep mode, the lower encryption time of our LSCalgorithm provides an additional estimated autonomy of

9.45 10.53 10.60 10.72 10.47 10.84 10.82 10.85 10.96 10.97 10.94 10.89 10.93 10.97 10.98

7.52 8.36 8.22 8.21 8.17 8.22 8.19 8.18 8.25 8.25 8.23 8.18 8.20 8.23 8.220

10

20

16

32

48

64

80

96

112

128

144

160

176

192

208

224

240

Messagesizeinbytes

LSCvsAES&SPECKonArduino

Encryption time ratio

AES-LSCratio SPECK-LSC ratio

28.70 31.89 32.96 35.72 34.80 35.73 36.33 36.24 36.17 36.60 36.50 36.84 36.72 36.99 37.23

0.80 0.83 0.85 0.94 0.90 0.92 0.91 0.97 0.93 0.94 0.93 0.94 0.94 0.94 0.95

0

20

40

16 32 48 64 80 96 112

128

144

160

176

192

208

224

240

Messagesizeinbytes

LSCvsAES&SPECKonTeensy32Encryption time ratio

AES-LSCratio SPECK-LSC ratio

Figure 7: Encryption time ratio

56° lens

76° lens

116° lens

+

RX

Pin 1

GND

MOSI

UART1

ucamII

Pin 1

MISO CS

SCK

SCK

CS

3.3v

3.3v RAW

TX

Figure 8: Long-range image IoT

more than 1 month: for instance 730 days compared to686 days.

VIII. CONCLUSIONS

In this paper, an efficient lightweight stream cipherscheme (LSC) was proposed for tiny IoT devices thatare limited in terms of energy, resources, and sometimesreal-time requirements. The existing standard ciphers arenot adapted for these devices since a higher number ofround iterations is required to reach the desired securitylevel. In addition, a static round function is usually

7

Page 9: Lightweight Stream Cipher Scheme for Resource-Constrained IoT … · 2020-07-20 · the limitations of resource-constrained IoT devices, nor for real-time requirements of some IoT

applied for each iteration which is why existing ap-proaches use a larger number of rounds r. Our proposedsolution LSC reduces r to one iteration and requires lesscomputation and resource overheads. LSC is based onthe dynamic key dependence approach to reach a goodbalance between security level and device’s performance.The statistical tests and the experimentations on real IoThardware show that LSC is a promising candidate forresource-constrained IoT as it exhibits high randomnessand uniformity level in addition to a high periodicity inthe worst-case scenario, while outperforming traditionalAES in terms of encryption/decryption time as well asthe more recent Speck algorithm. In addition to theobvious latency reduction, significant energy saving havebeen quantified when encryption is performed on smallimages.

ACKNOWLEDGMENTS

This work is supported by (a) the WAZIHUB projectfunded by EU Horizon 2020 program under grant agree-ment No 780229, (b) the Maroun Semaan Faculty ofEngineering and Architecture at the American Universityof Beirut and (c) by the EIPHI Graduate School (contractANR-17-EURE-0002). We also thank the supercomputerfacilities of the Mesocentre de calcul de Franche-Comte.

REFERENCES

[1] Daemen, Joan and Rijmen, Vincent, The design of Rijndael: AES-the advanced encryption standard. Springer Science & BusinessMedia, 2013.

[2] Noura, Hassan and Chehab, Ali and Sleem, Lama and Noura,Mohamad and Couturier, Raphael and Mansour, MohammadM, “One round cipher algorithm for multimedia IoT devices,”Multimedia Tools and Applications, vol. 77, no. 14, pp. 18 383–18 413, 2018.

[3] Beaulieu, Ray and Shors, Douglas and Smith, Jason andTreatman-Clark, Stefan and Weeks, Bryan and Wingers, Louis,“SIMON and SPECK: Block Ciphers for the Internet of Things.”IACR Cryptology ePrint Archive, vol. 2015, p. 585, 2015.

[4] Noura, Hassan, “Conception et simulation des generateurs,crypto-systemes et fonctions de hachage bases chaos perfor-mants,” Ph.D. dissertation, universite de Nantes, 2012.

[5] McKay, Kerry A and Bassham, Larry and Turan, Meltem Sonmezand Mouha, Nicky, “Report on lightweight cryptography,” NISTDRAFT NISTIR, vol. 8114, 2016.

[6] Poschmann, Axel York, “Lightweight cryptography: crypto-graphic engineering for a pervasive world,” in PH. D. THESIS.Citeseer, 2009.

[7] Noura, Hassan and Sleem, Lama and Noura, Mohamad and Man-sour, Mohammad M. and Chehab, Ali and Couturier, Raphael,“A new efficient lightweight and secure image cipher scheme,”Multimedia Tools and Applications, vol. 77, no. 12, pp. 15 457–15 484, Jun 2018.

[8] Noura, Hassan and Courousse, Damien, “Method of encryptionwith dynamic diffusion and confusion layers,” December 2017.

[9] Noura, Hassan N and Noura, Mohamad and Chehab, Ali andMansour, Mohammad M and Couturier, Raphael, “Efficient andsecure cipher scheme for multimedia contents,” Multimedia Toolsand Applications, pp. 1–30, 2019, to appear.

[10] Roman, Rodrigo and Alcaraz, Cristina and Lopez, Javier andSklavos, Nicolas, “Key management systems for sensor networksin the context of the Internet of Things,” Computers & ElectricalEngineering, vol. 37, no. 2, pp. 147–159, 2011.

[11] T. Grembowski, R. Lien, K. Gaj, N. Nguyen, P. Bellows, J. Flidr,T. Lehman, and B. Schott, “Comparative analysis of the hardwareimplementations of hash functions sha-1 and sha-512,” in Inter-national Conference on Information Security. Springer, 2002,pp. 75–89.

[12] Paul, Goutam and Maitra, Subhamoy, RC4 stream cipher and itsvariants. CRC press, 2011.

[13] Panneton, Francois and L’ecuyer, Pierre, “On the xorshift ran-dom number generators,” ACM Transactions on Modeling andComputer Simulation (TOMACS), vol. 15, no. 4, pp. 346–361,2005.

[14] Paar, Christof and Pelzl, Jan, Understanding cryptography: atextbook for students and practitioners. Springer Science &Business Media, 2009.

[15] Stallings, William, Cryptography and network security: princi-ples and practice. Pearson Upper Saddle River, NJ, 2017.

[16] Pierre L’Ecuyer and Richard J. Simard , “TestU01: A C libraryfor empirical testing of random number generators ,” ACM Trans.Math. Softw , 2007.

[17] Doty-Humphrey, C., “PractRand,” 2014. [Online]. Available:{http://pracrand.sourceforge.net/}

[18] Noura, Hassan and Martin, Steven and Al Agha, Khaldounand Chahine, Khaled, “ERSS-RLNC: Efficient and robust securescheme for random linear network coding,” Computer networks,vol. 75, pp. 99–112, 2014.

[19] C. Pham, “DIY low-cost LoRa IoT framework,”2016. [Online]. Available: {https://github.com/CongducPham/LowCostLoRaGw}

[20] Gerben den Hartog, “Efficient AES implementation for Arduino,”2016. [Online]. Available: {\url{https://github.com/Ideetron/RFM95W Nexus/tree/master/LoRaWAN V31}}

[21] C. Pham, “Low-cost, low-power and long-range image sensor forvisual surveillance,” in SmartObjects@MobiCom. ACM, 2016,pp. 35–40.

8


Recommended