{"id":2247,"date":"2023-05-08T17:38:28","date_gmt":"2023-05-08T17:38:28","guid":{"rendered":"https:\/\/content.one.lumenlearning.com\/quantitativereasoning\/?post_type=chapter&#038;p=2247"},"modified":"2025-08-26T03:59:27","modified_gmt":"2025-08-26T03:59:27","slug":"cryptography-learn-it-1","status":"web-only","type":"chapter","link":"https:\/\/content.one.lumenlearning.com\/quantitativereasoning\/chapter\/cryptography-learn-it-1\/","title":{"raw":"Cryptography: Learn It 1","rendered":"Cryptography: Learn It 1"},"content":{"raw":"<section class=\"textbox learningGoals\">\r\n<ul>\r\n\t<li>Compare ways of encrypting and decrypting data using shared symmetric-key methods<\/li>\r\n\t<li>Understand the basics of public key cryptography, including key pairs, digital signatures, and encryption\/decryption<\/li>\r\n\t<li>Compare the pros and cons of using public key cryptography versus symmetric-key methods<\/li>\r\n<\/ul>\r\n<\/section>\r\n<h2>Symmetric-Key Methods<\/h2>\r\n<p>When people need to secretly store or communicate messages, they turn to cryptography. <strong>Cryptography <\/strong>involves using techniques to obscure a message so outsiders cannot read the message. It is typically split into two steps: <strong>encryption<\/strong>, in which the message is obscured, and <strong>decryption<\/strong>, in which the original message is recovered from the obscured form.<\/p>\r\n<section class=\"textbox keyTakeaway\">\r\n<div>\r\n<h3>encryption and decryption<\/h3>\r\n<p><strong>Encryption<\/strong> is the process of converting plain text or data into an encoded format that can only be read by authorized parties who possess the appropriate decryption key. The goal of encryption is to protect the confidentiality and integrity of the information being transmitted or stored.<\/p>\r\n<p>&nbsp;<\/p>\r\n<p><strong>Decryption<\/strong>, on the other hand, is the process of converting the encrypted data back into its original, readable form using the appropriate decryption key. Only authorized parties who possess the correct key are able to decrypt the information and access the original plain text or data.<\/p>\r\n<\/div>\r\n<\/section>\r\n<p>One simple encryption method is called a <strong>substitution cipher<\/strong>.<\/p>\r\n<section class=\"textbox keyTakeaway\">\r\n<div>\r\n<h3>substitution cipher<\/h3>\r\n<p>A <strong>substitution cipher<\/strong> is a method of encryption that involves replacing each letter in a message with a different letter or symbol according to a predetermined pattern or rule.<\/p>\r\n<\/div>\r\n<\/section>\r\n\r\n[caption id=\"attachment_2252\" align=\"alignright\" width=\"310\"]<img class=\"wp-image-2252\" src=\"https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/08174732\/crypt1.png\" alt=\"A picture of two alphabets with a mapping between: A maps to D, B maps to E, and C maps to F.\" width=\"310\" height=\"135\" \/> Figure 1. The Caesar cipher[\/caption]\r\n\r\n<p>A simple example of a substitution cipher is called the Caesar cipher, sometimes called a shift cipher. In this approach, each letter is replaced with a different letter which falls in a fixed number of positions later in the alphabet. For example, if we use a shift of [latex]3[\/latex], then the letter [latex]A[\/latex] would be replaced with [latex]D[\/latex], the letter [latex]3[\/latex] positions later in the alphabet. The entire mapping would look like:<\/p>\r\n<p>Original: [latex]ABCDEFGHIJKLMNOPQRSTUVWXYZ[\/latex]<br \/>\r\nMaps to: [latex]DEFGHIJKLMNOPQRSTUVWXYZABC[\/latex]<\/p>\r\n<section class=\"textbox example\">Use the Caesar cipher with shift of [latex]3[\/latex] to encrypt the message: \u201cWe ride at noon\u201d<br \/>\r\n[reveal-answer q=\"4330\"]Show Solution[\/reveal-answer]<br \/>\r\n[hidden-answer a=\"4330\"]We use the mapping above to replace each letter. [latex]W[\/latex] gets replaced with [latex]Z[\/latex], and so forth, giving the encrypted message: [latex]ZH ULGH DW QRRQ[\/latex].Notice that the length of the words could give an important clue to the cipher shift used. If we saw a single letter in the encrypted message, we would assume it must be an encrypted [latex]A[\/latex] or [latex]I[\/latex], since those are the only single letters that form valid English words. To obscure the message, the letters are often rearranged into equal-sized blocks. The message [latex]ZH ULGH DW QRRQ[\/latex] could be written in blocks of three characters as [latex]ZHU \\ LGH \\ DWQ \\ RRQ[\/latex].<br \/>\r\n[\/hidden-answer]<\/section>\r\n<section class=\"textbox tryIt\">[ohm2_question hide_question_numbers=1]5178[\/ohm2_question]<\/section>\r\n\r\n[caption id=\"attachment_2275\" align=\"alignright\" width=\"234\"]<img class=\"wp-image-2275 size-full\" src=\"https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/08181014\/crypt2.png\" alt=\"A picture of a cipher disk, with an outer ring of letters and numbers, and an inner ring of letters.\" width=\"234\" height=\"222\" \/> Figure 2. Alberti cipher disk[\/caption]\r\n\r\n<p>Notice that in the cipher above, the extra part of the alphabet wraps around to the beginning. Because of this, a handy version of the shift cipher is a cipher disc, such as the Alberti cipher disk shown here from the 1400s. In a cipher disc, the inner wheel could be turned to change the cipher shift. This same approach is used for \u201csecret decoder rings.\u201d<\/p>","rendered":"<section class=\"textbox learningGoals\">\n<ul>\n<li>Compare ways of encrypting and decrypting data using shared symmetric-key methods<\/li>\n<li>Understand the basics of public key cryptography, including key pairs, digital signatures, and encryption\/decryption<\/li>\n<li>Compare the pros and cons of using public key cryptography versus symmetric-key methods<\/li>\n<\/ul>\n<\/section>\n<h2>Symmetric-Key Methods<\/h2>\n<p>When people need to secretly store or communicate messages, they turn to cryptography. <strong>Cryptography <\/strong>involves using techniques to obscure a message so outsiders cannot read the message. It is typically split into two steps: <strong>encryption<\/strong>, in which the message is obscured, and <strong>decryption<\/strong>, in which the original message is recovered from the obscured form.<\/p>\n<section class=\"textbox keyTakeaway\">\n<div>\n<h3>encryption and decryption<\/h3>\n<p><strong>Encryption<\/strong> is the process of converting plain text or data into an encoded format that can only be read by authorized parties who possess the appropriate decryption key. The goal of encryption is to protect the confidentiality and integrity of the information being transmitted or stored.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Decryption<\/strong>, on the other hand, is the process of converting the encrypted data back into its original, readable form using the appropriate decryption key. Only authorized parties who possess the correct key are able to decrypt the information and access the original plain text or data.<\/p>\n<\/div>\n<\/section>\n<p>One simple encryption method is called a <strong>substitution cipher<\/strong>.<\/p>\n<section class=\"textbox keyTakeaway\">\n<div>\n<h3>substitution cipher<\/h3>\n<p>A <strong>substitution cipher<\/strong> is a method of encryption that involves replacing each letter in a message with a different letter or symbol according to a predetermined pattern or rule.<\/p>\n<\/div>\n<\/section>\n<figure id=\"attachment_2252\" aria-describedby=\"caption-attachment-2252\" style=\"width: 310px\" class=\"wp-caption alignright\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-2252\" src=\"https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/08174732\/crypt1.png\" alt=\"A picture of two alphabets with a mapping between: A maps to D, B maps to E, and C maps to F.\" width=\"310\" height=\"135\" srcset=\"https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/08174732\/crypt1.png 259w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/08174732\/crypt1-65x28.png 65w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/08174732\/crypt1-225x98.png 225w\" sizes=\"(max-width: 310px) 100vw, 310px\" \/><figcaption id=\"caption-attachment-2252\" class=\"wp-caption-text\">Figure 1. The Caesar cipher<\/figcaption><\/figure>\n<p>A simple example of a substitution cipher is called the Caesar cipher, sometimes called a shift cipher. In this approach, each letter is replaced with a different letter which falls in a fixed number of positions later in the alphabet. For example, if we use a shift of [latex]3[\/latex], then the letter [latex]A[\/latex] would be replaced with [latex]D[\/latex], the letter [latex]3[\/latex] positions later in the alphabet. The entire mapping would look like:<\/p>\n<p>Original: [latex]ABCDEFGHIJKLMNOPQRSTUVWXYZ[\/latex]<br \/>\nMaps to: [latex]DEFGHIJKLMNOPQRSTUVWXYZABC[\/latex]<\/p>\n<section class=\"textbox example\">Use the Caesar cipher with shift of [latex]3[\/latex] to encrypt the message: \u201cWe ride at noon\u201d<\/p>\n<div class=\"qa-wrapper\" style=\"display: block\"><button class=\"show-answer show-answer-button collapsed\" data-target=\"q4330\">Show Solution<\/button><\/p>\n<div id=\"q4330\" class=\"hidden-answer\" style=\"display: none\">We use the mapping above to replace each letter. [latex]W[\/latex] gets replaced with [latex]Z[\/latex], and so forth, giving the encrypted message: [latex]ZH ULGH DW QRRQ[\/latex].Notice that the length of the words could give an important clue to the cipher shift used. If we saw a single letter in the encrypted message, we would assume it must be an encrypted [latex]A[\/latex] or [latex]I[\/latex], since those are the only single letters that form valid English words. To obscure the message, the letters are often rearranged into equal-sized blocks. The message [latex]ZH ULGH DW QRRQ[\/latex] could be written in blocks of three characters as [latex]ZHU \\ LGH \\ DWQ \\ RRQ[\/latex].\n<\/div>\n<\/div>\n<\/section>\n<section class=\"textbox tryIt\"><iframe loading=\"lazy\" id=\"ohm5178\" class=\"resizable\" src=\"https:\/\/ohm.one.lumenlearning.com\/multiembedq.php?id=5178&theme=lumen&iframe_resize_id=ohm5178&source=tnh\" width=\"100%\" height=\"150\"><\/iframe><\/section>\n<figure id=\"attachment_2275\" aria-describedby=\"caption-attachment-2275\" style=\"width: 234px\" class=\"wp-caption alignright\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-2275 size-full\" src=\"https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/08181014\/crypt2.png\" alt=\"A picture of a cipher disk, with an outer ring of letters and numbers, and an inner ring of letters.\" width=\"234\" height=\"222\" srcset=\"https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/08181014\/crypt2.png 234w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/08181014\/crypt2-65x62.png 65w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/08181014\/crypt2-225x213.png 225w\" sizes=\"(max-width: 234px) 100vw, 234px\" \/><figcaption id=\"caption-attachment-2275\" class=\"wp-caption-text\">Figure 2. Alberti cipher disk<\/figcaption><\/figure>\n<p>Notice that in the cipher above, the extra part of the alphabet wraps around to the beginning. Because of this, a handy version of the shift cipher is a cipher disc, such as the Alberti cipher disk shown here from the 1400s. In a cipher disc, the inner wheel could be turned to change the cipher shift. This same approach is used for \u201csecret decoder rings.\u201d<\/p>\n","protected":false},"author":15,"menu_order":4,"template":"","meta":{"_candela_citation":"[]","pb_show_title":"on","pb_short_title":"","pb_subtitle":"","pb_authors":[],"pb_section_license":""},"chapter-type":[],"contributor":[],"license":[],"part":2245,"module-header":"learn_it","content_attributions":[],"internal_book_links":[],"video_content":null,"cc_video_embed_content":{"cc_scripts":"","media_targets":[]},"try_it_collection":null,"_links":{"self":[{"href":"https:\/\/content.one.lumenlearning.com\/quantitativereasoning\/wp-json\/pressbooks\/v2\/chapters\/2247"}],"collection":[{"href":"https:\/\/content.one.lumenlearning.com\/quantitativereasoning\/wp-json\/pressbooks\/v2\/chapters"}],"about":[{"href":"https:\/\/content.one.lumenlearning.com\/quantitativereasoning\/wp-json\/wp\/v2\/types\/chapter"}],"author":[{"embeddable":true,"href":"https:\/\/content.one.lumenlearning.com\/quantitativereasoning\/wp-json\/wp\/v2\/users\/15"}],"version-history":[{"count":23,"href":"https:\/\/content.one.lumenlearning.com\/quantitativereasoning\/wp-json\/pressbooks\/v2\/chapters\/2247\/revisions"}],"predecessor-version":[{"id":15667,"href":"https:\/\/content.one.lumenlearning.com\/quantitativereasoning\/wp-json\/pressbooks\/v2\/chapters\/2247\/revisions\/15667"}],"part":[{"href":"https:\/\/content.one.lumenlearning.com\/quantitativereasoning\/wp-json\/pressbooks\/v2\/parts\/2245"}],"metadata":[{"href":"https:\/\/content.one.lumenlearning.com\/quantitativereasoning\/wp-json\/pressbooks\/v2\/chapters\/2247\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/content.one.lumenlearning.com\/quantitativereasoning\/wp-json\/wp\/v2\/media?parent=2247"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/content.one.lumenlearning.com\/quantitativereasoning\/wp-json\/pressbooks\/v2\/chapter-type?post=2247"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/content.one.lumenlearning.com\/quantitativereasoning\/wp-json\/wp\/v2\/contributor?post=2247"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/content.one.lumenlearning.com\/quantitativereasoning\/wp-json\/wp\/v2\/license?post=2247"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}