CommunicationTheoryofSecrecySystems*ByC.E.SHANNON1.INTRODUCTIONANDSUMMARYTHEproblemsofcryptographyandsecrecysystemsfurnishaninterestingapplicationofcommunicationtheory.'Inthispaperatheoryofsecrecysystemsisdeveloped.Theapproachisonatheoreticallevelandisintendedtocomplementthetreatmentfoundinstandardworksoncryptography.There,adetailedstudyismadeofthemanystandardtypesofcodesandciphers,andofthewaysofbreakingthem.Wewillbemoreconcernedwiththegeneralmathematicalstructureandpropertiesofsecrecysystems.Thetreatmentislimitedincertainways.First,therearethreegeneraltypesofsecrecysystem:(1)concealmentsystems,includingsuchmethodsasinvisibleink,concealingamessageinaninnocenttext,orinafakecoveringcryptogram,orothermethodsinwhichtheexistenceofthemessageisconcealedfromtheenemy;(2)privacysystems,forexamplespeechinversion,inwhichspecialequipmentisrequiredtorecoverthemessage;(3)truesecrecysystemswherethemeaningofthemessageisconcealedbycipher,code,etc.,althoughitsexistenceisnothidden,andtheenemyisassumedtohaveanyspecialequipmentnecessarytointerceptandrecordthetransmittedsignal.Weconsideronlythethirdtype-concealmentsystemsareprimarilyapsychologicalproblem,andprivacysystemsatechnologicalone.Secondly,thetreatmentislimitedtothecaseofdiscreteinformation,wherethemessagetobeencipheredconsistsofasequenceofdiscretesymbols,eachchosenfromafiniteset.Thesesymbolsmaybelettersinalanguage,wordsofalanguage,amplitudelevelsofaquantizedspeechorvideosignal,etc.,butthemainemphasisandthinkinghasbeenconcernedwiththecaseofletters.Thepaperisdividedintothreeparts.Themainresultswillnowbebrieflysummarized.Thefirstpartdealswiththebasicmathematicalstructureofsecrecysystems.Asincommunicationtheoryalanguageisconsideredto,.ThematerialinthispaperappearedoriginallyinaconfidentialreportAMathematicalTheoryofCryptographydatedSept.1,1945.whichhasnowbeendeclassified.IShannon,C.E.,AMathematicalTheoryofCommunication,BellSystemTechnicalJournal,July1948,p,379;Oct.1948,p.623.2See,forexample,H.F.Gaines,ElementaryCryptanalysis,orM.Giviergc,CoursdeCryptographic.656CO.lIM['NICATIONTHEORYOFSECREel'SYSTEMS657berepresentedbyastochasticprocesswhichproducesadiscretesequenceofsymbolsinaccordancewithsomesystemofprobabilities.AssociatedwithalanguagethereisacertainparameterDwhichwecalltheredundancyofthelanguage.Dmeasures,inasense,howmuchatextinthelanguagecanbereducedinlengthwithoutlosinganyinformation.Asasimpleexample,sinceualwaysfollowsqinEnglishwords,theumaybeomittedwithoutloss.ConsiderablereductionsarepossibleinEnglishduetothestatisticalstructureofthelanguage,thehighfrequenciesofcertainlettersorwords,etc.Redundancyisofcentralimportanceinthestudyofsecrecysystems.Asecrecysystemisdefinedabstractlyasasetoftransformationsofonespace(thesetofpossiblemessages)intoasecondspace(thesetofpossiblecryptograms).Eachparticulartransformationofthesetcorrespondstoencipheringwithaparticularkey.Thetransformationsaresupposedreversible(non-singular)sothatuniquedecipheringispossiblewhenthekeyisknown.Eachkeyandthereforeeachtransformationisassumedtohaveanaprioriprobabilityassociatedwithit-theprobabilityofchoosingthatkey.Similarlyeachpossiblemessageisassumedtohaveanassociatedaprioriprobability,determinedbytheunderlyingstochasticprocess.Theseprobabilitiesforthevariouskeysandmessagesareactuallytheenemycryptanalyst'saprioriprobabilitiesforthechoicesinquestion,andrepresenthisaprioriknowledgeofthesituation.Tousethesystemakeyisfirstselectedandsenttothereceivingpoint.Thechoiceofakeydeterminesaparticulartransformationinthesetformingthesystem.Thenamessageisselectedandtheparticulartransformationcorrespondingtotheselectedkeyappliedtothismessagetoproduceacryptogram.Thiscryptogramistransmittedtothereceivingpointbyachannelandmaybe'interceptedbytheenemy*.Atthereceivingendtheinverseoftheparticulartransformationisappliedtothecryptogramtorecovertheoriginalmessage.Iftheenemyinterceptsthecryptogramhecancalculatefromittheaposterioriprobabilitiesofthevariouspossiblemessagesandkeyswhichmighthaveproducedthiscryptogram.Thissetofaposterioriprobabilitiesconstituteshisknowledgeofthekeyandmessageaftertheinterception.Knowledgeisthusidentifiedwithasetofpropositionshavingassociatedprobabilities.Thecalculationoftheaposterioriprobabilitiesisthegeneralizedproblemofcryptanalysis.Asanexampleofthesenotions,inasimplesubstitutioncipherwithrandomkeythereare261transformations,correspondingtothe26!wayswe*Thewordenemy,stemmingfrommilitaryapplications,iscommonlyusedincryptographicworktodenoteanyonewhomayinterceptacryptogram.658BELLSYSTEMTECHNlCALJOURNALcansubstitutefor26differentletters.Theseareallequallylikelyandeachthereforehasanaprioriprobabilityi/26!.IfthisisappliedtonormalEnglishthecryptanalystbeingassumedtohavenoknowledgeofthemessagesourceotherthanthatitisproducingEnglishtext,theaprioriprobabilitiesofvariousmessagesofNlettersaremerelytheirrelativefrequenciesinnormalEnglishtext.IftheenemyinterceptsNlettersofcryptograminthissystemhisprobabilitieschange.IfNislargeenough(saySOletters)thereisusuallyasinglemessageofaposterioriprobabilityn