{"id":15316,"date":"2016-06-23T11:00:52","date_gmt":"2016-06-23T11:00:52","guid":{"rendered":"https:\/\/www.whizlabs.com\/?p=15316"},"modified":"2020-08-31T12:18:05","modified_gmt":"2020-08-31T12:18:05","slug":"cryptography","status":"publish","type":"post","link":"https:\/\/www.whizlabs.com\/blog\/cryptography\/","title":{"rendered":"Cryptography"},"content":{"rendered":"<p><span lang=\"EN-US\">\u2018Cryptography\u2019 is the ability to hide messages from intermediate persons and ensure effective and secure communication between different parties. \u2018Cryptography\u2019s\u2019 origins can be traced back to 2000 B.C. Egypt (when hieroglyphics were used) and to the time of Julius Caesar where alphabets were shifted to encrypt a message. We also see various instances of cryptography in movies such as \u2018The Da Vinci code\u2019, \u2018The Imitation game\u2019, \u2018Pi\u2019, \u2018Enigma\u2019 among others.<\/span><\/p>\n<p><span lang=\"EN-US\">We will see the two different types of encryption \u2013 symmetric and asymmetric algorithms and primarily focus our discussion on the symmetric algorithm.<\/span><\/p>\n<h2><span lang=\"EN-US\">Introduction:<\/span><\/h2>\n<p><span lang=\"EN-US\">The key terms that are associated with cryptographic systems are <\/span><\/p>\n<ol>\n<li><span lang=\"EN-US\"> <\/span><span lang=\"EN-US\">Plain text<\/span><\/li>\n<li><span lang=\"EN-US\"> <\/span><span lang=\"EN-US\">Cipher text<\/span><\/li>\n<li><span lang=\"EN-US\"> <\/span><span lang=\"EN-US\">Algorithm<\/span><\/li>\n<li><span lang=\"EN-US\"> <\/span><span lang=\"EN-US\">Key<\/span><\/li>\n<li><span lang=\"EN-US\"> <\/span><span lang=\"EN-US\">Encryption<\/span><\/li>\n<\/ol>\n<p><span lang=\"EN-US\">\u00a0\u201cEncryption\u201d is converting \u201cplain text\u201d (or text that is ordinarily read by everybody) into \u201ccipher text\u201d. \u00a0\u201cCipher text\u201d is text that is not readable by humans or machines.\u00a0 Reconverting the \u201ccipher text\u201d into \u201cplaintext\u201d is \u201cdecryption\u201d. The entire process of encryption and decryption is possible due to the \u201calgorithm\u201d and the \u201ckey\u201d.<\/span><\/p>\n<p><span lang=\"EN-US\">The \u201calgorithm\u201d is a set of rules which are complex mathematical formulae that enable encryption and decryption. Popular cryptographic algorithms include DES (Data encryption standard), AES (Advanced encryption standard) and MD5.<\/span><\/p>\n<p><span lang=\"EN-US\">The \u201ckey\u201d is a value that consists of random bits which is used for encryption and decryption.\u00a0 The longer the key, the more difficult it will be for the attacker to guess the message.<\/span><\/p>\n<h2><span lang=\"EN-US\">Types of cryptography:<\/span><\/h2>\n<p><span lang=\"EN-US\">In asymmetric cryptography there are two keys \u2013 one is a public key and one is a private key to encrypt and decrypt.<\/span><\/p>\n<p><span lang=\"EN-US\">Symmetric cryptography on the other hand is when both the sender and receiver use two instances of the same \u201ckey\u201d (also known as \u201csecret keys\u201d) to encrypt and decrypt messages. In traditional parlance, if Bob and Alice were to communicate then, they need two instances of the same key. <\/span><\/p>\n<p><span lang=\"EN-US\">There are two types of symmetric ciphers \u2013 substitution ciphers and transposition ciphers. <\/span><\/p>\n<ol>\n<li><span lang=\"EN-US\"> <\/span><span lang=\"EN-US\">Substitution ciphers:<\/span><\/li>\n<\/ol>\n<p style=\"padding-left: 30px\"><span lang=\"EN-US\">In substitution ciphers, the alphabets in the plain text are replaced by shifting the alphabets \u2018n\u2019 number of places. For example, in the <span style=\"color: #ff0000\"><b><i>Caesar cipher<\/i><\/b><\/span>, if this algorithm were followed,<\/span><\/p>\n<p style=\"padding-left: 30px\"><span lang=\"EN-US\">ABCDEFGHIJKLMNOPQRSTUVWXYZ being replaced by:<\/span><\/p>\n<p style=\"padding-left: 30px\"><span lang=\"EN-US\">CDEFGHIJKLMNOPQRSTUVWXYZAB<\/span><\/p>\n<p style=\"padding-left: 30px\">Plaintext:\u00a0 <span style=\"color: #ff0000\"><b>WHIZLABS<\/b><\/span> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 will be replaced by<\/p>\n<p style=\"padding-left: 30px\"><span lang=\"EN-US\">Cipher text: <span style=\"color: #ff0000\"><b>YKLBNCDU<\/b><\/span><\/span><\/p>\n<p style=\"padding-left: 30px\">In the above algorithm, the alphabets are shifted by \u20182\u2019 places. The key is the number of places the alphabets are shifted (which is \u20182\u2019 here)<\/p>\n<p style=\"padding-left: 30px\"><span lang=\"EN-US\">This is the simplest implementation of the substitution cipher.<\/span><\/p>\n<p style=\"padding-left: 30px\">2. Transposition ciphers<\/p>\n<p style=\"padding-left: 30px\"><span lang=\"EN-US\">In the transposition cipher, the letters are re-arranged in a way to mask the original message. The \u2018<b><i>rail fence cipher<\/i><\/b>\u2019 is a simple example of the transposition cipher, where the alphabets are written diagonally and read off horizontally. \u00a0\u2018JAVA PROGRAMMING\u2019 is written diagonally,<\/span><span style=\"line-height: 1.5\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0<\/span><\/p>\n<p style=\"padding-left: 30px\"><b><span lang=\"EN-US\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 J <\/span><\/b><span lang=\"EN-US\">\u00a0\u00a0\u00a0\u00a0\u00a0<b>P <\/b>\u00a0\u00a0\u00a0\u00a0\u00a0<b>\u00a0R<\/b>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <b>I<\/b><\/span><\/p>\n<p style=\"padding-left: 30px\"><span lang=\"EN-US\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <b>A <\/b>\u00a0\u00a0\u00a0\u00a0\u00a0<b>R <\/b>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<b>A<\/b>\u00a0\u00a0\u00a0\u00a0\u00a0 <b>N<\/b><\/span><\/p>\n<p style=\"padding-left: 30px\"><b><span lang=\"EN-US\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 V<\/span><\/b><span lang=\"EN-US\">\u00a0 <\/span><span lang=\"EN-US\">\u00a0\u00a0\u00a0\u00a0\u00a0<b>O<\/b>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <b>M<\/b>\u00a0\u00a0\u00a0\u00a0\u00a0 <b>G<\/b><\/span><\/p>\n<p style=\"padding-left: 30px\"><span lang=\"EN-US\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <b>A <\/b>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<b>G<\/b>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <b>M<\/b>\u00a0\u00a0\u00a0\u00a0\u00a0 <b>X<\/b><\/span><\/p>\n<p style=\"padding-left: 30px\"><span lang=\"EN-US\">\u00a0<\/span>This can be written horizontally in cipher text as:<\/p>\n<p style=\"padding-left: 30px\"><b><span lang=\"EN-US\">JPRI ARAN VOMG AGMX<\/span><\/b><\/p>\n<p style=\"padding-left: 30px\">We have seen simple illustrations of the substitution cipher and the transposition cipher.<\/p>\n<h2><span lang=\"EN-US\">\u00a0<\/span>Advantages and Disadvantages of the symmetric algorithm:<\/h2>\n<p><span lang=\"EN-US\">The advantages of symmetric algorithms include speed and with a larger key size \u2013 harder to crack algorithm. However, there are traditional problems associated with symmetric ciphers are:<\/span><\/p>\n<ol>\n<li><span lang=\"EN-US\"> <\/span><span lang=\"EN-US\">Key distribution problem :\u00a0<\/span>The \u201ckey\u201d is the crucial part of the symmetric algorithm, but distributing the key through secure channels is a challenge. The key cannot be emailed or couriered as each of them is susceptible to snooping.<\/li>\n<li><span lang=\"EN-US\"> <\/span><span lang=\"EN-US\">Symmetric ciphers only ensure confidentiality but not authentication and non-repudiation.<br \/>\n<\/span>Confidentiality or ensuring that the message is seen only by the required person is possible by symmetric ciphers. Non-repudiation (or a sender retracting that they not sent the message) is not guaranteed by symmetric ciphers.<\/li>\n<\/ol>\n<p><span lang=\"EN-US\">We have seen the exciting concept of cryptography and have discussed basic cryptographic algorithms. \u00a0We will discuss another technical topic in the next post.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u2018Cryptography\u2019 is the ability to hide messages from intermediate persons and ensure effective and secure communication between different parties. \u2018Cryptography\u2019s\u2019 origins can be traced back to 2000 B.C. Egypt (when hieroglyphics were used) and to the time of Julius Caesar where alphabets were shifted to encrypt a message. We also see various instances of cryptography in movies such as \u2018The Da Vinci code\u2019, \u2018The Imitation game\u2019, \u2018Pi\u2019, \u2018Enigma\u2019 among others. We will see the two different types of encryption \u2013 symmetric and asymmetric algorithms and primarily focus our discussion on the symmetric algorithm. Introduction: The key terms that are associated [&hellip;]<\/p>\n","protected":false},"author":13,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[17],"tags":[679],"class_list":["post-15316","post","type-post","status-publish","format-standard","hentry","category-news-updates","tag-cryptography"],"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false,"profile_24":false,"profile_48":false,"profile_96":false,"profile_150":false,"profile_300":false,"tptn_thumbnail":false,"web-stories-poster-portrait":false,"web-stories-publisher-logo":false,"web-stories-thumbnail":false},"uagb_author_info":{"display_name":"Pavan Gumaste","author_link":"https:\/\/www.whizlabs.com\/blog\/author\/pavan\/"},"uagb_comment_info":1,"uagb_excerpt":"\u2018Cryptography\u2019 is the ability to hide messages from intermediate persons and ensure effective and secure communication between different parties. \u2018Cryptography\u2019s\u2019 origins can be traced back to 2000 B.C. Egypt (when hieroglyphics were used) and to the time of Julius Caesar where alphabets were shifted to encrypt a message. We also see various instances of cryptography&hellip;","_links":{"self":[{"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/posts\/15316","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/users\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/comments?post=15316"}],"version-history":[{"count":1,"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/posts\/15316\/revisions"}],"predecessor-version":[{"id":75860,"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/posts\/15316\/revisions\/75860"}],"wp:attachment":[{"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/media?parent=15316"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/categories?post=15316"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/tags?post=15316"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}