• No results found

Applying Cuckoo Search for analysis of LFSR based cryptosystem

N/A
N/A
Protected

Academic year: 2021

Share "Applying Cuckoo Search for analysis of LFSR based cryptosystem"

Copied!
5
0
0

Loading.... (view fulltext now)

Full text

(1)

Availableonlineatwww.sciencedirect.com

ScienceDirect

j ou rn a l h o m e p a g e :w w w . e l s e v i e r . c o m / p i s c

Applying

Cuckoo

Search

for

analysis

of

LFSR

based

cryptosystem

Maiya

Din

a,∗

,

Saibal

K.

Pal

a

,

S.K.

Muttoo

b

,

Anjali

Jain

c

a

DRDO,Delhi,India

bDelhiUniversity,Delhi,India c

BanasthaliUniversity,Jaipur,India

Received26January2016;accepted9April2016 Availableonline 28April2016

KEYWORDS LFSR;

Swarmintelligence; CuckooSearch; Cryptanalysis

Summary Cryptographictechniquesareemployedforminimizingsecurityhazardstosensitive information.Tomakethesystemsmorerobust,cyphersorcryptsbeingusedneedtobeanalysed forwhichcryptanalystsrequirewaystoautomatetheprocess,sothatcryptographicsystems canbetestedmoreefficiently.Evolutionaryalgorithmsprovideonesuch resortastheseare capable ofsearchingglobaloptimalsolutionveryquickly. CuckooSearch(CS)Algorithmhas beenusedeffectivelyincryptanalysisofconventionalsystemslikeVigenereandTransposition cyphers.LinearFeedbackShiftRegister(LFSR)isacryptoprimitiveusedextensivelyindesign ofcryptosystems.Inthispaper,we analyseLFSRbasedcryptosystem usingCuckooSearchto findcorrectinitialstatesofusedLFSR.Primitivepolynomialsofdegree11,13,17and19are consideredtoanalysetextcryptsoflength200,300and400characters.Optimalsolutionswere obtainedforthefollowingCSparameters:Levydistributionparameter(ˇ)=1.5andAlieneggs discoveringprobability(pa)=0.25.

©2016PublishedbyElsevierGmbH.ThisisanopenaccessarticleundertheCCBY-NC-NDlicense (http://creativecommons.org/licenses/by-nc-nd/4.0/).

Introduction

Inpresentworldofcommunication,confidentiality,integrity and availability of a message can be ensured only if the

ThisarticlebelongstothespecialissueonEngineeringand

Mate-rialSciences.

Correspondingauthor.Tel.:+918585943774;fax:+9123812683.

E-mailaddresses:[email protected](M.Din), [email protected](S.K.Pal),[email protected] (S.K.Muttoo),[email protected](A.Jain).

content is encrypted before transmission using crypto-graphictechniques.Ononehandwherecryptographydeals with the encryption of messages, cryptanalysis (Bhateja etal., 2015; Heydari and Senejani, 2014) is another side ofcryptographyused,tofindplaintextwithoutknowingthe key.Cryptanalysisrequireslargenumberofpossiblekeysto betested for most of thecryptographic algorithms which makesitatimeconsumingprocess,thusmakingtheresults obsoleteanduselessifnotobtainedintime.Cryptanalysis thusformsasubsetofhardoptimizationproblemsasthese cannotbesolvedwithinreasonabletimebyusingstandard, mathematicalanddeterministicmethods.Researchisbeing

http://dx.doi.org/10.1016/j.pisc.2016.04.098

2213-0209/©2016PublishedbyElsevierGmbH.ThisisanopenaccessarticleundertheCCBY-NC-NDlicense(http://creativecommons.org/ licenses/by-nc-nd/4.0/).

(2)

carriedoutinfindingautomatedwaystocomputeoptimal solutionstotheseproblems andit hasbeenobservedthat meta-heuristicsinspiredbynatureprovidepromisingresults inthisfield.

In this paper, we use Linear Feedback Shift Register (LFSR) (Som and Ghosh, 2012) based PN sequence for encrypting the plaintext and an evolutionary algorithm (CuckooSearchAlgorithm)for findingthekeyfor decrypt-ingthecyphertext.WeuseLFSRwithprimitivepolynomials forencryptionasthisapproachmakesthekeymoresecure anddifficult toguessbytheintruder.CuckooSearch Algo-rithmdevelopedbyYangandDeb(2010a)isanatureinspired techniquewhichusestheLevybehaviourshownbyvarious animals.Newsolutionsaregeneratedaroundthebest solu-tionobtainedsofarwhichspeedupthelocalsearchbutalso employsfarfieldrandomizationwhichpreventsthetrapping ofsystem in a localoptimum. This inspires toinvestigate theapplicabilityofCuckooSearchincryptanalysisofLFSR basedcryptosystems.Literaturereviewsectiongivesabrief literaturereviewandLinearFeedbackShiftRegister(LFSR) sectionprovidesadescriptionofLFSR.CuckooSearch(CS) Algorithm section describes the Cuckoo Search Algorithm withthe sub-sections giving a briefinsight in the mathe-maticalfoundationsandtheapproachusedintheanalysis. Fitnessor objectivefunction section describes the fitness orobjectivefunction usedforexperimentation, resultsof whicharepresentedinExperimentalresultssection.

Literature

review

Swarmintelligence has emerged asan important subfield of artificial intelligence withpromising research opportu-nitiesandappreciableresultswhenappliedtothefieldof computationalproblems. Millonas(1994) putsforwardthe basic idea behind swarm intelligence as employing many simple agents which arepreferably present in the nature which in turn lead to an emergent global behaviour as no rule is applied to them. The general principles that provideachannelizedapproachtowardsswarmintelligence explainedinthispaperhelpsinunderstandingthecommon behaviourexhibitedbythevariousswarmslikeantcolonies, fishschools,beecoloniesetc.andaidsindrawinga mathe-maticalformulationforthebehaviour.Thesemathematical formulations help in drawing meta-heuristic algorithms derivedfromnaturelikeAntColonyOptimization(ACO),Bee Colony Optimization, Particle Swarm Optimization (PSO), Cuckoo Search Algorithm (CSA), etc. Meta-heuristic algo-rithms (Yangand Deb,2010b) aregeneral purposesearch algorithms that enable complexsearch spaces to be tra-versed in search of optimal or high quality solutions toa givenproblem.

DanzigerandHenriques(2011)givesan insightintothe factthattheconceptofswarmintelligenceorbio-inspired computingalgorithms can beappliedtothe fieldof cryp-tography.Khan etal.(2013)propose anovelswarmbased attackcalledAntColonyOptimizationtothecryptanalysisof DataEncryptionStandard (DES).DadhichandYadav(2014)

givea cryptanalytic approach towards 4 round DES using swarmintelligenceand evolutionarycomputation. Geetha andGeorgeAmalarethinam(2015)haveproposedABCRNG, i.e.ArtificialBeeColonyRandomNumberGenerationwhich

can be applied to the Public Key cryptography. Yang and DebproposedanewalgorithmcalledCuckooSearch(Tuba, 2013)whichwasinspiredbythebroodparasitismexhibited bycuckoos.Thisapproachwasmathematicalsoundwitha greatamountofrandomnesswhichmakesitquiteidealto beusedinthefieldofcryptographyasrandomnessprovides strengthtothecodethusincreasingthesecurity.

Linear

Feedback

Shift

Register

(LFSR)

Stream cyphers (Stallings, 2006) are type of Symmetric-Key cryptosystemsthatencrypts plaintext onebit/byteat a time.Pseudorandom numbersequences(PNS) (Som and Ghosh,2012)aresequenceswhosepropertiesapproximate thepropertiesofsequencesofrandomnumbers.Theseare nottrulyrandom,becauseitiscompletelydeterminedbya relativelysmallsetofinitialvalues.

LFSRs are used in a stream cypher to generate linear sequencesofpseudorandomnumbers.Theyrequireveryless hardwareandhavehighspeedofoperations.An-stageLFSR is of maximum length if initial states repeat after every (2n1)bits.Thecontentsoftheregistersareshiftedbyone

positionateachclock.Theleft-mostbitfedtotheregisteris theresultofmod-2additionofbitscorrespondingtothe non-zero coefficients of considered primitivepolynomial. The right most bit is used toformthe pseudorandom number sequence.Allinitialstatesshouldnotbe‘‘0’’sbecausethe LFSRwouldremainlocked-upinthesestates.

Cuckoo

Search

(CS)

Algorithm

Cuckoo Search Algorithmwasdeveloped by Yangand Deb (2010a)in2009inspiredbytheuniqueaggressive reproduc-tionstrategyofcuckoobirds.Cuckoobirdsengageinbrood parasitisminwhichabirdlaysandabandonsitseggsinthe nestofanotherspecies,whichactassurrogateparentsand unwillinglyraiseherbrood.Someeggscanevenmimicthe colourofthehost bird’seggsandcanalsoproducesounds similartoitschicksinordertodupethehostbird.Somehost birdsdonotbehavefriendlywiththese‘intruders’andget involvedinadirectconflict,inwhichtheythrowawaythe alieneggs.Otherwise,thehostbirdsjustabandontheeggs andnestandbuildanewnestsomewhereelse.

DescriptionoforiginalCSAlgorithm

Cuckoo Search Algorithm is one of the powerful nature-inspired population based stochastic global search meta-heuristictechnique.Forallsuchnatureinspiredalgorithms fundamentalissueisthebalancebetweentheuseoffound good solutions, i.e. exploitation and investigation of new areasofsearchspace,i.e.farfieldrandomizationinorder toavoidbeingtrappedinlocalminima,i.e.exploration.This algorithmfindsthisbalancebyemployinglevyflight accord-ingtolevydistributionwithinfinitemeanandvariance.The threemainidealizedapproximationrulesonwhichthe algo-rithmisbasedareasfollows:

• Eachartificialcuckoocanlayonlyoneeggatatimeand dumpsitinarandomlychosennest.

(3)

• Thebestnestswithhighqualityeggswillbepassedtothe nextgeneration.

• Hostnestnumberisnotadjustable,i.e.itisfixedandthe egglaidbythecuckooisdiscoveredbythehostbirdwith a probability,pa∈[0,1].In thiscase, thehost bird can eitherthrowawaytheeggorabandonthenestandbuild anewnest.

In this algorithm, potential solutions correspond to cuckooeggs.Tomakethingsevensimpler,thelast assump-tioncanbeapproximatedbythefractionpaof‘n’nestsin current iteration which needs tobe replacedby the new nests,i.e.newrandomsolutionsinthenextiteration.

Mathematicalformulation

Whileflying, someinsects and animalsfollow the pathof long trajectories withsudden right angle turns combined withshort,randommovements.Thisrandomwalkiscalled Levy flight (Yang et al., 2013), named after the French mathematicianPaul PierreLevy.This behaviour is usedin generatingnewsolutionforacuckooinCSalgorithm accord-ingtothefollowingequation:

x(t+1) i =x

(t)

i +˛ˆLevy() (1)

where˛(˛>0)isthestepsizewhichisadjustedaccordingto thescaleoftheproblemofinterest.Inmostcases,˛canbe unity or someother constant.This equationsuggests that therandomwalkis aMarkov chain,i.e. thenextlocation dependsonpresent locationgivenbythefirsttermofthe equationandthetransitionprobabilityrepresentedbythe secondterm.

The transition probability advocates entry wise multi-plicationwhichmakestheexplorationofthesearchspace moreefficientasstepsizeincreasesexponentially.The ran-domsteplengthfollowstheLevydistributionwhichhasan infinitevariancewithaninfinitemean:

Levy∼u=t−, where1<3. (2)

CuckooSearchforcryptanalysisofLFSR

LFSRisusedtogeneratekeystreambitsbyprimitive poly-nomials.GeneratedPNsequenceisusedforencryptingthe plain textmessages. The plain messageis converted into binarymessageusingMurraycode.Thebinaryplainmessage is XORed withthe keystream bits toget encrypted mes-sage.Togetplainmessage,wegeneratekeystreambitsand XORthemwithencryptedmessage.Tofindthekeyfor deci-pheringencryptedmessageCuckooSearchbasedapproach isused.Inthisapproachfollowingstepsareinvolved:

Generatingthehabitat:Thedegreeoftheprimitive poly-nomialisenteredusingwhichthetotalnumberofsolutions is calculated using the formula 2ˆn−1 where n is the degreeofthepolynomial.Asthenumberofprobable solu-tionsincreaseswiththedegreeofthepolynomial,weuse clusteringmethodforfindingouttheoptimalsolution(s). Anapproximateclustersizeiscalculatedbyroundingoff thevalueobtainedby2ˆn/n.

Initialization of CuckooSearch parameters: Number of nestswillbeequaltotheclustersizecalculated.Valuesfor alieneggsdiscoveringprobability(pa),stepsizeparameter

(˛),Levydistributionparameter(ˇ)andsigma()areset experimentally.

Initializationofdiscretenestsoreggsofhostbirds:From the clustersformed out oftotal possible nests,the nest withthemaximumscorefortheobjectiveorfitness func-tionisusedastheinitialbestnest.Usingthisinitialvalue thestepsizeiscalculated.

GenerationofnewnestsusingLevyflights:Newnestsare generatedusingLevyflightssimulatedbyMantegna’s algo-rithm(Mantegna,1994).Thebestnestisreplacedwiththe currentbestifthevalueofthefitnessfunctionisgreater thanthecalculatedfitnessfunctionvalue.

Discoveryofalieneggsorworsenests:Afractionofworst nests are discovered with the probability pa. A random number is generated and ifthe probabilitypa is greater thantherandomnumberthenanewsolutionisgenerated bybiasedorselectiverandomwalks.Theexistingbestnest isreplacedwiththenewsolutionifitisbetterinquality.

Criterionforstopping:Newnestsaregeneratedandalien eggsorworstnestsarediscoveredusingtheproposedsteps until the clusters reachtheir maximum value. The best nests from each cluster arewritten toa file for further analysis.

Fitness

or

objective

function

Fitnessfunctionisusedtoobtainthebestsolution(s)within alargesolutionspace.Itindicatestheproximityofthe pos-siblesolution(s)tothedesiredsolution.ForanalysisofLFSR, afitnessfunctionisusedwhichgivehighscoreforapieceof textsimilartoEnglishplaintextwhilelowforrandomtext. The fitness function is based on15 most frequent mono-grams, bigrams and trigrams as found by Norvig through experimentation.Theformulausedforfindingfitnessvalue is: Fitness= ⎛ ⎝ 15 i=1Fi×Wi  ×100 L ⎞ ⎠

whereFiisthefrequencyoffeaturesasmonograms,bigrams andtrigrams,Listhemessagelength,Wiistheweightsof firstmostfrequent15monograms,bigramsandtrigrams.

Usingthisformula,anaveragefitnessvalueiscalculated whichisusedasathresholdvalueforcomparingthequality oftheobtainedprobablesolutions.Asolutiongeneratinga decryptedtextofhigher fitnessvaluethan theaverage is consideredoneoftheoptimalsolutions.Forthisatextfile (size59KB)ofnormalEnglishtextfromvariousbooksand articleswascreated.Textfileafterremovingofallspecial charactersandnumeralsisusedforcalculatingathreshold averagefitnessfunctionvalue.

Experimental

results

TheschemeofanalysingLFSRbasedcryptosystemis imple-mentedinMATLAB®on2.8GHzPC.Englishtextofsize200,

(4)

Table1 Textlength=200characters,ˇ=1.5.

Poly.degree n=10 n=15

Pa=0.2 Pa=0.25 Pa=0.4 Pa=0.2 Pa=0.25 Pa=0.4

11 CPUtime(insec) 41.51 40.86 41.20 41.24 40.70 40.83

Bestfitnessvalue 2.64 2.64

13 CPUtime(insec) 483.67 480.57 482.51 482.18 480.10 483.21

Bestfitnessvalue 2.64 2.64

17 CPUtime(insec) 69,390 69,134 68,890 69,402 68,102 69,256

Bestfitnessvalue 2.63 2.63

19 CPUtime(insec) 276,543 277,534 277,560 277,542 266,545 276,459

Bestfitnessvalue 2.63 2.63

Table2 Textlength=300characters,ˇ=1.5.

Poly.degree n=10 n=15

Pa=0.2 Pa=0.25 Pa=0.4 Pa=0.2 Pa=0.25 Pa=0.4

11 CPUtime(insec) 57.05 57.94 57.30 57.25 57.56 57.27

Bestfitnessvalue 2.68 2.68

13 CPUtime(insec) 673.30 670.01 673.26 673.29 669.30 673.18

Bestfitnessvalue 2.68 2.68

17 CPUtime(insec) 92,520 91,562 92,678 91,672 91,529 92,561

Bestfitnessvalue 2.68 2.68

19 CPUtime(insec) 360,799 368,800 360,800 360,695 359,765 360,799

Bestfitnessvalue 2.68 2.68

Figure1 Fortextlength:200characters.

300and400charactersareusedfor analysingresults.The polynomialsusedforencryptingthetextareofdegree11, 13, 17 and 19. Murray code is used for obtaining binary text.Experimentationwascarriedoutwithdifferent param-etersof theCSalgorithm.Probabilityofdiscoveringworst nests (pa) are assigned three different values, i.e. 0.2, 0.25 and 0.4. Value of ˇ is varied between three values (1.1,1.5 and1.8). The valuesof searchdomainsare also variedand assignedthreevalues,i.e. 10,15and 20. Cor-rectinitialstatesofLFSRhavebeenobtainedforprimitive

Figure2 Fortextlength:300characters.

polynomialofdegree11,13,17and19.Accordingto plot-tedgraphs(Figs.1and2)andresultsgiveninTables1and2

fortextlength200and300characters,computationaltime increasesasdegreeofprimitivepolynomialincreases.

Conclusion

We have developed novel approach for analysis of LFSR based cryptosystemusingCuckoo Search. Developedcode hasbeen tested for varying parametersasdefinedabove.

(5)

The optimumsolutions wereobtainedwhen ˇ=1.5, n=15 andpa=0.25.Cuckoo Searchmayalsobe appliedin anal-ysis of Non-LinearFeedback ShiftRegister (N-LFSR)based Cryptosystems.

Conflict

of

interest

Theauthorsdeclarethatthereisnoconflictofinterest.

References

Bhateja,A.K.,etal.,2015.CryptanalysisofVigenerecipherusing cuckoosearch.Appl.SoftComput.26,315—324,Elsevier. Danziger,M.,Henriques,M.A.A.,2011.ComputationalIntelligence

Applied on Cryptology: A Brief Review. CIBSI, Bucaramanga, Colombia.

Dadhich,A.,Yadav,S.K.,2014.Swarmintelligenceandevolutionary computationbasedcryptographyand cryptanalysisof4-round DESalgorithm.Int.J.Adv.Res.Comput.Eng.Technol.(IJARCET) 3(5).

Geetha,J.S.,GeorgeAmalarethinam,D.I.,2015. ABCRNG-swarm intelligenceinpublickeycryptographyforrandomnumber gen-eration.Int.J.FuzzyMath.Arch.6(2).

Heydari, M., Senejani, M.N., 2014. Automated cryptanalysis of transpositionciphersusingcuckoosearchalgorithm.Int.J. Com-put.Sci.Mob.Comput.3(1),140—149.

Khan,S.,Ali,A.,Durrani,M.Y.,2013.Ant-crypto,acryptographer fordataencryptionstandard.Int.J.Comput.Sci.Issues(IJCSI) 10(1).

Mantegna,R.N.,1994.Fast,accuratealgorithmfornumerical sim-ulation of Levy stablestochastic processes. Phys.Rev. E 49, 4677—4683.

Millonas,M.,1994.Swarms,PhaseTransitions,andCollective Intel-ligence.Addison-WesleyPublishingCompany,Reading. P.Norvig,EnglishLetterFrequencyCounts:MayznerRevisited,

Avail-ableat:http://norvig.com/mayzner.html—Online.

Stallings,W.,2006.CryptographyandNetworkSecurity:Principles andPractices,5thed.Printice-Hall,UpperSaddleRiver,NJ. Som,S.,Ghosh,S.,2012.Astreamciphercryptosystembasedon

LFSR.Int.J.Math.Arch.3(2),362—372.

Tuba,M.,2013.Cuckoosearchoptimizationmetaheuristic adjust-ment.RecentAdv.Knowl.Eng.Syst.Sci.

Yang,X.-S., Deb,S.,2010a.Engineering optimizationbycuckoo search.Int.J.Math.Model.Numer.Optim.1(4),330—343. Yang,X.-S., Deb, S.,2010b. Nature-Inspired Metaheuristic

Algo-rithms,2nded.LuniverPress,UnitedKingdom.

Yang,X.-S.,Cui, Z., Xiao, R.,Gandomi,A.H., Karamanoglu,M., 2013.SwarmIntelligenceandBio-InspiredComputation:Theory andApplications,1sted.Elsevier.

References

Related documents

Structural, Electrical And Magnetic Characteristics Of Nickel Substituted Cobalt Ferrite Nano Particles, Synthesized By Self Combustion Method.. Preparation And Microwave

The importance of facial expression system is widely recognized in social interaction and social intelligence. The system analysis has been an active research

T h e tetrads were also tested on YEP alcohol plates containing 1 mM 2-deoxyglucose; spores that did not grow on this plate were invariably able to grow on

1 Coevolution Takes the Sting Out of It Evolutionary Biology and Mechanisms of Toxin Resistance in Animals Kevin Arbuckle1,2,*, Ricardo C Rodr?guez de la Vega3?, and Nicholas R Casewell4?

Importantly, this planning process in the Mississippi Gulf Coast provided evidence of the lack of accurate and tested estimates of food waste generation in some stages of the

The OAS/RNase L system represents an important component of the IFN- dependent antiviral response (Samuel, 2001). The proteins of the OAS family polymerize.. ATP into oligoA that

A sample child (SC) in each family was randomly selected for the Sample Child Core and CAL supplement. The Family Core collected data on socio-demographics, insurance status,