Briefintroduction
Accordingtorecords,theancientGreeksinventedthesubstitutioncodein400BC.In1881,theworld'sfirsttelephonesecuritypatentappeared.DuringtheSecondWorldWar,theGermanmilitaryusedthe"Enigma"cryptographicmachine,andcryptographyplayedaveryimportantroleinthewar.
Withthedevelopmentofinformationtechnologyanddigitalsociety,people’sawarenessoftheimportanceofinformationsecurityandconfidentialitycontinuestoincrease,soin1997,theAmericanNationalBureauofStandardsannouncedtheimplementationofthe"AmericanDataEncryptionStandard(DES)"Thecivilforcesbegantofullyinterveneintheresearchandapplicationofcryptography,usingencryptionalgorithmssuchasDES,RSA,andSHA.Asthedemandforencryptionstrengthcontinuestoincrease,AESandECChaverecentlyappeared.
Usingcryptographycanachievethefollowingpurposes:
Confidentiality:Preventtheuser'sidentificationordatafrombeingread.
Dataintegrity:Preventdatafrombeingchanged.
Identityverification:toensurethatthedataissentfromaspecificparty.
Classification
Encryptiontechnologyisusuallydividedintotwocategories:"symmetric"and"asymmetric".
Symmetricencryptiontechnology
Symmetricencryptionmeansthatencryptionanddecryptionusethesamekey,usuallycalled"SessionKey".Thisencryptiontechnologyiswidelyusedtoday,suchasTheDESencryptionstandardadoptedbytheUSgovernmentisatypical"symmetric"encryptionmethod,anditsSessionKeylengthis56bits.
Asymmetricencryptiontechnology
Asymmetricencryptionmeansthatencryptionanddecryptiondonotusethesamekey.Thereareusuallytwokeyscalled"publickey"and"Privatekey",thetwoofthemmustbeusedinpairs,otherwisetheencryptedfilecannotbeopened.The"publickey"herereferstotheonethatcanbepublishedtotheoutsideworld,whilethe"privatekey"cannot.Itcanonlybeknownbytheholder.Itssuperioritylieshere,becauseifthesymmetricencryptionmethodistotransmitencryptedfilesonthenetwork,itisdifficultnottotelltheotherpartythekey,nomatterwhatmethodisused,itmaybeeavesdropped.Theasymmetricencryptionmethodhastwokeys,andthe"publickey"canbemadepublic,soyouarenotafraidofothersknowing.Therecipientonlyneedstousehisownprivatekeywhendecrypting,whichworkswell.Itavoidsthetransmissionsecurityproblemofthekey.
Algorithm
AnencryptionsystemScanbedescribedbymathematicalnotationasfollows:
S={P,C,K,E,D}
Amongthem
P——plaintextspace,whichmeansthesetofallpossibleplaintexts,
C——theciphertextspace,meansthesetofallpossibleciphertexts,
p>K——keyspace,thekeyisavariableparameterintheencryptionalgorithm,
E——encryptionalgorithm,composedofsomeformulas,rulesorprocedures,
D——Decryptionalgorithm,whichistheinverseofE.
WhenthekeykÎKisgiven,therelationshipbetweenthesymbolsisasfollows:
C=Ek(P),theciphertextCisobtainedafterencryptingtheplaintextP
P=Dk(C)=Dk(Ek(P)),theplaintextPisobtainedafterdecryptingtheciphertextC
IfE-1representstheinverseofE,D-1representsDInversely,thereare:
Ek=Dk-1andDk=Ek-1
Therefore,theencryptiondesignmainlydeterminesE,D,K.
RSAisanencryptionalgorithmbasedonnumbertheoryasymmetry(publickey)proposedbyRivest,ShamirandAdleman.ThehardfactorizationofprimefactorsoflargeintegersisthebasisoftheRSAalgorithm.
RSAhasalreadyenteredthepracticalstageabroad,andavarietyofhigh-speedRSAdedicatedchipshavebeendeveloped.AlthoughmanyfeaturesofRSAarenotveryideal,duetotheactualneedsofinformationsecurity,manyimportantinformationsystemsstilluseRSAasabasicencryptionmechanism.SoonafterRSAwasputforward,relevantdepartmentsofourcountryhavebeenstudyingit.Fromanapplicationpointofview,RSAimplementedbysoftwarehasbeguntobeusedforcomputernetworkencryptiontocompletefunctionssuchaskeydistributionanddigitalsignatures.
InadditiontoRSA,thereisalsoDES(DataEncryptionStandard).AlthoughDESdiscloseditsencryptionalgorithmandwaslistedasa"standard"bytheUnitedStates,itwasquicklyabandoned.Encryptiontechnologyhasreturnedtothetraditionof"algorithmicsecrecy".
Commonencryptionalgorithms
DES(DataEncryptionStandard):Symmetricalalgorithm,dataencryptionstandard,faster,suitableforencryptinglargeamountsofdata;
3DES(TripleDES):ItisasymmetricalgorithmbasedonDES.Itusesthreedifferentkeystoencryptapieceofdatathreetimes,whichhashigherstrength;
RC2andRC4:symmetricalgorithms,usevariable-lengthkeysEncryptlargeamountsofdata,fasterthanDES;
IDEA(InternationalDataEncryptionAlgorithm)internationaldataencryptionalgorithm,usinga128-bitkeytoprovideverystrongsecurity;
RSA:InventedbyRSA,itisapublickeyalgorithmthatsupportsvariable-lengthkeys.Thelengthofthefileblockthatneedstobeencryptedisalsovariable,anasymmetricalgorithm;thealgorithmisasfollows:
First,findthreeNumber,p,q,r,
wherep,qaretwodifferentprimenumbers,andrisanumberthatisprimewith(p-1)(q-1).
Thethreenumbersp,q,rareprivatekeys.
Next,findmsothatrm==1mod(p-1)(q-1).....
Thismmustexist,becauserand(p-1)(q-1)arerelativelyprimeandcanbeobtainedbydividingbytossandturns.
Comeagain,calculaten=pq.......
m,nthesetwonumbersarepublickey
DSA(DigitalSignatureAlgorithm):DigitalsignaturealgorithmisastandardDSS(DigitalSignatureStandard),strictlyspeaking,itisnotanencryptionalgorithm;
AES(AdvancedEncryptionStandard):Advancedencryptionstandard,symmetricalgorithm,isthenextgenerationTheencryptionalgorithmstandardisfast,andthesecuritylevelishigh.AnimplementationoftheAESstandardinthe21stcenturyistheRijndaelalgorithm.
BLOWFISH,itusesavariable-lengthkeywithalengthofupto448bits,andrunsveryfast;
MD5:Strictlyspeaking,itisnotanencryptionalgorithm,itcanonlybesaidtobeadigestAlgorithm;
AbriefdescriptionoftheMD5algorithmcanbe:MD5processestheinputinformationin512-bitgroups,andeachgroupisdividedinto1632-bitsub-groups,afteraseriesofprocessing,Theoutputofthealgorithmiscomposedoffour32-bitpackets,andcascadingthesefour32-bitpacketswillgeneratea128-bithashvalue.
IntheMD5algorithm,theinformationneedstobefilledfirst,sothattheresultoftheremainderofthebytelengthof512isequalto448.Therefore,thebytelengthoftheinformation(BitsLength)willbeextendedtoN*512+448,thatis,N*64+56bytes(Bytes),whereNisapositiveinteger.Thefillingmethodisasfollows.Filla1andcountless0satthebackoftheinformation,andstopfillingtheinformationwith0suntiltheaboveconditionsaremet.Then,a64-bitbinaryrepresentationofthelengthofthepre-paddinginformationisappendedtotheresult.Afterthesetwostepsofprocessing,thelengthoftheinformationbyteisnow=N*512+448+64=(N+1)*512,thatis,thelengthisexactlyanintegermultipleof512.Thereasonforthisistomeettherequirementsforinformationlengthinthesubsequentprocessing.(SeetheMD5algorithmentry)
PKCS:ThePublic-KeyCryptographyStandards(PKCS)isasetofpublickeycryptographystandardsdevelopedbytheRSADataSecurityCorporationanditspartnersintheUnitedStates,includingcertificatesAseriesofrelatedagreementsonapplication,certificaterenewal,certificaterevocationformissuance,extendedcertificatecontent,digitalsignature,digitalenvelopeformat,etc.
SSF33,SSF28,SCB2(SM1):ThehiddenandundisclosedcommercialalgorithmsoftheNationalCryptographyBureau,whichareusedindomesticcivilandcommercialapplications,exceptthesearenotallowedtobeused,otherscanbeused;
p>Otheralgorithms
SuchasElGamal,Diffie-Hellman,newellipticcurvealgorithmECC,etc.
Typesofencryptionalgorithms
Intoday'sinformationsecurityfield,therearevariousencryptionalgorithmsthatcondensethewisdomofcomputerscientists.Fromamacropointofview,theseencryptionalgorithmscanbesummarizedintothreecategories:hashingalgorithms,symmetricencryptionalgorithms,asymmetricencryptionalgorithm.