Историја
AccordingtoSuvitonius’records,Caesarusedthismethodtoencryptimportantmilitaryinformation:
Ifyouneedtokeepitsecret,useapasswordintheletter,thatis,changethealphabeticalordersothatoutsiderscannotformaword.Ifyouwanttoreadandunderstandtheirmeaning,youhavetoreplacethefirstletterwiththefourthletter,thatis,replaceAwithD,andsoon.
Similarly,Augustusalsousedasimilarmethod,exceptthathemovedtheletteroneplacetotheright,andtheenddidnotturnback.Wheneverhewritesinasecretlanguage,heusesBforAandCforB.Therestofthelettersfollowthesamerules;heusesAforZ.
Inaddition,thereisevidencethatCaesarhasusedamorecomplexcryptographicsystem:grammaristProbusoncewroteauniqueandinnovativemanuscript,studyingthesecretscontainedinCaesar’slettersLettersofinformation.
IthasbeenimpossibletofigureouthoweffectivetheCaesarcipherwasatthetime,buttherearereasonstobelievethatitissafe.BecausemostofCaesar'senemiesareilliterate,andtherestmayregardthesenewsasanunknownforeignlanguage.EvenifanenemyobtainedtheencryptedinformationofCaesar,accordingtotheexistingrecords,therewasnotechnologyatthattimetosolvethismostbasicandsimplereplacementpassword.Theearliestsurvivingmethodofcrackingisrecordedinthe9thcenturyArabbookbyAlKendiontheanalysisofthefrequencyofdiscovery.
Концепт
Incryptography,Caesarcipher(English:Caesarcipher),orCaesarencryption,CaesarTransformandTransformEncryptionarethesimplestandmostwidelyknownencryptiontechnologies.Itisareplacementencryptiontechnologyinwhichalllettersintheplaintextareshiftedbackward(orforward)inthealphabetbyafixednumberandthenreplacedwithciphertext.Forexample,whentheoffsetis3,alllettersAwillbereplacedwithD,BwillbecomeE,andsoon.ThisencryptionmethodisnamedafterCaesarduringtheRomanRepublic,whenCaesarusedthismethodtocommunicatewithhisgenerals.
TheCaesarcipherisoftenusedasastepinothermorecomplexencryptionmethods,suchastheVirginiacipher.TheCaesarcipherisalsousedinthemodernROT13system.However,likeallencryptiontechnologiesthatusealphabetstoreplace,theCaesarcipherisveryeasytobecracked,andcommunicationsecuritycannotbeguaranteedinpracticalapplications.
СпецифицЦаесарпассворднаме
Accordingtotheoffset,thereareseveralspecificCaesarpasswordnames:
ПартиалТхеоффсетис10:Авоцат(А→К)
Тхеоффсетис13:РОТ13
Тхеоффсетис-5:Цассис(К6)
Тхеоффсетис-6:Касета (К7)
ПассвордЦрацкинг
Evenifaciphertextattackisused,theCaesarcipherisaveryeasyencryptionmethodtocrack.Theremaybetwosituationstoconsider:
(1)Theattackerknows(orguesses)thatasimplealternativeencryptionmethodisusedinthepassword,butisnotsurethatitistheCaesarpassword;
(2)Нападач зна (нагађа) да је Цезаршифер користио, али не зна да поништи.
Forthefirstcase,theattackercanusemethodssuchasfrequencyanalysisorpatternwordanalysistoimmediatelyseethepatternfromtheanalysisresults,andconcludethattheencryptorusestheCaesarcipher.
Forthesecondcase,thesolutionisevensimpler.SincethelanguagesencryptedbytheCaesarcipheraregenerallyalphabetictextsystems,theoffsetthatmaybeusedinthepasswordisalsolimited.Forexample,whenusing26-letterEnglish,itsoffsetisupto25(offset26isequivalenttooffset0,thatis,plaintext;iftheoffsetexceeds26,itisequivalenttooffset1-25).Therefore,itcanbeeasilycrackedbyexhaustivemethods.Oneofthemethodsistowritedownasmallfragmentoftheciphertextinthetableanduseallpossibleoffsetstodecryptthecontent-calledcandidateplaintext,andthenanalyzewhetherthecandidateplaintextinthetablehasactualmeaning,andgetthecorrectOffset,decrypttheentireciphertext.Forexample,theselectedciphertextfragmentis"EXXEGOEXSRGI".Fromthecandidateplaintextinthetableontheright,wecanquicklyseethatthecorrectoffsetis4.Itisalsopossibletowritedowntheotherlettersoftheentirealphabetverticallyundereachletterofeachciphertextword,andthenthroughanalysis,itcanbeconcludedthatoneofthelinesisplaintext.
Anothermethodofattackisthroughfrequencyanalysis.Whenthelengthoftheciphertextislargeenough,thefrequencyofeachletterintheciphertextcanbeanalyzedfirst,andthenthisfrequencycanbecomparedwiththefrequencyofoccurrenceofalllettersinthelanguagealphabetundernormalcircumstances.Forexample,inEnglish,thefrequencyofthelettersEandTinnormalplaintextisparticularlyhigh,whilethefrequencyofthelettersQandZisparticularlylow.InFrench,themostfrequentletterisE,andthelowestisKandW.Thisfeaturecanbeusedtoanalyzethefrequencyofciphertextletters,andthecorrectoffsetcanbeestimated.Inaddition,sometimesthefrequencyanalysiscanbeextendedfromletterstowords.Forexample,inEnglish,themostfrequentlyoccurringwordsare:the,of,and,a,to,in...Wecananalyzeitbycompilingallpossible25groupsofciphertextsofthemostcommonwordsintoadictionary.Forexample,QEBmaybethe,andMPQYmaybethewordknow(ofcourseitmayalsobeaden).However,frequencyanalysisalsohasitslimitations.Itisnotsuitablefordecryptingciphertextsthatareshortordeliberatelyomittedvowelsorotherabbreviations.
Inaddition,usingtheCaesarciphermultipletimestoencryptcannotachievegreatersecurity,becausetheresultobtainedbyusingoffsetAtoencryptandthenusingoffsetBtoencryptisequivalenttousingA+TheoffsetofBistheresultofencryption.
Пример
ThereplacementmethodoftheCaesarcipheristoarrangetheplaintextandciphertextalphabets.TheciphertextlettersindicatethatbymovingtheplaintextalphabettotheleftorrightafixednumberLocation.Forexample,whentheoffsetisshiftedtotheleftby3(thekeyfordecryptionis3):
Плаинтекталпхабет:АБЦДЕФГХИЈКЛМНОПКРСТУВВКСИЗ;
Ципхертекталпхабет:ДЕФГХИЈКЛМНОПКРСТУВВКСИЗАБЦ.
Whenusing,theencryptorfindsthelocationofeachletterinthemessagethatneedstobeencryptedintheplaintextalphabet,andwritesdownthecorrespondingletterintheciphertextalphabet.Thepersonwhoneedstodecryptwilloperateinverselyaccordingtothepreviouslyknownkeytogettheoriginalplaintext.Forexample:
Плаинтект:ТХЕКУИЦКБРОВНФОКСЈУМПСОВЕРТХЕЛАЗИДОГ;
Шифровани текст:ВКХТКСЛФНЕУРЗКИРАМКСПСВРИХУВКХОДЦБГРЈ.
Методе шифровања и дешифровања на каналу Цаесарципхер се такође израчунавају математичком методом конгруенције. Прво, замените слова бројевима, А=0,Б=1,...,З=25.У овом тренутку,метода шифровања са помаком:
Дешифровање: