<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Untitled Publication]]></title><description><![CDATA[Untitled Publication]]></description><link>https://complexlity.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Tue, 13 Oct 2026 15:17:18 GMT</lastBuildDate><atom:link href="https://complexlity.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[The Cipher Challenge]]></title><description><![CDATA[AngelHack is a global innovation organization, founded on the idea of bringing creators together. Companies from all over the world have chosen them as their partner to engage developers with their technologies through hackathons and events. AngelHac...]]></description><link>https://complexlity.hashnode.dev/the-cipher-challenge</link><guid isPermaLink="true">https://complexlity.hashnode.dev/the-cipher-challenge</guid><category><![CDATA[Cryptography]]></category><category><![CDATA[ciphers]]></category><category><![CDATA[angelhack]]></category><category><![CDATA[cryptii]]></category><dc:creator><![CDATA[Nwalozie Elijah]]></dc:creator><pubDate>Mon, 24 Apr 2023 13:28:58 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1681907601803/8be1c124-3908-4a61-b3e9-17f82a305ae7.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><a target="_blank" href="https://angelhack.com/angelhack-team/">AngelHack</a> is a global innovation organization, founded on the idea of bringing creators together. Companies from all over the world have chosen them as their partner to engage developers with their technologies through hackathons and events. AngelHack has created an incredibly diverse and global community of change makers and developers</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1681908273873/aed42a66-e931-48ed-9cbe-dbba634a974f.jpeg" alt class="image--center mx-auto" /></p>
<p>A new challenge was organized giving hints along the way. In this article, we will go step-by-step through the process of solving the challenge</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1681908609011/e1f49c14-2cb0-45e8-b8a6-0f42cb1e0d7d.png" alt class="image--center mx-auto" /></p>
<p><strong>Cipher Text</strong>: <code>Jryy qbar lbh! Bar pvcure qbja, ohg vg'f whfg gur ortvaavat.mrvbaevdturheblabarzbhrsbobqkpyqcuztrmbszkkryppstuvtyrykemnkhmbqxzdmzroqkaqqebjvpctlnlhpnluagslymxuxsndjrksshyrduvssaosrwokhcftfnlhxqlc</code></p>
<p>Let's get right on with it!!</p>
<h2 id="heading-solving-the-challenge">Solving The Challenge</h2>
<p>To come to the solution, we have to go over the clues. There were many clues provided, some of which are valuable in getting to the solution and a few others not. We would only go through important ones and leave the rest out. You can find it all on <a target="_blank" href="https://twitter.com/AngelHack/status/1643237096738656256?s=20">Twitter</a></p>
<h3 id="heading-clue-1">Clue 1:</h3>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1681909099779/f6dd1bb1-7f65-4c53-8b0e-b17fb37f2976.png" alt class="image--center mx-auto" /></p>
<p><a target="_blank" href="https://cryptii.com/"><strong>Cryptii</strong></a> is an <a target="_blank" href="https://github.com/cryptii/cryptii">open-source</a> project for carrying out modular conversion, encoding and encryptions directly on the browser. For starters, we know cryptii is going to be important in solving the puzzle</p>
<h3 id="heading-clue-2">Clue 2:</h3>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1681910096151/607b5c70-181f-4f8b-8717-27961977e089.jpeg" alt class="image--center mx-auto" /></p>
<p><strong>CAESAR -</strong> Julius <strong>Caesar</strong> led the Roman army in wars and is a famous name from the roman empire. <a target="_blank" href="https://www.mccraystavern.com/caesar-salad#:~:text=Caesar%20salad%20was%20invented%20in,have%20invented%20the%20Caesar%20Salad."><strong>Caesar</strong> Salad</a> is also the name of that depicted in the image. From the hint, we know to use the <a target="_blank" href="https://en.wikipedia.org/wiki/Caesar_cipher">Caesar Cipher</a> to decrypt the message.</p>
<p>The <strong>Caesar Cipher</strong> is a method of encryption and decryption with takes a number called <strong>KEY</strong> and applies this algorithm (shifting) to the letters according to the given key. To know more about it. See <a target="_blank" href="https://en.wikipedia.org/wiki/Caesar_cipher">Wiki</a></p>
<p>Now we have the decryption algorithm but not the key... yet... Enter Clue 3</p>
<p>P.S: Without the key, we could iterate by applying keys from 1 to 26 (length of the English alphabet) and we would as well find the key</p>
<h3 id="heading-clue-3">Clue 3</h3>
<p><img src="https://pbs.twimg.com/media/FuFI4kVaYAAPlWw?format=jpg&amp;name=medium" alt="Image" /></p>
<p>The image above is a simple math (quantitive reasoning) that multiplies the two top values to get the bottom one i.e 4 x 6 = 24, 8 x 5 = 40. We can deduce the missing number the same way: 1 x 13 = 13. Now we have our key. Back to cryptii</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1681910948377/d2242614-4948-4ddf-84e1-6cfab6b6faef.png" alt class="image--center mx-auto" /></p>
<p>We took the text and applied the Caesar cipher to it and gave it the key of 13 and we get 30% of the problem solved</p>
<p><strong>Current Text</strong>: <code>Well done you! One cipher down, but it's just the beginning. zeionriqgheuroynonemouefobodxcldphmgezofmxxelccfghiglelxrzaxuzodkmqzmebdxnddrowicpgyayucayhntfylzkhkfaqwexffuleqhiffnbfejbxupsgsayukdyp</code></p>
<h3 id="heading-clue-4">Clue 4:</h3>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1681929223670/98cd9bba-d8e8-49f2-a250-b52e2a0562f5.jpeg" alt class="image--center mx-auto" /></p>
<p>Another Math problem. We are expected to find the value of 🔺 <strong>and</strong> 🟢 <strong>and</strong> ⭐.</p>
<p>Firstly, from row 4, we can deduce that <code>4⭐ = 20</code>. Hence, A single star <code>⭐ = 5</code> (20 ÷ 4)</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1681929816902/70f63459-68bf-4c03-bdbe-269c6004baeb.jpeg" alt="Equation 1" class="image--center mx-auto" /></p>
<p>To find the values of 🔺 and 🟢, we would need to substitute the value of ⭐(5) into other equations gotten from the diagram</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1681930154999/e0f79681-18a5-4b72-a333-4b9806144a72.jpeg" alt="Equation 2" class="image--center mx-auto" /></p>
<p>From the equation above, we can deduce that <code>3🟢 + ⭐ = 14</code>. Substituting the value of ⭐(5) in the equation we get <code>3🟢 = 9</code>. Therefore, the value of <code>🟢 is 3</code></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1681930310178/a2d6f254-8a84-44a7-97a9-6f7f52d32925.jpeg" alt class="image--center mx-auto" /></p>
<p>Finally, to get the value of 🔺, we put the value of ⭐ and 🟢 into the equation in the diagram above</p>
<p><code>⭐ + 🟢 + 🔺 + ⭐ = 17</code>. Substituting the values of ⭐(5) and 🟢(3) into the equation</p>
<p><code>5 + 3 + 🔺 + 5 = 17</code></p>
<p><code>🔺 = 4</code></p>
<p><strong>Therefore, ⭐ and 🟢 and 🔺 = 5 x 3 x 4 = 60</strong>.</p>
<p>P.S In mathematics <code>and</code> refers to multiplication (x)</p>
<h3 id="heading-clue-5">Clue 5:</h3>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1681931043181/199f9d35-597a-4d5d-9e20-717f8f6f97fd.jpeg" alt class="image--center mx-auto" /></p>
<p>Yet another basic math problem. This could be solved by using the <a target="_blank" href="https://en.wikipedia.org/wiki/Pythagorean_theorem">Pythagoras theorem</a>:</p>
<p><img src="https://www.gstatic.com/education/formulas2/472522532/en/pythagorean_theorem.svg" alt="a^2 + b^2 = c^2" /></p>
<p>Where <code>a</code> and <code>b</code> are the adjacent and opposite sides while <code>c</code> represents the longest side called the <code>hypothenuse</code> . a = 3, b = 4 and c = ⭐</p>
<p>Substituting the values of a, b and c. We get <code>⭐ = 5</code>. To test the out practically, see this <a target="_blank" href="https://www.calculator.net/pythagorean-theorem-calculator.html">online Pythagoras calculator</a></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1681931439780/7a1c2d86-9e38-4930-8d3f-65d42ae943a7.png" alt class="image--center mx-auto" /></p>
<p><strong>Therefore, ⭐= 5</strong></p>
<h3 id="heading-clue-6">Clue 6:</h3>
<p>For the past two clues, we have been solving a lot of math without having to use those values. To recap, in clue 4, we had the value of <code>60</code> and in clue 6, we obtained the value of <code>5</code>.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1681931915904/5d8034a1-9f87-4a55-8dbd-7810de1670e3.jpeg" alt class="image--center mx-auto" /></p>
<p>Looks familiar? This shot is taken from <a target="_blank" href="https://cryptii.com/">Cryptii</a>. The name of the cipher has been removed so we have to find which of them ourselves. Going through all the algorithms, we would find that the <a target="_blank" href="https://en.wikipedia.org/wiki/Affine_cipher#:~:text=The%20affine%20cipher%20is%20a,converted%20back%20to%20a%20letter.">Affine cipher</a> is what we are looking for</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1681932094657/951730e2-eb51-487c-92be-9592030abce0.png" alt class="image--center mx-auto" /></p>
<p>The affine cipher involves shifting and scaling letters using two chosen numbers to create an encrypted message, which can be decrypted using the inverse formula.</p>
<p><img src="https://www.gstatic.com/education/formulas2/472522532/en/equation_of_a_line_slope_intercept_form.svg" alt="y=m x+b" /></p>
<p>Consider the equation above. <code>m</code> represents the slope while <code>b</code> represents the intercept. y and x are the unknowns. This is an example of a formula used to encrypt/decrypt a message in the Affine cipher. Where y and x represent the encrypted and original letters respectively.</p>
<p>Back to solving...</p>
<p>At the moment, we have the <code>slope</code>, and <code>intercept</code> but don't have the <code>alphabets</code> .</p>
<p>By trial, using the entire letters of the English alphabet does not yield anything meaningful yet. Enter Clue 7...</p>
<h3 id="heading-clue-7">Clue 7:</h3>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1681941219067/b994282a-410a-48f2-9c23-43608cb518d2.jpeg" alt class="image--center mx-auto" /></p>
<p>And for the last part of the affine cipher. We have to supply the letters from the English alphabet we would use.</p>
<p>By default, we would be inclined to use all 26 of them. But from this clue, it says "Remove <strong>LEMON</strong> From <strong>ALPHABET".</strong></p>
<p>Alphabet is the parent company that owns Google (and all their services), Youtube and all the corporations shown below in the image. Removes letters L, E, M, O, N from the English alphabet, we have: <code>abcdfghijkpqrstuvwxyz</code></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1681941639275/875d79ff-6f62-4330-9a5b-32f739995457.png" alt class="image--center mx-auto" /></p>
<p>Applying Clues 4-7 we finally make some progress in solving the challenge. The current text becomes:</p>
<p><strong>Current Text</strong>: <code>Well done you! One cipher down, but it's just the beginning.</code> <code>secondcipherdownonemoretogoxablxqhmpesotmaaelbbtphcpleladskarsoxumismegxanxxdofcbqpwkwrbkwhnvtwlsuhutkifeattrleihcttngteygarqzpzkwruxwq</code></p>
<p>Now it says "Second cipher down one more to go". And for the last cipher.</p>
<h3 id="heading-clue-8">Clue 8:</h3>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1681942781533/11ccc0cf-c8b2-4ef7-acb1-605b6fd3143f.jpeg" alt class="image--center mx-auto" /></p>
<p>A more straightforward clue. From the image above, we know the 3rd layer would be decrypted by the <strong>Bifid Cipher.</strong></p>
<p>The <strong>Bifid cipher</strong> uses a 5x5 grid to convert each letter of a message into a pair of coordinates, which are then rearranged and converted back into letters to create an encrypted message. Learn more about it <a target="_blank" href="https://www.geeksforgeeks.org/bifid-cipher-in-cryptography/">Here</a>.</p>
<p>It also makes use of a key to order the arrangement of the letters in the 5x5 grid. From the image above, the key is a 13-letter string containing CIFR somewhere in between.</p>
<p><strong>Bifid Key</strong>: ------CIFR---</p>
<h3 id="heading-clue-9">Clue 9:</h3>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1681974330704/c3dae51c-4f35-425c-b94a-3cbe2f9431b8.png" alt class="image--center mx-auto" /></p>
<p>Above is an image from the <a target="_blank" href="https://en.wikipedia.org/wiki/Pigpen_cipher">PigPen Cipher</a> . The letters are encrypted from the 3 x 3 grids and give a shape similar to the one in the cipher.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1681975037661/ffe0bf43-db0e-4cf7-80c2-af0de3491349.png" alt class="image--center mx-auto" /></p>
<p><em>Image from</em> <a target="_blank" href="https://crypto.interactive-maths.com/pigpen-cipher.html"><em>Crypto Corner</em></a></p>
<p>From this, using the layout above, we can figure that the text from the cipher would be <strong>ANGLHK</strong>.</p>
<p><strong>Bifid Key</strong>: ANGLHKCIFR---</p>
<p>We have placed the new text at the start of the key because it contains the exact number of letters (6) from that missing position. Now for the last Clue.</p>
<h3 id="heading-clue-9-1">Clue 9:</h3>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1681975397505/947376c9-b48f-4e28-94c3-1c3b85b4ebb9.png" alt class="image--center mx-auto" /></p>
<p>We'll go over the hint above till we get to the 3-letter answer.</p>
<ol>
<li><p>"All are correct..". Hence we can deduce that the 3 letters are <strong>U</strong>, <strong>Q</strong> and <strong>Z</strong>. "..one is correctly placed". We'll figure it out as we go.</p>
</li>
<li><p>"Two are correct but are wrongly placed...". We know what those two are already ( <strong>U</strong> and <strong>Q</strong>). "...but are wrongly placed". We can deduce that <strong>U</strong> cannot be placed at the start and <strong>Q</strong> cannot be placed at the end.</p>
</li>
<li><p>"One is correct and is placed correctly". Now we find the correct position of <strong>Q</strong> which is the start of the 3-letter sequence.</p>
</li>
<li><p>"One is correct but wrongly placed". From hint 2, we figured <strong>U</strong> cannot be placed at the start and from this hint we find it cannot also be placed at the end. Hence, <strong>U</strong> has to be placed in the middle.</p>
</li>
</ol>
<p><strong>Therefore,</strong> the sequence becomes <strong>Q - U - Z.</strong></p>
<p>This completes the missing letters from the Bifid key.</p>
<p><strong>Bifid Key</strong>: ANGLHKCIFRQUZ</p>
<p>Back to Cryptii...</p>
<p>Applying the bifid cipher to the last encrypted text we have ...</p>
<p><code>WELLDONEYOUHAVECOMPLETEDTHECHALLENGEDMUSTHEENTIREPASSAGEANDWEWILLGIVEYOUYOURPRIZE</code></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1681999374950/851a3bca-a275-4df4-ae5f-c2b1e64948c5.png" alt class="image--center mx-auto" /></p>
<h3 id="heading-final-solution">Final Solution</h3>
<p>After decoding the three layers of encryption, we finally have the solution.</p>
<p><code>Well done you! One cipher down, but it's just the beginning.</code></p>
<p><code>secondcipherdownonemoretogo</code></p>
<p><code>welldoneyouhavecompletedthechallengedmusthentirepassageandwewillgiveyouyourprize</code></p>
<h3 id="heading-winners">Winners</h3>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1682002689321/d79bc93a-b88a-4c31-8fd2-21cb55a31fd9.jpeg" alt class="image--center mx-auto" /></p>
<p>The following twitter handles above were the first five to come up with the solution.</p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>In this article, we went through step-by-step the process of solving a simple cryptography cipher with 3-layer encryption.</p>
<p>Through the way, we learnt about the Caesar cipher, Affine cipher, Bifid cipher, some elementary maths and even a bit about foods (salads). Hopefully, this has given you an idea of how real word code decryption.</p>
<p>To learn more and join more exciting challenges and hackathons, find AngelHack on the following spaces: <a target="_blank" href="https://twitter.com/AngelHack?s=20">Twitter</a>, <a target="_blank" href="https://ahack.link/discord">Discord</a>, <a target="_blank" href="https://angelhack.com/">Official Website</a>, and <a target="_blank" href="https://ahack.link/">Other Links</a>.</p>
]]></content:encoded></item></channel></rss>