{"id":768,"date":"2015-02-17T07:09:25","date_gmt":"2015-02-17T12:09:25","guid":{"rendered":"http:\/\/shirishranjit.com\/blog1\/?page_id=768"},"modified":"2015-02-17T07:24:08","modified_gmt":"2015-02-17T12:24:08","slug":"crypto","status":"publish","type":"page","link":"https:\/\/shirishranjit.com\/blog1\/technical-posts\/crypto","title":{"rendered":"Crypto &#8212;"},"content":{"rendered":"<p>Ciphers are divided into two according to\u00a0type of key used<\/p>\n<ul>\n<li><a class=\"mw-redirect\" title=\"Symmetric key algorithm\" href=\"http:\/\/en.wikipedia.org\/wiki\/Symmetric_key_algorithm\">symmetric key algorithms<\/a>\u00a0(<a class=\"mw-redirect\" title=\"Private-key cryptography\" href=\"http:\/\/en.wikipedia.org\/wiki\/Private-key_cryptography\">Private-key cryptography<\/a>), where the same key is used for encryption and decryption, and<\/li>\n<li><a class=\"mw-redirect\" title=\"Asymmetric key algorithm\" href=\"http:\/\/en.wikipedia.org\/wiki\/Asymmetric_key_algorithm\">asymmetric key algorithms<\/a>\u00a0(<a title=\"Public-key cryptography\" href=\"http:\/\/en.wikipedia.org\/wiki\/Public-key_cryptography\">Public-key cryptography<\/a>), where two different keys are used for encryption and decryption.<\/li>\n<li><a title=\"http:\/\/en.wikipedia.org\/wiki\/Secure_Hash_Algorithm\" href=\"http:\/\/en.wikipedia.org\/wiki\/Secure_Hash_Algorithm\">Secure Hash Algorithms<\/a> &#8211; lists all the algorithms<\/li>\n<li><a title=\"http:\/\/en.wikipedia.org\/wiki\/Cryptographic_hash_function\" href=\"http:\/\/en.wikipedia.org\/wiki\/Cryptographic_hash_function\">Crypto hash functions<\/a><\/li>\n<\/ul>\n<p>Crypto References:<\/p>\n<ul>\n<li><a title=\"http:\/\/en.wikipedia.org\/wiki\/Cipher\" href=\"http:\/\/en.wikipedia.org\/wiki\/Cipher\">Cipher<\/a><\/li>\n<li><a title=\"http:\/\/en.wikipedia.org\/wiki\/Stream_cipher\" href=\"http:\/\/en.wikipedia.org\/wiki\/Stream_cipher\">Stream Cipher<\/a>\u00a0&#8211; A\u00a0<b>stream cipher<\/b>\u00a0is a\u00a0<a class=\"mw-redirect\" title=\"Symmetric key algorithm\" href=\"http:\/\/en.wikipedia.org\/wiki\/Symmetric_key_algorithm\">symmetric key<\/a>\u00a0<a title=\"Cipher\" href=\"http:\/\/en.wikipedia.org\/wiki\/Cipher\">cipher<\/a>\u00a0where plaintext digits are combined with a\u00a0<a class=\"mw-redirect\" title=\"Pseudorandom\" href=\"http:\/\/en.wikipedia.org\/wiki\/Pseudorandom\">pseudorandom<\/a>\u00a0cipher digit stream (<a title=\"Keystream\" href=\"http:\/\/en.wikipedia.org\/wiki\/Keystream\">keystream<\/a>). In a stream cipher each\u00a0<a title=\"Plaintext\" href=\"http:\/\/en.wikipedia.org\/wiki\/Plaintext\">plaintext<\/a>\u00a0<a title=\"Numerical digit\" href=\"http:\/\/en.wikipedia.org\/wiki\/Numerical_digit\">digit<\/a>\u00a0is encrypted one at a time with the corresponding digit of the keystream, to give a digit of the ciphertext stream. An alternative name is a\u00a0<b>state cipher<\/b>, as the encryption of each digit is dependent on the current state. In practice, a digit is typically a\u00a0<a title=\"Bit\" href=\"http:\/\/en.wikipedia.org\/wiki\/Bit\">bit<\/a>\u00a0and the combining operation an\u00a0<a class=\"mw-redirect\" title=\"Exclusive-or\" href=\"http:\/\/en.wikipedia.org\/wiki\/Exclusive-or\">exclusive-or<\/a>\u00a0(XOR).The pseudorandom keystream is typically generated serially from a random seed value using digital\u00a0<a title=\"Shift register\" href=\"http:\/\/en.wikipedia.org\/wiki\/Shift_register\">shift registers<\/a>. The seed value serves as the\u00a0<a class=\"mw-redirect\" title=\"Cryptographic key\" href=\"http:\/\/en.wikipedia.org\/wiki\/Cryptographic_key\">cryptographic key<\/a>\u00a0for decrypting the ciphertext stream.Stream ciphers represent a different approach to symmetric encryption from\u00a0<a title=\"Block cipher\" href=\"http:\/\/en.wikipedia.org\/wiki\/Block_cipher\">block ciphers<\/a>. Block ciphers operate on large blocks of digits with a fixed, unvarying transformation. This distinction is not always clear-cut: in some\u00a0<a class=\"mw-redirect\" title=\"Block cipher modes of operation\" href=\"http:\/\/en.wikipedia.org\/wiki\/Block_cipher_modes_of_operation\">modes of operation<\/a>, a block cipher primitive is used in such a way that it acts effectively as a stream cipher. Stream ciphers typically execute at a higher speed than block ciphers and have lower hardware complexity. However, stream ciphers can be susceptible to serious security problems if used incorrectly (see\u00a0<a title=\"Stream cipher attack\" href=\"http:\/\/en.wikipedia.org\/wiki\/Stream_cipher_attack\">stream cipher attacks<\/a>); in particular, the same starting state (seed) must never be used twice.<\/li>\n<li><a title=\"http:\/\/en.wikipedia.org\/wiki\/Block_cipher\" href=\"http:\/\/en.wikipedia.org\/wiki\/Block_cipher\">Block Cipher<\/a> &#8211;\u00a0\u00a0a\u00a0<b>block cipher<\/b>\u00a0is a\u00a0<a title=\"Deterministic algorithm\" href=\"http:\/\/en.wikipedia.org\/wiki\/Deterministic_algorithm\">deterministic algorithm<\/a>\u00a0operating on fixed-length groups of\u00a0<a title=\"Bit\" href=\"http:\/\/en.wikipedia.org\/wiki\/Bit\">bits<\/a>, called\u00a0<i>blocks<\/i>, with an unvarying transformation that is specified by a\u00a0<a class=\"mw-redirect\" title=\"Symmetric key\" href=\"http:\/\/en.wikipedia.org\/wiki\/Symmetric_key\">symmetric key<\/a>. Block ciphers are important\u00a0<a title=\"Cryptographic primitive\" href=\"http:\/\/en.wikipedia.org\/wiki\/Cryptographic_primitive\">elementary components<\/a>\u00a0in the design of many\u00a0<a title=\"Cryptographic protocol\" href=\"http:\/\/en.wikipedia.org\/wiki\/Cryptographic_protocol\">cryptographic protocols<\/a>, and are widely used to implement\u00a0<a title=\"Encryption\" href=\"http:\/\/en.wikipedia.org\/wiki\/Encryption\">encryption<\/a>\u00a0of bulk data.<\/li>\n<li><a title=\"http:\/\/en.wikipedia.org\/wiki\/MD5\" href=\"http:\/\/en.wikipedia.org\/wiki\/MD5\">MD5\u00a0<\/a><\/li>\n<\/ul>\n<div class=\"twttr_buttons\"><div class=\"twttr_twitter\">\n\t\t\t\t\t<a href=\"http:\/\/twitter.com\/share?text=Crypto+--\" class=\"twitter-share-button\" data-via=\"\" data-hashtags=\"\"  data-size=\"default\" data-url=\"https:\/\/shirishranjit.com\/blog1\/technical-posts\/crypto\"  data-related=\"\" target=\"_blank\">Tweet<\/a>\n\t\t\t\t<\/div><div class=\"twttr_followme\">\n\t\t\t\t\t\t<a href=\"https:\/\/twitter.com\/shiranjit\" class=\"twitter-follow-button\" data-size=\"default\"  data-show-screen-name=\"false\"  target=\"_blank\">Follow me<\/a>\n\t\t\t\t\t<\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>Ciphers are divided into two according to\u00a0type of key used symmetric key algorithms\u00a0(Private-key cryptography), where the same key is used for encryption and decryption, and asymmetric key algorithms\u00a0(Public-key cryptography), where two different keys are used for encryption and decryption. Secure &hellip; <a href=\"https:\/\/shirishranjit.com\/blog1\/technical-posts\/crypto\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":198,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-768","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/shirishranjit.com\/blog1\/wp-json\/wp\/v2\/pages\/768"}],"collection":[{"href":"https:\/\/shirishranjit.com\/blog1\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/shirishranjit.com\/blog1\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/shirishranjit.com\/blog1\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/shirishranjit.com\/blog1\/wp-json\/wp\/v2\/comments?post=768"}],"version-history":[{"count":7,"href":"https:\/\/shirishranjit.com\/blog1\/wp-json\/wp\/v2\/pages\/768\/revisions"}],"predecessor-version":[{"id":775,"href":"https:\/\/shirishranjit.com\/blog1\/wp-json\/wp\/v2\/pages\/768\/revisions\/775"}],"up":[{"embeddable":true,"href":"https:\/\/shirishranjit.com\/blog1\/wp-json\/wp\/v2\/pages\/198"}],"wp:attachment":[{"href":"https:\/\/shirishranjit.com\/blog1\/wp-json\/wp\/v2\/media?parent=768"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}