Home Техника Код на Хил

Код на Хил



Въведение

Паролата на Hillе алтернативна парола, използваща принципите на теорията за основната матрица, изобретена от LesterS.Hillin1929.

Всяка буква се третира като 26-основно число: A=0, B=1, C=2... Низ от букви се третира като вектор с измерение, умножен по матрица ann × n, и след това резултатът ще бъде по модул 26.

Имайте предвид, че матрицата(ключът), използвана за криптиране, трябва да бъде обратима, в противен случай ще бъде невъзможно да се декодира. Само детерминантата на матрицата и 26 са взаимно прости, те са обратими.

Reasons

Withtherapiddevelopmentoftechnologyandtheincreasingdependenceofpeopleoncreditcardsandcomputers,cryptographyhasbecomemoreandmoreimportant.Cryptographyisadisciplineaboutencryptionanddecryption,ciphertextandplaintext.Iftheoriginalsymbolisreplacedbyanothersymbol,itcanbecalledageneralizedcipher.Thenarrowpasswordismainlyforkeepingsecret.Itisanothertypeofsymboltextdesignedtopreventthethieffromknowingthecontent,anditisalsoapasswordwellknowntoordinarypeople.

Необходими са пароли за използване на кредитни карти, мрежови акаунти и пароли, имейли и електронни подписи. За да се улесни паметта, много хора използват рождени дни, телефонни номера и номера на къщи като пароли, но това е по-малко сигурно.

За да стане паролата по-сложна и по-трудна за дешифриране, са създадени много различни форми на парола. Функционалната характеристика на паролата е връзката едно към едно или едно към много между обикновения текст и паролата, тоест обикновеният текст е функция на паролата. Един от традиционните шифри се нарича метод на преместване. methodistheadditiveencryptionsystemC=P+s(modm).Общо казано,ние използваме1заA,2заB,...,25заY,26заZ,и скоро.Sinces= 0 е еквивалентно на некриптирано и 0≤s≤m-1(s≥mможе да бъде заменено от0≤s≤m-1), следователно, цялата система има само m-1 промени. С други думи, ако бъдат изпробвани m-1 пъти, ще изтече поверителна информация.

Fromthispointofview,thereliabilityofpasswordsindailylifeandtraditionalpasswordsispoor.Weneedtofindawaytoeasilyconcealorhomogenizethenaturalfrequencyofletters,whichisconducivetostatisticalanalysis.Thesafeandreliableencryptionmethod.HillCiphercanbasicallymeetthisrequirement.

Principle

Thebasicideaof​​theHillencryptionalgorithmistoconvertdplaintextlettersintodciphertextlettersthroughlineartransformation.Decryptionrequiresonlyoneinversetransformation,andthekeyisthetransformationmatrixitself.

TheHillpasswordisatypeofmulti-lettersubstitutionpassword.Multi-lettersubstitutioncipherscanbeconvenientlydescribedbymatrixtransformation,sometimescalledmatrixtransformationciphers.LettheplaintextalphabetbeZ,andifLlettersareusedastheunitforsubstitution,themulti-codesubstitutionisthemappingf:Z→Z.Ifthemappingislinear,thenfisalineartransformation,whichcanberepresentedbyanL×LmatrixKonZ.Ifitisfullrank,thetransformationisaone-to-onemapping,andthereisaninversetransformationK.DenotethenumberofLlettersastheL-dimensionalvectormonZ,thecorrespondingciphertextvectorc,andmK=c,usingKasthedecryptionmatrix,thecorrespondingplaintextc·K=mcanberecoveredfromc.

Inmilitarycommunications,characters(information)areoftencorrespondedtonumbers(forconvenience,wecorrespondtocharactersandnumbersintheoriginalorder,infact,thiscorrespondenceruleisextremelyeasytocrack):

abcde…xyz

12345…242526

Например, съобщението "NOSLEEPPING" съответства на набор от кодове 14,15,19,12,5,5,16,16,9,14,7. Но се предава директно по този начин, то може лесно да бъде дешифрирано от врага. Следователно трябва да се вземат мерки за криптиране, т.е. оригиналният сигнал, умножен по много edencryptionmatrixK,предавателният сигнал еC=KB(криптиране), и страната, която получава сигнала, възстановява (дешифрира) сигнала до B=KC. Ако врагът не знае криптиращата матрица, ще бъде трудно да се дешифрира.

Шифроване

Първата стъпка, задайте матрицата за шифроване на K=112-120113, това е, setq=26,L=intheHillpassword3. Изберете пълната обратима матрица с ред 3 × 3. Ето защо вземем 3 × 3 обратима квадратна матрица​ също за удобство на изчислението лация и съответната сигурност е по-ниска.

Втората стъпка, разделете информацията 14,15,19,12,5,5,16,16,9,14,7 на 4 матрици на колони: X1=141519, X2=1255, X3=16169, X4=1470, където "0" в X е въображаемо и целта му трябва да бъде в съответствие с броя редове в матрицата на колоната. Броят редове 3 и номерът 4 на матрицата на колоната напълно зависят от броя числа, съответстващи на криптираната информация и реда на матрицата за криптиране.

Третата стъпка, шифровайте информацията. Извършете матрично умножение: Y1=KX1=112-120213141519=6716100;Y2=KX2=112-1202131255=27-244;Y3=KX3=112-12021316169=501675; Y4= KX4=112-1202131470=21035.Новият криптиран код е67,16,100,27,-2,44,50,16,75,21,0.Въпреки че 35inY е излишна информация, тя трябва да бъде изпратена на другата страна заедно с паролата и другата страна трябва да участва в изчислението при кракване паролата.

Декриптиране

Първата стъпка, намерете обратната матрица на ключовата матрица K.K може да бъде изчислена с Mathematica. Това е, K=-614-3125-1-3.

Втората стъпка, извършете умножение на матрица отново: X1=-614-3125-1-3671610=141519;X2=-614-3125-1-327-244=1255;X3=-614-3125-1 -3501675=16169;X4=-614-3125-1-321035=1470. По този начин оригиналната информация е кодирана като 14,15,19,12,5,5,16,16,9,14,7.

Третата стъпка, сравнете кодиращата таблица, можете да получите съдържанието на информацията, изпратено от другата страна, като "NOSLEEPPING".

Securityanalysis

ItisnotdifficulttoseethattherearetwoveryimportantconditionsintheHillcipheralgorithm.Thefirstconditionisthecorrespondencetableofcharacters(information)andnumbers.Whentheorderoftheencryptionmatrixn(theorderoftheencryptionmatrixinthisexampleisn=3)islarger,thedifficultyofdecipheringwillincrease.Atthistime,theamountofcalculationItisalsobig,wecanuserelatedmathematicssoftwaresuchasMathematicatoimprovecomputingefficiency.Thesecondconditionistheencryptionmatrix.Howtodefineandsolvethismatrixis​​crucialtotheencryptionanddecryptionofpasswords.

Fromtheperspectiveofdecipheringpasswords,traditionalpasswordshaveafatalweakness,thatis,deciphererscanfindthelawfromthestatisticalcharacterfrequency,andthenfindoutthebreakthroughpoint,especiallyattheheightofcomputertechnology.Today,whenitisdeveloped,thespeedofdecipheringisfaster.TheHillcipheralgorithmcompletelyovercomesthisdefect.Byusingmatrixmultiplicationandinverseoperationsinlinearalgebra,itcanbetterresistfrequencyanalysisandisdifficulttobreak.

TheHillcryptosystemsetsatleastthreebarriersfordecipherers,whichincreasesthedifficultyofdeciphering.ThekeytodecipheringtheHillcipheristoguesshowthetextisconvertedintoafew-dimensionalvector(thenumberofrowsinthecolumnmatrix),howthecorrespondingalphabetisarranged,andmoreimportantly,totrytoobtaintheencryptionmatrixA.Tocrackthepassword,thedimensionsofthevector,thealphabeticallistandtheencryptionmatrixareindispensable.Inespionagewarsinancientandmoderntimes,bothsidesalwaystrytheirbesttoobtainthekeytocracktheotherparty'spassword,butitisnoteasytogetthethreekeysofHill'spassword.

Thereisnounbreakablepasswordintheworld,andtheHillpasswordisnoexception.ThedisadvantageoftheHillcipheralgorithmisthatthesecurityoflineartransformationisveryfragileandeasytobebrokenbyattacks.Hackersusetheweaknessesofvariouscipherstofrequentlylaunchattacksonusers.Nevertheless,theHillpasswordisstillasimpleandefficientpassword.

Пример

Помислете за съобщението ACT, тъй като A=0, C=2, T=19, съобщението е:

SetThekeyis

Потвърдете, че възпалението е обратимо:

Процес на криптиране:

Съответният шифъртекст е „POH“.

Assumingthattheotherpartyknowstheciphertextandthekey,firstfindouttheinversematrixofthekey:

Умножете обратната матрица и шифъртекста:

p>

получавате „ДЕЙСТВАЙТЕ“.

This article is from the network, does not represent the position of this station. Please indicate the origin of reprint
TOP