频率分析

频率分析数学物理学信号处理中是一种分解函数波形、或者信号的频率组成,以获取频谱的方法。

英语文本中典型的字母分布情况。较弱的密码会显示出这个分布,从而被密码专家所破译。
條目維基百科的字詞分布情况,字型越大,代表該字詞出現的機率就越大。

密码学中,频率分析是指研究字母或者字母组合在文本中出现的频率。应用频率分析可以破解古典密码

频率分析基于如下原理:在任何一种书面语言中,不同的字母或字母组合出现的频率各不相同。而且,对于以这种语言书写的任意一段文本,都具有大致相同的特征字母分布。比如,在英语中,字母E出现的频率很高,而Z则出现得较少。类似地,STNGTH,以及QU等双字母组合出现的频率非常高,NZQJ组合则极少。英语中出现频率最高的12个字母可以简记为“ETAOIN SHRDLU”。在現代標準漢語中,漢字「的」、「不」、「是」出現的頻率很高,而漢字「翊」、「謐」、「覷」則出現的較少,見常用國字標準字體表,後三個字屬於次常用字

简单替换密码的频率分析

在一个简单的替换密码中,明文中的每一个字母都被另一个字母替换,而且明文中相同的字母在转换为密文时总是被同一个字母所替换。比如,所有的e都会被替换成 X.一个含有大量X的密文消息会向密码破译者暗示X替换e.

一个例子

現假設愛麗絲與鮑伯中的伊夫截獲了一段密碼(列於下方),它使用了一個簡單替換密碼進行加密:

LIVITCSWPIYVEWHEVSRIQMXLEYVEOIEWHRXEXIPFEMVEWHKVSTYLXZIXLIKIIXPIJVSZEYPERRGERIM
WQLMGLMXQERIWGPSRIHMXQEREKIETXMJTPRGEVEKEITREWHEXXLEXXMZITWAWSQWXSWEXTVEPMRXRSJ
GSTVRIEYVIEXCVMUIMWERGMIWXMJMGCSMWXSJOMIQXLIVIQIVIXQSVSTWHKPEGARCSXRWIEVSWIIBXV
IZMXFSJXLIKEGAEWHEPSWYSWIWIEVXLISXLIVXLIRGEPIRQIVIIBGIIHMWYPFLEVHEWHYPSRRFQMXLE
PPXLIECCIEVEWGISJKTVWMRLIHYSPHXLIQIMYLXSJXLIMWRIGXQEROIVFVIZEVAEKPIEWHXEAMWYEPP
XLMWYRMWXSGSWRMHIVEXMSWMGSTPHLEVHPFKPEZINTCMXIVJSVLMRSCMWMSWVIRCIGXMWYMX

在這個例子中,大寫字母表示密文,小寫字母則表示明文(或猜測在這樣),而X~t用來代表一個關於:密文X 代表明文t的猜測。

伊夫可以使用頻率分析,以下面的消息來幫助解決密文大意:單字母中I最為常見;XL是最為常見的雙字母組;而XLI則為最為常見的三字母組,且密文中找不到D。根據英文的字母分布e是最常見的單字母,th是最為常見的雙字母組,而the則為最為常見的三字母組。因些她猜測X~tL~hI~e。第二個密文中最常見的字母是E;t是英文中第二常見的字母,因此應該是E~t,但由於已假設X~t,所以伊夫暫且假設E~a。姑且讓這些假設進行解碼,獲得以下的(部分)已解密消息。

heVeTCSWPeYVaWHaVSReQMthaYVaOeaWHRtatePFaMVaWHKVSTYhtZetheKeetPeJVSZaYPaRRGaReM
WQhMGhMtQaReWGPSReHMtQaRaKeaTtMJTPRGaVaKaeTRaWHatthattMZeTWAWSQWtSWatTVaPMRtRSJ
GSTVReaYVeatCVMUeMWaRGMeWtMJMGCSMWtSJOMeQtheVeQeVetQSVSTWHKPaGARCStRWeaVSWeeBtV
eZMtFSJtheKaGAaWHaPSWYSWeWeaVtheStheVtheRGaPeRQeVeeBGeeHMWYPFhaVHaWHYPSRRFQMtha
PPtheaCCeaVaWGeSJKTVWMRheHYSPHtheQeMYhtSJtheMWReGtQaROeVFVeZaVAaKPeaWHtaAMWYaPP
thMWYRMWtSGSWRMHeVatMSWMGSTPHhaVHPFKPaZeNTCMteVJSVhMRSCMWMSWVeRCeGtMWYMt

使用這些初始的猜測,伊夫發現了某些規律,來讓她可以確認其猜測,例如"that"。此外,其他規律則建議了進一步的猜測:"Rtate"可能是"state",即R~s。同樣,"atthattMZe"可以是"atthattime",寫出M~iZ~m。而且,"heVe"可能是"here",給出V~r。再填入本來的密文,獲得:

hereTCSWPeYraWHarSseQithaYraOeaWHstatePFairaWHKrSTYhtmetheKeetPeJrSmaYPassGasei
WQhiGhitQaseWGPSseHitQasaKeaTtiJTPsGaraKaeTsaWHatthattimeTWAWSQWtSWatTraPistsSJ
GSTrseaYreatCriUeiWasGieWtiJiGCSiWtSJOieQthereQeretQSrSTWHKPaGAsCStsWearSWeeBtr
emitFSJtheKaGAaWHaPSWYSWeWeartheStherthesGaPesQereeBGeeHiWYPFharHaWHYPSssFQitha
PPtheaCCearaWGeSJKTrWisheHYSPHtheQeiYhtSJtheiWseGtQasOerFremarAaKPeaWHtaAiWYaPP
thiWYsiWtSGSWsiHeratiSWiGSTPHharHPFKPameNTCiterJSrhisSCiWiSWresCeGtiWYit

反過來,這些猜測還建議一些例子(例如"remarA"可能是"remark",即A~k)。接著,相對簡單地就可推斷出其餘字母,最終產生明文:

hereuponlegrandarosewithagraveandstatelyairandbroughtmethebeetlefromaglasscasei
nwhichitwasencloseditwasabeautifulscarabaeusandatthattimeunknowntonaturalistsof
courseagreatprizeinascientificpointofviewthereweretworoundblackspotsnearoneextr
emityofthebackandalongoneneartheotherthescaleswereexceedinglyhardandglossywitha
lltheappearanceofburnishedgoldtheweightoftheinsectwasveryremarkableandtakingall
thingsintoconsiderationicouldhardlyblamejupiterforhisopinionrespectingit

到了此時,伊夫便可以加上空格及標點符號:

Hereupon Legrand arose, with a grave and stately air, and brought me the beetle
from a glass case in which it was enclosed. It was a beautiful scarabaeus, and, at
that time, unknown to naturalists—of course a great prize in a scientific point
of view. There were two round black spots near one extremity of the back, and a
long one near the other. The scales were exceedingly hard and glossy, with all the
appearance of burnished gold. The weight of the insect was very remarkable, and,
taking all things into consideration, I could hardly blame Jupiter for his opinion
respecting it.

其實這個例子是來自金甲蟲,正好伊夫的猜測全部正確。這並非總是如此,個別明文中的統計資料變化可能意味著最初的猜測並不正確。這樣可能就要做回溯法來更正錯誤或進一步推測。

明文中沒有表現出預期的字母頻率分佈也有可能。越短的消息越會表現出其更多的變化。明文本來就是經過人為扭曲的文本,例如整篇明文沒有了一些字母,通常會是最常見的「e」,這樣就稱為漏字文

历史和应用

肯迪第九世紀所著的《手稿上破譯加密消息》
阿拉伯字母頻率分布英语Arabic_Letter_Frequency

第一個已知頻率分析(事實上,是任何一種密碼分析)的解釋是在9世紀時,阿拉伯博學家肯迪所著的《手稿上破譯加密消息》之上。[1] 它對於古蘭經的文本研究發現阿拉伯文有一個特別的字母頻率。其使用快速蔓延,類似的系統在文藝復興時期的歐洲國家十分流行。1474年,西科·西蒙内塔英语Cicco Simonetta寫了一本手冊,上有關於破譯已加密的拉丁語意大利語文本。[2]

密碼學家為加強簡單替換加密,使用了數項措施,包括:

所有這些抵禦頻率分析攻擊的嘗試都有一個缺點:它增加了加密和解密的難度,可能導致使用失誤。而最著名的的事件如下:最初英國外交部拒絕使用波雷費密碼,認為它太複雜。當惠斯登證明鄰近學校的四個男孩中,有三個可以在15分鐘內學會這種方法,外交部副秘書長的回應是:「這是有可能的,可惜你不能教曉那些高層人員。」

20世紀首50年,旋轉盤的使用興起(例如,恩尼格瑪密碼機),其基本上不會受到直接頻率分析攻擊。然而,其他種類的分析成功解譯了其中一些信息(其中最著名為Ultra計劃)。

西班牙字母頻率

頻率分析只需基本了解明文字母的統計,以及一些解決問題的能力,而且此方法可用人手解譯。在第二次世界大戰期間,英國美國同時使用各大報紙上字謎和密碼比賽來招募解碼專家。軸心國中使用了某些很容易遭頻率分析破解的密碼(例如日本第二次世界大戰時的領事密碼)。機械替換加密或解密亦於第二次世界大戰之時開始使用。現時,頻率分析基本上全由電腦來完成,因此,現時替換式密碼很容易就被破解。

小说中的频率分析

阿瑟·柯南·道尔所寫的偵探小說福爾摩斯‧歸來記》中《跳舞的人》篇中,福爾摩斯就在牆上看到五個跳舞人的畫,他從英語用語對答的常用性與英語使用頻率最高的字母E猜出了其中一次跳舞人畫所代表的字為Never,從而破解了字謎。

爱伦坡的《金甲蟲》亦是一小說有密文的例子。

参考文献

引用

  1. ^ Ibrahim A. Al-Kadi‧《密碼學的起源:阿拉伯國家的貢獻》,Cryptologia页面存档备份,存于互联网档案馆, 16(2) (1992年4月) pp. 97–126.
  2. ^ Kahn, David L. 密碼破譯者:加密的故事. 紐約: Scribner. 1996. ISBN 0-684-83130-9. 

书籍

  • Helen Fouché Gaines, "Cryptanalysis", 1939, Dover. ISBN 978-0-486-20097-2
  • Ibraham A. “Al-Kindi: The origins of cryptology: The Arab contributions”, Cryptologia, 16(2) (April 1992) pp. 97–126.
  • Abraham Sinkov, "Elementary Cryptanalysis : A Mathematical Approach", The Mathematical Association of America, 1966. ISBN 978-0-88385-622-2.

参见

外部链接

Read other articles:

Rifle cartridge This article has multiple issues. Please help improve it or discuss these issues on the talk page. (Learn how and when to remove these template messages) This article includes a list of general references, but it lacks sufficient corresponding inline citations. Please help to improve this article by introducing more precise citations. (October 2008) (Learn how and when to remove this template message) This article needs additional citations for verification. Please help improv...

 

Prince of Moldavia (1531–1562) This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed.Find sources: Ilie II Rareș – news · newspapers · books · scholar · JSTOR (September 2007) (Learn how and when to remove this message) Ilie II RareșIliaș al II-lea RareșPrince of MoldaviaReign3 September 1546 – 30 May 1551PredecessorPet...

 

Disambiguazione – Koei Tecmo rimanda qui. Se stai cercando la società holding, vedi Koei Tecmo Holdings. Koei Tecmo Games Co., Ltd.Logo Sede centrale a Yokohama Stato Giappone Forma societariasocietà privata Fondazione1º aprile 2010 Sede principaleYokohama GruppoKoei Tecmo Holdings Controllate Koei Tecmo Singapore Pte, Ltd. Koei Tecmo China, Tianjin Koei Tecmo China, Beijing Koei Tecmo Software Vietnam Co., Ltd. Gust Nagano Development Group Settoreinformatico Prodotti ...

Boeing C-17 Globemaster IIIC-17 Globemaster IIITipePesawat angkutProdusenMcDonnell Douglas / BoeingTerbang perdana15 September 1991Diperkenalkan17 Januari 1995StatusAktifPengguna utamaAngkatan Udara Amerika SerikatAngkatan Udara IndiaAngkatan Udara Britania RayaPengguna lainLihat PenggunaTahun produksi1991–2015Jumlah produksi279Harga satuan$202,3 juta (1998)[1]Acuan dasarMcDonnell Douglas YC-15 McDonnell Douglas/Boeing C-17 Globemaster III adalah sebuah pesawat angkut yang dikembang...

 

Policy bureau of the Hong Kong Government For the agency in Macau, see Education and Youth Development Bureau. Education Bureau教育局Emblem of the Hong Kong SARAgency overviewFormed1852Jurisdiction Hong KongHeadquarters11/F, East Wing, Central Government Offices, 2 Tim Mei Avenue, Tamar, Hong KongEmployees5355Minister responsibleChristine Choi, Secretary for EducationDeputy Minister responsibleUnder Secretary for EducationAgency executiveMichelle Li, Permanent Secretary for EducationC...

 

Dewan Perwakilan Rakyat Daerah Kabupaten Buton TengahDewan Perwakilan RakyatKabupaten Buton Tengah2019–2024JenisJenisUnikameral Jangka waktu5 tahunSejarahSesi baru dimulai1 Oktober 2019PimpinanKetuaBobi Ertanto, S.Pd. (PDI-P) sejak 28 Oktober 2019 Wakil Ketua IAdam, S.Ag. (PAN) sejak 28 Oktober 2019 Wakil Ketua IISuharman, S.Pd. (NasDem) sejak 28 Oktober 2019 KomposisiAnggota25Partai & kursi  PDI-P (8)   NasDem (4)   PKB (2)   Demokrat...

Historic church in New York, United States United States historic placeTrinity-St. Paul's Episcopal ChurchU.S. National Register of Historic Places The clock tower at Trinity-St. Paul's Episcopal ChurchShow map of New YorkShow map of the United StatesLocation311 Huguenot St., New Rochelle, New YorkCoordinates40°54′34.2″N 73°47′4″W / 40.909500°N 73.78444°W / 40.909500; -73.78444Area1.6 acres (0.65 ha)Built1862-1864ArchitectRichard Upjohn & Son; F. C...

 

1930 Allahabad speech by Muhammad Iqbal Muhammad Iqbal, then president of the Muslim League in 1930 and address deliverer The Allahabad Address (Urdu: خطبہ الہ آباد) was a speech by scholar, Sir Muhammad Iqbal, one of the best-known in Pakistani history. It was delivered by Iqbal during the 21st annual session of the All-India Muslim League, on the afternoon of Monday, 29 December 1930, at Allahabad in United Provinces (U. P.). In this address Iqbal outlined a vision of independent...

 

Lebanese Christian nationalist political party and former militia For the faction during the Lebanese Civil War, see Lebanese Forces (militia). Not to be confused with Lebanese Armed Forces. Lebanese Forces القوات اللبنانيةal-Quwwāt al-LubnānīyahAbbreviationLFSecretary-GeneralEmile MoukarzelPresidentSamir GeageaFounderBachir GemayelVice-presidentGeorges AdwanFounded1976HeadquartersMaarab, LebanonNewspaperAlmassiraMembership50,000IdeologyChristian democracyLiberal conservatis...

1890 painting by Claude Monet This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed.Find sources: Boating on the River Epte – news · newspapers · books · scholar · JSTOR (October 2011) (Learn how and when to remove this message) Boating on the River EpteArtistClaude MonetYear1890Mediumoil on canvasDimensions133 cm ×&#...

 

نصار   معلومات شخصية الميلاد 5 مارس 1958 (66 سنة)  مواطنة الهند  عدد الأولاد 3   الحياة العملية المدرسة الأم كلية مدراس المسيحية  المهنة مخرج أفلام،  وممثل،  وكاتب سيناريو،  ومنتج أفلام  اللغات التاميلية،  والماليالامية  المواقع IMDB صفحته على IMDB  تع�...

 

TN19Stasiun Kita-Kanuma北鹿沼駅Stasiun Kita-Kanuma pada Agustus 2021Lokasi724 Tamada-machi, Kanuma-shi, Tochigi-ken 322-0072JepangKoordinat36°34′50″N 139°44′15″E / 36.5806°N 139.7375°E / 36.5806; 139.7375Operator Tobu RailwayJalurTN Jalur Tobu NikkoLetak69.8 km dari Tōbu-Dōbutsu-KōenJumlah peron2 peron sampingJumlah jalur2Informasi lainKode stasiunTN-19Situs webSitus web resmiSejarahDibuka10 Desember 1931PenumpangFY2020185 per hari Lokasi pada petaSt...

Definisi IUPAC untuk kopolimer Suatu polimer yang terdiri dari lebih dari satu monomer. Catatan: Kopolimer yang diperoleh dari kopolimerisasi dari dua spesi monomerterkadang diistilahkan sebagai bipolimer, mereka yang diperoleh dari tiga monomerdisebut terpolimer, untuk empat monomer kuaterpolimer, dsb. [1] Kopolimer bergantian (alternating): Suatu kopolimer yang terdiri dari makromolekulyang terdiri dari dua spesi satuan monomer dalam urutan bergantian. Catatan: Kopolimer bergantian...

 

Men's 50 kilometres walk at the 2010 Asian GamesVenueAoti Main StadiumDate27 NovemberCompetitors5 from 3 nationsMedalists  Si Tianfeng   China Li Lei   China Koichiro Morioka   Japan← 19982014 → Athletics at the2010 Asian GamesTrack events100 mmenwomen200 mmenwomen400 mmenwomen800 mmenwomen1500 mmenwomen5000 mmenwomen10,000 mmenwomen100 m hurdleswomen110 m hurdlesmen400 m hurdlesmenwomen3000 m steeplechase...

 

American college football rivalry This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed.Find sources: Clemson–Georgia football rivalry – news · newspapers · books · scholar · JSTOR (August 2016) (Learn how and when to remove this message) Clemson–Georgia football rivalry Clemson Tigers Georgia Bulldogs First meetingOctober ...

University of Illinois Ice RinkLocationChampaign, IllinoisPublic transit MTDOwnerUniversity of Illinois at Urbana–ChampaignOperatorCampus RecreationCapacity1,500 (Ice hockey)Surface197 ft × 115 ft (60 m × 35 m)ConstructionOpened1931ArchitectHolabird and RootTenantsIllini Men's and Women's Ice Hockey Teams Illini Synchronized Skating Team The University of Illinois Ice Arena, also known as the Big Pond,[1] is an ice arena and recreational sports facili...

 

The decay of a kaon (K+) into three pions (2 π+, 1 π−) is a process that involves both weak and strong interactions.Weak interactions: The strange antiquark (s) of the kaon transmutes into an up antiquark (u) by the emission of a W+ boson; the W+ boson subsequently decays into a down antiquark (d) and an up quark (u).Strong interactions: An up quark (u) emits a gluon (g) which decays into a down quark (d) and a down ...

 

Si ce bandeau n'est plus pertinent, retirez-le. Cliquez ici pour en savoir plus. Cet article adopte un point de vue régional ou culturel particulier et nécessite une internationalisation (janvier 2024). Merci de l'améliorer ou d'en discuter sur sa page de discussion ! Vous pouvez préciser les sections à internationaliser en utilisant {{section à internationaliser}}. Mairie de Serres-Castet dans les Pyrénées-Atlantiques en France. Une mairie est l'appareil administratif d'une vill...

Donna rastrella il fieno, stampa Mikuláš Jordán (Prešov, 7 giugno 1892 – Prešov, 16 aprile 1977) è stato un pittore slovacco. Tomba di Mikuláš Jordán e dei genitori al cimitero di Prešov. Biografia Nacque dal vasaio Bartolomej Jordán e da sua moglie Alžbeta, nata Sedláková. Acquisì le basi dell'educazione artistica dall'importante pittore all'aria aperta Pál Szinyei Merse a Jarovnice e le approfondì all'Accademia di Belle Arti di Budapest, sotto la guida di Eduard Ballo, ma...

 

Questa voce sull'argomento calciatori italiani è solo un abbozzo. Contribuisci a migliorarla secondo le convenzioni di Wikipedia. Segui i suggerimenti del progetto di riferimento. Bernardo RogoraRogora alla Fiorentina negli anni 1960Nazionalità Italia Altezza175 cm Peso72 kg Calcio RuoloDifensore CarrieraGiovanili 19??-19?? Pro Patria Squadre di club1 1959-1960 Pro Patria1 (0)1960-1962 Gallaratese56 (1)1962-1965 Padova95 (1)1965-1970 Fiorentina123 (3)1970...