Cipher - Wikipedia

文章推薦指數: 80 %
投票人數:10人

In cryptography, a cipher (or cypher) is an algorithm for performing encryption or decryption—a series of well-defined steps that can be followed as a ... Cipher FromWikipedia,thefreeencyclopedia Jumptonavigation Jumptosearch Algorithmforencryptinganddecryptinginformation Forotheruses,seeCipher(disambiguation). Thisarticleincludesalistofgeneralreferences,butitremainslargelyunverifiedbecauseitlackssufficientcorrespondinginlinecitations.Pleasehelptoimprovethisarticlebyintroducingmoreprecisecitations.(March2009)(Learnhowandwhentoremovethistemplatemessage) EdwardLarsson'srunecipherresemblingthatfoundontheKensingtonRunestone.Alsoincludesrunicallyunrelatedblackletterwritingstyleandpigpencipher. Incryptography,acipher(orcypher)isanalgorithmforperformingencryptionordecryption—aseriesofwell-definedstepsthatcanbefollowedasaprocedure.Analternative,lesscommontermisencipherment.Toencipherorencodeistoconvertinformationintocipherorcode.Incommonparlance,"cipher"issynonymouswith"code",astheyarebothasetofstepsthatencryptamessage;however,theconceptsaredistinctincryptography,especiallyclassicalcryptography. Codesgenerallysubstitutedifferentlengthstringsofcharacterintheoutput,whileciphersgenerallysubstitutethesamenumberofcharactersasareinput.Thereareexceptionsandsomeciphersystemsmayuseslightlymore,orfewer,characterswhenoutputversusthenumberthatwereinput. Codesoperatedbysubstitutingaccordingtoalargecodebookwhichlinkedarandomstringofcharactersornumberstoawordorphrase.Forexample,"UQJHSE"couldbethecodefor"Proceedtothefollowingcoordinates."Whenusingaciphertheoriginalinformationisknownasplaintext,andtheencryptedformasciphertext.Theciphertextmessagecontainsalltheinformationoftheplaintextmessage,butisnotinaformatreadablebyahumanorcomputerwithoutthepropermechanismtodecryptit. Theoperationofacipherusuallydependsonapieceofauxiliaryinformation,calledakey(or,intraditionalNSAparlance,acryptovariable).Theencryptingprocedureisvarieddependingonthekey,whichchangesthedetailedoperationofthealgorithm.Akeymustbeselectedbeforeusingaciphertoencryptamessage.Withoutknowledgeofthekey,itshouldbeextremelydifficult,ifnotimpossible,todecrypttheresultingciphertextintoreadableplaintext. Mostmoderncipherscanbecategorizedinseveralways Bywhethertheyworkonblocksofsymbolsusuallyofafixedsize(blockciphers),oronacontinuousstreamofsymbols(streamciphers). Bywhetherthesamekeyisusedforbothencryptionanddecryption(symmetrickeyalgorithms),orifadifferentkeyisusedforeach(asymmetrickeyalgorithms).Ifthealgorithmissymmetric,thekeymustbeknowntotherecipientandsenderandtonooneelse.Ifthealgorithmisanasymmetricone,theencipheringkeyisdifferentfrom,butcloselyrelatedto,thedecipheringkey.Ifonekeycannotbededucedfromtheother,theasymmetrickeyalgorithmhasthepublic/privatekeypropertyandoneofthekeysmaybemadepublicwithoutlossofconfidentiality. Contents 1Etymology 2Versuscodes 3Types 3.1Historical 3.2Modern 4Keysizeandvulnerability 5Seealso 6Notes 7References 8Externallinks Etymology[edit] TheRomannumbersystemwasverycumbersome,inpartbecausetherewasnoconceptofzero.TheArabicnumeralsystemspreadfromtheArabicworldtoEuropeintheMiddleAges.Inthistransition,theArabicwordforzeroصفر(sifr)wasadoptedintoMedievalLatinascifra,andthenintoMiddleFrenchascifre.ThiseventuallyledtotheEnglishwordcipher(minorityspellingcypher).OnetheoryforhowthetermcametorefertoencodingisthattheconceptofzerowasconfusingtoEuropeans,andsothetermcametorefertoamessageorcommunicationthatwasnoteasilyunderstood.[1] ThetermcipherwaslateralsousedtorefertoanyArabicdigit,ortocalculationusingthem,soencodingtextintheformofArabicnumeralsisliterallyconvertingthetextto"ciphers". Versuscodes[edit] Mainarticle:Code(cryptography) Innon-technicalusage,a"(secret)code"typicallymeansa"cipher".Withintechnicaldiscussions,however,thewords"code"and"cipher"refertotwodifferentconcepts.Codesworkatthelevelofmeaning—thatis,wordsorphrasesareconvertedintosomethingelseandthischunkinggenerallyshortensthemessage. Anexampleofthisisthecommercialtelegraphcodewhichwasusedtoshortenlongtelegraphmessageswhichresultedfromenteringintocommercialcontractsusingexchangesoftelegrams. Anotherexampleisgivenbywholewordciphers,whichallowtheusertoreplaceanentirewordwithasymbolorcharacter,muchlikethewayJapaneseutilizeKanji(meaningChinesecharactersinJapanese)characterstosupplementtheirlanguage.ex"Thequickbrownfoxjumpsoverthelazydog"becomes"Thequickbrown狐jumps上thelazy犬". Ciphers,ontheotherhand,workatalowerlevel:thelevelofindividualletters,smallgroupsofletters,or,inmodernschemes,individualbitsandblocksofbits.Somesystemsusedbothcodesandciphersinonesystem,usingsuperenciphermenttoincreasethesecurity.Insomecasesthetermscodesandciphersarealsousedsynonymouslytosubstitutionandtransposition. Historically,cryptographywassplitintoadichotomyofcodesandciphers;andcodinghaditsownterminology,analogoustothatforciphers:"encoding,codetext,decoding"andsoon. However,codeshaveavarietyofdrawbacks,includingsusceptibilitytocryptanalysisandthedifficultyofmanagingacumbersomecodebook.Becauseofthis,codeshavefallenintodisuseinmoderncryptography,andciphersarethedominanttechnique. Types[edit] Thereareavarietyofdifferenttypesofencryption.Algorithmsusedearlierinthehistoryofcryptographyaresubstantiallydifferentfrommodernmethods,andmoderncipherscanbeclassifiedaccordingtohowtheyoperateandwhethertheyuseoneortwokeys. Historical[edit] Historicalpenandpaperciphersusedinthepastaresometimesknownasclassicalciphers.Theyincludesimplesubstitutionciphers(suchasROT13)andtranspositionciphers(suchasaRailFenceCipher).Forexample,"GOODDOG"canbeencryptedas"PLLXXLP"where"L"substitutesfor"O","P"for"G",and"X"for"D"inthemessage.Transpositionoftheletters"GOODDOG"canresultin"DGOGDOO".Thesesimpleciphersandexamplesareeasytocrack,evenwithoutplaintext-ciphertextpairs.[2] Simplecipherswerereplacedbypolyalphabeticsubstitutionciphers(suchastheVigenère)whichchangedthesubstitutionalphabetforeveryletter.Forexample,"GOODDOG"canbeencryptedas"PLSXTWF"where"L","S",and"W"substitutefor"O".Withevenasmallamountofknownorestimatedplaintext,simplepolyalphabeticsubstitutionciphersandlettertranspositionciphersdesignedforpenandpaperencryptionareeasytocrack.[3]Itispossibletocreateasecurepenandpapercipherbasedonaone-timepadthough,buttheusualdisadvantagesofone-timepadsapply. Duringtheearlytwentiethcentury,electro-mechanicalmachineswereinventedtodoencryptionanddecryptionusingtransposition,polyalphabeticsubstitution,andakindof"additive"substitution.Inrotormachines,severalrotordisksprovidedpolyalphabeticsubstitution,whileplugboardsprovidedanothersubstitution.Keyswereeasilychangedbychangingtherotordisksandtheplugboardwires.Althoughtheseencryptionmethodsweremorecomplexthanpreviousschemesandrequiredmachinestoencryptanddecrypt,othermachinessuchastheBritishBombewereinventedtocracktheseencryptionmethods. Modern[edit] Modernencryptionmethodscanbedividedbytwocriteria:bytypeofkeyused,andbytypeofinputdata. Bytypeofkeyusedciphersaredividedinto: symmetrickeyalgorithms(Private-keycryptography),whereonesamekeyisusedforencryptionanddecryption,and asymmetrickeyalgorithms(Public-keycryptography),wheretwodifferentkeysareusedforencryptionanddecryption. Inasymmetrickeyalgorithm(e.g.,DESandAES),thesenderandreceivermusthaveasharedkeysetupinadvanceandkeptsecretfromallotherparties;thesenderusesthiskeyforencryption,andthereceiverusesthesamekeyfordecryption.TheFeistelcipherusesacombinationofsubstitutionandtranspositiontechniques.Mostblockcipheralgorithmsarebasedonthisstructure.Inanasymmetrickeyalgorithm(e.g.,RSA),therearetwoseparatekeys:apublickeyispublishedandenablesanysendertoperformencryption,whileaprivatekeyiskeptsecretbythereceiverandenablesonlythatpersontoperformcorrectdecryption. Cipherscanbedistinguishedintotwotypesbythetypeofinputdata: blockciphers,whichencryptblockofdataoffixedsize,and streamciphers,whichencryptcontinuousstreamsofdata. Keysizeandvulnerability[edit] Inapuremathematicalattack,(i.e.,lackinganyotherinformationtohelpbreakacipher)twofactorsaboveallcount: Computationalpoweravailable,i.e.,thecomputingpowerwhichcanbebroughttobearontheproblem.Itisimportanttonotethataverageperformance/capacityofasinglecomputerisnottheonlyfactortoconsider.Anadversarycanusemultiplecomputersatonce,forinstance,toincreasethespeedofexhaustivesearchforakey(i.e.,"bruteforce"attack)substantially. Keysize,i.e.,thesizeofkeyusedtoencryptamessage.Asthekeysizeincreases,sodoesthecomplexityofexhaustivesearchtothepointwhereitbecomesimpracticaltocrackencryptiondirectly. Sincethedesiredeffectiscomputationaldifficulty,intheoryonewouldchooseanalgorithmanddesireddifficultylevel,thusdecidethekeylengthaccordingly. AnexampleofthisprocesscanbefoundatKeyLengthwhichusesmultiplereportstosuggestthatasymmetricalcipherwith128bits,anasymmetriccipherwith3072bitkeys,andanellipticcurvecipherwith512bits,allhavesimilardifficultyatpresent. ClaudeShannonproved,usinginformationtheoryconsiderations,thatanytheoreticallyunbreakableciphermusthavekeyswhichareatleastaslongastheplaintext,andusedonlyonce:one-timepad.[4] Seealso[edit] Autokeycipher Cover-coding Encryptionsoftware Listofciphertexts Steganography Telegraphcode Notes[edit] ^Ali-Karamali,Sumbul(2008).TheMuslimNextDoor:TheQur'an,theMedia,andThatVeilThing.WhiteCloudPress.pp. 240–241.ISBN 978-0974524566. ^Saltzman,BenjaminA."Uthkskdkxt:EarlyMedievalCryptography,TextualErrors,andScribalAgency(Speculum,forthcoming)".Speculum.93(4):975.doi:10.1086/698861.S2CID 165362817. ^Stinson,p.45harvnberror:notarget:CITEREFStinson(help) ^"CommunicationTheoryofSecrecySystems"(PDF).Archivedfromtheoriginal(PDF)onJune5,2007.RetrievedFebruary3,2019. References[edit] RichardJ.Aldrich,GCHQ:TheUncensoredStoryofBritain'sMostSecretIntelligenceAgency,HarperCollinsJuly2010. HelenFouchéGaines,"Cryptanalysis",1939,Dover.ISBN 0-486-20097-3 IbrahimA.Al-Kadi,"Theoriginsofcryptology:TheArabcontributions",Cryptologia,16(2)(April1992)pp. 97–126. DavidKahn,TheCodebreakers-TheStoryofSecretWriting(ISBN 0-684-83130-9)(1967) DavidA.King,Theciphersofthemonks-AforgottennumbernotationoftheMiddleAges,Stuttgart:FranzSteiner,2001(ISBN 3-515-07640-9) AbrahamSinkov,ElementaryCryptanalysis:AMathematicalApproach,MathematicalAssociationofAmerica,1966.ISBN 0-88385-622-0 WilliamStallings,CryptographyandNetworkSecurity,principlesandpractices,4thEdition Stinson,DouglasR.(1995),Cryptogtaphy/TheoryandPractice,CRCPress,ISBN 0-8493-8521-0 Externallinks[edit] LookupcipherinWiktionary,thefreedictionary. Kishcypher vteCryptography Historyofcryptography Outlineofcryptography Cryptographicprotocol Authenticationprotocol Cryptographicprimitive Cryptanalysis Cryptocurrency Cryptosystem Cryptographicnonce Cryptovirology Hashfunction Cryptographichashfunction Keyderivationfunction Digitalsignature Kleptography Key(cryptography) Keyexchange Keygenerator Keyschedule Keystretching Keygen Cryptojackingmalware Ransomware Randomnumbergeneration Cryptographicallysecurepseudorandomnumbergenerator(CSPRNG) Pseudorandomnoise(PRN) Securechannel Insecurechannel Subliminalchannel Encryption Decryption End-to-endencryption Information-theoreticsecurity Plaintext Codetext Ciphertext Sharedsecret Trapdoorfunction Trustedtimestamping Key-basedrouting Onionrouting Garlicrouting Kademlia Mixnetwork Cryptographichashfunction Blockcipher Streamcipher Symmetric-keyalgorithm Public-keycryptography Quantumkeydistribution Quantumcryptography Post-quantumcryptography Messageauthenticationcode Randomnumbers Steganography Category AuthoritycontrolNationallibraries UnitedStates Other MicrosoftAcademic Retrievedfrom"https://en.wikipedia.org/w/index.php?title=Cipher&oldid=1061040854" Categories:CryptographyCiphersHiddencategories:HarvandSfnno-targeterrorsArticleswithshortdescriptionShortdescriptionmatchesWikidataArticleslackingin-textcitationsfromMarch2009Allarticleslackingin-textcitationsArticlescontainingFrench-languagetextArticleswithLCCNidentifiersArticleswithMAidentifiers Navigationmenu Personaltools NotloggedinTalkContributionsCreateaccountLogin Namespaces ArticleTalk Variants expanded collapsed Views ReadEditViewhistory More expanded collapsed Search Navigation MainpageContentsCurrenteventsRandomarticleAboutWikipediaContactusDonate Contribute HelpLearntoeditCommunityportalRecentchangesUploadfile Tools WhatlinkshereRelatedchangesUploadfileSpecialpagesPermanentlinkPageinformationCitethispageWikidataitem Print/export DownloadasPDFPrintableversion Inotherprojects WikimediaCommons Languages العربيةAzərbaycancaবাংলাBân-lâm-gúБеларускаяБългарскиDanskDeutschEspañolفارسیFrançaisGaeilge한국어BahasaIndonesiaItalianoქართულიҚазақшаКыргызчаNorskbokmålNorsknynorskPolskiPortuguêsРусскийSimpleEnglishسنڌيSlovenščinaСрпски/srpskiSvenskaTagalogУкраїнська粵語中文 Editlinks



請為這篇文章評分?