[{"data":1,"prerenderedAt":605},["ShallowReactive",2],{"content:\u002Fen\u002Farchive\u002Finformation-theory":3},{"id":4,"title":5,"ambience":6,"articleStatus":7,"assets":8,"body":9,"breadcrumb":591,"chunks":8,"completed":6,"def":8,"description":592,"disclaimer":6,"extension":593,"hasMath":47,"image":8,"indexed":6,"key":594,"language":595,"meta":596,"metaTitle":8,"navigation":47,"nextArticle":8,"nextArticleTransition":8,"path":597,"previousArticle":8,"previousArticleTransition":8,"publishedAt":598,"review":6,"seo":599,"seriesPart":8,"seriesTitle":8,"stem":600,"subtitle":8,"tags":601,"tocEnabled":6,"__hash__":604},"legacy_en\u002Fen\u002Farchive\u002Finformation-theory.md","Information theory",false,"published",null,{"type":10,"value":11,"toc":572},"minimark",[12,17,33,49,52,63,76,79,87,107,115,140,148,157,166,170,175,178,181,191,194,197,200,268,271,315,318,321,329,333,336,346,358,368,372,386,391,398,401,406,484,488,502,506,517,525,528,537,545,548],[13,14,16],"h2",{"id":15},"measurement-and-encoding-of-information","Measurement and encoding of information",[18,19,20,21],"p",{},"Shannon's formula of entropy ",[22,23,24],"sup",{},[25,26,32],"a",{"href":27,"ariaDescribedBy":28,"dataFootnoteRef":30,"id":31},"#user-content-fn-1",[29],"footnote-label","","user-content-fnref-1","1",[34,35,39],"div",{"className":36},[37,38],"math-display-scroll","edge-fade-scroll",[40,41],"math",{"display":42,"className":43,"style":45,"dataCopyLatex":46,"dataCopyDisplay":47,"innerHTML":48},"block",[44],"tml-display","display:block math;","H_b(S) = -\\sum_{s \\in \\mathbf{A}}{p_S(s)\\log_b(p_S(s))}",true,"\u003Cmrow>\u003Cmsub>\u003Cmi>H\u003C\u002Fmi>\u003Cmi>b\u003C\u002Fmi>\u003C\u002Fmsub>\u003Cmrow>\u003Cmo fence=\"true\" form=\"prefix\" stretchy=\"false\">(\u003C\u002Fmo>\u003Cmi>S\u003C\u002Fmi>\u003Cmo fence=\"true\" form=\"postfix\" stretchy=\"false\">)\u003C\u002Fmo>\u003C\u002Fmrow>\u003Cmo>=\u003C\u002Fmo>\u003Cmo form=\"prefix\" stretchy=\"false\">−\u003C\u002Fmo>\u003Cmrow>\u003Cmunder>\u003Cmo movablelimits=\"false\">∑\u003C\u002Fmo>\u003Cmrow>\u003Cmi>s\u003C\u002Fmi>\u003Cmo>∈\u003C\u002Fmo>\u003Cmi>𝐀\u003C\u002Fmi>\u003C\u002Fmrow>\u003C\u002Fmunder>\u003C\u002Fmrow>\u003Cmrow>\u003Cmsub>\u003Cmi>p\u003C\u002Fmi>\u003Cmi>S\u003C\u002Fmi>\u003C\u002Fmsub>\u003Cmrow>\u003Cmo fence=\"true\" form=\"prefix\" stretchy=\"false\">(\u003C\u002Fmo>\u003Cmi>s\u003C\u002Fmi>\u003Cmo fence=\"true\" form=\"postfix\" stretchy=\"false\">)\u003C\u002Fmo>\u003C\u002Fmrow>\u003Cmsub>\u003Cmi>log\u003C\u002Fmi>\u003Cmi>b\u003C\u002Fmi>\u003C\u002Fmsub>\u003Cmo>⁡\u003C\u002Fmo>\u003Cmrow>\u003Cmo fence=\"true\" form=\"prefix\" stretchy=\"false\">(\u003C\u002Fmo>\u003Cmsub>\u003Cmi>p\u003C\u002Fmi>\u003Cmi>S\u003C\u002Fmi>\u003C\u002Fmsub>\u003Cmrow>\u003Cmo fence=\"true\" form=\"prefix\" stretchy=\"false\">(\u003C\u002Fmo>\u003Cmi>s\u003C\u002Fmi>\u003Cmo fence=\"true\" form=\"postfix\" stretchy=\"false\">)\u003C\u002Fmo>\u003C\u002Fmrow>\u003Cmo fence=\"true\" form=\"postfix\" stretchy=\"false\">)\u003C\u002Fmo>\u003C\u002Fmrow>\u003C\u002Fmrow>\u003C\u002Fmrow>",[18,50,51],{},"By convention, when the base b is not specified, we use the base 2 (binary system): b = 2.",[18,53,54,58,59],{},[55,56,57],"em",{},"Information Theory (IT) inequality"," :\n",[40,60],{"dataCopyLatex":61,"dataCopyDisplay":6,"innerHTML":62},"log_b(r) \\leq (r+1)log_b(e)","\u003Cmrow>\u003Cmi>l\u003C\u002Fmi>\u003Cmi>o\u003C\u002Fmi>\u003Cmsub>\u003Cmi>g\u003C\u002Fmi>\u003Cmi>b\u003C\u002Fmi>\u003C\u002Fmsub>\u003Cmrow>\u003Cmo fence=\"true\" form=\"prefix\" stretchy=\"false\">(\u003C\u002Fmo>\u003Cmi>r\u003C\u002Fmi>\u003Cmo fence=\"true\" form=\"postfix\" stretchy=\"false\">)\u003C\u002Fmo>\u003C\u002Fmrow>\u003Cmo>≤\u003C\u002Fmo>\u003Cmrow>\u003Cmo fence=\"true\" form=\"prefix\" stretchy=\"false\">(\u003C\u002Fmo>\u003Cmi>r\u003C\u002Fmi>\u003Cmo>+\u003C\u002Fmo>\u003Cmn>1\u003C\u002Fmn>\u003Cmo fence=\"true\" form=\"postfix\" stretchy=\"false\">)\u003C\u002Fmo>\u003C\u002Fmrow>\u003Cmi>l\u003C\u002Fmi>\u003Cmi>o\u003C\u002Fmi>\u003Cmsub>\u003Cmi>g\u003C\u002Fmi>\u003Cmi>b\u003C\u002Fmi>\u003C\u002Fmsub>\u003Cmrow>\u003Cmo fence=\"true\" form=\"prefix\" stretchy=\"false\">(\u003C\u002Fmo>\u003Cmi>e\u003C\u002Fmi>\u003Cmo fence=\"true\" form=\"postfix\" stretchy=\"false\">)\u003C\u002Fmo>\u003C\u002Fmrow>\u003C\u002Fmrow>",[18,64,65,66,75],{},"for all ",[67,68,71],"span",{"className":69},[70],"inline-math",[40,72],{"dataCopyLatex":73,"dataCopyDisplay":6,"innerHTML":74},"r > 0","\u003Cmrow>\u003Cmi>r\u003C\u002Fmi>\u003Cmo>>\u003C\u002Fmo>\u003Cmn>0\u003C\u002Fmn>\u003C\u002Fmrow>",".",[18,77,78],{},"The average codewords length:",[34,80,82],{"className":81},[37,38],[40,83],{"display":42,"className":84,"style":45,"dataCopyLatex":85,"dataCopyDisplay":47,"innerHTML":86},[44],"L(S, Γ) = \\sum_{s \\in \\mathbf{A}} p_S(s)l(Γ(s))","\u003Cmrow>\u003Cmi>L\u003C\u002Fmi>\u003Cmrow>\u003Cmo fence=\"true\" form=\"prefix\" stretchy=\"false\">(\u003C\u002Fmo>\u003Cmi>S\u003C\u002Fmi>\u003Cmo separator=\"true\">,\u003C\u002Fmo>\u003Cmrow>\u003Cmi mathvariant=\"normal\">Γ\u003C\u002Fmi>\u003Cmspace>\u003C\u002Fmspace>\u003C\u002Fmrow>\u003Cmo fence=\"true\" form=\"postfix\" stretchy=\"false\">)\u003C\u002Fmo>\u003C\u002Fmrow>\u003Cmo>=\u003C\u002Fmo>\u003Cmrow>\u003Cmunder>\u003Cmo movablelimits=\"false\">∑\u003C\u002Fmo>\u003Cmrow>\u003Cmi>s\u003C\u002Fmi>\u003Cmo>∈\u003C\u002Fmo>\u003Cmi>𝐀\u003C\u002Fmi>\u003C\u002Fmrow>\u003C\u002Fmunder>\u003C\u002Fmrow>\u003Cmsub>\u003Cmi>p\u003C\u002Fmi>\u003Cmi>S\u003C\u002Fmi>\u003C\u002Fmsub>\u003Cmrow>\u003Cmo fence=\"true\" form=\"prefix\" stretchy=\"false\">(\u003C\u002Fmo>\u003Cmi>s\u003C\u002Fmi>\u003Cmo fence=\"true\" form=\"postfix\" stretchy=\"false\">)\u003C\u002Fmo>\u003C\u002Fmrow>\u003Cmi>l\u003C\u002Fmi>\u003Cmrow>\u003Cmo fence=\"true\" form=\"prefix\" stretchy=\"false\">(\u003C\u002Fmo>\u003Cmrow>\u003Cmi mathvariant=\"normal\">Γ\u003C\u002Fmi>\u003Cmspace>\u003C\u002Fmspace>\u003C\u002Fmrow>\u003Cmrow>\u003Cmo fence=\"true\" form=\"prefix\" stretchy=\"false\">(\u003C\u002Fmo>\u003Cmi>s\u003C\u002Fmi>\u003Cmo fence=\"true\" form=\"postfix\" stretchy=\"false\">)\u003C\u002Fmo>\u003C\u002Fmrow>\u003Cmo fence=\"true\" form=\"postfix\" stretchy=\"false\">)\u003C\u002Fmo>\u003C\u002Fmrow>\u003C\u002Fmrow>",[18,88,89,90,93],{},"We have the following property:",[91,92],"br",{},[67,94,96,97,101,102,106],{"className":95},[70],"Let ",[40,98],{"dataCopyLatex":99,"dataCopyDisplay":6,"innerHTML":100},"Γ : \\mathbf{A} \\rightarrow C","\u003Cmrow>\u003Cmrow>\u003Cmi mathvariant=\"normal\">Γ\u003C\u002Fmi>\u003Cmspace>\u003C\u002Fmspace>\u003C\u002Fmrow>\u003Cmo lspace=\"0.2222em\" rspace=\"0.2222em\">:\u003C\u002Fmo>\u003Cmi>𝐀\u003C\u002Fmi>\u003Cmo stretchy=\"false\">→\u003C\u002Fmo>\u003Cmi>C\u003C\u002Fmi>\u003C\u002Fmrow>"," be an encoding function for a D-ary code following a distribution (random variable) ",[40,103],{"dataCopyLatex":104,"dataCopyDisplay":6,"innerHTML":105},"S \\in \\mathbf{A}","\u003Cmrow>\u003Cmi>S\u003C\u002Fmi>\u003Cmo>∈\u003C\u002Fmo>\u003Cmi>𝐀\u003C\u002Fmi>\u003C\u002Fmrow>",". If the code is uniquely decodable, then we have:",[34,108,110],{"className":109},[37,38],[40,111],{"display":42,"className":112,"style":45,"dataCopyLatex":113,"dataCopyDisplay":47,"innerHTML":114},[44],"H_D(S) \\leq L(S, Γ)","\u003Cmrow>\u003Cmsub>\u003Cmi>H\u003C\u002Fmi>\u003Cmi>D\u003C\u002Fmi>\u003C\u002Fmsub>\u003Cmrow>\u003Cmo fence=\"true\" form=\"prefix\" stretchy=\"false\">(\u003C\u002Fmo>\u003Cmi>S\u003C\u002Fmi>\u003Cmo fence=\"true\" form=\"postfix\" stretchy=\"false\">)\u003C\u002Fmo>\u003C\u002Fmrow>\u003Cmo>≤\u003C\u002Fmo>\u003Cmi>L\u003C\u002Fmi>\u003Cmrow>\u003Cmo fence=\"true\" form=\"prefix\" stretchy=\"false\">(\u003C\u002Fmo>\u003Cmi>S\u003C\u002Fmi>\u003Cmo separator=\"true\">,\u003C\u002Fmo>\u003Cmrow>\u003Cmi mathvariant=\"normal\">Γ\u003C\u002Fmi>\u003Cmspace>\u003C\u002Fmspace>\u003C\u002Fmrow>\u003Cmo fence=\"true\" form=\"postfix\" stretchy=\"false\">)\u003C\u002Fmo>\u003C\u002Fmrow>\u003C\u002Fmrow>",[18,116,117,121,123],{},[118,119,120],"u",{},"Shannon-Fano code",[91,122],{},[67,124,126,127,129,130,134,135,139],{"className":125},[70],"For any random variable ",[40,128],{"dataCopyLatex":104,"dataCopyDisplay":6,"innerHTML":105}," and any integer ",[40,131],{"dataCopyLatex":132,"dataCopyDisplay":6,"innerHTML":133},"D \\geq 2","\u003Cmrow>\u003Cmi>D\u003C\u002Fmi>\u003Cmo>≥\u003C\u002Fmo>\u003Cmn>2\u003C\u002Fmn>\u003C\u002Fmrow>",", there exists a prefix-free D-ary codefor S, such that ",[40,136],{"dataCopyLatex":137,"dataCopyDisplay":6,"innerHTML":138},"\\forall s \\in \\mathbf{A}","\u003Cmrow>\u003Cmi>∀\u003C\u002Fmi>\u003Cmi>s\u003C\u002Fmi>\u003Cmo>∈\u003C\u002Fmo>\u003Cmi>𝐀\u003C\u002Fmi>\u003C\u002Fmrow>",",",[34,141,143],{"className":142},[37,38],[40,144],{"display":42,"className":145,"style":45,"dataCopyLatex":146,"dataCopyDisplay":47,"innerHTML":147},[44],"l(Γ(s)) = \\lceil -\\log_Dp_S(s) \\rceil","\u003Cmrow>\u003Cmi>l\u003C\u002Fmi>\u003Cmrow>\u003Cmo fence=\"true\" form=\"prefix\" stretchy=\"false\">(\u003C\u002Fmo>\u003Cmrow>\u003Cmi mathvariant=\"normal\">Γ\u003C\u002Fmi>\u003Cmspace>\u003C\u002Fmspace>\u003C\u002Fmrow>\u003Cmrow>\u003Cmo fence=\"true\" form=\"prefix\" stretchy=\"false\">(\u003C\u002Fmo>\u003Cmi>s\u003C\u002Fmi>\u003Cmo fence=\"true\" form=\"postfix\" stretchy=\"false\">)\u003C\u002Fmo>\u003C\u002Fmrow>\u003Cmo fence=\"true\" form=\"postfix\" stretchy=\"false\">)\u003C\u002Fmo>\u003C\u002Fmrow>\u003Cmo>=\u003C\u002Fmo>\u003Cmrow>\u003Cmo fence=\"true\" form=\"prefix\" stretchy=\"false\">⌈\u003C\u002Fmo>\u003Cmo form=\"prefix\" stretchy=\"false\">−\u003C\u002Fmo>\u003Cmsub>\u003Cmi>log\u003C\u002Fmi>\u003Cmi>D\u003C\u002Fmi>\u003C\u002Fmsub>\u003Cmo>⁡\u003C\u002Fmo>\u003Cmspace width=\"0.1667em\">\u003C\u002Fmspace>\u003Cmsub>\u003Cmi>p\u003C\u002Fmi>\u003Cmi>S\u003C\u002Fmi>\u003C\u002Fmsub>\u003Cmrow>\u003Cmo fence=\"true\" form=\"prefix\" stretchy=\"false\">(\u003C\u002Fmo>\u003Cmi>s\u003C\u002Fmi>\u003Cmo fence=\"true\" form=\"postfix\" stretchy=\"false\">)\u003C\u002Fmo>\u003C\u002Fmrow>\u003Cmo fence=\"true\" form=\"postfix\" stretchy=\"false\">⌉\u003C\u002Fmo>\u003C\u002Fmrow>\u003C\u002Fmrow>",[18,149,150,153],{},[118,151,152],{},"Entrypy of a symbol:",[40,154],{"dataCopyLatex":155,"dataCopyDisplay":6,"innerHTML":156},"H(\\mathcal{S}) = \\lim_{i \\to \\infty} H(S_i)","\u003Cmrow>\u003Cmi>H\u003C\u002Fmi>\u003Cmrow>\u003Cmo fence=\"true\" form=\"prefix\" stretchy=\"false\">(\u003C\u002Fmo>\u003Cmi class=\"mathcal\">𝒮\u003C\u002Fmi>\u003Cmo fence=\"true\" form=\"postfix\" stretchy=\"false\">)\u003C\u002Fmo>\u003C\u002Fmrow>\u003Cmo>=\u003C\u002Fmo>\u003Cmsub>\u003Cmi>lim\u003C\u002Fmi>\u003Cmrow>\u003Cmi>i\u003C\u002Fmi>\u003Cmo>→\u003C\u002Fmo>\u003Cmi>∞\u003C\u002Fmi>\u003C\u002Fmrow>\u003C\u002Fmsub>\u003Cmo>⁡\u003C\u002Fmo>\u003Cmspace width=\"0.1667em\">\u003C\u002Fmspace>\u003Cmi>H\u003C\u002Fmi>\u003Cmrow>\u003Cmo fence=\"true\" form=\"prefix\" stretchy=\"false\">(\u003C\u002Fmo>\u003Cmsub>\u003Cmi>S\u003C\u002Fmi>\u003Cmi>i\u003C\u002Fmi>\u003C\u002Fmsub>\u003Cmo fence=\"true\" form=\"postfix\" stretchy=\"false\">)\u003C\u002Fmo>\u003C\u002Fmrow>\u003C\u002Fmrow>",[18,158,159,162],{},[118,160,161],{},"Entropy per symbol:",[40,163],{"dataCopyLatex":164,"dataCopyDisplay":6,"innerHTML":165},"H^*(\\mathcal{S}) = \\lim_{i \\to \\infty} H(S_i|S_1, S_2, \\ldots, S_{i-1})","\u003Cmrow>\u003Cmsup>\u003Cmi>H\u003C\u002Fmi>\u003Cmo form=\"prefix\" stretchy=\"false\" class=\"tml-sml-pad\">∗\u003C\u002Fmo>\u003C\u002Fmsup>\u003Cmrow>\u003Cmo fence=\"true\" form=\"prefix\" stretchy=\"false\">(\u003C\u002Fmo>\u003Cmi class=\"mathcal\">𝒮\u003C\u002Fmi>\u003Cmo fence=\"true\" form=\"postfix\" stretchy=\"false\">)\u003C\u002Fmo>\u003C\u002Fmrow>\u003Cmo>=\u003C\u002Fmo>\u003Cmsub>\u003Cmi>lim\u003C\u002Fmi>\u003Cmrow>\u003Cmi>i\u003C\u002Fmi>\u003Cmo>→\u003C\u002Fmo>\u003Cmi>∞\u003C\u002Fmi>\u003C\u002Fmrow>\u003C\u002Fmsub>\u003Cmo>⁡\u003C\u002Fmo>\u003Cmspace width=\"0.1667em\">\u003C\u002Fmspace>\u003Cmi>H\u003C\u002Fmi>\u003Cmrow>\u003Cmo fence=\"true\" form=\"prefix\" stretchy=\"false\">(\u003C\u002Fmo>\u003Cmsub>\u003Cmi>S\u003C\u002Fmi>\u003Cmi>i\u003C\u002Fmi>\u003C\u002Fmsub>\u003Cmi>|\u003C\u002Fmi>\u003Cmsub>\u003Cmi>S\u003C\u002Fmi>\u003Cmn>1\u003C\u002Fmn>\u003C\u002Fmsub>\u003Cmo separator=\"true\">,\u003C\u002Fmo>\u003Cmsub>\u003Cmi>S\u003C\u002Fmi>\u003Cmn>2\u003C\u002Fmn>\u003C\u002Fmsub>\u003Cmo separator=\"true\">,\u003C\u002Fmo>\u003Cmo>…\u003C\u002Fmo>\u003Cmo separator=\"true\">,\u003C\u002Fmo>\u003Cmsub>\u003Cmi>S\u003C\u002Fmi>\u003Cmrow>\u003Cmi>i\u003C\u002Fmi>\u003Cmo>−\u003C\u002Fmo>\u003Cmn>1\u003C\u002Fmn>\u003C\u002Fmrow>\u003C\u002Fmsub>\u003Cmo fence=\"true\" form=\"postfix\" stretchy=\"false\">)\u003C\u002Fmo>\u003C\u002Fmrow>\u003C\u002Fmrow>",[13,167,169],{"id":168},"cryptography","Cryptography",[171,172,174],"h3",{"id":173},"introduction","Introduction",[18,176,177],{},"First there are the so-called symmetric cryptosystems. Here we use a single encryption key. Let's take two parties A and B. If A wants to send an encrypted message to B he will use an encryption function with the data of the encryption key. When B will receive the message from A, he will have to use a decryption function (the \"inverse\" function of the encryption function) with the same key as A.",[18,179,180],{},"Here, the encryption and decryption functions are very fast, but a problem arises: in order for A and B to use the same key, they will have to exchange it. And during this key exchange between A and B, a malicious person might intercept the key and send it back to B. This person will then be able to decrypt the information, thus breaking the confidentiality established between A and B.",[18,182,183,184,190],{},"This is the origin of the so-called \"",[25,185,189],{"href":186,"rel":187},"https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FMan-in-the-middle_attack",[188],"nofollow","Man-in-the-middle-attack","\".",[18,192,193],{},"The second system is asymmetric encryption. In this one, if A wants to send an encrypted message to B, he will have to use two keys: a public key and a private key. The public key is accessible to everyone. It is by using A's public key that B will be able to decrypt A's message that he has encrypted with his private key.",[18,195,196],{},"With this system, there is no key exchange, but the encryption and decryption functions are slower than with symmetric encryption. Moreover, the security of this kind of system relies on the fact that with today's computers, it would take an extremely long time to find an individual's private key from his or her public key (accessible to everyone). The point is that it is technically possible to decrypt any conversation using asymmetric encryption, but all in an unreasonable amount of time.",[18,198,199],{},"Different applications of cryptography",[201,202,203,216],"table",{},[204,205,206],"thead",{},[207,208,209,213],"tr",{},[210,211,212],"th",{},"Name",[210,214,215],{},"Type of encryption",[217,218,219,228,236,244,252,260],"tbody",{},[207,220,221,225],{},[222,223,224],"td",{},"Cards and banking systems",[222,226,227],{},"RSA",[207,229,230,233],{},[222,231,232],{},"NSA's \"secret defense\" files",[222,234,235],{},"AES",[207,237,238,241],{},[222,239,240],{},"Online shopping",[222,242,243],{},"SSL or TLS",[207,245,246,249],{},[222,247,248],{},"Wifi networks",[222,250,251],{},"WEP, WPA or WPA2",[207,253,254,257],{},[222,255,256],{},"Client-server relationship",[222,258,259],{},"SSH (using RSA or DSA)",[207,261,262,265],{},[222,263,264],{},"Email",[222,266,267],{},"PGP (RSA or DSA)",[18,269,270],{},"Classification of certain encryption systems",[201,272,273,283],{},[204,274,275],{},[207,276,277,280],{},[210,278,279],{},"Symmetric encryption",[210,281,282],{},"Asymmetric encryption",[217,284,285,291,299,307],{},[207,286,287,289],{},[222,288,235],{},[222,290,227],{},[207,292,293,296],{},[222,294,295],{},"DES",[222,297,298],{},"McEliece",[207,300,301,304],{},[222,302,303],{},"IDEA",[222,305,306],{},"DSS\u002FDSA",[207,308,309,312],{},[222,310,311],{},"Menezes-Vanstonne",[222,313,314],{},"ElGamal",[18,316,317],{},"Not discussed here, it may be interesting to learn about homomorphic encryption and its potential use for the cloud.",[18,319,320],{},"In cryptography, the first names Alice and Bob are generally used to name two interlocutors. The first name Eve is used to designate a third person who is secretly listening to the conversation.",[18,322,323,324,75],{},"List of other names used: ",[25,325,328],{"href":326,"rel":327},"https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FAlice_and_Bob",[188],"Wikipedia page",[171,330,332],{"id":331},"symmetric-encryption-systems","Symmetric encryption systems",[18,334,335],{},"Historical encryption systems:",[337,338,339,343],"ul",{},[340,341,342],"li",{},"Caesar's encryption",[340,344,345],{},"Vigenère's encryption",[18,347,348,355,357],{},[118,349,350,351,354],{},"Definition (",[55,352,353],{},"Perfect Secrecy",")",[91,356],{},"\nA cryptosystem has a perfect secret if its plaintext T and the corresponding ciphertext C are statistically independent.",[18,359,360,361,363,364],{},"Important result:",[91,362],{},"\nLet be a symmetric encryption system of key K. For this system to have a perfect secret, it must verify for any clear text T :\n",[40,365],{"dataCopyLatex":366,"dataCopyDisplay":6,"innerHTML":367},"H(K) \\geq H(T)","\u003Cmrow>\u003Cmi>H\u003C\u002Fmi>\u003Cmrow>\u003Cmo fence=\"true\" form=\"prefix\" stretchy=\"false\">(\u003C\u002Fmo>\u003Cmi>K\u003C\u002Fmi>\u003Cmo fence=\"true\" form=\"postfix\" stretchy=\"false\">)\u003C\u002Fmo>\u003C\u002Fmrow>\u003Cmo>≥\u003C\u002Fmo>\u003Cmi>H\u003C\u002Fmi>\u003Cmrow>\u003Cmo fence=\"true\" form=\"prefix\" stretchy=\"false\">(\u003C\u002Fmo>\u003Cmi>T\u003C\u002Fmi>\u003Cmo fence=\"true\" form=\"postfix\" stretchy=\"false\">)\u003C\u002Fmo>\u003C\u002Fmrow>\u003C\u002Fmrow>",[171,369,371],{"id":370},"asymmetric-encryption-systems","Asymmetric encryption systems",[18,373,374,375,380,381,75],{},"To better understand the way such systems work, it is mandatory to have some knowledge of ",[25,376,379],{"href":377,"rel":378},"https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FNumber_theory",[188],"number theory"," and ",[25,382,385],{"href":383,"rel":384},"https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FModular_arithmetic",[188],"modular arithmetic",[387,388,390],"h4",{"id":389},"rsa-encryption","RSA Encryption",[18,392,393,394,397],{},"RSA, for ",[55,395,396],{},"Rivest Shamir Adleman"," is an encryption that appeared in 1977. It was created by Ronald Rivest, Adi Shamir, and Leonard Adleman.",[18,399,400],{},"Let's describe how this system works when Alice wants to send a message to Bob. To do so, Bob will need to create his two keys: a private key and a public key.",[402,403,405],"h5",{"id":404},"steps-for-bob","Steps for Bob:",[34,407,409,442,450,462,470,477],{"className":408},[70],[337,410,411,421,432],{},[340,412,413,414,380,417,420],{},"He chooses two distinct prime numbers ",[415,416,18],"strong",{},[415,418,419],{},"q",". In order to guarantee the security of the encryption, these two numbers must be large enough. One can imagine two 1024 bits prime numbers, which is the usual practice.",[340,422,423,424,427,428,75],{},"Let us note ",[415,425,426],{},"m = pq",", which will be used as a modulus: all the following operations will be performed in ",[40,429],{"dataCopyLatex":430,"dataCopyDisplay":6,"innerHTML":431},"\\mathbb{Z\u002F}m\\mathbb{Z}","\u003Cmrow>\u003Cmrow>\u003Cmi>ℤ\u003C\u002Fmi>\u003Cmi>\u002F\u003C\u002Fmi>\u003C\u002Fmrow>\u003Cmi>m\u003C\u002Fmi>\u003Cmi>ℤ\u003C\u002Fmi>\u003C\u002Fmrow>",[340,433,434,435,438,439,441],{},"Then, Bob chooses an integer ",[415,436,437],{},"k",", multiple of both (p-1) and (q-1).",[91,440],{},"p and q being distinct, it is then quite appropriate to choose the Euler indicator in pq:",[34,443,445],{"className":444},[37,38],[40,446],{"display":42,"className":447,"style":45,"dataCopyLatex":448,"dataCopyDisplay":47,"innerHTML":449},[44],"k = \\phi(pq) = \\phi(p)\\phi(q) = (p-1)(q-1)","\u003Cmrow>\u003Cmi>k\u003C\u002Fmi>\u003Cmo>=\u003C\u002Fmo>\u003Cmi>ϕ\u003C\u002Fmi>\u003Cmrow>\u003Cmo fence=\"true\" form=\"prefix\" stretchy=\"false\">(\u003C\u002Fmo>\u003Cmi>p\u003C\u002Fmi>\u003Cmi>q\u003C\u002Fmi>\u003Cmo fence=\"true\" form=\"postfix\" stretchy=\"false\">)\u003C\u002Fmo>\u003C\u002Fmrow>\u003Cmo>=\u003C\u002Fmo>\u003Cmi>ϕ\u003C\u002Fmi>\u003Cmrow>\u003Cmo fence=\"true\" form=\"prefix\" stretchy=\"false\">(\u003C\u002Fmo>\u003Cmi>p\u003C\u002Fmi>\u003Cmo fence=\"true\" form=\"postfix\" stretchy=\"false\">)\u003C\u002Fmo>\u003C\u002Fmrow>\u003Cmi>ϕ\u003C\u002Fmi>\u003Cmrow>\u003Cmo fence=\"true\" form=\"prefix\" stretchy=\"false\">(\u003C\u002Fmo>\u003Cmi>q\u003C\u002Fmi>\u003Cmo fence=\"true\" form=\"postfix\" stretchy=\"false\">)\u003C\u002Fmo>\u003C\u002Fmrow>\u003Cmo>=\u003C\u002Fmo>\u003Cmrow>\u003Cmo fence=\"true\" form=\"prefix\" stretchy=\"false\">(\u003C\u002Fmo>\u003Cmi>p\u003C\u002Fmi>\u003Cmo>−\u003C\u002Fmo>\u003Cmn>1\u003C\u002Fmn>\u003Cmo fence=\"true\" form=\"postfix\" stretchy=\"false\">)\u003C\u002Fmo>\u003C\u002Fmrow>\u003Cmrow>\u003Cmo fence=\"true\" form=\"prefix\" stretchy=\"false\">(\u003C\u002Fmo>\u003Cmi>q\u003C\u002Fmi>\u003Cmo>−\u003C\u002Fmo>\u003Cmn>1\u003C\u002Fmn>\u003Cmo fence=\"true\" form=\"postfix\" stretchy=\"false\">)\u003C\u002Fmo>\u003C\u002Fmrow>\u003C\u002Fmrow>",[337,451,452,459],{},[340,453,454,455,458],{},"He chooses an integer ",[415,456,457],{},"e"," prime with k, in other words: gcd(e, k) = 1.",[340,460,461],{},"According to the Bézout identity, there are integers d and l such that :",[34,463,465],{"className":464},[37,38],[40,466],{"display":42,"className":467,"style":45,"dataCopyLatex":468,"dataCopyDisplay":47,"innerHTML":469},[44],"1 = ed + kl \\Leftrightarrow ed = 1 - kl","\u003Cmrow>\u003Cmn>1\u003C\u002Fmn>\u003Cmo>=\u003C\u002Fmo>\u003Cmi>e\u003C\u002Fmi>\u003Cmi>d\u003C\u002Fmi>\u003Cmo>+\u003C\u002Fmo>\u003Cmi>k\u003C\u002Fmi>\u003Cmi>l\u003C\u002Fmi>\u003Cmo stretchy=\"false\">⇔\u003C\u002Fmo>\u003Cmi>e\u003C\u002Fmi>\u003Cmi>d\u003C\u002Fmi>\u003Cmo>=\u003C\u002Fmo>\u003Cmn>1\u003C\u002Fmn>\u003Cmo>−\u003C\u002Fmo>\u003Cmi>k\u003C\u002Fmi>\u003Cmi>l\u003C\u002Fmi>\u003C\u002Fmrow>",[18,471,472,473,75],{},"Thus, we have: ",[40,474],{"dataCopyLatex":475,"dataCopyDisplay":6,"innerHTML":476},"[e]_k\\cdot[d]_k = [1]_k","\u003Cmrow>\u003Cmsub>\u003Cmrow>\u003Cmo fence=\"true\" form=\"prefix\" stretchy=\"false\">[\u003C\u002Fmo>\u003Cmi>e\u003C\u002Fmi>\u003Cmo fence=\"true\" form=\"postfix\" stretchy=\"false\">]\u003C\u002Fmo>\u003C\u002Fmrow>\u003Cmi>k\u003C\u002Fmi>\u003C\u002Fmsub>\u003Cmo>⋅\u003C\u002Fmo>\u003Cmsub>\u003Cmrow>\u003Cmo fence=\"true\" form=\"prefix\" stretchy=\"false\">[\u003C\u002Fmo>\u003Cmi>d\u003C\u002Fmi>\u003Cmo fence=\"true\" form=\"postfix\" stretchy=\"false\">]\u003C\u002Fmo>\u003C\u002Fmrow>\u003Cmi>k\u003C\u002Fmi>\u003C\u002Fmsub>\u003Cmo>=\u003C\u002Fmo>\u003Cmsub>\u003Cmrow>\u003Cmo fence=\"true\" form=\"prefix\" stretchy=\"false\">[\u003C\u002Fmo>\u003Cmn>1\u003C\u002Fmn>\u003Cmo fence=\"true\" form=\"postfix\" stretchy=\"false\">]\u003C\u002Fmo>\u003C\u002Fmrow>\u003Cmi>k\u003C\u002Fmi>\u003C\u002Fmsub>\u003C\u002Fmrow>",[18,478,479,480,483],{},"We keep ",[415,481,482],{},"d",", which is therefore the inverse of e modulo k.",[402,485,487],{"id":486},"creation-of-keys","Creation of keys:",[337,489,490,496],{},[340,491,492,495],{},[415,493,494],{},"(m, e)"," becomes Bob's public key",[340,497,498,501],{},[415,499,500],{},"(m, d)"," becomes Bob's private key",[402,503,505],{"id":504},"message-transmission","Message transmission:",[18,507,508,509,512,513,516],{},"Alice will send to Bob ",[415,510,511],{},"c"," (encrypted), the message corresponding to this transformation performed on his plaintext message ",[415,514,515],{},"t",":",[34,518,520],{"className":519},[37,38],[40,521],{"display":42,"className":522,"style":45,"dataCopyLatex":523,"dataCopyDisplay":47,"innerHTML":524},[44],"c = [t]_m^e","\u003Cmrow>\u003Cmi>c\u003C\u002Fmi>\u003Cmo>=\u003C\u002Fmo>\u003Cmsubsup>\u003Cmrow>\u003Cmo fence=\"true\" form=\"prefix\" stretchy=\"false\">[\u003C\u002Fmo>\u003Cmi>t\u003C\u002Fmi>\u003Cmo fence=\"true\" form=\"postfix\" stretchy=\"false\">]\u003C\u002Fmo>\u003C\u002Fmrow>\u003Cmi>m\u003C\u002Fmi>\u003Cmi>e\u003C\u002Fmi>\u003C\u002Fmsubsup>\u003C\u002Fmrow>",[18,526,527],{},"Therefore, Alice used the elements of Bob's public key.",[18,529,530,531,536],{},"Bob receives ",[67,532,534],{"className":533},[70],[40,535],{"dataCopyLatex":523,"dataCopyDisplay":6,"innerHTML":524}," and decrypts this message using the following relation:",[34,538,540],{"className":539},[37,38],[40,541],{"display":42,"className":542,"style":45,"dataCopyLatex":543,"dataCopyDisplay":47,"innerHTML":544},[44],"c^d = [t]_m^{ed} = [t]_m^{1-kl} = [t]_m","\u003Cmrow>\u003Cmsup>\u003Cmi>c\u003C\u002Fmi>\u003Cmi class=\"tml-sml-pad\">d\u003C\u002Fmi>\u003C\u002Fmsup>\u003Cmo>=\u003C\u002Fmo>\u003Cmsubsup>\u003Cmrow>\u003Cmo fence=\"true\" form=\"prefix\" stretchy=\"false\">[\u003C\u002Fmo>\u003Cmi>t\u003C\u002Fmi>\u003Cmo fence=\"true\" form=\"postfix\" stretchy=\"false\">]\u003C\u002Fmo>\u003C\u002Fmrow>\u003Cmi>m\u003C\u002Fmi>\u003Cmrow>\u003Cmi>e\u003C\u002Fmi>\u003Cmi>d\u003C\u002Fmi>\u003C\u002Fmrow>\u003C\u002Fmsubsup>\u003Cmo>=\u003C\u002Fmo>\u003Cmsubsup>\u003Cmrow>\u003Cmo fence=\"true\" form=\"prefix\" stretchy=\"false\">[\u003C\u002Fmo>\u003Cmi>t\u003C\u002Fmi>\u003Cmo fence=\"true\" form=\"postfix\" stretchy=\"false\">]\u003C\u002Fmo>\u003C\u002Fmrow>\u003Cmi>m\u003C\u002Fmi>\u003Cmrow>\u003Cmn>1\u003C\u002Fmn>\u003Cmo>−\u003C\u002Fmo>\u003Cmi>k\u003C\u002Fmi>\u003Cmi>l\u003C\u002Fmi>\u003C\u002Fmrow>\u003C\u002Fmsubsup>\u003Cmo>=\u003C\u002Fmo>\u003Cmsub>\u003Cmrow>\u003Cmo fence=\"true\" form=\"prefix\" stretchy=\"false\">[\u003C\u002Fmo>\u003Cmi>t\u003C\u002Fmi>\u003Cmo fence=\"true\" form=\"postfix\" stretchy=\"false\">]\u003C\u002Fmo>\u003C\u002Fmrow>\u003Cmi>m\u003C\u002Fmi>\u003C\u002Fmsub>\u003C\u002Fmrow>",[18,546,547],{},"Thus, Bob correctly retrieves the message from Alice.",[549,550,553,558],"section",{"className":551,"dataFootnotes":30},[552],"footnotes",[13,554,557],{"className":555,"id":29},[556],"sr-only","Footnotes",[559,560,561],"ol",{},[340,562,564,565],{"id":563},"user-content-fn-1","Claude Elwood Shannon (April 30, 1916 in Petoskey, Michigan - February 24, 2001 in Medford, Massachusetts) was an American electrical engineer and mathematician. He is one of the fathers, if not the founding father, of information theory. ",[25,566,571],{"href":567,"ariaLabel":568,"className":569,"dataFootnoteBackref":30},"#user-content-fnref-1","Back to reference 1",[570],"data-footnote-backref","↩",{"title":30,"searchDepth":573,"depth":573,"links":574},5,[575,577,590],{"id":15,"depth":576,"text":16},2,{"id":168,"depth":576,"text":169,"children":578},[579,581,582],{"id":173,"depth":580,"text":174},3,{"id":331,"depth":580,"text":332},{"id":370,"depth":580,"text":371,"children":583},[584],{"id":389,"depth":585,"text":390,"children":586},4,[587,588,589],{"id":404,"depth":573,"text":405},{"id":486,"depth":573,"text":487},{"id":504,"depth":573,"text":505},{"id":29,"depth":576,"text":557},"\u002Fen \u002Farchive \u002Finformation-theory","Exploring Shannon's entropy formula, information encoding, and cryptographic applications in classical and quantum computing.","md","information-theory","en",{},"\u002Fen\u002Farchive\u002Finformation-theory","2021-04-12",{"title":5,"description":592},"en\u002Farchive\u002Finformation-theory",[602,168,594,603],"mathematics","shannon","AjG7yNum6kjGOAkE7NtVD-62fcYM6LSDMe1Q-21H73Q",1792158875997]