]> git.saurik.com Git - apple/security.git/blob - OSX/libsecurity_cryptkit/lib/CurveParamDocs/curverecords.nb
Security-57336.10.29.tar.gz
[apple/security.git] / OSX / libsecurity_cryptkit / lib / CurveParamDocs / curverecords.nb
1 (***********************************************************************
2
3 Mathematica-Compatible Notebook
4
5 This notebook can be used on any computer system with Mathematica 3.0,
6 MathReader 3.0, or any compatible application. The data for the notebook
7 starts with the line of stars above.
8
9 To get the notebook into a Mathematica-compatible application, do one of
10 the following:
11
12 * Save the data starting with the line of stars above into a file
13 with a name ending in .nb, then open the file inside the application;
14
15 * Copy the data starting with the line of stars above to the
16 clipboard, then use the Paste menu command inside the application.
17
18 Data for notebooks contains only printable 7-bit ASCII and can be
19 sent directly in email or through ftp in text mode. Newlines can be
20 CR, LF or CRLF (Unix, Macintosh or MS-DOS style).
21
22 NOTE: If you modify the data for this notebook not in a Mathematica-
23 compatible application, you must delete the line below containing the
24 word CacheID, otherwise Mathematica-compatible applications may try to
25 use invalid cache data.
26
27 For more information on notebooks and Mathematica-compatible
28 applications, contact Wolfram Research:
29 web: http://www.wolfram.com
30 email: info@wolfram.com
31 phone: +1-217-398-0700 (U.S.)
32
33 Notebook reader applications are available free of charge from
34 Wolfram Research.
35 ***********************************************************************)
36
37 (*CacheID: 232*)
38
39
40 (*NotebookFileLineBreakTest
41 NotebookFileLineBreakTest*)
42 (*NotebookOptionsPosition[ 18376, 710]*)
43 (*NotebookOutlinePosition[ 19227, 740]*)
44 (* CellTagsIndexPosition[ 19183, 736]*)
45 (*WindowFrame->Normal*)
46
47
48
49 Notebook[{
50 Cell["\<\
51 (* curverecords
52
53 Recorded data for Apple ECC curves.
54
55 R. Crandall
56 3 Apr 2001
57
58
59 *)
60
61 pointQ[x_] := (JacobiSymbol[x^3 + c x^2 + a x + b, p] > -1);
62
63 (* Next, binary expansion for very old M'ca versions,
64 otherwise use IntegerDigits[.,2]. *)
65 bitList[k_] := Block[{li = {}, j = k},
66 \tWhile[j > 0,
67 \t li = Append[li, Mod[j,2]];
68 \t j = Floor[j/2];
69 \t];
70 \tReturn[Reverse[li]];
71 \t];
72 \t
73 ellinv[n_] := PowerMod[n,-1,p];
74 (* Next, obtain actual x,y coords via normalization:
75 {x,y,z} := {X/Z^2, Y/Z^3, 1}. *)
76 normalize[pt_] := Block[{z,z2,z3},
77 \t\tIf[pt[[3]] == 0, Return[pt]];
78 \t\tz = ellinv[pt[[3]]];
79 \t\tz2 = Mod[z^2,p];
80 \t\tz3 = Mod[z z2,p];
81 \t\tReturn[{Mod[pt[[1]] z2, p], Mod[pt[[2]] z3, p], 1}];
82 \t\t];
83
84 ellneg[pt_] := Mod[pt * {1,-1,1}, p];
85 ellsub[pt1_, pt2_] := elladd[pt1, ellneg[pt2]];
86 elldouble[pt_] := Block[{x,y,z,m,y2,s},
87 \tx = pt[[1]]; y = pt[[2]]; z = pt[[3]];
88 \tIf[(y==0) || (z==0), Return[{1,1,0}]];
89 \tm = Mod[3 x^2 + a Mod[Mod[z^2,p]^2,p],p];
90 \tz = Mod[2 y z, p];
91 \ty2 = Mod[y^2,p];
92 \ts = Mod[4 x y2,p];
93 \tx = Mod[m^2 - 2s,p];
94 \ty = Mod[m(s - x) - 8 y2^2,p];
95 \tReturn[{x,y,z}];
96 ];
97
98 elladd[pt0_, pt1_] := Block[
99 \t{x0,y0,z0,x1,y1,z1,
100 \tt1,t2,t3,t4,t5,t6,t7},
101 \tx0 = pt0[[1]]; y0 = pt0[[2]]; z0 = pt0[[3]];
102 \tx1 = pt1[[1]]; y1 = pt1[[2]]; z1 = pt1[[3]];
103 \tIf[z0 == 0, Return[pt1]];
104 \tIf[z1 == 0, Return[pt0]];
105
106 \tt1 = x0;
107 \tt2 = y0;
108 \tt3 = z0;
109 \tt4 = x1;
110 \tt5 = y1;
111 \tIf[(z1 != 1),
112 \t\tt6 = z1;
113 \t\tt7 = Mod[t6^2, p];
114 \t\tt1 = Mod[t1 t7, p];
115 \t\tt7 = Mod[t6 t7, p];
116 \t\tt2 = Mod[t2 t7, p];
117 \t];
118 \tt7 = Mod[t3^2, p];
119 \tt4 = Mod[t4 t7, p];
120 \tt7 = Mod[t3 t7, p];
121 \tt5 = Mod[t5 t7, p];
122 \tt4 = Mod[t1-t4, p];
123 \tt5 = Mod[t2 - t5, p];
124 \tIf[t4 == 0, If[t5 == 0,
125 \t\t\t\t Return[elldouble[pt0]],
126 \t \t\t\t\tReturn[{1,1,0}]
127 \t \t\t\t]
128 \t];
129 \tt1 = Mod[2t1 - t4,p];
130 \tt2 = Mod[2t2 - t5, p];
131 \tIf[z1 != 1, t3 = Mod[t3 t6, p]];
132 \tt3 = Mod[t3 t4, p];
133 \tt7 = Mod[t4^2, p];
134 \tt4 = Mod[t4 t7, p];
135 \tt7 = Mod[t1 t7, p];
136 \tt1 = Mod[t5^2, p];
137 \tt1 = Mod[t1-t7, p];
138 \tt7 = Mod[t7 - 2t1, p];
139 \tt5 = Mod[t5 t7, p];
140 \tt4 = Mod[t2 t4, p];
141 \tt2 = Mod[t5-t4, p];
142 \tIf[EvenQ[t2], t2 = t2/2, t2 = (p+t2)/2];
143 \tReturn[{t1, t2, t3}];
144 ];
145 \t\t
146 (* Next, elliptic-multiply a normalized pt by k. *)
147 elliptic[pt_, k_] := Block[{pt2, hh, kk, hb, kb, lenh, lenk},
148 \tIf[k==0, Return[{1,1,0}]];
149 \thh = Reverse[bitList[3k]];
150 \tkk = Reverse[bitList[k]];
151 \tpt2 = pt;
152 \tlenh = Length[hh];
153 \tlenk = Length[kk];
154 \tDo[
155 \t\tpt2 = elldouble[pt2];
156 \t\thb = hh[[b]];
157 \t\tIf[b <= lenk, kb = kk[[b]], kb = 0];
158 \t\tIf[{hb,kb} == {1,0},
159 \t\t\tpt2 = elladd[pt2, pt],
160 \t\t\tIf[{hb, kb} == {0,1},
161 \t\t\tpt2 = ellsub[pt2, pt]]
162 \t\t]
163 \t ,{b, lenh-1, 2,-1}
164 \t ];
165 \tReturn[pt2];
166 ];
167
168 (* Next, provide point-finding functions. *)
169
170 (* Next, perform (a + b w)^n (mod p), where pair = {a,b}, w2 = w^2. *)
171 pow[pair_, w2_, n_, p_] := Block[{bitlist, z},
172 bitlist = bitList[n];
173 z = pair;
174 \tDo[\t
175 \t zi = Mod[z[[2]]^2,p];
176 \t z = {Mod[z[[1]]^2 + w2 zi, p], Mod[2 z[[1]] z[[2]], p]};
177 \t If[bitlist[[q]] == 1,
178 \t zi = Mod[pair[[2]] z[[2]], p];
179 \t \t z = {Mod[pair[[1]] z[[1]] + w2 zi, p],
180 \t \t Mod[pair[[1]] z[[2]] + pair[[2]] z[[1]], p]};
181 \t ],
182 \t {q,2,Length[bitlist]}
183 ];
184 Return[z]
185 ];
186
187
188 sqrt[x_, p_] := Module[{t, b, w2},
189 If[Mod[x,p] == 0, Return[0]];
190 \tIf[Mod[p,4] == 3, Return[PowerMod[x, (p+1)/4, p]]];
191 \tIf[Mod[p,8] == 5,
192 \t\tb = PowerMod[x, (p-1)/4, p];
193 \t\tIf[b==1, Return[PowerMod[x, (p+3)/8, p]],
194 \t\t\tReturn[Mod[2x PowerMod[4x, (p-5)/8,p],p]]
195 \t\t]
196 \t];
197 \tt = 2;
198 While[True,
199 w2 = Mod[t^2 - x, p];
200 If[JacobiSymbol[w2,p] == -1, Break[]];
201 ++t
202 ];
203 (* Next, raise (t + Sqrt[w2])^((p+1)/2). *)
204 t = pow[{t,1},w2, (p+1)/2, p];
205 Return[t[[1]]];
206 ];
207
208 findpoint[start_] := Block[{x = start, y, s},
209 \tWhile[True,
210 \t s = Mod[x(Mod[x^2+a,p]) + b, p];
211 \t y = sqrt[s, p];
212 \t If[Mod[y^2, p] == s, Break[]];
213 \t ++x;
214 \t];
215 \tReturn[{x, y, 1}]
216 ];
217
218 report[a_] := Module[{ia = IntegerDigits[a,65536]},
219 Prepend[Reverse[ia], Length[ia]]
220 ];
221 \
222 \>", "Input",
223 AspectRatioFixed->True],
224
225 Cell[CellGroupData[{
226
227 Cell["\<\
228
229
230
231 report[a_] := Module[{ia = IntegerDigits[a,65536]},
232 Prepend[Reverse[ia], Length[ia]]
233 ];
234
235
236 (* Case of Weierstrass/feemod curve. *)
237 p = 2^127 + 57675
238 report[p]
239 r = 512000; s = 512001;
240
241 a = Mod[-3 r s^3, p]
242 report[a]
243 b = Mod[-2 r s^5, p]
244 report[b]
245 pt = findpoint[3];
246 pt
247 plusOrd = 170141183460469231756943134065055014407
248 report[plusOrd]
249 PrineQ[plusOrd]
250 minusOrd = 170141183460469231706431473366713312401
251 report[minusOrd]
252 PrimeQ[minusOrd]
253 elliptic[pt, plusOrd]
254 elliptic[pt, minusOrd]\
255 \>", "Input",
256 AspectRatioFixed->True],
257
258 Cell[BoxData[
259 \(170141183460469025572049133804586627403\)], "Output"],
260
261 Cell[BoxData[
262 \({8, 29003, 44777, 29962, 4169, 54360, 65535, 65535, 32767}\)], "Output"],
263
264 Cell[BoxData[
265 \(170105154311605172483148226534443139403\)], "Output"],
266
267 Cell[BoxData[
268 \({8, 16715, 42481, 16221, 60523, 56573, 13644, 4000, 32761}\)], "Output"],
269
270 Cell[BoxData[
271 \(Reverse::"normal" \( : \ \)
272 "Nonatomic expression expected at position \!\(1\) in \
273 \!\(Reverse[ib]\)."\)], "Message"],
274
275 Cell[BoxData[
276 \(Join::"heads" \( : \ \)
277 "Heads \!\(List\) and \!\(Reverse\) at positions \!\(1\) and \!\(2\) \
278 are expected to be the same."\)], "Message"],
279
280 Cell[BoxData[
281 \(Join[{0}, Reverse[ib]]\)], "Output"],
282
283 Cell[BoxData[
284 \({6, 30690820274365139284340271178980469693, 1}\)], "Output"],
285
286 Cell[BoxData[
287 \({1, 1, 0}\)], "Output"],
288
289 Cell[BoxData[
290 \({29855379595419734109449938959593549451,
291 71894799143021275114012027736812077762,
292 78629090074833058028405436736324079039}\)], "Output"],
293
294 Cell[CellGroupData[{
295
296 Cell[BoxData[{
297 \( (*\ Case\ of\ Weierstrass/gen . \ mod\ \(curve . \)\ *) \n
298 p\ = \ 1654338658923174831024422729553880293604080853451; \n
299 Mod[p, 4]\),
300 \(Length[IntegerDigits[p, 2]]\),
301 \(report[p]\),
302 \(PrimeQ[p]\n\n\),
303 \(a\ = \ \(-152\); \nreport[a]\),
304 \(b\ = \ Mod[722, \ p]\),
305 \(report[b]\),
306 \(ptplus\ = \
307 findpoint[1245904487553815885170631576005220733978383542270]\),
308 \(ptminus\ = \
309 findpoint[1173563507729187954550227059395955904200719019884]\),
310 \(plusOrd\ = \ \ 1654338658923174831024425147405519522862430265804; \n
311 report[plusOrd]\),
312 \(PrimeQ[plusOrd]\),
313 \(minusOrd\ = \ 2 p + 2\ - \ plusOrd\),
314 \(report[minusOrd]\),
315 \(PrimeQ[minusOrd]\n\),
316 \(pt2\ = \
317 elliptic[ptplus, \ plusOrd/\((2^2\ *\ 23\ *\ 359\ *\ 479\ *\ 102107)\)]
318 \),
319 \(pt3\ = \ elliptic[ptminus, \ minusOrd/\((2^2\ *\ 5^2\ *\ 17^2)\)]\)}],
320 "Input"],
321
322 Cell[BoxData[
323 \(3\)], "Output"],
324
325 Cell[BoxData[
326 \(161\)], "Output"],
327
328 Cell[BoxData[
329 \({11, 41419, 58349, 36408, 14563, 25486, 9098, 29127, 50972, 7281, 8647,
330 1}\)], "Output"],
331
332 Cell[BoxData[
333 \(True\)], "Output"],
334
335 Cell[BoxData[
336 \({1, 152}\)], "Output"],
337
338 Cell[BoxData[
339 \(722\)], "Output"],
340
341 Cell[BoxData[
342 \({1, 722}\)], "Output"],
343
344 Cell[BoxData[
345 \({1245904487553815885170631576005220733978383542270,
346 560361014661268580786436670038204012763093444403, 1}\)], "Output"],
347
348 Cell[BoxData[
349 \({1173563507729187954550227059395955904200719019885,
350 1175039848591896005104837959278049495835875105211, 1}\)], "Output"],
351
352 Cell[BoxData[
353 \({11, 41420, 58349, 36408, 14563, 25486, 9100, 29127, 50972, 7281, 8647,
354 1}\)], "Output"],
355
356 Cell[BoxData[
357 \(False\)], "Output"],
358
359 Cell[BoxData[
360 \(1654338658923174831024420311702241064345731441100\)], "Output"],
361
362 Cell[BoxData[
363 \({11, 41420, 58349, 36408, 14563, 25486, 9096, 29127, 50972, 7281, 8647,
364 1}\)], "Output"],
365
366 Cell[BoxData[
367 \(False\)], "Output"],
368
369 Cell[BoxData[
370 \({1, 1, 0}\)], "Output"],
371
372 Cell[BoxData[
373 \({1190583420013022954017374261618382173651469909929,
374 629194203259568943908951973353992532594049316627,
375 1243063853191133727091858197899695654928311311960}\)], "Output"]
376 }, Open ]]
377 }, Open ]],
378
379 Cell[CellGroupData[{
380
381 Cell["\<\
382
383
384 (* Case of Weierstrass/feemod curve. *)
385 p = 2^160 + 5875
386 report[p]
387 PrimeQ[p]
388 r = 512; s = 513;
389
390 a = Mod[-3 r s^3, p]
391 report[a]
392 b = Mod[2 r s^5, p]
393 report[b]
394 pt = findpoint[3];
395 pt
396 plusOrd = 1461501637330902918203687223801810245920805144027
397 report[plusOrd]
398 PrimeQ[plusOrd]
399 minusOrd = 1461501637330902918203682441630755793391059953677
400 report[minusOrd]
401 PrimeQ[minusOrd]
402
403 elliptic[pt, plusOrd]
404 elliptic[pt, minusOrd]\
405 \>", "Input",
406 AspectRatioFixed->True],
407
408 Cell[BoxData[
409 \(1461501637330902918203684832716283019655932548851\)], "Output"],
410
411 Cell[BoxData[
412 \({11, 5875, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}\)], "Output"],
413
414 Cell[BoxData[
415 \(True\)], "Output"],
416
417 Cell[BoxData[
418 \(1461501637330902918203684832716283019448563798259\)], "Output"],
419
420 Cell[BoxData[
421 \({11, 4339, 47068, 65487, 65535, 65535, 65535, 65535, 65535, 65535,
422 65535, 0}\)], "Output"],
423
424 Cell[BoxData[
425 \(36382017816364032\)], "Output"],
426
427 Cell[BoxData[
428 \({4, 1024, 41000, 16704, 129}\)], "Output"],
429
430 Cell[BoxData[
431 \({7, 1141381147330837701163756056508811445797829159301, 1}\)], "Output"],
432
433 Cell[BoxData[
434 \(1461501637330902918203687223801810245920805144027\)], "Output"],
435
436 Cell[BoxData[
437 \({11, 50651, 30352, 49719, 403, 64085, 1, 0, 0, 0, 0, 1}\)], "Output"],
438
439 Cell[BoxData[
440 \(True\)], "Output"],
441
442 Cell[BoxData[
443 \(1461501637330902918203682441630755793391059953677\)], "Output"],
444
445 Cell[BoxData[
446 \({11, 26637, 35183, 15816, 65132, 1450, 65534, 65535, 65535, 65535,
447 65535, 0}\)], "Output"],
448
449 Cell[BoxData[
450 \(True\)], "Output"],
451
452 Cell[BoxData[
453 \({1, 1, 0}\)], "Output"],
454
455 Cell[BoxData[
456 \({626678646813931825585362114548610779332932369721,
457 425645027836716936906396416648647850487040622280,
458 374678203163702432662589149043052098374578486466}\)], "Output"]
459 }, Open ]],
460
461 Cell[CellGroupData[{
462
463 Cell[BoxData[{
464 \( (*\ Case\ of\ NIST\ P - 192. \ *) \n
465 p\ = \ 6277101735386680763835789423207666416083908700390324961279; \n
466 Mod[p, 4]\),
467 \(Length[IntegerDigits[p, 2]]\),
468 \(report[p]\),
469 \(PrimeQ[p]\n\n\),
470 \(a\ = \ \(-3\); \nreport[a]\),
471 \(b\ = \
472 Mod[\(-2455155546008943817740293915197451784769108058161191238065\), \
473 p]\),
474 \(report[b]\),
475 \(pt\ = \ findpoint[3]; \npt\),
476 \(plusOrd\ = \ \
477 6277101735386680763835789423176059013767194773182842284081\),
478 \(report[plusOrd]\),
479 \(PrimeQ[plusOrd]\),
480 \(minusOrd\ = \ 2 p + 2\ - \ plusOrd\),
481 \(report[minusOrd]\),
482 \(PrimeQ[minusOrd]\),
483 \(elliptic[pt, \ plusOrd]\),
484 \(pt2\ = \ elliptic[pt, \ 23]\),
485 \(pt\ = \ elliptic[pt2, \ minusOrd/23]\),
486 \(report[minusOrd/23]\)}], "Input"],
487
488 Cell[BoxData[
489 \(3\)], "Output"],
490
491 Cell[BoxData[
492 \(192\)], "Output"],
493
494 Cell[BoxData[
495 \({12, 65535, 65535, 65535, 65535, 65534, 65535, 65535, 65535, 65535,
496 65535, 65535, 65535}\)], "Output"],
497
498 Cell[BoxData[
499 \(True\)], "Output"],
500
501 Cell[BoxData[
502 \({1, 3}\)], "Output"],
503
504 Cell[BoxData[
505 \(3821946189377736946095495508010214631314800642229133723214\)], "Output"],
506
507 Cell[BoxData[
508 \({12, 17998, 16057, 8467, 327, 53173, 36315, 5716, 61528, 32536, 6755,
509 64230, 39902}\)], "Output"],
510
511 Cell[BoxData[
512 \({3, 2573760116079900500718205355717584033158714840310676461950, 1}\)],
513 "Output"],
514
515 Cell[BoxData[
516 \(6277101735386680763835789423176059013767194773182842284081\)], "Output"],
517
518 Cell[BoxData[
519 \({12, 10289, 46290, 51633, 5227, 63542, 39390, 65535, 65535, 65535,
520 65535, 65535, 65535}\)], "Output"],
521
522 Cell[BoxData[
523 \(True\)], "Output"],
524
525 Cell[BoxData[
526 \(6277101735386680763835789423239273818400622627597807638479\)], "Output"],
527
528 Cell[BoxData[
529 \({12, 55247, 19245, 13902, 60308, 1991, 26145, 0, 0, 0, 0, 0, 0}\)],
530 "Output"],
531
532 Cell[BoxData[
533 \(False\)], "Output"],
534
535 Cell[BoxData[
536 \({1974979226733528697945860683178722101664119564992975891016,
537 4098724835649872426757510355842063594543191498480025032993,
538 6276809135556566751199297417037505266020088100630063387404}\)], "Output"],
539
540 Cell[BoxData[
541 \({4331701396234773295967464070295991827703321716502384917379,
542 6038875199291747318091498070766965234564517946489302751105,
543 2975197300407214290225034931542769825877023149833302700493}\)], "Output"],
544
545 Cell[BoxData[
546 \({1, 1, 0}\)], "Output"],
547
548 Cell[BoxData[
549 \({12, 16649, 40728, 9152, 53911, 59923, 9684, 22795, 17096, 45590,
550 34192, 25644, 2849}\)], "Output"]
551 }, Open ]],
552
553 Cell[CellGroupData[{
554
555 Cell[BoxData[
556 \(normalize[pt2]\)], "Input"],
557
558 Cell[BoxData[
559 \({572757471182948021179439097275935071491066938838024362853,
560 1582598775998321197887787208733859332485461160705858323879, 1}\)],
561 "Output"],
562
563 Cell[CellGroupData[{
564
565 Cell[BoxData[
566 \(report[%[\([1]\)]]\)], "Input"],
567
568 Cell[BoxData[
569 \({12, 39781, 2122, 19172, 23122, 40686, 43699, 10062, 14682, 25122,
570 55271, 56820, 5979}\)], "Output"]
571 }, Open ]]
572 }, Open ]],
573
574 Cell[CellGroupData[{
575
576 Cell[BoxData[{
577 \(minusOrd\),
578 \(plusOrd\)}], "Input"],
579
580 Cell[BoxData[
581 \(6277101735386680763835789423239273818400622627597807638479\)], "Output"],
582
583 Cell[BoxData[
584 \(6277101735386680763835789423176059013767194773182842284081\)], "Output"]
585 }, Open ]],
586
587 Cell[CellGroupData[{
588
589 Cell[BoxData[
590 \(IntegerDigits[13, 2]\)], "Input"],
591
592 Cell[BoxData[
593 \({1, 1, 0, 1}\)], "Output"]
594 }, Open ]],
595
596 Cell[CellGroupData[{
597
598 Cell[BoxData[{
599 \(minusOrd/23\),
600 \(\treport[minusOrd/23]\)}], "Input"],
601
602 Cell[BoxData[
603 \(272917466755942641905903887966924948626114027286861201673\)], "Output"],
604
605 Cell[BoxData[
606 \({12, 16649, 40728, 9152, 53911, 59923, 9684, 22795, 17096, 45590,
607 34192, 25644, 2849}\)], "Output"]
608 }, Open ]],
609
610 Cell[CellGroupData[{
611
612 Cell[BoxData[
613 \(ord\ = \ 1024120625531724089187207582052247831; \n
614 Floor[4^Length[IntegerDigits[plusOrd, \ 2]]/plusOrd]\)], "Input"],
615
616 Cell[BoxData[
617 \(5846006549323611672814729766523023173564239767715\)], "Output"]
618 }, Open ]],
619
620 Cell[CellGroupData[{
621
622 Cell[BoxData[
623 \(report[%]\)], "Input"],
624
625 Cell[BoxData[
626 \({11, 59555, 9660, 63266, 63920, 5803, 65528, 65535, 65535, 65535,
627 65535, 3}\)], "Output"]
628 }, Open ]],
629
630 Cell[CellGroupData[{
631
632 Cell[BoxData[
633 \(IntegerDigits[
634 6277101735386680763835789423207666416083908700390324961279, 2]\)],
635 "Input"],
636
637 Cell[BoxData[
638 \({1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
639 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
640 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
641 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
642 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
643 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
644 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
645 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
646 1}\)], "Output"]
647 }, Open ]],
648
649 Cell[CellGroupData[{
650
651 Cell[BoxData[{
652 \(a\),
653 \(b\),
654 \(JacobiSymbol[3^3\ + \ a\ *\ 3\ - \ b, \ p]\)}], "Input"],
655
656 Cell[BoxData[
657 \(\(-3\)\)], "Output"],
658
659 Cell[BoxData[
660 \(3821946189377736946095495508010214631314800642229133723214\)], "Output"],
661
662 Cell[BoxData[
663 \(1\)], "Output"]
664 }, Open ]],
665
666 Cell[CellGroupData[{
667
668 Cell[BoxData[
669 \(minusOrd\)], "Input"],
670
671 Cell[BoxData[
672 \(6277101735386680763835789423239273818400622627597807638479\)], "Output"]
673 }, Open ]],
674
675 Cell[CellGroupData[{
676
677 Cell[BoxData[
678 \(o\ = 272917466755942641905903887966924948626114027286861201673; \n
679 Floor[4^Length[IntegerDigits[o, 2]]/o]\)], "Input"],
680
681 Cell[BoxData[
682 \(563958359038647099875871705988474052021461054728890671516\)], "Output"]
683 }, Open ]],
684
685 Cell[CellGroupData[{
686
687 Cell[BoxData[
688 \(report[%]\)], "Input"],
689
690 Cell[BoxData[
691 \({12, 57756, 63294, 44830, 2517, 2125, 63187, 65535, 65535, 65535,
692 65535, 65535, 5887}\)], "Output"]
693 }, Open ]],
694
695 Cell[CellGroupData[{
696
697 Cell[BoxData[
698 \(IntegerDigits[1654338658923174831024422729553880293604080853451, 2]\)],
699 "Input"],
700
701 Cell[BoxData[
702 \({1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1,
703 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1,
704 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0,
705 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1,
706 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1,
707 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1,
708 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 1, 1}\)], "Output"]
709 }, Open ]]
710 },
711 FrontEndVersion->"NeXT 3.0",
712 ScreenRectangle->{{0, 957}, {0, 768}},
713 WindowToolbars->{},
714 CellGrouping->Manual,
715 WindowSize->{520, 600},
716 WindowMargins->{{Automatic, 44}, {-10, Automatic}},
717 PrivateNotebookOptions->{"ColorPalette"->{RGBColor, -1}},
718 ShowCellLabel->True,
719 ShowCellTags->False,
720 RenderingOptions->{"ObjectDithering"->True,
721 "RasterDithering"->False}
722 ]
723
724
725 (***********************************************************************
726 Cached data follows. If you edit this Notebook file directly, not using
727 Mathematica, you must remove the line containing CacheID at the top of
728 the file. The cache data will then be recreated when you save this file
729 from within Mathematica.
730 ***********************************************************************)
731
732 (*CellTagsOutline
733 CellTagsIndex->{}
734 *)
735
736 (*CellTagsIndex
737 CellTagsIndex->{}
738 *)
739
740 (*NotebookFileOutline
741 Notebook[{
742 Cell[1709, 49, 4062, 173, 2136, "Input"],
743
744 Cell[CellGroupData[{
745 Cell[5796, 226, 556, 29, 336, "Input"],
746 Cell[6355, 257, 73, 1, 24, "Output"],
747 Cell[6431, 260, 92, 1, 24, "Output"],
748 Cell[6526, 263, 73, 1, 24, "Output"],
749 Cell[6602, 266, 92, 1, 24, "Output"],
750 Cell[6697, 269, 145, 3, 33, "Message"],
751 Cell[6845, 274, 166, 3, 33, "Message"],
752 Cell[7014, 279, 56, 1, 24, "Output"],
753 Cell[7073, 282, 80, 1, 24, "Output"],
754 Cell[7156, 285, 43, 1, 24, "Output"],
755 Cell[7202, 288, 168, 3, 50, "Output"],
756
757 Cell[CellGroupData[{
758 Cell[7395, 295, 949, 24, 381, "Input"],
759 Cell[8347, 321, 35, 1, 24, "Output"],
760 Cell[8385, 324, 37, 1, 24, "Output"],
761 Cell[8425, 327, 115, 2, 37, "Output"],
762 Cell[8543, 331, 38, 1, 24, "Output"],
763 Cell[8584, 334, 42, 1, 24, "Output"],
764 Cell[8629, 337, 37, 1, 24, "Output"],
765 Cell[8669, 340, 42, 1, 24, "Output"],
766 Cell[8714, 343, 145, 2, 37, "Output"],
767 Cell[8862, 347, 146, 2, 37, "Output"],
768 Cell[9011, 351, 115, 2, 37, "Output"],
769 Cell[9129, 355, 39, 1, 24, "Output"],
770 Cell[9171, 358, 83, 1, 24, "Output"],
771 Cell[9257, 361, 115, 2, 37, "Output"],
772 Cell[9375, 365, 39, 1, 24, "Output"],
773 Cell[9417, 368, 43, 1, 24, "Output"],
774 Cell[9463, 371, 200, 3, 50, "Output"]
775 }, Open ]]
776 }, Open ]],
777
778 Cell[CellGroupData[{
779 Cell[9712, 380, 469, 25, 312, "Input"],
780 Cell[10184, 407, 83, 1, 24, "Output"],
781 Cell[10270, 410, 74, 1, 24, "Output"],
782 Cell[10347, 413, 38, 1, 24, "Output"],
783 Cell[10388, 416, 83, 1, 24, "Output"],
784 Cell[10474, 419, 117, 2, 37, "Output"],
785 Cell[10594, 423, 51, 1, 24, "Output"],
786 Cell[10648, 426, 62, 1, 24, "Output"],
787 Cell[10713, 429, 91, 1, 24, "Output"],
788 Cell[10807, 432, 83, 1, 24, "Output"],
789 Cell[10893, 435, 89, 1, 24, "Output"],
790 Cell[10985, 438, 38, 1, 24, "Output"],
791 Cell[11026, 441, 83, 1, 24, "Output"],
792 Cell[11112, 444, 117, 2, 37, "Output"],
793 Cell[11232, 448, 38, 1, 24, "Output"],
794 Cell[11273, 451, 43, 1, 24, "Output"],
795 Cell[11319, 454, 198, 3, 50, "Output"]
796 }, Open ]],
797
798 Cell[CellGroupData[{
799 Cell[11554, 462, 844, 23, 420, "Input"],
800 Cell[12401, 487, 35, 1, 24, "Output"],
801 Cell[12439, 490, 37, 1, 24, "Output"],
802 Cell[12479, 493, 129, 2, 37, "Output"],
803 Cell[12611, 497, 38, 1, 24, "Output"],
804 Cell[12652, 500, 40, 1, 24, "Output"],
805 Cell[12695, 503, 92, 1, 24, "Output"],
806 Cell[12790, 506, 124, 2, 37, "Output"],
807 Cell[12917, 510, 103, 2, 50, "Output"],
808 Cell[13023, 514, 92, 1, 24, "Output"],
809 Cell[13118, 517, 128, 2, 37, "Output"],
810 Cell[13249, 521, 38, 1, 24, "Output"],
811 Cell[13290, 524, 92, 1, 24, "Output"],
812 Cell[13385, 527, 100, 2, 24, "Output"],
813 Cell[13488, 531, 39, 1, 24, "Output"],
814 Cell[13530, 534, 228, 3, 89, "Output"],
815 Cell[13761, 539, 228, 3, 89, "Output"],
816 Cell[13992, 544, 43, 1, 24, "Output"],
817 Cell[14038, 547, 126, 2, 37, "Output"]
818 }, Open ]],
819
820 Cell[CellGroupData[{
821 Cell[14201, 554, 47, 1, 25, "Input"],
822 Cell[14251, 557, 166, 3, 63, "Output"],
823
824 Cell[CellGroupData[{
825 Cell[14442, 564, 51, 1, 25, "Input"],
826 Cell[14496, 567, 127, 2, 37, "Output"]
827 }, Open ]]
828 }, Open ]],
829
830 Cell[CellGroupData[{
831 Cell[14672, 575, 61, 2, 38, "Input"],
832 Cell[14736, 579, 92, 1, 24, "Output"],
833 Cell[14831, 582, 92, 1, 24, "Output"]
834 }, Open ]],
835
836 Cell[CellGroupData[{
837 Cell[14960, 588, 53, 1, 25, "Input"],
838 Cell[15016, 591, 46, 1, 24, "Output"]
839 }, Open ]],
840
841 Cell[CellGroupData[{
842 Cell[15099, 597, 78, 2, 38, "Input"],
843 Cell[15180, 601, 91, 1, 24, "Output"],
844 Cell[15274, 604, 126, 2, 37, "Output"]
845 }, Open ]],
846
847 Cell[CellGroupData[{
848 Cell[15437, 611, 141, 2, 38, "Input"],
849 Cell[15581, 615, 83, 1, 24, "Output"]
850 }, Open ]],
851
852 Cell[CellGroupData[{
853 Cell[15701, 621, 42, 1, 25, "Input"],
854 Cell[15746, 624, 116, 2, 37, "Output"]
855 }, Open ]],
856
857 Cell[CellGroupData[{
858 Cell[15899, 631, 119, 3, 51, "Input"],
859 Cell[16021, 636, 666, 9, 128, "Output"]
860 }, Open ]],
861
862 Cell[CellGroupData[{
863 Cell[16724, 650, 103, 3, 51, "Input"],
864 Cell[16830, 655, 40, 1, 24, "Output"],
865 Cell[16873, 658, 92, 1, 24, "Output"],
866 Cell[16968, 661, 35, 1, 24, "Output"]
867 }, Open ]],
868
869 Cell[CellGroupData[{
870 Cell[17040, 667, 41, 1, 24, "Input"],
871 Cell[17084, 670, 92, 1, 24, "Output"]
872 }, Open ]],
873
874 Cell[CellGroupData[{
875 Cell[17213, 676, 143, 2, 64, "Input"],
876 Cell[17359, 680, 91, 1, 24, "Output"]
877 }, Open ]],
878
879 Cell[CellGroupData[{
880 Cell[17487, 686, 42, 1, 25, "Input"],
881 Cell[17532, 689, 126, 2, 37, "Output"]
882 }, Open ]],
883
884 Cell[CellGroupData[{
885 Cell[17695, 696, 103, 2, 38, "Input"],
886 Cell[17801, 700, 559, 7, 115, "Output"]
887 }, Open ]]
888 }
889 ]
890 *)
891
892
893
894
895 (***********************************************************************
896 End of Mathematica Notebook file.
897 ***********************************************************************)
898