Sistema crittografico a chiave pubblica

SynonymCryptographygenerallyreferstopublickeycryptography.

Publickeycryptography

Introductio

Thisisjustoneaspectofthecurrentcryptographytheme.Theverificationofthetrueidentityofthesenderandreceiveroftheinformation,thenon-repudiationofthesent/receivedinformationafterthefact,andtheprotectionoftheintegrityofthedataareotheraspectsofmoderncryptography.

Thepublickeycryptosystemhasprovidedexcellentanswerstothesetwoissues,andmanynewideasandsolutionsarecontinuingtobeproduced.Inthepublickeysystem,theencryptionkeyisdifferentfromthedecryptionkey.Peoplemaketheencryptionkeypublicandanyonecanuseit;andthedecryptionkeyisonlyknowntothedecryptor.Amongallpublickeycryptosystemssofar,theRSAsystemisthemostfamousandwidelyusedone.

Progressio

In1976,apublickeycryptosystemwasproposed,theprincipleofwhichistoseparatetheencryptionkeyandthedecryptionkey.Inthisway,aspecificusercanpublicizetheencryptionkeyandalgorithmhedesigned,andonlykeepthedecryptionkeysecret.Anyonewhousesthisencryptionkeyandalgorithmtosendencryptedinformationtotheusercanrestoreit.Theadvantageofpublickeycryptographyisthatitdoesnotneedtopassthekeythroughasecurechannel,whichgreatlysimplifieskeymanagement.Itsalgorithmissometimescalledpublickeyalgorithmorpublickeyalgorithmforshort.

In1978,aspecificimplementationplanforpublickeycryptography,theRSAplan,wasproposed.

TheDSAalgorithmproposedin1991isalsoapublickeyalgorithm,whichhasgreaterapplicationadvantagesindigitalsignatures.

Conceptus

Somebasicconceptsandstructuralcomponentsinthepublickeyarchitecture.

KeypairInasecuritysystembasedonapublickeysystem,keysaregeneratedinpairs,andeachpairofkeysiscomposedofapublickeyandaprivatekey.Inpracticalapplications,theprivatekeyiskeptbytheowner,whilethepublickeyneedstobepublishedtothepublic.Inordertomakethebusinessbasedonthepublickeysystem(suchase-commerce,etc.)widelyused,afundamentalandkeyissueisthedistributionandmanagementofpublickeys.

Thepublickeyitselfisnotmarked,andtheownerofthepublickeycannotbedistinguishedfromthepublickeyalone.

Inaverysmallarea,suchasasmallgroupoftwopeoplelikeAandB,theytrusteachother,exchangepublickeys,andcommunicateontheInternetwithoutanyproblems.Ifthisgroupisalittlelarger,itmaynotbeaproblemtotrusteachother,butfromalegalperspective,suchtrustisalsoproblematic.Ifitisbigger,thetrustproblembecomesabigproblem.

Testimonium

TheusergroupoftheInternetisbynomeansasmallgroupofpeoplewhotrusteachother.Inthisusergroup,fromalegalpointofview,userscannoteasilytrusteachother.Therefore,thepublickeyencryptionsystemhasadoptedanotherapproach,linkingthepublickeywiththenameoftheownerofthepublickey,andthenaskacredible,fairandauthoritativeorganizationthateveryonecantrusttoconfirm,andaddthesignatureofthisauthority.Thisformsthecertificate.

Becausethecertificateissignedbyanauthority,everyonebelievesthatthecontentonthecertificateistrustworthy;andbecausethecertificatehasidentityinformationsuchastheowner’sname,otherscaneasilyknowthepublickeyWhoistheowner.

CA

Theauthoritymentionedaboveistheelectronicvisaauthority,orCA.CA(TestimoniumAuthority)alsohasacertificate(containingapublickey),ofcourse,italsohasitsownprivatekey,soithastheabilitytosign.OnlinepublicuserstrusttheCA(TestimoniumAuthority)byverifyingthesignatureoftheCA(TestimoniumAuthority).Anyoneshouldbeabletoobtainthecertificate(includingthepublickey)oftheCA(TestimoniumAuthority)toverifythecertificateissuedbyit.

Iftheuserwantstogetacertificateofhisown,heshouldfirstapplytotheCA(TestimoniumAuthority).AftertheCA(TestimoniumAuthority)determinestheidentityoftheapplicant,itassignshimapublickey,andtheCA(TestimoniumAuthority)bindsthepublickeytotheapplicant’sidentityinformationandsignsittoformacertificateTothatuser(applicant).

Ifauserwantstoverifytheauthenticityofanothercertificate,hewillusetheCA’spublickeytoverifythesignatureonthatcertificate(asmentionedabove,theCAsignatureisactuallypassedbytheCA(TestimoniumAuthority)Informationencryptedbytheprivatekey,theprocessofsignatureverificationisaccompaniedbytheprocessofdecryptingusingtheCA(TestimoniumAuthority)publickey).Oncetheverificationispassed,thecertificateisconsideredvalid.

Inadditiontoissuingcertificates,CA(TestimoniumAuthority)hasanotherimportantroleinthemanagementofcertificatesandkeys.

Itcanbeseenthatthecertificateistheuser’selectronicpersonalIDcardontheInternet,whichhasthesamefunctionasthepersonalIDcardusedindailylife.CA(TestimoniumAuthority)isequivalenttotheonlinepublicsecuritybureau,whichspecializesinissuingandverifyingIDcards.

Algorithmus

Introductio

ThepublickeyalgorithmwasdevelopedbyDiffieandHellmanatStanfordUniversityin1976.Thetwofirstinventedit(thesis"NewDirectioninCryptography").ButcurrentlythemostpopularRSAwasjointlydevelopedbyMITprofessorsRonaldL.Rivest,AdiShamirandLeonardM.Adlemanin1977,andwascomposedofthefirstlettersofthenamesofthreemathematicians.

Theideaof​​thepublickeycryptosystemproposedin1976isdifferentfromthetraditionalsymmetrickeycryptosystem.Itrequireskeystoappearinpairs,oneistheencryptionkey(e),andtheotheristhedecryptionkey.(d),anditisimpossibletodeduceonefromtheother.Since1976,avarietyofpublic-keycryptographicalgorithmshavebeenproposed,manyofwhichareinsecure,someareconsideredsecureandmanyarenotpractical.Theyareeitherthekeyistoolarge,ortheciphertextisveryextended.serious.Thesecurityfoundationofmostcryptographicalgorithmsisbasedonsomemathematicalproblems,whichexpertsbelievecannotbesolvedinashortperiodoftime.Becausesomeproblems(suchasfactorizationproblems)havebeenthousandsofyearsold.

Publickeyencryptionalgorithm,alsocalledasymmetrickeyalgorithm,usestwopairsofkeys:apublickeyandaprivatekey.Theusermustensurethesecurityoftheprivatekey;thepublickeycanbereleased.Publickeyandprivatekeyarecloselyrelated.Informationencryptedwithpublickeycanonlybedecryptedwithprivatekey,andviceversa.Sincethepublickeyalgorithmdoesnotrequireanonlinekeyserverandthekeydistributionprotocolissimple,thekeymanagementisgreatlysimplified.Inadditiontoencryptionfunctions,publickeysystemscanalsoprovidedigitalsignatures.

RSA

ThemostwidelyusedpublickeyencryptionalgorithmisRSA.RSAusestwokeys,apublickeyandaprivatekey.Ifoneisusedforencryption,theothercanbeusedfordecryption.Thekeylengthisvariablefrom40to2048bits.Theplaintextisalsodividedintoblocksduringencryption.Theblocksizeisvariablebutcannotexceedthelengthofthekey.TheRSAalgorithmdivideseachblockofplaintextConvertedintoaciphertextblockwiththesamelengthasthekey.Thelongerthekey,thebettertheencryptioneffect,butthecostofencryptionanddecryptionisalsogreater,sotheremustbeacompromisebetweensecurityandperformance.Generally,64-bitismoreappropriate.Awell-knownapplicationofRSAisSSL.IntheUnitedStatesandCanada,the128-bitRSAalgorithmisusedforSSL.Duetoexportrestrictions,the40-bitversioniscommonlyusedinotherregions(includingChina).

TheoriginalconceptandgoalofRSAalgorithmdevelopmentistomaketheInternetsafeandreliable,aimingtosolvetheproblemoftheuseofopenchanneltransmissionanddistributionofthesecretkeyoftheDESalgorithm.Theactualresultsnotonlysolvethisproblemwell;RSAcanalsobeusedtocompletethedigitalsignatureofthemessagetoresistthedenialanddenialofthemessage;atthesametime,thedigitalsignaturecanbeusedtoeasilydetecttheillegaltamperingofthemessagebytheattacker.Toprotecttheintegrityofdatainformation.

Informationsecuritygoals

Generally,thegoalsofinformationsecuritycanbesummarizedassolvingthefollowingproblemsofinformation:

Confidentialityensuresthatinformationisnotleakedtounauthorizedpersons.Anyoneauthorized.

Integritypreventsinformationfrombeingtamperedwithbyunauthorizedpersons.

Availabilityguaranteesthatinformationandinformationsystemsareindeedusedbyauthorizedpersons.

Controllability(Controllability)implementssecuritymonitoringofinformationandinformationsystemstopreventillegaluseofinformationandinformationsystems.

Passwordisakindoftransformation.Theuseofpasswordtransformationtoprotectinformationsecretsisthemostprimitiveabilityofpasswords.However,withthedevelopmentofinformationandinformationtechnology,moderncryptographyisnotonlyusedtosolvetheproblemofinformationConfidentiality,butalsousedtosolvetheintegrity,availabilityandcontrollabilityofinformation.Itcanbesaidthatpasswordisthemosteffectivemeanstosolveinformationsecurity,andpasswordtechnologyisthecoretechnologytosolveinformationsecurity.

Theadvantageofpublickeysisthatyoumaynotknowanentity,butaslongasyourserverbelievesthattheentity’sCAisreliable,youcancommunicatesecurely.ThisisexactlywhatWebcommerceis.Requiredforsuchabusiness.Forexample,creditcardshopping.TheservicepartycanauthorizeitsownresourcesaccordingtothereliabilityoftheissuingorganizationoftheclientCA.Atpresent,thereisnoCAthatcanbewidelytrustedathomeandabroad.TheproductsofAmericanNatescapeCompanysupportpublickey,butNatescapeCompanyisregardedastheCA.ItisunthinkableinChinathataforeigncompanyactsasaCA.

Theprocessingspeedofthepublickeyschemeisslowerthanthatofthesecretkeyscheme.Therefore,thepublickeyandtheprivatekeytechnologyareusuallycombinedtoachievethebestperformance.Thatis,thepublickeytechnologyisusedtotransfertheprivatekeybetweenthecommunicationparties,andtheprivatekeyisusedtoencryptanddecrypttheactualdatatransmitted.Inaddition,publickeyencryptionisalsousedtoencryptprivatekeys.

Amongthesesafeandpracticalalgorithms,somearesuitableforkeydistribution,somecanbeusedasencryptionalgorithms,andsomeareonlyusedfordigitalsignatures.Mostalgorithmsrequirelargenumberoperations,sotheimplementationspeedisveryslowandcannotbeusedforfastdataencryption.Thefollowingwillintroduceatypicalpublickeycryptographicalgorithm-RSA.

RSAalgorithmcompletesthedigitalsignatureofthemessageverywelltoresistthedenialanddenialofthedata;itiseasiertofindtheillegaltamperingofthemessagebytheattackerbyusingthedigitalsignaturetoprotecttheintegrityofthedatainformation.Sofar,manyencryptiontechnologiesuseRSAalgorithm,suchasPGP(PrettyGoodPrivacy)encryptionsystem,whichisatoolsoftwarethatcanbeusedtoencrypt,decryptordigitallysignfilesafterregisteringwiththecertificationcenter.PGPusesRSAalgorithm.ItcanbeseenthatRSAhasverygoodapplications.

Generare

1.Choosetwolargeprimenumbers,pandq,andcalculaten=qp,whereniscalledthemodulusoftheRSAalgorithm.pandqmustbekeptsecret.Generally,pandqarerequiredtobesecureprimenumbers,andthelengthofnisgreaterthan1024bits.ThisismainlybecausethesecurityoftheRSAalgorithmreliesontheproblemoffactoringlargenumbers.

2.CalculatetheEulernumberofn

φ(n)=(p-1)(q-1)

φ(n)isdefinedasThenumberofnumbersthatdonotexceednandarerelativelyprimeton.

3.Thenrandomlyselecttheencryptionkeye,andselecta numberethatis relativeprimetoφ(n)ex[0,φ(n)-1]asthepublicencryptionindex.

4.Finally,theEuclidalgorithmisusedtocalculatethedecryptionkeyd,whichsatisfiesde≡1(modφ(n)).Amongthem,nanddshouldalsoberelativelyprime.Thenumberseandnarepublickeys,anddistheprivatekey.Thetwoprimenumberspandqarenolongerneededandshouldbediscardedwithoutlettinganyoneknow.

5.Gettherequiredpublickeyandsecretkey:

Publickey(ieencryptionkey)PK=(e,n)

Secretkey(decryptionkey)SK=(d,n)

Encryptionanddecryption

1.Whenencryptinginformationm(binaryrepresentation),firstdividemintoequal-lengthdataBlockm1,m2,...,mi,blocklengths,where2^s<=n,sisaslargeaspossible.

2.Thecorrespondingciphertextis:ci≡mi^e(modn)(a)

3.Calculateasfollowings whendecrypting:mi≡ci^d(modn)(b)RSAcanbeused fordigitalsignaturas, theschemeistouse(a)signatureand(b)verificationem.

Related Articles
TOP