{"id":461,"date":"2026-09-20T16:45:55","date_gmt":"2026-09-20T16:45:55","guid":{"rendered":"https:\/\/ndovu.org.uk\/cs\/?p=461"},"modified":"2026-10-20T10:19:54","modified_gmt":"2026-10-20T10:19:54","slug":"yr5-term-1-1-5-codebreaker","status":"publish","type":"post","link":"https:\/\/ndovu.org.uk\/cs\/yr5-term-1-1-5-codebreaker\/","title":{"rendered":"Yr5 Term 1.1.5 Codebreaker"},"content":{"rendered":"\n<p><strong>Welcome to Year 5 Computing \u2014 Lesson 5! \ud83d\udd10<\/strong><\/p>\n<p>Today we are becoming codebreakers! We will learn how secret messages are sent across the internet using <strong>Encryption<\/strong>, and we will try to crack the classic Caesar Cipher and Random Substitution Ciphers!<\/p>\n\n<p><strong>Step 1: Keyboard Warm-up \u2328\ufe0f (10 Mins)<\/strong><\/p>\n<ul>\n  <li>Click here to warm up your fingers on our typing studio: <a href=\"https:\/\/ndovu.org.uk\/type\/\" target=\"_blank\" rel=\"noopener\">Start Typing Practice on Ndovu<\/a>.<\/li>\n  <li>Focus on correct finger placement and accuracy. Keep practicing until your teacher brings the class together!<\/li>\n<\/ul>\n\n<p><strong>Step 2: Interactive Caesar Cipher Simulator \ud83d\udd75\ufe0f\u200d\u2642\ufe0f (15 Mins)<\/strong><\/p>\n<p>A Caesar Cipher is one of the oldest encryption methods. It works by &#8220;shifting&#8221; the alphabet by a certain number.<\/p>\n<p><strong>The Challenge:<\/strong> Type a short, secret message and choose a shift number. Then click <strong>&#8220;Lock &amp; Hide Secret&#8221;<\/strong>. Swap seats with a partner and see if they can crack your code using just the Cyphertext!<\/p>\n\n<!-- Cipher Simulator & Question Module -->\n<div style=\"max-width: 850px; margin: 20px auto; font-family: Arial, sans-serif; border: 2px solid #ddd; border-radius: 10px; padding: 20px; background-color: #fcfcfc; box-shadow: 0 4px 8px rgba(0,0,0,0.05);\">\n  \n  <!-- Caesar Cipher Interactive Tool -->\n  <div style=\"background: #e6f2f8; border: 2px solid #0073aa; border-radius: 8px; padding: 15px; margin-bottom: 20px; transition: background 0.3s;\" id=\"cipher-container\">\n    \n    <div style=\"display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px;\">\n      <h3 style=\"margin: 0; color: #0073aa;\">Caesar Cipher Encryptor<\/h3>\n      <button type=\"button\" onclick=\"window.toggleLock()\" id=\"btn-lock\" style=\"background-color: #e53935; color: white; border: none; padding: 8px 15px; border-radius: 5px; cursor: pointer; font-weight: bold; font-size: 14px;\">\ud83d\udd12 Lock &amp; Hide Secret<\/button>\n    <\/div>\n    \n    <div id=\"secret-controls\" style=\"display: block; transition: opacity 0.3s;\">\n      <label style=\"font-weight: bold; font-size: 13px;\">Your Secret Message (Plaintext):<\/label>\n      <textarea id=\"cipher-input\" rows=\"2\" oninput=\"window.updateCipher()\" style=\"width: 100%; font-family: monospace; font-size: 14px; padding: 10px; margin-top: 5px; margin-bottom: 15px; border: 1px solid #ccc; border-radius: 5px; box-sizing: border-box;\" placeholder=\"Type a message here...\"><\/textarea>\n      \n      <div style=\"display: flex; align-items: center; gap: 15px; margin-bottom: 15px;\">\n        <label style=\"font-weight: bold; font-size: 13px;\">Shift Value: <span id=\"shift-display\" style=\"color: #e53935; font-size: 16px;\">3<\/span><\/label>\n        <input type=\"range\" id=\"shift-slider\" min=\"1\" max=\"25\" value=\"3\" oninput=\"window.updateCipher()\" style=\"flex: 1; cursor: pointer;\">\n      <\/div>\n    <\/div>\n\n    <label style=\"font-weight: bold; font-size: 13px;\">Encrypted Output (Cyphertext):<\/label>\n    <div id=\"cipher-output\" style=\"width: 100%; min-height: 50px; font-family: monospace; font-size: 20px; font-weight: bold; letter-spacing: 3px; padding: 15px; margin-top: 5px; background: #222; color: #00ffcc; border-radius: 5px; box-sizing: border-box; word-wrap: break-word; text-align: center;\"><\/div>\n  <\/div>\n\n  <div style=\"background: #fff; border: 1px solid #ccc; border-radius: 8px; padding: 15px; margin-bottom: 15px;\">\n    <label style=\"font-weight: bold; display: block; margin-bottom: 5px; font-size: 14px;\">1. How does a Caesar cipher work, and how do you use a &#8220;shift value&#8221; to encrypt a message?<\/label>\n    <textarea id=\"q1-caesar\" rows=\"3\" style=\"width: 100%; font-family: Arial, sans-serif; font-size: 13px; padding: 10px; border: 1px solid #ccc; border-radius: 5px; box-sizing: border-box;\" placeholder=\"Explain how the alphabet changes...\"><\/textarea>\n  <\/div>\n\n  <div style=\"background: #fff; border: 1px solid #ccc; border-radius: 8px; padding: 15px; margin-bottom: 15px;\">\n    <label style=\"font-weight: bold; display: block; margin-bottom: 5px; font-size: 14px;\">2. When cracking your partner&#8217;s code, what made it easier or harder to crack?<\/label>\n    <textarea id=\"q2-frequency\" rows=\"3\" style=\"width: 100%; font-family: Arial, sans-serif; font-size: 13px; padding: 10px; border: 1px solid #ccc; border-radius: 5px; box-sizing: border-box;\" placeholder=\"Did you look for common letters? Did you guess the shift?\"><\/textarea>\n  <\/div>\n\n  <div style=\"background: #fff; border: 1px solid #ccc; border-radius: 8px; padding: 15px; margin-bottom: 15px;\">\n    <label style=\"font-weight: bold; display: block; margin-bottom: 5px; font-size: 14px;\">3. Why is strong encryption essential for daily life on the internet (like online banking or secure messaging)?<\/label>\n    <textarea id=\"q3-importance\" rows=\"3\" style=\"width: 100%; font-family: Arial, sans-serif; font-size: 13px; padding: 10px; border: 1px solid #ccc; border-radius: 5px; box-sizing: border-box;\" placeholder=\"What would happen if our data wasn't encrypted?\"><\/textarea>\n  <\/div>\n\n  <div style=\"text-align: right;\">\n    <button type=\"button\" onclick=\"window.downloadCipherAnswers()\" style=\"background-color: #4CAF50; color: white; border: none; padding: 12px 25px; border-radius: 5px; cursor: pointer; font-size: 16px; font-weight: bold;\">\ud83d\udcbe Download Reflection Image<\/button>\n  <\/div>\n<\/div>\n\n<p><strong>Step 3: Cracking Codes on Code.org \ud83d\ude80 (20 Mins)<\/strong><\/p>\n<p>Now that you understand how a shift cipher works, it is time to try breaking a <strong>Random Substitution Cipher<\/strong>! You will need to use your detective skills and <em>frequency analysis<\/em> to figure out which random letters match up with the real alphabet.<\/p>\n\n<div style=\"background-color: #ffebee; border-left: 5px solid #e53935; padding: 15px 20px; border-radius: 8px; margin-bottom: 20px; text-align: center;\">\n  <p style=\"margin-top: 0; font-weight: bold; font-size: 16px; color: #b71c1c;\">Mission: Launch Code.org Encryption Unit<\/p>\n  <p style=\"margin-bottom: 15px; font-size: 14px;\">Click the button below to sign in. Once signed in, navigate to your assigned Encryption section!<\/p>\n  <a href=\"https:\/\/studio.code.org\/users\/sign_in\" target=\"_blank\" rel=\"noopener\" style=\"display: inline-block; background-color: #e53935; color: white; padding: 12px 25px; border-radius: 5px; text-decoration: none; font-weight: bold; font-size: 16px;\">Launch Code.org Sign In \u2794<\/a>\n<\/div>\n\n<p><strong>Step 4: Log Off and Reflect \ud83d\udc4b (5 Mins)<\/strong><\/p>\n<ul>\n  <li><strong>Exit Ticket:<\/strong> Why are simple substitution ciphers considered weak, and why do we need much stronger encryption today?<\/li>\n  <li>Log out securely and tidy your desk space!<\/li>\n<\/ul>\n<script>window.updateCipher=function(){var t=document.getElementById(\"cipher-input\").value.toUpperCase();var s=parseInt(document.getElementById(\"shift-slider\").value);document.getElementById(\"shift-display\").innerText=s;var e=\"\";for(var i=0;i!==t.length;i++){var c=t.charCodeAt(i);if(Math.max(65,c)===c&&Math.min(90,c)===c){e+=String.fromCharCode(((c-65+s)%26)+65);}else{e+=t.charAt(i);}}document.getElementById(\"cipher-output\").innerText=e;};window.toggleLock=function(){var ctrl=document.getElementById(\"secret-controls\");var btn=document.getElementById(\"btn-lock\");var box=document.getElementById(\"cipher-container\");var isLocked=(ctrl.style.display===\"none\");if(isLocked){ctrl.style.display=\"block\";btn.innerText=String.fromCodePoint(128274)+\" Lock & Hide Secret\";btn.style.backgroundColor=\"#e53935\";box.style.backgroundColor=\"#e6f2f8\";box.style.borderColor=\"#0073aa\";}else{ctrl.style.display=\"none\";btn.innerText=String.fromCodePoint(128275)+\" Unlock Screen\";btn.style.backgroundColor=\"#4CAF50\";box.style.backgroundColor=\"#fff3e0\";box.style.borderColor=\"#ff9800\";}};window.downloadCipherAnswers=function(){var a1=document.getElementById(\"q1-caesar\").value.trim()||\"No answer provided.\";var a2=document.getElementById(\"q2-frequency\").value.trim()||\"No answer provided.\";var a3=document.getElementById(\"q3-importance\").value.trim()||\"No answer provided.\";var c=document.createElement(\"canvas\");c.width=800;c.height=1000;var x=c.getContext(\"2d\");x.fillStyle=\"#ffffff\";x.fillRect(0,0,c.width,c.height);function w(t,sx,sy,wl,lh){var ws=t.split(String.fromCharCode(32));var cl=\"\";for(var n=0;n!==ws.length;n++){var tl=cl+ws[n]+String.fromCharCode(32);var m=x.measureText(tl);if(Math.max(m.width,wl)!==wl&&n!==0){x.fillText(cl,sx,sy);cl=ws[n]+String.fromCharCode(32);sy+=lh;}else{cl=tl;}}x.fillText(cl,sx,sy);return sy+lh;}var y=60;x.fillStyle=\"#0073aa\";x.font=\"bold 28px Arial\";x.fillText(\"Encryption & Cipher Cracking Reflection\",40,y);y+=60;x.fillStyle=\"#333333\";x.font=\"bold 18px Arial\";x.fillText(\"1. How does a Caesar cipher work with a shift value?\",40,y);y+=30;x.font=\"normal 16px Arial\";y=w(a1,40,y,720,24);y+=40;x.fillStyle=\"#333333\";x.font=\"bold 18px Arial\";x.fillText(\"2. When cracking your partner's code, what made it easier or harder?\",40,y);y+=30;x.font=\"normal 16px Arial\";y=w(a2,40,y,720,24);y+=40;x.fillStyle=\"#333333\";x.font=\"bold 18px Arial\";x.fillText(\"3. Why is strong encryption essential for daily internet life?\",40,y);y+=30;x.font=\"normal 16px Arial\";y=w(a3,40,y,720,24);var ln=document.createElement(\"a\");ln.href=c.toDataURL(\"image\/png\");ln.download=\"Lesson5_Encryption_Reflection.png\";document.body.appendChild(ln);ln.click();document.body.removeChild(ln);alert(\"Your answers have been downloaded! Please paste this PNG into your Computing Word document.\");};<\/script>\n","protected":false},"excerpt":{"rendered":"<p>Welcome to Year 5 Computing \u2014 Lesson 5! \ud83d\udd10 Today we are becoming codebreakers! We will learn how secret messages are sent across the internet&#8230;<\/p>\n<div class=\"more-link-wrapper\"><a class=\"more-link\" href=\"https:\/\/ndovu.org.uk\/cs\/yr5-term-1-1-5-codebreaker\/\">Continue Reading<span class=\"screen-reader-text\">Yr5 Term 1.1.5 Codebreaker<\/span><\/a><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_kilabel_text_disclosure":"","_kilabel_text_reviewed_by":"","_kilabel_text_reviewed_on":"","_kilabel_text_responsible":"","iawp_total_views":2,"footnotes":""},"categories":[8],"tags":[],"class_list":["post-461","post","type-post","status-publish","format-standard","hentry","category-year5","entry"],"_links":{"self":[{"href":"https:\/\/ndovu.org.uk\/cs\/wp-json\/wp\/v2\/posts\/461","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ndovu.org.uk\/cs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ndovu.org.uk\/cs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ndovu.org.uk\/cs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ndovu.org.uk\/cs\/wp-json\/wp\/v2\/comments?post=461"}],"version-history":[{"count":5,"href":"https:\/\/ndovu.org.uk\/cs\/wp-json\/wp\/v2\/posts\/461\/revisions"}],"predecessor-version":[{"id":611,"href":"https:\/\/ndovu.org.uk\/cs\/wp-json\/wp\/v2\/posts\/461\/revisions\/611"}],"wp:attachment":[{"href":"https:\/\/ndovu.org.uk\/cs\/wp-json\/wp\/v2\/media?parent=461"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ndovu.org.uk\/cs\/wp-json\/wp\/v2\/categories?post=461"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ndovu.org.uk\/cs\/wp-json\/wp\/v2\/tags?post=461"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}