    <rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:content="http://purl.org/rss/1.0/modules/content/">
     <channel>
        <title>ACCU  :: The ACCU 2011 Crypto Challenge</title>
        <link>https://members.accu.org/index.php/articles/1976</link>
        <description>Professionalism in Programming</description>
        <dc:language>en-us</dc:language> 
        <dc:creator>Administrator</dc:creator> 
        <admin:generatorAgent rdf:resource="http://www.xaraya.org" /> 
        <admin:errorReportsTo rdf:resource="mailto:webeditor@accu.org" />
       <sy:updatePeriod>hourly</sy:updatePeriod>
       <sy:updateFrequency>1</sy:updateFrequency>
       <docs>http://backend.userland.com/rss</docs>




<div class="xar-mod-head"><span class="xar-mod-title">Programming Topics + Overload Journal #103 - June 2011</span></div>

<table border="0" cellpadding="1" cellspacing="0">
    <tbody>
    <tr>
        <td valign="top">
            Browse in :
       </td>
       <td valign="top">

                                            <a href="https://members.accu.org/index.php/articles/">All</a>

                     &gt;                         <a href="https://members.accu.org/index.php/articles/c13/">Topics</a>

                     &gt;                         <a href="https://members.accu.org/index.php/articles/c65/">Programming</a>
<br />

                                            <a href="https://members.accu.org/index.php/articles/">All</a>

                     &gt;                         <a href="https://members.accu.org/index.php/articles/c76/">Journals</a>

                     &gt;                         <a href="https://members.accu.org/index.php/articles/c78/">Overload</a>

                     &gt;                         <a href="https://members.accu.org/index.php/articles/c297/">o103</a>
<br />

                                            <a href="https://members.accu.org/index.php/articles/c65-297/">Any of these categories</a>

                    -                        <a href="https://members.accu.org/index.php/articles/c65+297/">All of these categories</a>
<br />
</td>
   </tr>
   </tbody>
</table>




<div class="xar-error">
   <p>
 <strong>Note:</strong> when you create a new publication type,
the articles module will automatically use the templates
<em>user-display-[publicationtype].xt</em>
and <em>user-summary-[publicationtype].xt</em>.
If those templates do not exist when you try to preview or display a new article,
you'll get this warning :-)  Please place your own templates in themes/<em>yourtheme</em>/modules/articles . The templates will get the extension .xt there. </p>
</div>
<div class="xar-norm xar-standard-box-padding">
   <h1><strong>Title:</strong>&nbsp;The ACCU 2011 Crypto Challenge</h1>
<p><strong>Author:</strong>&nbsp;Martin Moene</p>
<p>
<strong>Date:</strong> 01 June 2011 20:45:52 +01:00 or Wed, 01 June 2011 20:45:52 +01:00</p>
<p><strong>Summary:</strong>&nbsp;Ready for the biggest challenge yet? Richard Harris throws down the gauntlet.</p>
<p><strong>Body:</strong>&nbsp;<p>For a third time I have had the pleasure of contributing a cryptographic puzzle to the fund raising efforts for Bletchley Park during the ACCU conference.</p>

<p>You may recall that the first two puzzles reflected the development of modern cryptosystems, beginning with electro-mechanical rotary ciphers such as the Enigma machine and followed by electronic stream ciphers such as RC4, and were designed to so that they could be broken with pencil and paper alone if their weaknesses were spotted.</p>

<p>As with the previous two puzzles a bonus question was included that was not possible to answer if the puzzle was solved by brute force rather than analysis. </p>

<p>So that you too might have a go at it, I present the puzzle below followed by its historical inspiration, its solution and the names of the conference delegates who cracked it.</p>

<h2>The challenge</h2>

<h3>Encoding</h3>

<p>The enemy are using a 32 character alphabet encoded as 5 bit signed binary numbers ranging from -16 to +15.  The # character is a control code indicating that the following character should be interpreted as its numerical value rather than as a letter or punctuation. The full table of character mappings is given below.</p>

<pre class="programlisting">
  ---------------- +++++++++++++++
  11111110000000000000000000111111
  65432109876543210123456789012345
  #abcdefghijklmnopqrstuvwxyz ?!.,</pre>

<h3>Encryption</h3>

<p>The enemy are using a public key cryptosystem in which the private key is a set of variables containing the numeric encodings of randomly chosen characters.</p>

<p>The public key is a set of randomly generated polynomials in those variables, all of which, when calculated with the values from the private key, yield zero.</p>

<p>To transmit a message character, they first generate a new random polynomial for each of those in the public key. They multiply each pair and add the products together to create an encryption polynomial that must also yield zero when evaluated with the private key.</p>

<p>They finally add the encoded message character to yield the ciphertext polynomial.</p>

<p>To decrypt the ciphertext polynomial they simply evaluate it with the values in the private key; since the encryption polynomial will have a value of zero, the ciphertext polynomial will have a value of the encoded message character.</p>

<h3>Example</h3>

<p>The characters â€˜râ€™ and â€˜sâ€™ give the private key variables <em>x</em> and <em>y</em> values of 2 and 3 respectively. The randomly generated polynomials <em>x</em><sup>2</sup><em>y</em>+<em>y</em> and <em>xy</em><sup>2</sup> yield 15 and 18 respectively and hence we can choose the polynomials <em>x</em><sup>2</sup><em>y</em>+<em>y</em>-15 and <em>xy</em><sup>2</sup>-18 as the public key.</p>

<p>Multiplying these by the randomly generated polynomials <em>y</em>+1 and <em>x</em>-1 respectively and summing yields an encryption polynomial of</p>

<p style="margin-left:1em"><img style="max-width:90%" src="http://accu.org/content/images/journals/ol103/Harris(2)/Eqn-01.png" /></p>

<p>The character â€˜lâ€™ can be encrypted by adding -4 to yield a ciphertext polynomial of </p>

<p style="margin-left:1em"><img style="max-width:41%" src="http://accu.org/content/images/journals/ol103/Harris(2)/Eqn-02.png" /></p>

<p>Evaluating this ciphertext polynomial with the private key values for <em>x</em> and <em>y</em> reveals the message.</p>

<p style="margin-left:1em"><img style="max-width:87%" src="http://accu.org/content/images/journals/ol103/Harris(2)/Eqn-03.png" /></p>

<h3>Public key</h3>

<p>The enemyâ€™s public key equations are</p>

<p style="margin-left:1em"><img style="max-width:83%" src="http://accu.org/content/images/journals/ol103/Harris(2)/Eqn-04.png" /></p>

<h3>Bonus question</h3>

<p>Assuming the worst possible ordering that is logically consistent with a cryptanalysis, what is the minimum necessary number of trial values that must be fed into these public key equations, as opposed to known values derived from them, to ensure that we can successfully recover the enemyâ€™s private key values?</p>

<h2>The historical justification</h2>

<p>Historically, one of the biggest problems in cryptography was exchanging the secret keys needed to encrypt and decrypt messages.</p>

<p>For example, the development of effective electronic ciphers required the exchange of sequences of random numbers. One way to do this was to hire a courier to carry a tape containing such a sequence between one party and another, perhaps in an aluminium briefcase handcuffed to his wrist as seen in so many spy movies.</p>

<p>The problem was then how to securely exchange the keys to the briefcase.</p>

<p>A solution is for the first party to courier an <em>unlocked</em> briefcase to the second party <em>without</em> the key. The latter can put their tape into it, close and push a button to lock it, and then send the courier back to the first party to securely exchange their electronic key without ever having seen the briefcase key.</p>

<p>Of course, both parties must trust the courierâ€¦</p>

<p>This is essentially the idea behind public key cryptography; the first party provides a means for the second to hide a secret without providing the means to reveal it.</p>

<p>We do this by means of a trap door function, that is to say a function that is easy to compute but difficult to invert.</p>

<p>The canonical example is the factorisation of integers. It is easy to calculate the product of a pair of integer factors, but it is very much more difficult to determine from the product what those factors are.</p>

<p>Whilst this is certainly an interesting property of the integers, it is not at all clear on the face of it how it is of any use.</p>

<p>The trick is to construct a function which depends upon the product and is difficult to invert <em>unless</em> you know its factors.</p>

<p>The RSA cryptosystem is an example of just such a function.</p>

<p>The first step is to choose a pair of prime numbers <em>p</em> and <em>q</em> and compute their product <em>n</em>. For example</p>

<p style="margin-left:1em"><img style="max-width:15%" src="http://accu.org/content/images/journals/ol103/Harris(2)/Eqn-05.png" /></p>

<p>Next we calculate the product of <em>p</em>-1 and <em>q</em>-1, denoted by Ï•(<em>n</em>)</p>

<p style="margin-left:1em"><img style="max-width:40%" src="http://accu.org/content/images/journals/ol103/Harris(2)/Eqn-06.png" /></p>

<p>Now we must choose a value <em>e</em> that is both smaller than Ï•(<em>n</em>) and has no common factors with it. In our example Ï•(<em>n</em>) has prime factors of 2 and 5, so we may choose</p>

<p style="margin-left:1em"><img style="max-width:18%" src="http://accu.org/content/images/journals/ol103/Harris(2)/Eqn-07.png" /></p>

<p>Next we must calculate the value <em>d</em> which when multiplied by <em>e</em> yields a product that is one plus some integer multiple of Ï•(<em>n</em>)</p>

<p style="margin-left:1em"><img style="max-width:22%" src="http://accu.org/content/images/journals/ol103/Harris(2)/Eqn-08.png" /></p>

<p>Mathematically, this the multiplicative inverse of <em>e</em> under arithmetic modulo Ï•(<em>n</em>) which we can write as</p>

<p style="margin-left:1em"><img style="max-width:22%" src="http://accu.org/content/images/journals/ol103/Harris(2)/Eqn-09.png" /></p>

<p>We can do this using the extended Euclidean algorithm which we shall not cover here. Note that this inverse is guaranteed to be unique because <em>e</em> and Ï•(<em>n</em>) have no common factors and in our example must be equal to 3.</p>

<p style="margin-left:1em"><img style="max-width:25%" src="http://accu.org/content/images/journals/ol103/Harris(2)/Eqn-10.png" /></p>


<p>The public key is comprised of the pair of integers <em>n</em> and <em>e</em> and the private key of the single integer <em>d</em>.</p>

<p>To encrypt a message <em>m</em> that has a value between 0 and <em>n</em> we calculate</p>

<p style="margin-left:1em"><img style="max-width:16%" src="http://accu.org/content/images/journals/ol103/Harris(2)/Eqn-11.png" /></p>


<p>For example, we shall choose 2 for our message <em>m</em>. The ciphertext <em>c</em> is consequently</p>

<p style="margin-left:1em"><img style="max-width:37%" src="http://accu.org/content/images/journals/ol103/Harris(2)/Eqn-12.png" /></p>


<p>To decrypt the ciphertext we compute</p>

<p style="margin-left:1em"><img style="max-width:16%" src="http://accu.org/content/images/journals/ol103/Harris(2)/Eqn-13.png" /></p>


<p>In our example we have</p>

<p style="margin-left:1em"><img style="max-width:31%" src="http://accu.org/content/images/journals/ol103/Harris(2)/Eqn-14.png" /></p>


<p>and as if by magic we have recovered the message!</p>

<p>What makes RSA secure is that the private key <em>d</em> is the multiplicative inverse of the public key value <em>e</em> modulo Ï•(<em>n</em>) which in turn depends upon the hard to find prime factors of the public key value <em>n</em>.</p>

<p>We can demonstrate <em>why</em> RSA works from Eulerâ€™s theorem which states that if <em>m</em> and <em>n</em> have no common factors, or in this case that the message is not equal to either of the prime factors of <em>n</em>, then</p>

<p style="margin-left:1em"><img style="max-width:18%" src="http://accu.org/content/images/journals/ol103/Harris(2)/Eqn-15.png" /></p>

<p>Consequently</p>

<p style="margin-left:1em"><img style="max-width:37%" src="http://accu.org/content/images/journals/ol103/Harris(2)/Eqn-16.png" /></p>

<p>since <em>m</em> is smaller than <em>n</em>.</p>

<p>The requirement that the message not be equal to either of the prime factors is not particularly burdensome in practice since they will be very, <em>very</em> large.</p>

<p>Now, our cryptosystem uses the difficulty in factoring integer polynomials rather than integers as its trap-door function. In the worked example we saw that it was relatively easy to construct a ciphertext polynomial from the public key polynomials.</p>

<p>That it is very much more difficult to reverse this process can be seen if you try to extract the message using just the ciphertext and public key polynomials.</p>

<p style="margin-left:1em"><img style="max-width:43%" src="http://accu.org/content/images/journals/ol103/Harris(2)/Eqn-17.png" /></p>


<p>Integer polynomials like these are known as Diophantine equations and are notoriously difficult to reason about.</p>

<p>Perhaps the most famous example is Fermatâ€™s Last Theorem which states that the formula</p>

<p style="margin-left:1em"><img style="max-width:15%" src="http://accu.org/content/images/journals/ol103/Harris(2)/Eqn-18.png" /></p>


<p>has no solutions with integer <em>a</em>, <em>b</em> and <em>c</em> if <em>n</em> is greater than two.</p>

<p>Despite Fermatâ€™s claim to have a proof that was too large to fit in the margin of the text in which he wrote his conjecture, it took over 350 years before the theorem was finally, and famously, proven by Andrew Wiles.</p>

<h2>The solution</h2>

<p>In this challenge the ciphertext polynomial is not given, so it is â€˜simplyâ€™ an exercise in finding the roots of the non-linear public key Diophantine equations; those values of the private key variables for which they all equate to zero.</p>

<p>Brace yourselfâ€¦</p>

<p>To begin, consider the first public key equation</p>

<p style="margin-left:1em"><img style="max-width:33%" src="http://accu.org/content/images/journals/ol103/Harris(2)/Eqn-19.png" /></p>


<p>Three of these terms are suspiciously perfect squares, 25<em>w</em>2, 9<em>z</em>2 and 49, and if we factorise the terms we have</p>

<p style="margin-left:1em"><img style="max-width:45%" src="http://accu.org/content/images/journals/ol103/Harris(2)/Eqn-20.png" /></p>


<p>The first three terms are those we should expect from the square of a sum of two terms and the last is the negation of a perfect square. Expressing the first three as just such a square and moving the last over to the right hand side yields</p>

<p style="margin-left:1em"><img style="max-width:19%" src="http://accu.org/content/images/journals/ol103/Harris(2)/Eqn-21.png" /></p>

<p>We can now take the square roots of both sides of the equation to reveal two possible relationships between <em>w</em> and <em>z</em>.</p>

<p style="margin-left:1em"><img style="max-width:16%" src="http://accu.org/content/images/journals/ol103/Harris(2)/Eqn-22.png" /></p>

<p>The analysis of this first equation is a significant clue as to how we should proceed; the entire puzzle is in fact an exercise in solving quadratic equations and the key to solving it is realising this.</p>

<p>Examining the second equation</p>

<p style="margin-left:1em"><img style="max-width:54%" src="http://accu.org/content/images/journals/ol103/Harris(2)/Eqn-23.png" /></p>


<p>we should note that once again we have three perfect squares in the terms 9<em>w</em>4, 289<em>z</em>2 and 25.</p>

<p>Factorising all of the terms yields</p>

<p style="margin-left:1em"><img style="max-width:80%" src="http://accu.org/content/images/journals/ol103/Harris(2)/Eqn-24.png" /></p>

<p>This time we have three non-squares that just happen to be twice the product of two of the three squared terms. Noting that it is only the terms with a single factor of five that are negative, we can express this equation as the square</p>

<p style="margin-left:1em"><img style="max-width:24%" src="http://accu.org/content/images/journals/ol103/Harris(2)/Eqn-25.png" /></p>

<p>and hence</p>

<p style="margin-left:1em"><img style="max-width:22%" src="http://accu.org/content/images/journals/ol103/Harris(2)/Eqn-26.png" /></p>

<p>We now have two possible pairs of simultaneous equations in w and z</p>

<p style="margin-left:1em"><img style="max-width:22%" src="http://accu.org/content/images/journals/ol103/Harris(2)/Eqn-27.png" /></p>

<p>and</p>

<p style="margin-left:1em"><img style="max-width:23%" src="http://accu.org/content/images/journals/ol103/Harris(2)/Eqn-28.png" /></p>

<p>and we are consequently in a position to examine the possible values of those private key variables.</p>

<p>Beginning with the first, we have</p>

<p style="margin-left:1em"><img style="max-width:22%" src="http://accu.org/content/images/journals/ol103/Harris(2)/Eqn-29.png" /></p>

<p>Multiplying the second equation by three, substituting <em>z</em> from the first and simplifying</p>

<p style="margin-left:1em"><img style="max-width:33%" src="http://accu.org/content/images/journals/ol103/Harris(2)/Eqn-30.png" /></p>

<p>At this point we can apply the rule for solving quadratic equations that we learnt in secondary school; minus a plus or minus the square root of <em>b</em> squared minus four times <em>a</em> times <em>c</em> all divided by two times <em>a</em></p>

<p style="margin-left:1em"><img style="max-width:50%" src="http://accu.org/content/images/journals/ol103/Harris(2)/Eqn-31.png" /></p>

<p>In this case this means that</p>

<p style="margin-left:1em"><img style="max-width:33%" src="http://accu.org/content/images/journals/ol103/Harris(2)/Eqn-32.png" /></p>

<p>We therefore have one candidate value for <em>w</em> of eight, but we must solve the second pair of equations to be sure that it is unique. Rearranging the first of those equations yields</p>

<p style="margin-left:1em"><img style="max-width:22%" src="http://accu.org/content/images/journals/ol103/Harris(2)/Eqn-33.png" /></p>

<p>Following the same approach as before we have</p>

<p style="margin-left:1em"><img style="max-width:35%" src="http://accu.org/content/images/journals/ol103/Harris(2)/Eqn-34.png" /></p>

<p>Applying the rule for solving quadratic equations yields</p>

<p style="margin-left:1em"><img style="max-width:34%" src="http://accu.org/content/images/journals/ol103/Harris(2)/Eqn-35.png" /></p>

<p>We must stop here because 12049 is a prime and hence this equation cannot result in a valid value for <em>w</em>.</p>

<p>With the unique valid value we have for <em>w</em> we can now calculate the correct value for <em>z</em></p>

<p style="margin-left:1em"><img style="max-width:19%" src="http://accu.org/content/images/journals/ol103/Harris(2)/Eqn-36.png" /></p>

<p>Having solved the first two public key equations we are ready to analyse the third</p>

<p style="margin-left:1em"><img style="max-width:75%" src="http://accu.org/content/images/journals/ol103/Harris(2)/Eqn-37.png" /></p>

<p>Ignoring the coefficients for now, this equation has a constant term, terms in <em>v</em><sup>2</sup>, <em>x</em> and <em>yz</em>, their squares and terms in all of their pair products except <em>xyz</em>. The fact that this term is missing mean that this cannot be a square of a sum of terms in <em>v</em><sup>2</sup>, <em>x</em> and <em>yz</em>.</p>

<p>It is, however, perfectly consistent with a sum of squares of the form</p>

<p style="margin-left:1em"><img style="max-width:47%" src="http://accu.org/content/images/journals/ol103/Harris(2)/Eqn-38.png" /></p>

<p>Noting that the <em>v</em><sup>4</sup>, <em>v</em><sup>4</sup> and constant terms must be split between both squares, we can group the related terms together on either side of the equals sign</p>

<p style="margin-left:1em"><img style="max-width:68%" src="http://accu.org/content/images/journals/ol103/Harris(2)/Eqn-39.png" /></p>

<p>We can see immediately that the <em>y</em><sup>2</sup><em>z</em><sup>2</sup> and <em>x</em><sup>2</sup> terms on the left and right hand side of the equation have negative coefficients. We must therefore negate both sides</p>

<p style="margin-left:1em"><img style="max-width:75%" src="http://accu.org/content/images/journals/ol103/Harris(2)/Eqn-40.png" /></p>

<p>Now we must add the terms that are missing on the right hand side of the equation to both sides</p>

<p style="margin-left:1em"><img style="max-width:85%" src="http://accu.org/content/images/journals/ol103/Harris(2)/Eqn-41.png" /></p>

<p>Now, if both sides are squares of sums, these unknown coefficients must conform to the very specific relationships this implies.</p>

<p>Firstly, the constant <em>c</em> must be related to the <em>x</em> and the <em>x</em><sup>2</sup> coefficients by</p>

<p style="margin-left:1em"><img style="max-width:22%" src="http://accu.org/content/images/journals/ol103/Harris(2)/Eqn-42.png" /></p>

<p>giving</p>

<p style="margin-left:1em"><img style="max-width:87%" src="http://accu.org/content/images/journals/ol103/Harris(2)/Eqn-43.png" /></p>

<p>reassuringly making the constants on both sides of the equation perfect squares.</p>

<p>Similarly, the coefficient of <em>v</em><sup>4</sup> on the right hand side, <em>a</em>, must be related to the coefficients of <em>v</em><sup>2</sup><em>x</em> and <em>x</em><sup>2</sup> by</p>

<p style="margin-left:1em"><img style="max-width:21%" src="http://accu.org/content/images/journals/ol103/Harris(2)/Eqn-44.png" /></p>

<p>giving</p>

<p style="margin-left:1em"><img style="max-width:95%" src="http://accu.org/content/images/journals/ol103/Harris(2)/Eqn-45.png" /></p>

<p>once again yielding perfect squares exactly where we want them!</p>

<p>Finally, relating the <em>v</em><sup>2</sup> coefficient on the right hand side, <em>b</em>, to those of <em>v</em>4 and the constant means that</p>

<p style="margin-left:1em"><img style="max-width:20%" src="http://accu.org/content/images/journals/ol103/Harris(2)/Eqn-46.png" /></p>

<p>Given that the coefficients of both <em>x</em> and <em>v</em><sup>2</sup><em>x</em> are negative, <em>b</em> must be positive giving</p>

<p style="margin-left:1em"><img style="max-width:89%" src="http://accu.org/content/images/journals/ol103/Harris(2)/Eqn-47.png" /></p>

<p>Partially factoring the coefficients yields</p>

<p style="margin-left:1em"><img style="max-width:96%" src="http://accu.org/content/images/journals/ol103/Harris(2)/Eqn-48.png" /></p>

<p>so we can express this as</p>

<p style="margin-left:1em"><img style="max-width:40%" src="http://accu.org/content/images/journals/ol103/Harris(2)/Eqn-49.png" /></p>

<p>and consequently</p>

<p style="margin-left:1em"><img style="max-width:38%" src="http://accu.org/content/images/journals/ol103/Harris(2)/Eqn-50.png" /></p>

<p>Now we have already determined that <em>z</em> is equal to minus 11, so we can substitute it into this equation to yield</p>

<p style="margin-left:1em"><img style="max-width:40%" src="http://accu.org/content/images/journals/ol103/Harris(2)/Eqn-51.png" /></p>

<p>Now we are on the home stretch with just one public key equation left to consider</p>

<p style="margin-left:1em"><img style="max-width:95%" src="http://accu.org/content/images/journals/ol103/Harris(2)/Eqn-52.png" /></p>

<p>Leaving aside the coefficients once again, it is clear that this formula is also formed from two quadratic equations, one in <em>v</em> and <em>y</em>, the other in <em>w</em> and <em>x</em>, with the constant term split between them.</p>

<p>Rearranging gives</p>

<p style="margin-left:1em"><img style="max-width:85%" src="http://accu.org/content/images/journals/ol103/Harris(2)/Eqn-53.png" /></p>

<p>A problem immediately presents itself in that the coefficients of the squared variables are not squares.</p>

<p>To address this we must partially factor the coefficients <em>first</em>.</p>

<p style="margin-left:1em"><img style="max-width:95%" src="http://accu.org/content/images/journals/ol103/Harris(2)/Eqn-54.png" /></p>

<p>So far, this is consistent with the left hand side being three times a square of a sum and the right hand side being twice the square of a sum.</p>

<p>If we take these factors out, we shall see whether it gives a consistent value for the constant <em>a</em>.</p>

<p style="margin-left:1em"><img style="max-width:95%" src="http://accu.org/content/images/journals/ol103/Harris(2)/Eqn-55.png" /></p>

<p>From the right hand side, following a similar argument that we used for the previous formula, if it is a square then <em>a</em> must satisfy</p>

<p style="margin-left:1em"><img style="max-width:27%" src="http://accu.org/content/images/journals/ol103/Harris(2)/Eqn-56.png" /></p>

<p>and therefore</p>

<p style="margin-left:1em"><img style="max-width:95%" src="http://accu.org/content/images/journals/ol103/Harris(2)/Eqn-57.png" /></p>

<p>giving us exactly the squares we seek</p>

<p style="margin-left:1em"><img style="max-width:36%" src="http://accu.org/content/images/journals/ol103/Harris(2)/Eqn-58.png" /></p>

<p>Given that the private key variables are integers and that the square root of three is not an integer multiple of that of two, this equation can only hold when both the left and right hand sides are equal to zero</p>

<p style="margin-left:1em"><img style="max-width:17%" src="http://accu.org/content/images/journals/ol103/Harris(2)/Eqn-59.png" /></p>

<p>We already know that <em>w</em> is eight, so from the second equation we have</p>

<p style="margin-left:1em"><img style="max-width:21%" src="http://accu.org/content/images/journals/ol103/Harris(2)/Eqn-60.png" /></p>

<p>Having found <em>x</em> we can further simplify the equation we derived from the third public key equation</p>

<p style="margin-left:1em"><img style="max-width:37%" src="http://accu.org/content/images/journals/ol103/Harris(2)/Eqn-61.png" /></p>

<p>From the first of the equations we derived from the fourth we can relate <em>v</em> and <em>y</em></p>

<p style="margin-left:1em"><img style="max-width:21%" src="http://accu.org/content/images/journals/ol103/Harris(2)/Eqn-62.png" /></p>

<p>Substituting this into the above is more easily achieved if we multiply the latter by nine</p>

<p style="margin-left:1em"><img style="max-width:55%" src="http://accu.org/content/images/journals/ol103/Harris(2)/Eqn-63.png" /></p>

<p>Expanding the squares yields</p>

<p style="margin-left:1em"><img style="max-width:80%" src="http://accu.org/content/images/journals/ol103/Harris(2)/Eqn-64.png" /></p>

<p>Once again we have two possibilities to consider, both of which yield simple quadratic equations.</p>

<p>Firstly</p>

<p style="margin-left:1em"><img style="max-width:50%" src="http://accu.org/content/images/journals/ol103/Harris(2)/Eqn-65.png" /></p>

<p>Using our trusty quadratic equation rule again we have</p>

<p style="margin-left:1em"><img style="max-width:37%" src="http://accu.org/content/images/journals/ol103/Harris(2)/Eqn-66.png" /></p>

<p>giving us a candidate value for <em>y</em>.</p>

<p>Of course we must check the second possibility to be sure we have the correct value</p>

<p style="margin-left:1em"><img style="max-width:50%" src="http://accu.org/content/images/journals/ol103/Harris(2)/Eqn-67.png" /></p>

<p>Solving for <em>y</em></p>

<p style="margin-left:1em"><img style="max-width:37%" src="http://accu.org/content/images/journals/ol103/Harris(2)/Eqn-68.png" /></p>

<p>Consequently <em>y</em> must be equal to minus six and thus</p>

<p style="margin-left:1em"><img style="max-width:22%" src="http://accu.org/content/images/journals/ol103/Harris(2)/Eqn-69.png" /></p>

<p>giving us the values of all of the private key variables without our having to guess at any of them!</p>

<h2>An (insincere) apology</h2>

<p>Now I recognise that this puzzle was somewhat trickier than the previous puzzles and for that I offer my apologies. In my defence, it was quite difficult designing a public key crypto challenge that satisfied my own requirements; those of novelty and a pencil and paper solution. Everything else I considered was either trivially solved using brute force or impossible to solve using pencil and paper.</p>

<p>And after all, it <em>was</em> an exercise in public key cryptography; of course it was going to be difficult!</p>

<p>Iâ€™m afraid that this has been the last of the crypto challenges; the next logical step would have been a puzzle based on quantum cryptography but I am reasonably certain that it is quite beyond my meagre faculties to design such a beast.</p>

<h2>And finallyâ€¦</h2>

<p>Congratulations are due to Gary Duke who successfully cracked the Crypto Challenge and to Per Liboriussen who was just one step from doing so.</p>

<p>I should also like to thank everyone who took part and everyone who donated to Bletchley Park.</p>
</p>
<p><strong>Notes:</strong>&nbsp;</p>
<p><em>More fields may be available via dynamicdata ..</em></p>
</div>
</channel>
</rss>
