Лесна парола за замяна
Simplereplacementencryptionisanencryptionmethodthatchangestheorderoflettersinthealphabetinaspecificwayandwritesinthisorder.Suchachangedalphabetiscalledthe‘replacementtable’.Thesubstitutiontablecanbeconstructedinanoffsetorreverse(CaesarandAtbashcode(English:Atbash),respectively)ormorecomplexways,inthiscaseitiscalleda‘hybridtable’.Traditionally,akeywordiswrittenatthebeginningofthealphabet,andthenrepeatedlettersaredeleted,sothatamixedtablecanbeobtained.
Пример
Използвайки системата за хибридни таблици, ключовата дума е "зебри":
TheplaintextisABCDEFGHIJKLMNOPQRSTUVWXYZ;theciphertextisZEBRASCDFGHIJKLMNOPQTUVWXY.
Чистият текст е:fleeatonce.weareddiscovered;резултатът от криптирането е:SIAAZQLKBA.VAZOARFPBLUAOAR.
Традиционно шифрованият текст ще допуска препинателни знаци и интервали и ще има единица с фиксирана дължина, за да се избегнат грешки при предаване и да се покажат границите на думите в обикновен текст без прикритие. Тези единици се наричат „групи“ (английски: групи), понякога наричани „брой групи“ (английски: брой групи) (брой групи), и правят на мениджъра допълнителна проверка чрез грамажа и обикновено се използват пет букви
SIAAZQLKBAVAZOARFPBLUAOAR
Ifthelengthoftheplaintextisnotdivisiblebyfive,itwillneedtobeattheendFillinwith"NULL".Theseemptycharacterscanbeanycharacters,becauseafterdecryption,itcanbeseenthattheyareobviousnonsense(suchasORANGEOOOO),sothereceivercaneasilyfindanddiscardthem.Ifthereceiverfindsthatthelengthoftheciphertextisnotdivisiblebyfive,itcanbeinformedthatthereisatransmissionerrorandrequestaretransmission.
Sometimesasimplereplacementpassworddoesnothavetobereplacedwithanotherletter.Forexample,inapigstypassword,theciphertextiscomposedofgridsymbols.
Theincreasedsecurityofthesefunctionsisnotmuchdifferentfrombefore,becausebasicallyallstrangesymbolswilleventuallybeconvertedintoA-Zletters.Sometimessalespeopleuseverysimpleencryptionintheirlistsandcatalogs:lettersareusedinsteadofnumbers.
Тази статия(номера):1234567890;шифровани букви:МАКЕЙПЕЧАЛБА.
Пример: MAT означава 120.
Сигурност
Thedisadvantageofsimplereplacementpasswordsisthatthelastfewlettersofthealphabet(mostofwhicharelowfrequency)tendtostayattheend.Thewaytostrengthenistodoacolumntranspositionagainafterencryption,butthisisoftennotdone.
Althoughthekeyusedforencryptionisverylikely(26!≈2^88.4,if88bits),itisextremelyeasytocracksingle-tableencryption.Aslongasareasonablelengthofciphertextisprovided,cryptanalysiscaninferthemeaningofthemostcommonunitthroughfrequencydistributionanalysis,thatis,frequencyanalysis.Thisallowsthecrackertousetheeliminationmethodtosolvethemeaningofaunit.Seeanexampleofcracking.Insomecases,itcanbedecipheredfromthepatternoftheirletters.Forexample,"attract"and"osseous"aretheonly"roots"ofthe"ABBCADB"modeinEnglish ,това,ако срещнете кодиран текст с проста парола за заместване "ABBCADB"може да се познае като "привличане" или "костно".Пъзелите за развлечение и вестници съдържат много такива методи за криптиране.
AccordingtotheEnglishuniquesolutiondistance(English:Unicitydistance),theaverageciphertextrequiresatleast27.6letterstocrackthesimplereplacementpasswordofthemixedtable.Undernormalcircumstances,itisassumedthatthenewarrangementisencountered,butusuallyabout50lettersarerequired(someoftheciphertextscanbeusedless).However,whentheciphertexthasanextremelyflatfrequencydistribution,thedemandforthelengthoftheciphertextmaybecomegreater.Atthesametime,theencryptorcanaddnullcharacterstocreateaflatfrequencydistribution.
Inaddition,thereisanotherwayto"fake"thefrequencydistribution,whichiscalledmissingcharacters.Asthenamesuggests,thesearticlesdeliberatelyavoidusingoneorafewspecificletters.IfitisEthatismissed,thenitisimpossibletofindtherealplaintextifwecontinuetoanalyzethenormalfrequency(estimatethehighestfrequencyasE).
Метод на хомофонично заместване
Inearlyencryption,inordertoincreasethestrengthofalternativepasswordstodealwithfrequencyanalysisattacks,sometimes"homonyms"wereusedtochangethefrequencyofplaintextletters.Inthisencryptionalgorithm,plaintextletterscanbemappedtomultipleciphertextsymbols.Normally,theplaintextsymbolswiththehighestfrequency(suchasE)willhavemorehomophonicsymbolsthanthelow-frequencyletters(suchasX),makingthefrequencydistributionflatterandmakinganalysismoredifficult.
Butalsobecauseofthis,justreplacingtheletterswitheachotherwillcauseinsufficientdistribution,andthereareseveraldifferentsolutions.Thesimplestwayistoreplacesomeletterswithatotalof10numbersfrom1-0.Anothermethodistoseparatetheexistinglettersintotheoriginalletterswithsimplechanges,uppercase,lowercase,upside-downletters,mirroredtext(leftandright),etc.Althoughitismoreartistic,itdoesnotmeanthatitissafer.Someofthehomophonicsubstitutionmethodsallusenewlyinventedstrangesymbolstorepresentletters.
Aninterestingchangeisnamednamingcryptography(English:nomenclator).Therearemanydifferentversionsofthisencryptionmethod,andthedifferencebetweenthemcomesfromitsprefix.Theprefixcomesfromthenameofthepublicofficialwhoannouncesthetitleofthevisitingguest.Thiskindofcipheriscombinedwithasmallcodebook(English:Codebook)toformalargehomophonicreplacementtable.Inthispassword,commonwordswillbeencryptedaccordingtothecodebook,andtheremainingletterswillbeencryptedaccordingtoanothercodebook.Thetwosymbolsarefinallymixedintheciphertexttoreducetheriskofcrackinginthesimplereplacementpassword.ThecodeusedbyLouisXIVwasagreatcodecreatedbytheRossignols(English:Rossignols),whichwasnotcrackeduntilahundredyearsaftertheabolitionoftheFrenchroyalfamily.
Fromtheearly15thcenturytothelate18thcentury,namedpasswordswerethemostcommonlyusedencryptionfordiplomaticdocumentsandspies,butmostofthemstillusednamedpasswordswithpoorencryptionperformance.Althoughcryptanalystsofgovernmentintelligenceagencieshavecrackedsomeofthenomenclaturecodessincethemiddleofthesixteenthcentury,theusualresponseofusersissimplytoincreasethehomophonicsubstitutiontable.Whenthehomophonicsubstitutionsystembegantodieoutinthelateeighteenthcentury,somenamedpasswordshadasmanyas50,000symbols.
However,notallnamedciphershavebeencracked.Tothisday,therearestillnewsthatnewnamedpasswordshavebeencrackedfromtimetotime.
TheBillCipherisanotherexampleofhomophonicsubstitution.ThisstoryreferstotheuseofanencryptedtexttohidethetreasuresdescribedintheUnitedStatesDeclarationofIndependencebetween1819and1821.Here,eachciphertextcharacterisreplacedbyanumber.ThenumberrepresentsthefirstletterofthefirstfewwordsintheDeclarationofIndependence.ManywordsintheDeclarationofIndependencehavethesamefirstletter,andtheciphertextnumbercanbeanyoneofthem.Forexample,thesecondandsixthwordsinthemaintextbothstartwith"I",thatis,"I"canbe2orItcanbe6.Theinterpretationisjusttoputthenumbersintheciphertext(suchasthealgebraX)intotheDeclarationofIndependence(thefirstletteroftheX-thword).
Starrdescribedanotherhomophonicreplacementpassword,whosepasswordwasthefirstattempttoencryptonacomputerdatabase.InStarr'smethod,bothplaintextandciphertextarestoredinbinarystrings,sothenumberofhomophonicsoundscanbeverylarge,makingfrequencyanalysismoredifficultthanusual.
Bookcipher(English:Bookcipher)andhashboardarebothakindofhomophonicreplacementcipher.
Криптиране на заместване на множество таблици
In1467,themulti-tablesubstitutionpasswordwasfirstdescribedintheformofadiscbyLeonBattistaAlberti.Atable(AncientGreek:tableau)isintroducedin"Steganography"(AncientGreek:Steganographia)byJohannesTritmius(seebelow;completedinthe15thcenturybutpublishedalongtimelater)).In1563,GiovanniBattistadelaPorta(English:Giovanni_Battista_della_Porta)describedamorecomplexmixed-letterversionin"HiddenCharactersinWriting"(AncientGreek:DeFurtivisLiterarumNotis).
Inamulti-tablereplacementpassword,multipleletterswillbeusedasthepassword.Inordertospeedupencryptionordecryption,alllettersareusuallywrittenonaform,whichiscalledtableauincryptography.Thiskindofformisusually26×26,becauseitcanfitall26Englishletters.Themethodoffillingintheformandselectingtheletterstobeusednexttimeistoreplacethedefinitionsbetweendifferentmulti-letterpasswords.Multi-letterreplacementpasswordsaremoredifficulttobreakthansingle-letterpasswords,becausetheyhavemorepossibilitiesforreplacementandrequirelongerciphertexts.
OneofthemostfamousistheVirginiaCodeintroducedbyGeovanBattistaBellasoin1585.Ithasnotbeencrackeduntil1863.TheFrenchcallit"acodethatcannotbedeciphered"(French:lechiffreindéchiffrable).(ThispasswordwasmistakenlythoughttobecreatedbyBrycedeVirginia,soitwascalledtheVirginiapassword.)
IntheVirginiapassword,thefirstrowofthetableJustfillin26lettersdirectly,andthenthelettersineachrowbelowareoffsetbyonespacetotheleft.(Thisiscalledatabletraverse,andmathematically,eachcolumniscongruence26.)Tousethiskindofpassword,youneedtouseakeywordasthekey.Repeateachtimethekeywordisusedup.Assumingthatthekeywordis"CAT",thefirstwordoftheplaintextisencryptedby"C",thesecondwordisencryptedby"A",thethirdwordisencryptedby"T",andthenbacktoCencryption,repeating.Thenencryptitaccordingtothepasswordtableontheright.Forexample,whenBALLusesCATasakeyword,itwillbeencryptedtoDAEN.Itcanbeseenthateventhesame"L"willbeencryptedtoanotherletter.Inreality,thekeywordsoftheVirginiapasswordareverylong.
In1863,MajorFriedrichKasiski(English:FriedrichKasiski)inventedamethod(itwassecretlyandindependentlyinventedbyCharlesBabbagebeforetheCrimeanWar)),whichmakesitpossibletocalculatethelengthofthekeywordintheVirginiapassword.Thismethodrequiresalongerciphertext,becauseitsoperationreliesonfindingthenumberofcommonwords(suchasTHE)thatusethesamekeywords(suchasABC).Therefore,itisdifficulttofindveryshortciphertextsbythismethod.
Therefore,eventoday,ifyouusehybridtableencryptioninthetable,orifthekeywordsarerandom,theVirginiacipheristheoreticallydifficulttocrack.Butbecausethesemethodsareactuallydifficulttouse,theuseofVirginiaciphersisbecominglessandless.
Друго добре известно криптиране със заместване на много букви включва:
Glanschfeldcipher-similartotheVirginiacipher,butbecausetheentirecipherusesonly10units,thekeyisThewordlengthislimitedanditiseasytocrack.BeaufortCipher-ThisisactuallytheVirginiaCipher,exceptthat"tabula"isshiftedbackwardbyonegrid,mathematicallytheequationis:ciphertext=key-plaintext.TheBeaufortcipherbelongstopeer-to-peerencryption,thatis,theencryptionalgorithmisthesameasthedecryptionalgorithm.Automatickeycipher-Ithasakeywordatthebeginningofthekey,followedbyarepetitionofplaintexttoavoidperiodicfunctions.Thesportskeypassword,keywordsaretakenfromsomearticlesorfamoussentences,soitcanbeverylong.
Itcanbeseenfrommodernstreamciphersthatmodernmulti-tablesubstitutionencryptionstrivestoimprovethestreamkeytomakeitaslongaspossibleandunpredictable.
Шифроване на замяна на формат на таблица
Inthetableformatreplacementpassword,theplaintextnolongerreplacesaletteralone,butreplacesalargerletterunit(usuallyapairofletters)atonetime).Thefirstadvantageisthatthefrequencydistributionisflatterthanthatofasingleletter(althoughitisactuallynotflat,becauseineverydaylanguage,"TH"ismuchmorecommonthan"XQ").Secondly,thelargenumberofsymbolsitgeneratesrequiresmoreciphertextforefficientletterfrequencyanalysis.
За да замените всяка "двойка" букви, ще са необходими общо 676 символа (26^2=676). В споменатата по-горе книга "Скрити знаци в писането", delaPorta предлага такава система: използвайте таблица 20x20 (20 букви на италиански или латински шрифт), която е попълнена с 400 специални глифа. Въпреки това, тази система е наистина по-непрактична,
TheearliestpracticaltableformatreplacementcodeisthePorefercodecreatedbySirCharlesWheatstonein1854.Inthispassword,the5×5squareisfilledwithmixedletters(twoletters,usuallyIandJaresidebyside,thatis,IequalsJ).Everytwolettersintheplaintextareaunit,usuallythisunitwillformasquareonthetable(thecontentoftheunitoccupiestwocorners),andthentaketheothertwocornersastheciphertext.Whenthecellcontentisinthesamecolumnorrow(thatis,itcannotformasquare),theciphertextofthesamecolumnistheplaintextoffsetbyonegrid;theciphertextofthesamecolumnistheplaintextoffsetbyonegrid.Forthetwounitswiththesameletter,addX(orQ)tothefrontofthelist(thatis,allofthemareshiftedbackbyonegrid).ThePoreficipherwasusedformilitarypurposesfromthebeginningoftheSecondBohrWaruntiltheSecondWorldWar.
През 1901 г. Феликс Деластеле (на английски: Felix_Delastelle) въвежда друга практична таблична форма за криптиране на заместване, включително парола за кодиране с две части (на английски: Bifid_cipher), с четири части и парола за криптиране с три части.
LesterS.Hill(English:LesterS.Hill)inventedtheHillcipherin1929,whichisatableformatreplacementencryption.Hillciphercanuselinearalgebratocombineunitswithverymanyletters.Eachletteristreatedasahexadecimalnumber:A=0,B=1,andsoon.(Insomevariants,3extrasymbolsareaddedtoturnthebaseintoaprimenumber.)Astringoflettersistreatedasann-dimensionalvector,multipliedbyann×nmatrix,andtheresultiscongruence26.Payattentiontothematrix(key)usedforencryption, в противен случай ще бъде невъзможно да се декодира. Само детерминантата на матрицата и 26 са взаимно прости, те са обратими.
BecausetheHillcipheriscompletelybasedonalinearrelationship,itwillbevulnerabletoknown-plaintextattack(English:Known-plaintextattack),therefore,sometimesitwillcombinesomenon-linearstepstoreducebeingbrokenchance.
Механично заместващо шифроване
ComputersthatwerewidelyusedduringtheFirstWorldWar(somegovernmentsbegantousetheminthe1950sand1960s;otherorganizationsLater,therewasnorecordofpersonalusebefore1975),makingthemulti-lettersubstitutionpasswordwidelyusedmechanically.Severalinventorshadsimilarideasatthesametime.Therewerefourpatentapplicationsforrotatingdisks(English:Rotormachine)in1919.OneofthemostimportantandfamousistheEnigmaciphermachineusedbytheGermanWehrmachtinthe1930s.Atthesametime,theAlliedforcesalsohadtheirownencryptionsystems:Sigaba(English:SIGABA)intheUnitedStatesandTypex(English:Typex)intheUnitedKingdom.
Thesimilaritybetweenthemisthattheybothusemechanicalrotatingdisksforencryption.Sincemorethanonerotatingdiskiscomposedofciphertext,ifeachwordisequippedwithasymbol,theamountofsymbolswillbehigherthantheastronomicalnumber.However,earlyversionsofthesemachinesareextremelyeasytocrack.WilliamF.FriedmanoftheSignalIntelligenceService,WilliamF.Friedman(English:WilliamF.Friedman)foundtheHebernRotor(English:Hebern_Rotor_Machine)vulnerabilitiesearlyon;GovernmentCryptographySchool(English:DillwynKnoxofGC%26CS(English:DillwynKnox)crackedtheversionoftheEnigmacipherwithoutaterminalboardbeforeWorldWarII.TheanalystsatBletchleyParkwereabletocrackthemilitaryversionoftheEnigmaciphermachineatalaterstage,inspiredbythePolishmathematicianMarianRejewski.
SIGABAandTypexencryptedmessageshavenotbeencrackedbythepublic.
Еднократен часовник
Еднократен часовникisaveryspecialreplacementpassword.ItwasestablishedbyJosephMauborgneinthelateWorldWarI.DuringtheSecondWorldWar,ClaudeShannonprovedmathematicallythatitssecrecywasunbreakable,andtheprocesswasfirstpublishedinlate1940.Incommonpractice,theone-timepadcanbereferredtoasaone-timereplacementpassword.Normally,theplaintextletterswillbecombined(notreplaced)withkeywordsinsomeway(usuallyalogicalexclusiveOR).
Еднократен часовникsareimpracticalordifficulttouseinmostcasesbecausetheyrequirekeywordstobethesame(orlonger)astheplaintext,"completely"random,andcanonlybeusedonce.Makesurethateveryoneexceptthesenderandreceiverdoesnotknow.Whenoneoftheseconditionsisnotimplemented,orevenonlyslightlyviolated,theone-timepadisnolongerindestructible,orevencollapsed.TheUnitedStatesusedanon-randomone-timepadtoencryptmessagesduringWorldWarIIbeforesendingthemtotheSovietUnion.Americancryptographershavebeenabletocrackveryfewone-timepadssincethe1940s.(SeetheVENONAproject(English:Venonaproject))
AftertheCubancrisis,theMoscow-Washingtonhotlinebegantouseone-timepasswordstoencryptmessages.
ModernAlternativeEncryption
Theabove-mentionedalternativepasswords,especiallythosemanualencryptionpasswordsthatonlyusepencilandpaper,arenolongerusedfrequently.However,eventoday,theconceptofreplacementencryptionisstilladvancing.Fromanovelperspective,modernbit-orientedblockciphers(suchasdataencryptionstandardsandhigh-levelencryptionstandards)canstillberegardedasalternativeencryptionusingalargenumberofbinaryletters.Inaddition,blockciphersusuallycontainasmallerreplacementtablenamedS-box(English:S-box),whichalsocontainsalogicalexclusiveORalgorithm.SeeSubstitution-permutation_network(English:Substitution-permutation_network).
Последователна подмяна на пароли
ROT5,ROT13,ROT18,ROT47encodingisasimplecodeelementpositionsequencereplacementpassword.Thistypeofcodeisreversibleandcanbeself-decrypted.Itismainlyusedtorespondtofastbrowsingormachinereadingwithoutallowingittounderstanditsmeaning.
ROT5istheabbreviationofrotateby5places,whichmeanstorotate5places,allothersarethesame.Let'stalkabouttheirencodingmethodsrespectively:ROT5:Onlyencodethenumber,replacethecurrentnumberwiththefifthnumberfromthepreviousnumber,forexample,thecurrentnumberis0,anditbecomes5afterencoding.Thecurrentvalueis1,anditbecomes6afterencoding,andsoon.ROT13:Onlyencodetheletters,replacethecurrentletterwiththe13thletterfromthecurrentletter,forexample,thecurrentletterisA,afterencoding,itbecomesN,thecurrentisB,andafterencoding,itbecomesO,Andsoon.ROT18:Thisisaheterogeneous,originallythereisno,itisacombinationofROT5andROT13,forthesakeofgoodtitle,nameditROT18.ROT47:Encodenumbers,letters,andcommonlyusedsymbols,andperformpositionreplacementaccordingtotheirASCIIvalue,andreplacethecurrentcharacterwiththecorrespondingcharacterofthe47thdigitfromthepreviousASCIIvalueofthecurrentcharacter,forexample,thecurrentcharacterislowercaseTheletterzbecomesacapitalletterKafterencoding,thecurrentnumberis0,anditbecomesthesymbol_afterencoding.TheASCIIvaluerangeofcharactersusedforROT47encodingis33-126.Fordetails,pleaserefertoASCIIencoding.