Caesarův kodex

ThesynonymCaesarpasswordgenerallyreferstotheCaesarpassword.

Dějiny

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.

Pojem

Incryptography,Caesarcipher(English:Caesarcipher),orCaesarencryption,CaesarTransformandTransformEncryptionarethesimplestandmostwidelyknownencryptiontechnologies.Itisareplacementencryptiontechnologyinwhichalllettersintheplaintextareshiftedbackward(orforward)inthealphabetbyafixednumberandthenreplacedwithciphertext.Forexample,whentheoffsetis3,alllettersAwillbereplacedwithD,BwillbecomeE,andsoon.ThisencryptionmethodisnamedafterCaesarduringtheRomanRepublic,whenCaesarusedthismethodtocommunicatewithhisgenerals.

TheCaesarcipherisoftenusedasastepinothermorecomplexencryptionmethods,suchastheVirginiacipher.TheCaesarcipherisalsousedinthemodernROT13system.However,likeallencryptiontechnologiesthatusealphabetstoreplace,theCaesarcipherisveryeasytobecracked,andcommunicationsecuritycannotbeguaranteedinpracticalapplications.

Specifické Caesarpasswordname

Accordingtotheoffset,thereareseveralspecificCaesarpasswordnames:

  • PartialTheoffsetis10:Avocat(A→K)

  • Theoffsetis13:ROT13

  • Theoffsetis-5:Cassis(K6)

  • Theoffsetis-6:Cassette(K7)

Cracking hesel

Evenifaciphertextattackisused,theCaesarcipherisaveryeasyencryptionmethodtocrack.Theremaybetwosituationstoconsider:

(1)Theattackerknows(orguesses)thatasimplealternativeencryptionmethodisusedinthepassword,butisnotsurethatitistheCaesarpassword;

(2)Útočník ví (hádá), že je použit Caesarcipher, ale nezná offset.

Forthefirstcase,theattackercanusemethodssuchasfrequencyanalysisorpatternwordanalysistoimmediatelyseethepatternfromtheanalysisresults,andconcludethattheencryptorusestheCaesarcipher.

Forthesecondcase,thesolutionisevensimpler.Sincethelanguages​​encryptedbytheCaesarcipheraregenerallyalphabetictextsystems,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.

Příklad

ThereplacementmethodoftheCaesarcipheristoarrangetheplaintextandciphertextalphabets.TheciphertextlettersindicatethatbymovingtheplaintextalphabettotheleftorrightafixednumberLocation.Forexample,whentheoffsetisshiftedtotheleftby3(thekeyfordecryptionis3):

Abeceda jednoduchého textu:ABCDEFGHIJKLMNOPQRSTUVWXYZ;

Šifrová abeceda:DEFGHIJKLMNOPQRSTUVWXYZABC.

Whenusing,theencryptorfindsthelocationofeachletterinthemessagethatneedstobeencryptedintheplaintextalphabet,andwritesdownthecorrespondingletterintheciphertextalphabet.Thepersonwhoneedstodecryptwilloperateinverselyaccordingtothepreviouslyknownkeytogettheoriginalplaintext.Forexample:

Otevřený text:THEQUICKBROWNFOXJUMPSOVERTHELAZYDOG;

Šifrovaný text:WKHTXLFNEURZQIRAMXPSVRYHUWKHODCBGRJ.

Metoda šifrování a dešifrování Caesarciferkanálů se vypočítává pomocí matematické metody kongruence. Nejprve nahraďte písmena čísly, A=0, B=1,...,Z=25. V současné době je metoda šifrování s offsetem:

Dešifrování:

Související články
HORNÍ