07.01.2015 Views

COMP 547: Assignment 1 Solutions

COMP 547: Assignment 1 Solutions

COMP 547: Assignment 1 Solutions

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Type x yx zx zyx<br />

Amount 24 23 27 26<br />

Table 1: Summary of results for problem 11.<br />

5)<br />

<strong>547</strong>1234567988 is not in QR_n (root of yx: 125637127136393030\<br />

900524755578585052721630258447382451765030144949951207786646\<br />

110838585885971204218719872431155751276782292634789749171217\<br />

050399637909286063835079790158907905880286681588957215994637\<br />

4)<br />

<strong>547</strong>1234567989 is not in QR_n (root of yx: 130096871661902070\<br />

710031752707137582830741110348039577107913444950334782429346\<br />

834499138925114821873522260732875624204023958322262242726896\<br />

915774023449924304056024312035505160809645729<strong>547</strong>061229283948\<br />

0)<br />

24, 23, 27, 26<br />

These results are summarised in table 1.<br />

12. We will first propose a way to check that n, y and z have all been chosen<br />

correctly and then discuss how and why it works. Let X be a set of 100<br />

random number in Z ∗ n.<br />

Here is a way to check that n, y and z have all been chosen correctly:<br />

(a) Compute ( y<br />

n)<br />

. If it is not 1, return fail.<br />

(b) Compute ( z<br />

n)<br />

. If it is not −1, return fail.<br />

(c) Sum up the amounts of variants of x ∈ X that are in QR n (that is,<br />

the numbers of x’s, yx’s, zx’s and zyx’s in QR n ). If they do not sum<br />

up to 100, return fail.<br />

(d) If they do sum up to 100, they should be more or less evenly distributed<br />

in the four categories. At this point, it is safe to return<br />

succeed.<br />

Let us assume, for the moment, that n, y and z have all been chosen correctly.<br />

We will make some important observations concerning our results<br />

in this case of correctly chosen parameters.<br />

We know that given a prime r, exactly half of the integers between 1 and<br />

r − 1 are in QR r . Thus, using some intuition, if n = pq, we would expect<br />

about half of the integers in X to be in QR p and about half of them to be<br />

in QR q . Of course, it will generally not be the case that exactly half of the<br />

26

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!