{"id":285,"date":"2018-07-23T10:40:19","date_gmt":"2018-07-23T10:40:19","guid":{"rendered":"http:\/\/csp11.epgpbooks.inflibnet.ac.in\/?post_type=chapter&#038;p=285"},"modified":"2018-12-27T11:29:54","modified_gmt":"2018-12-27T11:29:54","slug":"public-key-cryptography","status":"publish","type":"chapter","link":"https:\/\/ebooks.inflibnet.ac.in\/csp11\/chapter\/public-key-cryptography\/","title":{"rendered":"Public Key Cryptography"},"content":{"raw":"<div><span style=\"float: right\"><a href=\"https:\/\/youtu.be\/qHoE1ukTxSU\" target=\"_blank\" rel=\"noopener\"><img src=\"http:\/\/epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/2018\/11\/download.png\" alt=\"epgp books\" width=\"75px\" height=\"75px;\" \/><\/a>\r\n<\/span><\/div>\r\n&nbsp;\r\n\r\n&nbsp;\r\n\r\n&nbsp;\r\n\r\n<strong>LEARNING OBJECTIVES:<\/strong>\r\n<ul>\r\n \t<li>To understand the definitions of Public Key Cryptography<\/li>\r\n \t<li>To understand the need for symmetric and asymmetric cryptography<\/li>\r\n \t<li>To know the basic terms related with Digital signature and Digital certificate<\/li>\r\n<\/ul>\r\n<ol>\r\n \t<li><strong>Introduction:<\/strong><\/li>\r\n<\/ol>\r\n<p style=\"text-align: justify\"><strong>Symmetric-Key Cryptography: <\/strong>Symmetric-key cryptography uses a single key for both encryption and decryption. Encryption and decryption algorithm are inverse of each other.<\/p>\r\n&nbsp;\r\n\r\n<strong>Example:<\/strong>\r\n<ul>\r\n \t<li>To create the cipher text from the plaintext John uses an encryption algorithm and a key.<\/li>\r\n \t<li>To create the plaintext from cipher text, Bob uses the decryption algorithm and the same key.<\/li>\r\n<\/ul>\r\n<p style=\"text-align: justify\"><strong>Asymmetric-Key cryptography: <\/strong>It is also called public key cryptography. In public key cryptography two keys: a private key and a public key is used. Encryption is done through the public key and decryption through private key. Receiver creates both the keys and is responsible for distributing its public key to the communication community.<\/p>\r\n\r\n<div>\r\n\r\n<strong>Example:<\/strong>\r\n\r\n<\/div>\r\n<p style=\"text-align: justify\">\u00a0 The sender (say John) uses the public key to encrypt the plaintext into ciphertext and the receiver (say Bob) uses his private key to decrypt the ciphertext.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">Unlike symmetric key cryptography, we do not find historical use of public-key cryptography. It is a relatively new concept.<\/p>\r\n<p style=\"text-align: justify\">Symmetric cryptography was well suited for organizations such as governments, military, and big financial corporations were involved in the classified communication.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">With the spread of more unsecure computer networks in last few decades, a genuine need was felt to use cryptography at larger scale. The symmetric key was found to be non-practical due to challenges it faced for key management. This gave rise to the public key cryptosystems.<\/p>\r\n&nbsp;\r\n\r\n<img class=\"alignnone size-full wp-image-286\" src=\"http:\/\/csp11.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/55\/2018\/07\/2-28.png\" alt=\"\" width=\"703\" height=\"223\" \/>\r\n<div>\r\n\r\nThe most important properties of public key encryption scheme are \u2212\r\n<ul>\r\n \t<li>Different keys are used for encryption and decryption. This is a property which set this scheme different than symmetric encryption scheme.<\/li>\r\n \t<li>Each receiver possesses a unique decryption key, generally referred to as his private key.<\/li>\r\n \t<li>Receiver needs to publish an encryption key, referred to as his public key.<\/li>\r\n<\/ul>\r\n<p style=\"text-align: justify\">Some assurance of the authenticity of a public key is needed in this scheme to avoid spoofing by adversary as the receiver. Generally, this type of cryptosystem involves trusted third party which certifies that a particular public key belongs to a specific person or entity only.<\/p>\r\n<p style=\"text-align: justify\">Encryption algorithm is complex enough to prohibit attacker from deducing the plaintext from the cipher text and the encryption (public) key.<\/p>\r\n<p style=\"text-align: justify\">Though private and public keys are related mathematically, it is not be feasible to calculate the private key from the public key. In fact, intelligent part of any public-key cryptosystem is in designing a relationship between two keys.<\/p>\r\n\r\n<\/div>\r\nThe shorter keys result in two benefits \u2212\r\n<ul>\r\n \t<li>Ease of key management<\/li>\r\n \t<li>Efficient computation<\/li>\r\n<\/ul>\r\n<p style=\"text-align: justify\">These benefits make elliptic-curve-based variants of encryption scheme highly attractive for application where computing resources are constrained.<\/p>\r\n\r\n<ol>\r\n \t<li><strong> Key Distribution Problem<\/strong><\/li>\r\n<\/ol>\r\nIn symmetric key cryptosystems, over complete graph with <em>n<\/em> nodes, <em>n<\/em>C<sub>2<\/sub> = <em>n<\/em>(<em>n<\/em>-1)\/2 pairs secret keys are required.\r\n\r\n&nbsp;\r\n\r\nExample: n=100, 99 x 50 = 4,950 keys are required\r\n\r\n&nbsp;\r\n\r\nProblem: Managing large number of keys and keeping them in a secure manner is difficult.\r\n\r\n&nbsp;\r\n\r\n<img class=\"alignnone size-full wp-image-287\" src=\"http:\/\/csp11.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/55\/2018\/07\/2-29.png\" alt=\"\" width=\"190\" height=\"153\" \/>\r\n\r\n&nbsp;\r\n\r\nSecret keys are required between <em>(a,b), (a,c), (a,d), (a,e), (b,c), (b,d), (b,e), (c,d),<\/em> <em>(c,e), and (d,e)<\/em>\r\n\r\n&nbsp;\r\n\r\n<strong>The briefcase example with unshared key<\/strong>\r\n\r\n<img class=\"alignnone size-full wp-image-288\" src=\"http:\/\/csp11.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/55\/2018\/07\/2-30.png\" alt=\"\" width=\"489\" height=\"268\" \/>\r\n<div>\r\n\r\nThe briefcase has to be sent back and forward three times, which seems pretty inefficient.\r\n\r\n&nbsp;\r\n\r\n<strong>2.\u00a0\u00a0\u00a0\u00a0\u00a0 <\/strong><strong>Public-Key Cryptography<\/strong>\r\n\r\n<strong>\u00a0<\/strong>\r\n<p style=\"text-align: justify\">The public key systems, uses two keys. The development of public-key cryptography is the greatest and perhaps the only true revolution in the entire history of cryptography. It is asymmetric, involving the use of two separate keys, in contrast to symmetric encryption, which uses only one key. Anyone knowing the public key can encrypt messages or verify signatures, but cannot decrypt messages or create signatures, counter-intuitive though this may seem. It works by the clever use of number theory problems that are easy one way but hard the other. Note that public key schemes are neither more nor less secure than private key (security depends on the key size for both), nor do they replace private key schemes (they are too slow to do so), rather they complement them. Both also have issues with key distribution, requiring the use of some suitable protocol.<\/p>\r\n\r\n<\/div>\r\nThe major issues in Public-Key Cryptography\u00a0 are:\r\n\r\n&nbsp;\r\n\r\n\u2013 <strong>key distribution<\/strong> \u2013 how to have secure communications in general without having to trust a KDC with your key\r\n\r\n&nbsp;\r\n\r\n\u2013 <strong>digital signatures<\/strong> \u2013 how to verify a message comes intact from the claimed sender\r\n\r\n&nbsp;\r\n\r\nEach entity in public key cryptography has two keys:\r\n<ul>\r\n \t<li>A public-key\r\n<ul>\r\n \t<li>Public to anybody<\/li>\r\n \t<li>used to encrypt messages and verify signatures<\/li>\r\n<\/ul>\r\n<\/li>\r\n \t<li>A private-key\r\n<ul>\r\n \t<li>known only to the owner<\/li>\r\n \t<li>used to decrypt messages, and sign (create) signatures<\/li>\r\n<\/ul>\r\n<\/li>\r\n<\/ul>\r\nFor example:\r\n\r\n&nbsp;\r\n\r\nPublic Key = 4, Private Key = 1\/4, message M = 5\r\n\r\n&nbsp;\r\n\r\n<strong>Encryption:<\/strong>\r\n\r\n&nbsp;\r\n\r\nCiphertext C = M * Public Key\r\n\r\n&nbsp;\r\n\r\n5 * 4 = 20\r\n\r\n&nbsp;\r\n\r\n<strong>Decryption:<\/strong>\r\n\r\n&nbsp;\r\n\r\nPlaintext M = C * Private Key\r\n\r\n&nbsp;\r\n\r\n20 * \u00bc = 5\r\n<div>\r\n\r\n<strong>3.\u00a0 Public Key Encryption<\/strong>\r\n\r\n<\/div>\r\n<p style=\"text-align: justify\">Both sender and recipient is having two keys in public key cryptosystem. Here during encryption, cipher text is generated with recipient\u2019s public key.<\/p>\r\n<img class=\"size-full wp-image-289 aligncenter\" src=\"http:\/\/csp11.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/55\/2018\/07\/2-31.png\" alt=\"\" width=\"474\" height=\"304\" \/>\r\n\r\nDecryption is done with recipient\u2019s private key and plain text is retrieved. No nodes other than intended recipient can do the decryption, because the private is not known to other nodes in the network.\r\n\r\n&nbsp;\r\n\r\n<strong>Hybrid Encryption Systems<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">All known public key encryption algorithms are much slower than the fastest secret-key algorithms. In a hybrid system, Alice uses Bob\u2019s public key to send him a secret shared session key. Alice and Bob use the session key to exchange information<\/p>\r\n&nbsp;\r\n<div>\r\n\r\n<strong>4.\u00a0 Digital Signature<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">A conventional signature has the following salient characteristics: relative ease of establishing that the signature is authentic, the difficulty of forging a signature, the non-transferability of the signature, the difficulty of altering the signature, and the nonrepudiation of signature to ensure that the signer cannot later deny signing. A digital signature should have all the aforementioned features of a conventional signature plus a\u00a0<span style=\"text-align: initial;font-size: 1em\">few more as digital signatures are being used in practical, but sensitive, applications such as secure e-mail and credit card transactions over the Internet. Since a digital signature is just a sequence of zeroes and ones, it is desirable for it to have the following properties: the signature must be a bit pattern that depends on the message being signed (thus, for the same originator, the digital signature is different for different documents); the signature must use some information that is unique to the sender to prevent both forgery and denial; it must be relatively easy to produce; it must be relatively easy to recognize and verify the authenticity of digital signature; it must be computationally infeasible to forge a digital signature either by constructing a new message for an existing digital signature or constructing a fraudulent digital signature for a given message; and it must be practical to recopies of the digital signatures in storage for arbitrating possible disputes later. To verify that the received document is indeed from the claimed sender and that the contents have not been altered, several procedures, called authentication techniques, have been developed. However, message authentication techniques cannot be directly used as digital signatures due to inadequacies of authentication techniques. For example, although message authentication protects the two parties exchanging messages from a third party, it does not protect the two parties against each other. In addition, elementary authentication schemes produce signatures that are as long as the message themselves.<\/span><\/p>\r\n\r\n<\/div>\r\n<div>\r\n\r\n<strong>Creating and verifying a digital signature<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">A simple generic scheme for creating and verifying a digital signature is shown in Figure respectively. A hash function is applied to the message that yields a fixed-size message digest. The signature function uses the message digest and the sender\u2019s private key to generate the digital signature. A very simple form of the digital signature is obtained by encrypting the message digest using the sender\u2019s private key. The message and the signature can now be sent to the recipient. The message is unencrypted and can be read by anyone. However, the signature ensures authenticity of the sender (something similar to a circular sent by a proper authority to be read by many people, with the\u00a0signature attesting to the authenticity of the message). At the receiver, the inverse signature function is applied to the digital signature to recover the original message digest. The received message is subjected to the same hash function to which the original message was subjected. The resulting message digest is compared with the one recovered from the signature. If they match, then it ensures that the message has indeed been sent by the (claimed) sender and that it has not been altered.<\/p>\r\n\r\n<\/div>\r\n<img class=\"size-full wp-image-290 aligncenter\" src=\"http:\/\/csp11.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/55\/2018\/07\/Capture-49.jpg\" alt=\"\" width=\"589\" height=\"519\" \/>\r\n<ol start=\"5\">\r\n \t<li><strong> Digital Certificate<\/strong><\/li>\r\n<\/ol>\r\n<p style=\"text-align: justify\">A digital certificate is a certificate issued by a CA to verify the identity of the certificate holder. It actually uses a digital signature to attach a public key with a particular individual or an entity. Typically, a digital certificate contains the following information: a serial number that is used to uniquely identify a certificate, the individual or the entity identified by the certificate and the algorithm that is used to create the signature.<\/p>\r\n&nbsp;\r\n\r\n<img class=\"alignnone size-full wp-image-291\" src=\"http:\/\/csp11.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/55\/2018\/07\/2-32.png\" alt=\"\" width=\"409\" height=\"298\" \/>\r\n<div>\r\n\r\n&nbsp;\r\n\r\n<strong>Elements of Digital Certificate<\/strong>\r\n\r\n&nbsp;\r\n\r\nA Digital ID typically contains the following information:\r\n\r\n&nbsp;\r\n\r\n\u2013\u00a0 Your public key, Your name and email address\r\n\r\n&nbsp;\r\n\r\n\u2013\u00a0 Expiration date of the public key, Name of the CA who issued your Digital ID\r\n\r\n&nbsp;\r\n\r\n<img class=\"size-full wp-image-292 aligncenter\" src=\"http:\/\/csp11.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/55\/2018\/07\/2-33.png\" alt=\"\" width=\"398\" height=\"545\" \/>\r\n\r\n<\/div>\r\n<strong>Certificate Validation<\/strong>\r\n\r\n<img class=\"size-full wp-image-294 aligncenter\" src=\"http:\/\/csp11.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/55\/2018\/07\/2-35.png\" alt=\"\" width=\"451\" height=\"258\" \/>\r\n\r\nEssentially, this is just checking the digital signature ,but you may have to \u201cwalk the path\u201d of all subordinate authorities until you reach the root\r\n\r\n&nbsp;\r\n\r\n\u2013\u00a0 Unless you explicitly trust a subordinate CA\r\n\r\n&nbsp;\r\n\r\n<strong>Summary<\/strong>\r\n\r\n&nbsp;\r\n\r\nWe have considered:\r\n\r\n&nbsp;\r\n\r\n\u2013\u00a0 Symmetric and Asymmetric cryptography.\r\n\r\n\u2013\u00a0 Public Key cryptography.\r\n\r\n\u2013\u00a0 Creation, Verification, transmission of digital signatures.\r\n\r\n\u2013\u00a0 Elements of Digital Certificate and Certificate validation.\r\n\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td><strong>you can view video on Public Key Cryptography<\/strong><\/td>\r\n<td><a href=\"https:\/\/youtu.be\/qHoE1ukTxSU\" target=\"_blank\" rel=\"noopener\"><img class=\"alignnone wp-image-120\" src=\"http:\/\/epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/2018\/11\/download.png\" alt=\"\" width=\"36\" height=\"36\" \/><\/a><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<img class=\"alignnone size-full wp-image-295\" src=\"http:\/\/csp11.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/55\/2018\/07\/Capture-50.jpg\" alt=\"\" width=\"717\" height=\"378\" \/>","rendered":"<div><span style=\"float: right\"><a href=\"https:\/\/youtu.be\/qHoE1ukTxSU\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" src=\"http:\/\/epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/2018\/11\/download.png\" alt=\"epgp books\" width=\"75px\" height=\"75px;\" \/><\/a><br \/>\n<\/span><\/div>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><strong>LEARNING OBJECTIVES:<\/strong><\/p>\n<ul>\n<li>To understand the definitions of Public Key Cryptography<\/li>\n<li>To understand the need for symmetric and asymmetric cryptography<\/li>\n<li>To know the basic terms related with Digital signature and Digital certificate<\/li>\n<\/ul>\n<ol>\n<li><strong>Introduction:<\/strong><\/li>\n<\/ol>\n<p style=\"text-align: justify\"><strong>Symmetric-Key Cryptography: <\/strong>Symmetric-key cryptography uses a single key for both encryption and decryption. Encryption and decryption algorithm are inverse of each other.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Example:<\/strong><\/p>\n<ul>\n<li>To create the cipher text from the plaintext John uses an encryption algorithm and a key.<\/li>\n<li>To create the plaintext from cipher text, Bob uses the decryption algorithm and the same key.<\/li>\n<\/ul>\n<p style=\"text-align: justify\"><strong>Asymmetric-Key cryptography: <\/strong>It is also called public key cryptography. In public key cryptography two keys: a private key and a public key is used. Encryption is done through the public key and decryption through private key. Receiver creates both the keys and is responsible for distributing its public key to the communication community.<\/p>\n<div>\n<p><strong>Example:<\/strong><\/p>\n<\/div>\n<p style=\"text-align: justify\">\u00a0 The sender (say John) uses the public key to encrypt the plaintext into ciphertext and the receiver (say Bob) uses his private key to decrypt the ciphertext.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Unlike symmetric key cryptography, we do not find historical use of public-key cryptography. It is a relatively new concept.<\/p>\n<p style=\"text-align: justify\">Symmetric cryptography was well suited for organizations such as governments, military, and big financial corporations were involved in the classified communication.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">With the spread of more unsecure computer networks in last few decades, a genuine need was felt to use cryptography at larger scale. The symmetric key was found to be non-practical due to challenges it faced for key management. This gave rise to the public key cryptosystems.<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-286\" src=\"http:\/\/csp11.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/55\/2018\/07\/2-28.png\" alt=\"\" width=\"703\" height=\"223\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/2-28.png 703w, https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/2-28-300x95.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/2-28-65x21.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/2-28-225x71.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/2-28-350x111.png 350w\" sizes=\"auto, (max-width: 703px) 100vw, 703px\" \/><\/p>\n<div>\n<p>The most important properties of public key encryption scheme are \u2212<\/p>\n<ul>\n<li>Different keys are used for encryption and decryption. This is a property which set this scheme different than symmetric encryption scheme.<\/li>\n<li>Each receiver possesses a unique decryption key, generally referred to as his private key.<\/li>\n<li>Receiver needs to publish an encryption key, referred to as his public key.<\/li>\n<\/ul>\n<p style=\"text-align: justify\">Some assurance of the authenticity of a public key is needed in this scheme to avoid spoofing by adversary as the receiver. Generally, this type of cryptosystem involves trusted third party which certifies that a particular public key belongs to a specific person or entity only.<\/p>\n<p style=\"text-align: justify\">Encryption algorithm is complex enough to prohibit attacker from deducing the plaintext from the cipher text and the encryption (public) key.<\/p>\n<p style=\"text-align: justify\">Though private and public keys are related mathematically, it is not be feasible to calculate the private key from the public key. In fact, intelligent part of any public-key cryptosystem is in designing a relationship between two keys.<\/p>\n<\/div>\n<p>The shorter keys result in two benefits \u2212<\/p>\n<ul>\n<li>Ease of key management<\/li>\n<li>Efficient computation<\/li>\n<\/ul>\n<p style=\"text-align: justify\">These benefits make elliptic-curve-based variants of encryption scheme highly attractive for application where computing resources are constrained.<\/p>\n<ol>\n<li><strong> Key Distribution Problem<\/strong><\/li>\n<\/ol>\n<p>In symmetric key cryptosystems, over complete graph with <em>n<\/em> nodes, <em>n<\/em>C<sub>2<\/sub> = <em>n<\/em>(<em>n<\/em>-1)\/2 pairs secret keys are required.<\/p>\n<p>&nbsp;<\/p>\n<p>Example: n=100, 99 x 50 = 4,950 keys are required<\/p>\n<p>&nbsp;<\/p>\n<p>Problem: Managing large number of keys and keeping them in a secure manner is difficult.<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-287\" src=\"http:\/\/csp11.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/55\/2018\/07\/2-29.png\" alt=\"\" width=\"190\" height=\"153\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/2-29.png 190w, https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/2-29-65x52.png 65w\" sizes=\"auto, (max-width: 190px) 100vw, 190px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>Secret keys are required between <em>(a,b), (a,c), (a,d), (a,e), (b,c), (b,d), (b,e), (c,d),<\/em> <em>(c,e), and (d,e)<\/em><\/p>\n<p>&nbsp;<\/p>\n<p><strong>The briefcase example with unshared key<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-288\" src=\"http:\/\/csp11.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/55\/2018\/07\/2-30.png\" alt=\"\" width=\"489\" height=\"268\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/2-30.png 489w, https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/2-30-300x164.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/2-30-65x36.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/2-30-225x123.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/2-30-350x192.png 350w\" sizes=\"auto, (max-width: 489px) 100vw, 489px\" \/><\/p>\n<div>\n<p>The briefcase has to be sent back and forward three times, which seems pretty inefficient.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>2.\u00a0\u00a0\u00a0\u00a0\u00a0 <\/strong><strong>Public-Key Cryptography<\/strong><\/p>\n<p><strong>\u00a0<\/strong><\/p>\n<p style=\"text-align: justify\">The public key systems, uses two keys. The development of public-key cryptography is the greatest and perhaps the only true revolution in the entire history of cryptography. It is asymmetric, involving the use of two separate keys, in contrast to symmetric encryption, which uses only one key. Anyone knowing the public key can encrypt messages or verify signatures, but cannot decrypt messages or create signatures, counter-intuitive though this may seem. It works by the clever use of number theory problems that are easy one way but hard the other. Note that public key schemes are neither more nor less secure than private key (security depends on the key size for both), nor do they replace private key schemes (they are too slow to do so), rather they complement them. Both also have issues with key distribution, requiring the use of some suitable protocol.<\/p>\n<\/div>\n<p>The major issues in Public-Key Cryptography\u00a0 are:<\/p>\n<p>&nbsp;<\/p>\n<p>\u2013 <strong>key distribution<\/strong> \u2013 how to have secure communications in general without having to trust a KDC with your key<\/p>\n<p>&nbsp;<\/p>\n<p>\u2013 <strong>digital signatures<\/strong> \u2013 how to verify a message comes intact from the claimed sender<\/p>\n<p>&nbsp;<\/p>\n<p>Each entity in public key cryptography has two keys:<\/p>\n<ul>\n<li>A public-key\n<ul>\n<li>Public to anybody<\/li>\n<li>used to encrypt messages and verify signatures<\/li>\n<\/ul>\n<\/li>\n<li>A private-key\n<ul>\n<li>known only to the owner<\/li>\n<li>used to decrypt messages, and sign (create) signatures<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>For example:<\/p>\n<p>&nbsp;<\/p>\n<p>Public Key = 4, Private Key = 1\/4, message M = 5<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Encryption:<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>Ciphertext C = M * Public Key<\/p>\n<p>&nbsp;<\/p>\n<p>5 * 4 = 20<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Decryption:<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>Plaintext M = C * Private Key<\/p>\n<p>&nbsp;<\/p>\n<p>20 * \u00bc = 5<\/p>\n<div>\n<p><strong>3.\u00a0 Public Key Encryption<\/strong><\/p>\n<\/div>\n<p style=\"text-align: justify\">Both sender and recipient is having two keys in public key cryptosystem. Here during encryption, cipher text is generated with recipient\u2019s public key.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-289 aligncenter\" src=\"http:\/\/csp11.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/55\/2018\/07\/2-31.png\" alt=\"\" width=\"474\" height=\"304\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/2-31.png 474w, https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/2-31-300x192.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/2-31-65x42.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/2-31-225x144.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/2-31-350x224.png 350w\" sizes=\"auto, (max-width: 474px) 100vw, 474px\" \/><\/p>\n<p>Decryption is done with recipient\u2019s private key and plain text is retrieved. No nodes other than intended recipient can do the decryption, because the private is not known to other nodes in the network.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Hybrid Encryption Systems<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">All known public key encryption algorithms are much slower than the fastest secret-key algorithms. In a hybrid system, Alice uses Bob\u2019s public key to send him a secret shared session key. Alice and Bob use the session key to exchange information<\/p>\n<p>&nbsp;<\/p>\n<div>\n<p><strong>4.\u00a0 Digital Signature<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">A conventional signature has the following salient characteristics: relative ease of establishing that the signature is authentic, the difficulty of forging a signature, the non-transferability of the signature, the difficulty of altering the signature, and the nonrepudiation of signature to ensure that the signer cannot later deny signing. A digital signature should have all the aforementioned features of a conventional signature plus a\u00a0<span style=\"text-align: initial;font-size: 1em\">few more as digital signatures are being used in practical, but sensitive, applications such as secure e-mail and credit card transactions over the Internet. Since a digital signature is just a sequence of zeroes and ones, it is desirable for it to have the following properties: the signature must be a bit pattern that depends on the message being signed (thus, for the same originator, the digital signature is different for different documents); the signature must use some information that is unique to the sender to prevent both forgery and denial; it must be relatively easy to produce; it must be relatively easy to recognize and verify the authenticity of digital signature; it must be computationally infeasible to forge a digital signature either by constructing a new message for an existing digital signature or constructing a fraudulent digital signature for a given message; and it must be practical to recopies of the digital signatures in storage for arbitrating possible disputes later. To verify that the received document is indeed from the claimed sender and that the contents have not been altered, several procedures, called authentication techniques, have been developed. However, message authentication techniques cannot be directly used as digital signatures due to inadequacies of authentication techniques. For example, although message authentication protects the two parties exchanging messages from a third party, it does not protect the two parties against each other. In addition, elementary authentication schemes produce signatures that are as long as the message themselves.<\/span><\/p>\n<\/div>\n<div>\n<p><strong>Creating and verifying a digital signature<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">A simple generic scheme for creating and verifying a digital signature is shown in Figure respectively. A hash function is applied to the message that yields a fixed-size message digest. The signature function uses the message digest and the sender\u2019s private key to generate the digital signature. A very simple form of the digital signature is obtained by encrypting the message digest using the sender\u2019s private key. The message and the signature can now be sent to the recipient. The message is unencrypted and can be read by anyone. However, the signature ensures authenticity of the sender (something similar to a circular sent by a proper authority to be read by many people, with the\u00a0signature attesting to the authenticity of the message). At the receiver, the inverse signature function is applied to the digital signature to recover the original message digest. The received message is subjected to the same hash function to which the original message was subjected. The resulting message digest is compared with the one recovered from the signature. If they match, then it ensures that the message has indeed been sent by the (claimed) sender and that it has not been altered.<\/p>\n<\/div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-290 aligncenter\" src=\"http:\/\/csp11.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/55\/2018\/07\/Capture-49.jpg\" alt=\"\" width=\"589\" height=\"519\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/Capture-49.jpg 589w, https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/Capture-49-300x264.jpg 300w, https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/Capture-49-65x57.jpg 65w, https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/Capture-49-225x198.jpg 225w, https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/Capture-49-350x308.jpg 350w\" sizes=\"auto, (max-width: 589px) 100vw, 589px\" \/><\/p>\n<ol start=\"5\">\n<li><strong> Digital Certificate<\/strong><\/li>\n<\/ol>\n<p style=\"text-align: justify\">A digital certificate is a certificate issued by a CA to verify the identity of the certificate holder. It actually uses a digital signature to attach a public key with a particular individual or an entity. Typically, a digital certificate contains the following information: a serial number that is used to uniquely identify a certificate, the individual or the entity identified by the certificate and the algorithm that is used to create the signature.<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-291\" src=\"http:\/\/csp11.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/55\/2018\/07\/2-32.png\" alt=\"\" width=\"409\" height=\"298\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/2-32.png 409w, https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/2-32-300x219.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/2-32-65x47.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/2-32-225x164.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/2-32-350x255.png 350w\" sizes=\"auto, (max-width: 409px) 100vw, 409px\" \/><\/p>\n<div>\n<p>&nbsp;<\/p>\n<p><strong>Elements of Digital Certificate<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>A Digital ID typically contains the following information:<\/p>\n<p>&nbsp;<\/p>\n<p>\u2013\u00a0 Your public key, Your name and email address<\/p>\n<p>&nbsp;<\/p>\n<p>\u2013\u00a0 Expiration date of the public key, Name of the CA who issued your Digital ID<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-292 aligncenter\" src=\"http:\/\/csp11.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/55\/2018\/07\/2-33.png\" alt=\"\" width=\"398\" height=\"545\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/2-33.png 398w, https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/2-33-219x300.png 219w, https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/2-33-65x89.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/2-33-225x308.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/2-33-350x479.png 350w\" sizes=\"auto, (max-width: 398px) 100vw, 398px\" \/><\/p>\n<\/div>\n<p><strong>Certificate Validation<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-294 aligncenter\" src=\"http:\/\/csp11.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/55\/2018\/07\/2-35.png\" alt=\"\" width=\"451\" height=\"258\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/2-35.png 451w, https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/2-35-300x172.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/2-35-65x37.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/2-35-225x129.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/2-35-350x200.png 350w\" sizes=\"auto, (max-width: 451px) 100vw, 451px\" \/><\/p>\n<p>Essentially, this is just checking the digital signature ,but you may have to \u201cwalk the path\u201d of all subordinate authorities until you reach the root<\/p>\n<p>&nbsp;<\/p>\n<p>\u2013\u00a0 Unless you explicitly trust a subordinate CA<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Summary<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>We have considered:<\/p>\n<p>&nbsp;<\/p>\n<p>\u2013\u00a0 Symmetric and Asymmetric cryptography.<\/p>\n<p>\u2013\u00a0 Public Key cryptography.<\/p>\n<p>\u2013\u00a0 Creation, Verification, transmission of digital signatures.<\/p>\n<p>\u2013\u00a0 Elements of Digital Certificate and Certificate validation.<\/p>\n<table>\n<tbody>\n<tr>\n<td><strong>you can view video on Public Key Cryptography<\/strong><\/td>\n<td><a href=\"https:\/\/youtu.be\/qHoE1ukTxSU\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-120\" src=\"http:\/\/epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/2018\/11\/download.png\" alt=\"\" width=\"36\" height=\"36\" \/><\/a><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-295\" src=\"http:\/\/csp11.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/55\/2018\/07\/Capture-50.jpg\" alt=\"\" width=\"717\" height=\"378\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/Capture-50.jpg 717w, https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/Capture-50-300x158.jpg 300w, https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/Capture-50-65x34.jpg 65w, https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/Capture-50-225x119.jpg 225w, https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/Capture-50-350x185.jpg 350w\" sizes=\"auto, (max-width: 717px) 100vw, 717px\" \/><\/p>\n","protected":false},"author":3,"menu_order":20,"template":"","meta":{"pb_show_title":"on","pb_short_title":"","pb_subtitle":"","pb_authors":[],"pb_section_license":""},"chapter-type":[],"contributor":[],"license":[],"class_list":["post-285","chapter","type-chapter","status-publish","hentry"],"part":3,"_links":{"self":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-json\/pressbooks\/v2\/chapters\/285","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-json\/pressbooks\/v2\/chapters"}],"about":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-json\/wp\/v2\/types\/chapter"}],"author":[{"embeddable":true,"href":"https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-json\/wp\/v2\/users\/3"}],"version-history":[{"count":4,"href":"https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-json\/pressbooks\/v2\/chapters\/285\/revisions"}],"predecessor-version":[{"id":575,"href":"https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-json\/pressbooks\/v2\/chapters\/285\/revisions\/575"}],"part":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-json\/pressbooks\/v2\/parts\/3"}],"metadata":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-json\/pressbooks\/v2\/chapters\/285\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-json\/wp\/v2\/media?parent=285"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-json\/pressbooks\/v2\/chapter-type?post=285"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-json\/wp\/v2\/contributor?post=285"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-json\/wp\/v2\/license?post=285"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}