История
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:
Частичен Theoffsetis10:Avocat(A→K)
Theoffsetis13:ROT13
Теофсетис-5: Касис (K6)
Theoffsetis-6: Касета (K7)
Разбиване на пароли
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):
Обикновен текст: ABCDEFGHIJKLMNOPQRSTUVWXYZ;
Шифрова текстова азбука: DEFGHIJKLMNOPQRSTUVWXYZABC.
Whenusing,theencryptorfindsthelocationofeachletterinthemessagethatneedstobeencryptedintheplaintextalphabet,andwritesdownthecorrespondingletterintheciphertextalphabet.Thepersonwhoneedstodecryptwilloperateinverselyaccordingtothepreviouslyknownkeytogettheoriginalplaintext.Forexample:
Plaintext:THEQUICKBROWNFOXJUMPSOVERTHELAZYDOG;
Шифран текст: WKHTXLFNEURZQIRAMXPSVRYHUWKHODCBGRJ.
Методите за криптиране и декриптиране на Caesarcipher могат също да бъдат изчислени чрез математическия метод на конгруентност. Първо, заменете буквите с числа, A=0, B=1,..., Z=25. По това време методът за криптиране с отместване е:
Декриптиране: