From 558325e836afa28a54d93606272845d182ac711c Mon Sep 17 00:00:00 2001 From: tb Date: Wed, 5 Apr 2023 07:17:44 +0000 Subject: [PATCH] Add coverage for the truly non-deterministic path of Tonelli-Shanks Regress coverage of all of BN_mod_sqrt() is still lacking after this. This will improve in forthcoming commits. --- regress/lib/libcrypto/bn/bn_mod_sqrt.c | 1629 +++++++++++++++++++++++- 1 file changed, 1625 insertions(+), 4 deletions(-) diff --git a/regress/lib/libcrypto/bn/bn_mod_sqrt.c b/regress/lib/libcrypto/bn/bn_mod_sqrt.c index 74702f950c2..a4d86a80b64 100644 --- a/regress/lib/libcrypto/bn/bn_mod_sqrt.c +++ b/regress/lib/libcrypto/bn/bn_mod_sqrt.c @@ -1,6 +1,7 @@ -/* $OpenBSD: bn_mod_sqrt.c,v 1.3 2023/04/04 15:32:02 tb Exp $ */ +/* $OpenBSD: bn_mod_sqrt.c,v 1.4 2023/04/05 07:17:44 tb Exp $ */ + /* - * Copyright (c) 2022 Theo Buehler + * Copyright (c) 2022,2023 Theo Buehler * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -108,8 +109,6 @@ mod_sqrt_test(struct mod_sqrt_test *test, BN_CTX *ctx) /* XXX - Remove sum once we return the canonical square root. */ if (!BN_is_zero(diff) && !BN_is_zero(sum)) { - fprintf(stderr, "want != got\n"); - fprintf(stderr, "a: %s\n", test->a); fprintf(stderr, "p: %s\n", test->p); fprintf(stderr, "want: %s:", test->sqrt); @@ -145,12 +144,1634 @@ bn_mod_sqrt_test(void) return failed; } + +/* + * A list of primes p = 1 (mod 8) with long initial segments of quadratic + * residues. These exercise the non-deterministic path of Tonelli-Shanks. + */ + +static const struct p_is_1_mod_8_tests { + const char *p; + int first_non_square; + const char *sqrt[100]; +} p_is_1_mod_8_tests[] = { + { + .p = "d7a6133d89b7a840ec0d80d2ee197849", + .first_non_square = 101, + .sqrt = { + [0] = "0", + [1] = "1", + [2] = "127b07d9558aa7382fda337e674b0020", + [3] = "2b0756607c913be85534cec59846e6f8", + [4] = "2", + [5] = "1ac3bfe91dd86f91be44b30936b6bcff", + [6] = "3a03fcd8bc70d0a08444356250a316c9", + [7] = "22c3c29b3cf04300495e694db5a1fb11", + [8] = "24f60fb2ab154e705fb466fcce960040", + [9] = "3", + [10] = "46dce6880d735d143a40b99097f87f9e", + [11] = "3eab85485728056c43cd2681a96976ba", + [12] = "560eacc0f92277d0aa699d8b308dcdf0", + [13] = "19bf2319a32e92a6c2d80d364a19229d", + [14] = "51554e1d7adc5173841a9525b4a2ff7d", + [15] = "3d9a295185f27dc096b33184e4edd834", + [16] = "4", + [17] = "407d75edc1fba51c637aeddcb35abc1e", + [18] = "3771178c009ff5a88f8e9a7b35e10060", + [19] = "9e48ccec873561b315a0980c409c291", + [20] = "35877fd23bb0df237c8966126d6d79fe", + [21] = "2f4a3220291ac0440f3a2cb35d8e8f4c", + [22] = "218f85684d6378bf6a90d02b0f94dc11", + [23] = "432f4d621cc773b7945a024a076048d4", + [24] = "639e198c10d606ffe385160e4cd34ab7", + [25] = "5", + [26] = "8478976383e49d4fbda384883343e1", + [27] = "5690101c1403f487ec6f14822544c361", + [28] = "4587853679e0860092bcd29b6b43f622", + [29] = "47804840abaf4bc53e37c87291f55527", + [30] = "48925009cc14fbef1dee0b4a2f920890", + [31] = "228ef1765a5448f6a4600026dfb14830", + [32] = "49ec1f65562a9ce0bf68cdf99d2c0080", + [33] = "a41fb079bc22c9d1e5658a86db0e6bb", + [34] = "675b3a95cddf5b210dde6d3e7dd4cfa3", + [35] = "5b727e9bccd4da204cac92594babe837", + [36] = "6", + [37] = "64ba7d11b9d672e6d31a9b5971e60d2f", + [38] = "24afa6855c01017537555a58a70da6f9", + [39] = "3bb009b3541796452327d8e6fd8323ba", + [40] = "49ec462d6ed0ee18778c0db1be28790d", + [41] = "545f0385bd365fa7862502739a781f69", + [42] = "2b0b17173a32035911223d142ab00a4e", + [43] = "67109cc9a742fc0305d031cc20e7fd1f", + [44] = "5a4f08acdb679d68647333cf9b468ad5", + [45] = "504b3fbb59894eb53ace191ba42436fd", + [46] = "38e6358e14aa1cd9778b09cbf05deb48", + [47] = "319d132fc72dff9b631b3c2ca0c2f49f", + [48] = "2b88b9bb9772b89f973a45bc8cfddc69", + [49] = "7", + [50] = "5c67273eabb54418ef430178047700a0", + [51] = "3558bf08253c3d5afd58bd1c3c0498e3", + [52] = "337e4633465d254d85b01a6c9432453a", + [53] = "1845657cc9012fafd8a266bf41b2ce66", + [54] = "299a1cb35465365f5f40e0abfc3033ee", + [55] = "582fca95baf4c0b18befc9aa5b09aff4", + [56] = "34fb770293ff0559e3d8568784d3794f", + [57] = "62e847fb9f593dbe7d2f1a5c74594670", + [58] = "1c85e173426916ea88c889b950bd5d96", + [59] = "13e4d1ad2ef6d69c758826e554d3fce7", + [60] = "5c71c09a7dd2acbfbea71dc9243dc7e1", + [61] = "5bd4d7bf50d72c7642321ac648a41207", + [62] = "4d543e0b7cb7a087f6c6820871402203", + [63] = "684b47d1b6d0c900dc1b3be920e5f133", + [64] = "8", + [65] = "4720271c07130a09c11989006d5b65b7", + [66] = "27c5c5d3ef4be7d25b799ea455ff933", + [67] = "563c042e90bd60de622c83b96aad46f3", + [68] = "56ab276205c05e082517a5198764000d", + [69] = "40aabad2f12469f355cbd0e524021817", + [70] = "69f41210ae2c64ebbbfb9cc4436b121b", + [71] = "2495fdd3e3ee43c51d78a037f2af961", + [72] = "68c3e4258877bcefccf04bdc82577789", + [73] = "a54afbfe8d22b43dba10c45c3e1945a", + [74] = "387797174f3bf5d6281fe71ea18676e1", + [75] = "81635b1ae17cb7420576f6f4b6f571", + [76] = "13c9199d90e6ac3662b4130188138522", + [77] = "2095521a5b009be0acd08b5ee47fa519", + [78] = "2bdce5c6e97146d22fd25f4abb3bfa49", + [79] = "15d3c2c27cdc4411498596c20ef7d174", + [80] = "6b0effa47761be46f912cc24dadaf3fc", + [81] = "9", + [82] = "12af1ddc568bab9c8609a1069ad98974", + [83] = "4ba992f528674a24e7d11121eb88af39", + [84] = "5e946440523580881e745966bb1d1e98", + [85] = "1a0d8dbdac9222fddfacbae62f73dc50", + [86] = "4040b1fc21cc440034ac36b0e9eb9c90", + [87] = "1203e4b669c80a95eb2a5134436217aa", + [88] = "431f0ad09ac6f17ed521a0561f29b822", + [89] = "62aa36cb4434c129d65d92ff25a9c3c4", + [90] = "30f5fa5615d91043d4b5421262ff96f", + [91] = "2b64e196026445e615b7c019aafc52c4", + [92] = "514778795028c0d1c3597c3edf58e6a1", + [93] = "25eb81b5dcc44f0a8bcf7fb909690c50", + [94] = "48e96bc3845c7d38eb06fdf2d9274207", + [95] = "18ae0da0ae22f6cdee901b535977cfe", + [96] = "1069e025680b9a41250354b65472e2db", + [97] = "6bc184c777e6c859c4ce144eb68d6bef", + [98] = "5648dc4c32ed15b79d16185e1b0c7769", + [99] = "1ba38364843f97fc20a60d4df1dd141b", + }, + }, + { + .p = "ed2ca93a2b8b7053b5cbfbfc164284d9", + .first_non_square = 83, + .sqrt = { + [0] = "0", + [1] = "1", + [2] = "3a3c6e5ea115faa8be69eac1c177f698", + [3] = "2748dedd33f6c6a09f84973f2f862922", + [4] = "2", + [5] = "d7607decaa9bfe5ec031537ce343ed0", + [6] = "401d83de7c83456c0bee28fd25829dd5", + [7] = "21f72780e6f6789259086212c3e9538c", + [8] = "7478dcbd422bf5517cd3d58382efed30", + [9] = "3", + [10] = "28f8f6227299e5883b1a59e07b4cdec", + [11] = "4b557ee20b98bd00344c14563ca8f839", + [12] = "4e91bdba67ed8d413f092e7e5f0c5244", + [13] = "10242586b3f9e2ca74409066950b0dc", + [14] = "a4bfde50f20b288cf44d40af83abd84", + [15] = "43fffde1b3477313dd57b9cd7261cdc3", + [16] = "4", + [17] = "524907a08de4e5c0c153c544c87bf9ce", + [18] = "3e775e1e484980597a8e3bb6d1daa111", + [19] = "427441618f7df01a97f7435904162b4d", + [20] = "1aec0fbd95537fcbd8062a6f9c687da0", + [21] = "6cb69f443aa14ed65113febd0cfbdf66", + [22] = "7311499cc97a3d0f4a9c0597b2c761ec", + [23] = "2e4c8606309b68cd815085fb51529a9c", + [24] = "6cf1a17d3284e57b9defaa01cb3d492f", + [25] = "5", + [26] = "3565c3eaf0daac1e3a2c028657569676", + [27] = "75da9c979be453e1de8dc5bd8e927b66", + [28] = "43ee4f01cdecf124b210c42587d2a718", + [29] = "35864fac94ecba016620c63c0ccc5f56", + [30] = "3c85a120dba23570cc87f22b973f1654", + [31] = "6838d8565fcbbc5dbf597fb37a1f5406", + [32] = "43aefbfa73385b0bc2450f51062aa79", + [33] = "45bc0d05b45e92a9ec86fdb68d4d8b6d", + [34] = "617de3651efcd26b6524a971fc68398c", + [35] = "4101878d7ace3b9fb358dad9ace0a5c8", + [36] = "6", + [37] = "673a3026784b7a41328bac018550b86f", + [38] = "2b23c1a47cab7f8fcd0105546e230715", + [39] = "4e915dc6234ac56a095df35c40ea4907", + [40] = "51f1ec44e533cb107634b3c0f699bd8", + [41] = "3360c9282c4fdef670b93037989ff143", + [42] = "35e69c414ce1d44b024bcd9a7225a5c1", + [43] = "2e48de0b4bd10c05fbfb2f9719b20e69", + [44] = "5681ab761459f6534d33d34f9cf09467", + [45] = "2862179c5ffd3fb1c4093fa76a9cbc70", + [46] = "643d5c5c9b5af336e504f41726dfc0d3", + [47] = "3e98383357bcacf462c70cc9351a91a0", + [48] = "50092dc55bb055d137b99eff5829e051", + [49] = "7", + [50] = "36017e9ef9e274f8024599ccb1154c1f", + [51] = "5bf023ca007e263e4b5a030838af810c", + [52] = "20484b0d67f3c594e88120cd2a161b8", + [53] = "2b9e8a3b3ed1ed9329bede411f92778c", + [54] = "2cd41d9eb601a00f92018104a5baab5a", + [55] = "5bec2e51e71bb1f1a852e3e56d43a184", + [56] = "1497fbca1e4165119e89a815f0757b08", + [57] = "63423607948c915df58134dba2f29d07", + [58] = "18d9afef351887618e7bb9e3cfb0211", + [59] = "3ea4eee3e48e677c53aa0f392d896490", + [60] = "652cad76c4fc8a2bfb1c8861317ee953", + [61] = "66fbaa07b40873c3ac00b38cb100f017", + [62] = "6a018a4798e4a471a9ff4fb9dac762f", + [63] = "65e57682b4e369b70b1926384bbbfaa4", + [64] = "8", + [65] = "6188263fe8ff27e6249f9fb45efc8a9", + [66] = "3cff332519838822fd763253838bf932", + [67] = "4c83bbd2d19d60743a698d36db22c917", + [68] = "489a99f90fc1a4d233247172854a913d", + [69] = "38607b0f81008cc1a1dd707a16fc4d28", + [70] = "4eecbfcfce6b4da4c456d606983c3ef4", + [71] = "303995f9d14e1722b14e98314f7064ca", + [72] = "703decfd9af86fa0c0af848e728d42b7", + [73] = "17b2676a1150040ad999fbcd06f41d3a", + [74] = "1a7989bf779d64cf9a301debf4fec091", + [75] = "28c04ee827b98f30983507c028a3b72f", + [76] = "684426770c8f901e85dd754a0e162e3f", + [77] = "2b5c61ea91f69b1c7c7ebaeefb3240c5", + [78] = "568763066059e114d011688b51121883", + [79] = "a43ac4b02b98857c9d659c953154885", + [80] = "35d81f7b2aa6ff97b00c54df38d0fb40", + [81] = "9", + [82] = "d688cbf38d1530c3d11285f8a829bc3", + [84] = "13bf6ab1b648d2a713a3fe81fc4ac60d", + [85] = "4760657d9d6c47c60833c08573e79b80", + [86] = "3532206ae6f0f9a9721be80adf3b3df4", + [87] = "755e6970bfe25e6ac8bf805cf22b7343", + [88] = "70a16009896f6352093f0ccb0b3c101", + [90] = "7aeae26757cdb098b14f0da171e69c4", + [91] = "2bbeb474b349124e3ef6c222b62ad7b3", + [92] = "5c990c0c6136d19b02a10bf6a2a53538", + [93] = "46e5aa500f60629978168938a0c01682", + [94] = "228459bf06f9dfb15baf8ac31efe34c1", + [95] = "69e2c2104da63c9b919341b9013db3b7", + [96] = "1349663fc681a55c79eca7f87fc7f27b", + [97] = "39c6a22fb3f9d6c91f40fc217241c45e", + [98] = "42b24dddef7d060a36b28cabe23d4b8a", + [99] = "b2c2c9408c1395318e7bef960479c2e", + }, + }, + { + .p = "f9df802d991ea5ebaed8d3b9a42cf101", + .first_non_square = 59, + .sqrt = { + [0] = "0", + [1] = "1", + [2] = "9b87b93bb96389be7801b89dc1652d8", + [3] = "59e13489928842f26ae2886d9310b8f3", + [4] = "2", + [5] = "4c5c3af3b9fab5886e65b82402dad66f", + [6] = "69e583a41fd4c41fad8dfafe1d64ce80", + [7] = "2226e4abbf4dabfbc798cafda99b0c40", + [8] = "1370f727772c7137cf003713b82ca5b0", + [9] = "3", + [10] = "56069730d91a5cc07e2a98a6a68b7202", + [11] = "3f7c0d6dd412594787118d6095384c3a", + [12] = "461d171a740e2006d913c2de7e0b7f1b", + [13] = "40b3ccbea21d3d72c74263ab6879d65f", + [14] = "119ec14e3683163583a5553d2a0e9311", + [15] = "2aa84242c307fd827f2ab90abc5e7d0e", + [16] = "4", + [17] = "79b4a0e036f6d7ac8945c382d3135b5d", + [18] = "1d2972bb32c2a9d3b680529d9442f888", + [19] = "4fc091a564105b66fd19904959dd1c2b", + [20] = "61270a4625293adad20d63719e774423", + [21] = "5a0e8b4c8c5c042b55235a9cb7adaf60", + [22] = "35a1aa98a855b5d2c77f916145f41758", + [23] = "72a841aa741cb731c7986c8eee1af3b", + [24] = "261478e559751dac53bcddbd69635401", + [25] = "5", + [26] = "47e09b3873557e6bc1ceadd3969fbe88", + [27] = "13c41d6f1e7a22eb91cec58f150539d8", + [28] = "444dc9577e9b57f78f3195fb53361880", + [29] = "57798532e4e9404df4b67adf52c37099", + [30] = "3590327cc41d87a9e09fd8d9619c06c6", + [31] = "e15fec88e2da65f950f0a29275df452", + [32] = "26e1ee4eee58e26f9e006e2770594b60", + [33] = "614bdf992ff880c1f9092b13cdc354f2", + [34] = "16f4ebd0bea0a507679dfed7c67cfa36", + [35] = "84b3b3b80ffec8c1d8269511ac835ac", + [36] = "6", + [37] = "7533be777b68bc56c672a6970f2021d4", + [38] = "66d2c23bdb3236d9d65c761f5cd0b606", + [39] = "68bdd47cfdfa7a81e2550461aae74818", + [40] = "4dd251cbe6e9ec6ab283a26c57160cfd", + [41] = "38d5408abd422d8fcf19e8cf070d342d", + [42] = "358408a1b5fa21b4ad7eaeab5970dd7d", + [43] = "395a8a9786765fcc10641a5932985fac", + [44] = "7ae76551f0f9f35ca0b5b8f879bc588d", + [45] = "14cacf526b2e855263a7ab4d9b9c6db4", + [46] = "fefca61affd696e5b8c9179dc6ea1b5", + [47] = "70c9d4ca66eb1683ef376ed8e27f78de", + [48] = "6da551f8b10265ddfcb14dfca815f2cb", + [49] = "7", + [50] = "309a69e2a9ef1b0b858089b14c6f9e38", + [51] = "2f7c7a1a80c51f68ca01ad786d31730a", + [52] = "7877e6b054e42b0620540c62d3394443", + [53] = "10cd478dce3a9dc19548ee40ca0c2b0", + [54] = "43d10abec65fa67359d11d40b4017a7f", + [55] = "528ec8c6e928f443382d5537ef5e4844", + [56] = "233d829c6d062c6b074aaa7a541d2622", + [57] = "72bd2260fffce41b2fceb568f468cd5f", + [58] = "7159169c936f53e5d9e62a97f2c7fcaa", + [60] = "55508485860ffb04fe55721578bcfa1c", + [62] = "549a3f9a716d2b96a14ac143160611cc", + [63] = "6674ae033de903f356ca60f8fcd124c0", + [64] = "8", + [65] = "645b10018a4ad21e827fe92a1e59f098", + [66] = "bdb26c2d680b416a65bbcdbccc495f0", + [68] = "6763e6d2b30f6929c4d4cb3fe063a47", + [69] = "5b40ed33d02f5dc35137a11e753e982b", + [70] = "30c34c8e71a415dbbb1f090970f44828", + [71] = "13e6bbfca6921f5a4856c934c5d6e3c5", + [72] = "3a52e576658553a76d00a53b2885f110", + [74] = "3c65617b9a3fcb1c3f7296ea850efa7", + [75] = "3258f9ab5593fd1b4744fd4f69064543", + [76] = "5a5e5ce2d0fdef1db4a5b326f072b8ab", + [77] = "3552f699dfaa4c271b0eeda26ed29d78", + [78] = "58976ff498c84c33a271944f973ae216", + [80] = "37916ba14ecc30360abe0cd6673e68bb", + [81] = "9", + [82] = "5a9d0c87e518c6cb13a811c0ebbca59c", + [83] = "5ef2cb8d6cb52a4627e5c105c143c922", + [84] = "45c2699480669d9504921e8034d19241", + [85] = "4bba44a6872d99a6cd89235b86fd6796", + [86] = "5632d46186d2d1e32be4c3055231edaf", + [87] = "531f902b8fb73220ef988a46ca801f16", + [88] = "6b43553150ab6ba58eff22c28be82eb0", + [90] = "8344564f2307055cba6f63a4f756505", + [91] = "76240705743b992bad77b0ecb5569616", + [92] = "e5508354e8396e638f30d91ddc35e76", + [93] = "154d0dac17c4a150f8fc0c8c1ae2021e", + [94] = "6713d7b3635f41a9a0bee026abfdddb0", + [95] = "64321552a81000b462142ecd1287bc36", + [96] = "4c28f1cab2ea3b58a779bb7ad2c6a802", + [98] = "440b610a211b8c435480c0c5049c43e8", + [99] = "3b6b57e41ce79a1519a42b97e4840c53", + }, + }, + { + .p = "e74738af4ed4cdd4b646d73096a2ccc1", + .first_non_square = 73, + .sqrt = { + [0] = "0", + [1] = "1", + [2] = "6ac4647c98cf7af7efe36371c9840eaf", + [3] = "21f4d6a5034093c1707e59226887fd48", + [4] = "2", + [5] = "548a6d10aee79ac83c925efab62b6a1b", + [6] = "67066dfb891738c460a2e75221d367c5", + [7] = "1953c6191d849b93d1aab79fa4cda95", + [8] = "11be6fb61d35d7e4d680104d039aaf63", + [9] = "3", + [10] = "180026ae5dbe974e7eb06b324927eaf0", + [11] = "1f9a4dff72cd9019164b73b04505333c", + [12] = "43e9ad4a06812782e0fcb244d10ffa90", + [13] = "643262a816c65c4721ec5f69b3669844", + [14] = "233636554b325c46cbad926a62d900d6", + [15] = "2b886afec0a6d18648114e84a91330c4", + [16] = "4", + [17] = "25046e4d32a4c22cb9f8afba3f3ceffb", + [18] = "5905f4c67b99a31319635324c5e95f4c", + [19] = "369e8c7fda6cf7c0d54f91eff4932e14", + [20] = "3e325e8df10598443d22193b2a4bf88b", + [21] = "70a98d624f107a23b9291ed17c65e708", + [22] = "48e20c07cccf03cc10d026cd8f1ef8d8", + [23] = "39ac71be3dfc7f2469a7df772ca4a372", + [24] = "193a5cb83ca65c4bf501088c52fbfd37", + [25] = "5", + [26] = "8c353e6ed18c48d8d54754f51d9522", + [27] = "65de83ef09c1bb44517b0b673997f7d8", + [28] = "32a78c323b093727a3556f3f499b52a", + [29] = "4ec6fa6a98995394f71e0b2207f371a9", + [30] = "13107997fc19873b1902a2a615da9376", + [31] = "51dc60db382d37d1cd141b86b4154757", + [32] = "237cdf6c3a6bafc9ad00209a07355ec6", + [33] = "25640e49e12fb784a6ac33b6d27d6e77", + [34] = "25f4ab6cd383cb4026bffd362b15d7f", + [35] = "411f7f296f7fac0ef30960fd99f42d43", + [36] = "6", + [37] = "2feabe9655a9641a8fa1f87f22531049", + [38] = "720bb70b21823e069d150e3e64d26b7b", + [39] = "177beb203ec9b72d675ca269eab76fd5", + [40] = "30004d5cbb7d2e9cfd60d664924fd5e0", + [41] = "382967f0e5f5feb1984360723a0c4f82", + [42] = "22468c3c9efc7faffb5d3e8dd251fc40", + [43] = "2de84badd9bff0944b460f3b8d0458e", + [44] = "3f349bfee59b20322c96e7608a0a6678", + [45] = "16580e82bde20283ff7045bf8bdf7190", + [46] = "456c8f05a1da32e653cc5b839fa9b9e3", + [47] = "1092ae6dfcff9bf2b3292f357aca1c05", + [48] = "5f73de1b41d27ecef44d72a6f482d7a1", + [49] = "7", + [50] = "474785105e63cb2e42e342d7c24eafe9", + [51] = "4b16b51a17a20de39e3f2a36fc8c9abd", + [52] = "1ee2735f21481546726e185d2fd59c39", + [53] = "2be013c5a5285182d8f04af39b1d6fef", + [54] = "4dcc11434c70dc786ba1dec5ced76a8e", + [55] = "542fb8ff09b332e95786de3e3ec8a568", + [56] = "466c6caa9664b88d975b24d4c5b201ac", + [57] = "5a3d33318760312855953f24bffd9ced", + [58] = "469159fcdc46912a4e3fcab24a5ef2ac", + [59] = "25635a436530a1238a7f4b2f0025e32b", + [60] = "5710d5fd814da30c90229d0952266188", + [61] = "3deb808b5ad9f2cb409d268e094918af", + [62] = "2dbc7a4f609cc9466560d9177a45bfbb", + [63] = "4bfb524b588dd2bb750026deee68fbf", + [64] = "8", + [65] = "235c214fd9dc61623c9955f87db2b12", + [66] = "463c486bc87316cf7424a483bf537d38", + [67] = "41be254c0da85d290b883c6b08421178", + [68] = "4a08dc9a6549845973f15f747e79dff6", + [69] = "1632bc546d2fa40a63b66c9c0b10399", + [70] = "1de0640a5afe477f5b35616ff7a4cf41", + [71] = "52b9f4585f7d01646e479ec08cff289e", + [72] = "353b4f2257a187ae838030e70ad00e29", + [74] = "233e33da1bb170db78a61f5463dea41c", + [75] = "3d7f07763e91eb0d83cf19848bfada59", + [76] = "6d3d18ffb4d9ef81aa9f23dfe9265c28", + [77] = "a8291ed9a50df270c807f51fd931ec", + [78] = "10d7025482f44ccf3b15f625e68fa814", + [80] = "6ae27b936cc99d4c3c02a4ba420adbab", + [81] = "9", + [82] = "10a7130308b2012359b349defd48bb7c", + [84] = "5f41deab0b3d98d43f4998d9dd6feb1", + [85] = "593575a6c6f3d3defc4139e083a23789", + [86] = "14bb748ced6ace4ce9ba942b124e9978", + [87] = "54085d04c4746201ca5df23ce9c207b8", + [88] = "5583209fb536c63c94a689957864db11", + [90] = "4800740b193bc5eb7c114196db77c0d0", + [91] = "3ccce2be9baf4d2f5575efc5d8bcaf5d", + [92] = "7358e37c7bf8fe48d34fbeee594946e4", + [93] = "5f7b21557f767e363b43f867baf4921c", + [94] = "25f9463099ba6747ef039591b8a24142", + [95] = "618ad1c02988e0f3f4ecc2dff670aac2", + [96] = "3274b970794cb897ea021118a5f7fa6e", + [98] = "3589155a412df3496c63328abeb40086", + [99] = "5ecee9fe5868b04b42e25b10cf0f99b4", + }, + }, + { + .p = "d3a1b64e241479381932df4745621009", + .first_non_square = 53, + .sqrt = { + [0] = "0", + [1] = "1", + [2] = "3256df5d0e4054ee1c708a8c2a94ce21", + [3] = "1aceb5e620540ea3c8e28ff09e65a03e", + [4] = "2", + [5] = "4a920722c3d286a0acf498eb88a17407", + [6] = "59c0e022516ddfc6f750aed84fc5ae70", + [7] = "123de903d6dc595ff3db324dee5f1a27", + [8] = "64adbeba1c80a9dc38e1151855299c42", + [9] = "3", + [10] = "10fb193db4a2e4fb1183cb7aa4488898", + [11] = "f4ee6591467dcf7223ee39a1828d8a6", + [12] = "359d6bcc40a81d4791c51fe13ccb407c", + [13] = "3259920bf856147b6d524ea42d74cd0d", + [14] = "5a72ba66b8b0b50d7dfc78997218456f", + [15] = "41028b2be43eda537b3de57589b190bf", + [16] = "4", + [17] = "62de61e0af734f1d89f10bc4ac9ae273", + [18] = "3c9d1836f9537a6dc3e13fa2c5a3a5a6", + [19] = "4eacea5adabc97af905b65f1f32a67d6", + [20] = "3e7da8089c6f6bf6bf49ad70341f27fb", + [21] = "665de344f793cfcf0d8851eeaa979209", + [22] = "4ab0fe70c9af2e359407cfb7a9284d2e", + [23] = "55a3bad41617c6c316d63b172d065de3", + [24] = "201ff6098138b9aa2a918196a5d6b329", + [25] = "5", + [26] = "13519dc6a212b6970dbdfa5c48317dde", + [27] = "506c21b260fc2beb5aa7afd1db30e0ba", + [28] = "247bd207adb8b2bfe7b6649bdcbe344e", + [29] = "a108bd629d894d7d4ae6b94fc533244", + [30] = "25de096124247dca639e5b4bdb451969", + [31] = "3d7f485499372a399679f8a3ad2cb393", + [32] = "a4638d9eb13257fa770b5169b0ed785", + [33] = "63142ce93321793c61bc51c04ef70535", + [34] = "ddef86ef8e2539ebeca14b526f44b5", + [35] = "4ce13194f399e69fa318bb4bb8f7ea7b", + [36] = "6", + [37] = "9228193d6c0e38073c07cdf448de5ee", + [38] = "11c081d52a1f27b9dafd424384c59554", + [39] = "5006ac3ae7fc06103b81937bc75a2b33", + [40] = "21f6327b6945c9f6230796f548911130", + [41] = "3f455b8cd2f901c587b0598a682b583f", + [42] = "1df60d29d9e20a850f71ff40123437c1", + [43] = "2382b8ce194e6c36c92a0b3faadaaa52", + [44] = "1e9dccb228cfb9ee447dc7343051b14c", + [45] = "c145f1a27631aa9edaaeb7b54824c0c", + [46] = "671467f745d92daf13ebb67ecf24fca3", + [47] = "264506f56045c3502ef62170be528551", + [48] = "6866deb5a2c43ea8f5a89f84cbcb8f11", + [49] = "7", + [50] = "2810a683232d2f6e74ffd5758f85f69c", + [51] = "1ebedbfc86ece8fe5b90062a149969f8", + [52] = "64b32417f0ac28f6daa49d485ae99a1a", + [54] = "39a0ea18d035261cccbf2d41a9eefb47", + [55] = "694639a2f3d08884ecb2affda5ee61e3", + [56] = "1ebc4180b2b30f1d1d39ee146131852b", + [57] = "5d2cec4ee0c2ce79bf81a15df81ceb4f", + [58] = "2ce9fcc748ecf7848e9dcf2211e67206", + [60] = "519c9ff65b96c49122b7145c31feee8b", + [62] = "12685eaa555f8cb49a90178a0a6015fc", + [63] = "36b9bb0b84950c1fdb9196e9cb1d4e75", + [64] = "8", + [65] = "4de278e7a145b79c2419db6e07e791f", + [66] = "379ddde1c4ac6a9e5ca97ef7aba7a6c", + [67] = "37c6a10abcd0fe2aa60f330f989550ca", + [68] = "de4f28cc52ddafd0550c7bdec2c4b23", + [69] = "2769cef201b1aac7821d582d2d2e8780", + [70] = "639e469a7c754f5cd697dab32f90d07", + [71] = "2c68191bf87dfe5cef79f5f62b726623", + [72] = "5a6785e0316d845c91706001ba1ac4bd", + [73] = "3a6fe5f9d81eb2fe4353d17adde7346f", + [74] = "1576149deacfc14d26864a3cc3e17600", + [75] = "4d9828cf827030052cc60f942d65eed3", + [76] = "3647e1986e9b49d8f87c13635f0d405d", + [77] = "630c6e7117790a971af1517d57363f28", + [78] = "6856e68603816f2c27fdc4c7d5016934", + [80] = "56a6663ceb35a14a9a9f8466dd23c013", + [81] = "9", + [82] = "59830bfb04b7677115c088282226682f", + [84] = "6e5efc434ecd999fe223b69f032ebf7", + [85] = "59925907902ef6ef57cd520278a260c5", + [86] = "632a92f87db0fc76ab82a2d352768c19", + [87] = "16d7959610ea9badc85fb36603a94879", + [88] = "3e3fb96c90b61cccf1233fd7f31175ad", + [89] = "13088ca71d4342c41581472612636828", + [90] = "32f14bb91de8aef1348b626fecd999c8", + [91] = "5c0a55b7b9d58943b809015a4aa020ff", + [92] = "285a40a5f7e4ebb1eb866918eb555443", + [93] = "1592a85e0341d9c9825096e1976e192b", + [94] = "2fb36c59090a20bbaa092c8aa8992ac2", + [95] = "2e74a563b5f9c6a6b01d52288f9c0d6b", + [96] = "403fec13027173545523032d4bad6652", + [98] = "46e35110e4669fed6b51f4b960b27d2b", + [99] = "2decb30b3d3796e566bcaace487a89f2", + }, + }, + { + .p = "d7da4ea4510511593950179f8f711349", + .first_non_square = 59, + .sqrt = { + [0] = "0", + [1] = "1", + [2] = "959d1dbbc442f0c03fab00d7b74bc39", + [3] = "54011c029cc999cc59490b7ee97eeab5", + [4] = "2", + [5] = "27a5f203b507150a1470c9475067a7a9", + [6] = "5b106a2f61672bff1fc84537031bb8bf", + [7] = "c1c26a4d8728d54300851fec2a6c397", + [8] = "12b3a3b778885e1807f5601af6e97872", + [9] = "3", + [10] = "5454e217bab81e821a0b173196678210", + [11] = "1682f9cf7225b6fd06af37171fe3fde1", + [12] = "2fd8169f1771ddc086be00a1bc733ddf", + [13] = "217f7c4618539196631e3abcf5fe454d", + [14] = "46176a55e55c6e8920b06a348e37c612", + [15] = "43fc3e63a8bbe3e9e702986f4f1ed133", + [16] = "4", + [17] = "19453763a8648666e6d09e4de90b0333", + [18] = "1c0d759334cc8d240bf01028725e34ab", + [19] = "119bcbb7bff3e1badada7f4d83e36e67", + [20] = "4f4be4076a0e2a1428e1928ea0cf4f52", + [21] = "1d5498842ef5c553b8ef2d356bcc6eab", + [22] = "15b78a01b3f6097e3cf9b453f141e9ed", + [23] = "980e6f8411b4639e84cd6c712a9cba1", + [24] = "21b97a458e36b95af9bf8d318939a1cb", + [25] = "5", + [26] = "20dcca93e1306a7f700b99170fbce6c7", + [27] = "242905638557bc0bd28b0add2d0bacd6", + [28] = "18384d49b0e51aa86010a3fd854d872e", + [29] = "5a6e09373884c6bfa72122a486a177b3", + [30] = "12e5df3ef102359d598724a0811ba203", + [31] = "5c85b8dbe7a3ff15fcc9eb57067b82bc", + [32] = "2567476ef110bc300feac035edd2f0e4", + [33] = "6b8e76260fca9eefcef94f3f2d12200f", + [34] = "3b36f3d67d8463ece78ac1e3396d148e", + [35] = "394b72ee77c8734547637275946556da", + [36] = "6", + [37] = "4b64318604f4ae445368e8876704e136", + [38] = "c3a81ce44aaa2db666a3d16b0201d09", + [39] = "1e45b92f0be82f1042ad3fe274ff0c88", + [40] = "2f308a74db94d4550539e93c62a20f29", + [41] = "3e9c285ed90c12fe79cf4ba4128f6185", + [42] = "2025ee1dd9e72c7313b99e9f1c90d856", + [43] = "3a3dbbf0e96a1a3ce316b144b7826682", + [44] = "2d05f39ee44b6dfa0d5e6e2e3fc7fbc2", + [45] = "60e8789931efd23afbfdbbc99e3a1c4e", + [46] = "fee50de01be07f792ac6f5b9b5de4b7", + [47] = "8b0f0ef7048f8d3e4c9ba6d4ef80f6f", + [48] = "5fb02d3e2ee3bb810d7c014378e67bbe", + [49] = "7", + [50] = "2ec1194aad54eb3c13e570436947ad1d", + [51] = "17e29b58202c9cefddc75b5fafc7e372", + [52] = "42fef88c30a7232cc63c7579ebfc8a9a", + [53] = "3a0c58a5ec20f119c262f12ae5183157", + [54] = "3956efe9d33072a42608b80579e216f4", + [55] = "2be21c25e83850a25db71abbc4a48100", + [56] = "4bab79f8864c3446f7ef433673018725", + [57] = "5386749f14c9429c39b8d9d424f075b5", + [58] = "360395662a2d98180968961c84e61588", + [60] = "4fe1d1dcff8d49856b4ae6c0f13370e3", + [61] = "4238404aca0d8514e461aa1b212a5af6", + [62] = "629800208ccbf1d82b7b1b43ec19118c", + [63] = "245473ee8957a7fc9018f5fc47f44ac5", + [64] = "8", + [65] = "6b2bef42c7770064af9022b31d103d5c", + [66] = "20454e81a6a03a241dbc136180e8c664", + [68] = "328a6ec750c90ccdcda13c9bd2160666", + [69] = "160e654845d6518f69ca871d43a32123", + [70] = "1bb310d630d1bc146d36acc51d7abf11", + [72] = "381aeb2669991a4817e02050e4bc6956", + [73] = "472e264b5e0edc8ec4a88d77a050dc04", + [74] = "49a4a35f203f4e4d29034e654752f75", + [75] = "baf113b921a21b4b432f5c48f679109", + [76] = "2337976f7fe7c375b5b4fe9b07c6dcce", + [77] = "28caa6a79c150442aa8ad26a6a293d6b", + [78] = "1ea04d76bcb64865c84cbabc0eef714b", + [80] = "394286957ce8bd30e78cf2824dd274a5", + [81] = "9", + [82] = "f4596207cde9bd65f928c1c6ad96fe", + [83] = "56f024a084a7418b7fbb56a3398cdf40", + [84] = "3aa931085deb8aa771de5a6ad798dd56", + [85] = "5f4260a2d155f008378db93f90204793", + [86] = "140253b4201d75301a986809baed51d8", + [87] = "f5d00583106340970471bc36ca2d0d7", + [88] = "2b6f140367ec12fc79f368a7e283d3da", + [89] = "6adb209ecb5bcd002bef5b6bee7f253a", + [90] = "252457a2df234a2d14d12df533c572e7", + [91] = "1c21f090707344b4d211c183e4e5bd60", + [92] = "1301cdf082368c73d099ad8e25539742", + [93] = "4c8047a783cda4682655dc2f757b35bb", + [94] = "6eaa3447c9e7a4f0b0afe99836c88ee", + [95] = "69c7233d4237d40d65ac836ac27e305a", + [96] = "4372f48b1c6d72b5f37f1a6312734396", + [98] = "4174bd0225dd49541bdad05e6031258f", + [99] = "4388ed6e567124f7140da5455fabf9a3", + }, + }, + { + .p = "e4ad8bf1a7b946d591595a7347b15f71", + .first_non_square = 53, + .sqrt = { + [0] = "0", + [1] = "1", + [2] = "4c49d878822cfbe76fb4b402caaed4fd", + [3] = "3c37757e7487b01dfbc37216d844db99", + [4] = "2", + [5] = "5aeece5c7ed9ca8c1ed52da45babc777", + [6] = "40713762535e9a0c57f602473ff52998", + [7] = "3ecda635990f5dea2acb9b1a9fdefbf5", + [8] = "4c19db00a35f4f06b1eff26db253b577", + [9] = "3", + [10] = "91ce7bde461ea19843dc9847de90e4", + [11] = "125b241be577156bc1797be7208ee62b", + [12] = "6c3ea0f4bea9e69999d276459727a83f", + [13] = "425700a36490fb859641b2b08a7eae0a", + [14] = "10f1f9d70043a045d55a6d116c2a6f31", + [15] = "469981b6614fca719735f3d6d9dcb656", + [16] = "4", + [17] = "72796d6db8598786ae34c9df885233b", + [18] = "2ffd77decdace0bdc4c195185b1f86", + [19] = "1dcf29a92bb5b16be3ff967d956e78c1", + [20] = "2ecfef38aa05b1bd53aeff2a9059d083", + [21] = "417e0eec0ee9eab8893e2c6432f1410f", + [22] = "65551d126459325ddff4e27e0e154850", + [23] = "3394ef48c3876261e519f07c5cc22838", + [24] = "63cb1d2d00fc12bce16d55e4c7c70c41", + [25] = "5", + [26] = "10772742d4d9fbe450d15ef5ffc3fe71", + [27] = "30072b764a22367b9e0f042ebee2cca6", + [28] = "67123f86759a8b013bc2243e07f36787", + [29] = "5cc3d6327e652a41154770644a38b969", + [30] = "4ad60c254ddec972fae777b256a7c5d5", + [31] = "2e00a145ed5a04009a8355499ce70919", + [32] = "4c79d5f060faa8c82d797597e309f483", + [33] = "5cf3346d66af0589ba6cc2ca64333c79", + [34] = "4a3aaa0b4b8c6ede15bc17190bdada64", + [35] = "71363966ddc55278fda04d8b9c1ae94b", + [36] = "6", + [37] = "1b3a4a911ed3a3c94924fa36bb0b2ee9", + [38] = "28e73aa747bd0f9c9a9bc913df016115", + [39] = "6f8a1ed7db16005ca5df3eddb25eacbb", + [40] = "1239cf7bc8c3d433087b9308fbd21c8", + [41] = "6a7533c0bc1acd73a3b48be478dd13a2", + [42] = "9e55812741e9524ca166ce7bff9be9e", + [43] = "6244c591bd3277fca7ec50e93b69221c", + [44] = "24b64837caee2ad782f2f7ce411dcc56", + [45] = "2c1edf23d4d418cecb262e79cb51f6f4", + [46] = "e3c5e20bd259295570a71eec9ecd768", + [47] = "4cf99eaa49470e4938c90a22bc4ccb88", + [48] = "c304a082a6579a25db46de819620ef3", + [49] = "7", + [50] = "4be9dd88c491a225f42b30d899f895f1", + [51] = "3467e2afaf03823c26a922d43928cc08", + [52] = "5fff8aaade974fca64d5f51232b4035d", + [54] = "2359e5caad9d78b08977539d87d1e2a9", + [55] = "bd103977e456b841e966a74aad0e057", + [56] = "21e3f3ae0087408baab4da22d854de62", + [57] = "2c4fbdbb74128aab91bd39e1913a3f27", + [58] = "3371407d6491e3ec1977f1b775823de2", + [60] = "577a8884e519b1f262ed72c593f7f2c5", + [61] = "3ee45bf8835e5badafeb6df43185f5bc", + [62] = "56cb5291a6e682ffcaf3ff8b4150c72e", + [63] = "28449950dc8b2d1710f6892368146b92", + [64] = "8", + [65] = "143912b856d247f8c39d24c1c062491", + [66] = "3c15ad8b379ebaff4763bab01a9bcda9", + [68] = "e4f2dadb70b30f0d5c6993bf10a4676", + [69] = "635cd56cb6cb00cf27fa36b7aedfbc53", + [70] = "43c04f20e4e9ac170210fc23ab9c2dc2", + [72] = "5ffaefbd9b59c17b89832a30b63f0c", + [74] = "bfdaba577a3472dd49bfd77fd19918f", + [75] = "4867bf869eed29c05977dffef1a6ea8c", + [76] = "3b9e5352576b62d7c7ff2cfb2adcf182", + [77] = "2006ed422b0a69dc4d57d750f38d34ab", + [78] = "4b050d62afd87d0f33db026adbb1c115", + [80] = "5d9fde71540b637aa75dfe5520b3a106", + [81] = "9", + [82] = "b0dc8230270044d0edf3ab1ad97b16d", + [84] = "61b16e1989e571647edd01aae1cedd53", + [85] = "46e0143233ee83c76c0b13168f19a07a", + [86] = "52a1b3caadecf3720ef1d80d467e74bc", + [87] = "14589812286e6d6f123be7173952a95c", + [88] = "1a0351ccdf06e219d16f95772b86ced1", + [89] = "539cf0fd123cf0a349f1fa6ffdfc4a68", + [90] = "1b56b739ad25be4c8cb95c8d79bb2ac", + [91] = "5662acc7560be428cb14e9cc5a4e2128", + [92] = "6729de91870ec4c3ca33e0f8b9845070", + [93] = "5cb5d378c21458c2912dd06deb1a7735", + [94] = "552aec748d185891ca356d1379aed772", + [95] = "4fc9e390534febdb6c6ec3fea343b79c", + [96] = "1d175197a5c1215bce7eaea9b82346ef", + [98] = "4ca9d3683fc855a8eb3e372cfb651409", + [99] = "37116c53b0654043446c73b561acb281", + }, + }, + { + .p = "cbcabb1f226a0c65460ae623608b1ad9", + .first_non_square = 59, + .sqrt = { + [0] = "0", + [1] = "1", + [2] = "20aa56375597d8cdab6a03b709d4a278", + [3] = "49d44e3b109e23292d3d13445b9b8eea", + [4] = "2", + [5] = "1e0e210eb335cae047c35d767f674637", + [6] = "625c5c0f38eca85e2ecb80174fa4a95e", + [7] = "3745673b54e841a6a4fb1a8a3759b8bf", + [8] = "4154ac6eab2fb19b56d4076e13a944f0", + [9] = "3", + [10] = "4f0396e7b9df52bac992b43575c33c35", + [11] = "4d679981c0acbe4a8e305ca2cc963ef9", + [12] = "38221ea9012dc612eb90bf9aa953fd05", + [13] = "6596f0c8f4a91c4a17e751f02c81a82f", + [14] = "20d6292a2fdef5fadd66420ecd85cbd3", + [15] = "266647395842faa57f249c38db0f1eb1", + [16] = "4", + [17] = "3cba2f5354d5ba2192012e780019d728", + [18] = "61ff02a600c78a69023e0b251d7de768", + [19] = "577f304041afec01a5c075ab05175217", + [20] = "3c1c421d666b95c08f86baecfece8c6e", + [21] = "28429bbbd4c6513ad4f08b5ea351f8a", + [22] = "29cf35616a805dd926e7cdcbe6d63680", + [23] = "55d452f7467ccbaa62afc2985787cf17", + [24] = "7120300b090bba8e873e5f4c141c81d", + [25] = "5", + [26] = "29e4c4e321eced80ec26e6133bf20af6", + [27] = "11b22f920f705d1641ac53a9b24791e5", + [28] = "5d3feca878998917fc14b10ef1d7a95b", + [29] = "5b4b3eed097bd01db9cd0c7a288b56c3", + [30] = "3575cde15467aaaae6e0187e24d6d2ee", + [31] = "5840337f0dc69197ea45a3a340700304", + [32] = "49216241cc0aa92e9862d747393890f9", + [33] = "54002bd7d536884838b4eeda47283774", + [34] = "4951e9a1bd020bb682f868df70b4bfbc", + [35] = "376b66fcc1a223932d2b34a06781ff17", + [36] = "6", + [37] = "3f93f4d11e213ad8cdab598763039e7b", + [38] = "324d3ab2b47ec5393ef6070e5374bb34", + [39] = "261e82ec98f3c07d5dc28a1484db4146", + [40] = "2dc38d4faeab66efb2e57db87504a26f", + [41] = "1976a2ea6012d0647da3523808d36740", + [42] = "42de54dbb74f15f8e3186afc44a48501", + [43] = "4f751abc9fe3a2f84f1ccb3fd63bd3f6", + [44] = "30fb881ba1108fd029aa2cddc75e9ce7", + [45] = "5a2a632c19a160a0d74a18637e35d2a5", + [46] = "494db3f0b07d25c8a30faeec07f9b5e8", + [47] = "182d2c235507872a1e99c776b83ccfbe", + [48] = "5b867dcd200e803f6ee966ee0de320cf", + [49] = "7", + [50] = "28770c0a7672d060ecf8d3902f63ee81", + [51] = "d05c776625315a66187a12849c70f79", + [52] = "9cd98d3917d3d1163c42430787ca7b", + [53] = "286f9d986059b7f9938b43ead8c8d654", + [54] = "5b4a590e885becb546579a228e62e141", + [55] = "51aa04d6a5d11b6edc1a6fe2233eee6b", + [56] = "41ac52545fbdebf5bacc841d9b0b97a6", + [57] = "5aa5e71f1dfc8b3cc0e026612f7e1fb6", + [58] = "35533f553747e464072c4440bac52a0e", + [60] = "4ccc8e72b085f54afe493871b61e3d62", + [61] = "24551bf46096d057148ef425467a9ba9", + [62] = "3e52033154f120b235978178d647c143", + [63] = "25fa856d23b1477157199684ba7df09c", + [64] = "8", + [65] = "563a6e8eb33b076dbe065396eb315574", + [66] = "5e864cca82f747ea276994780ac8a19d", + [68] = "52565c7878be98222208893360576c89", + [69] = "5ce922cd0c1b446c1e4ca6c4e0f24df8", + [70] = "11f934d12f2ffcc38b0a891a84025b50", + [72] = "7ccb5d320daf793418ecfd9258f4c09", + [73] = "52a7a870244bba2a55519bf744ebed05", + [74] = "ad23956ae428025f0a0257bf2dda72f", + [75] = "266fef16f1bd68fca9e46bf0f70c6b20", + [76] = "1ccc5a9e9f0a3461fa89facd565c76ab", + [77] = "14072fe6875f3477f254a09d386e4654", + [78] = "38f4c4a6b86698a0480425b350bdbebe", + [80] = "539236e45592e0e426fd704962ee01fd", + [81] = "9", + [82] = "3f7b778244278ec4835d885d4839b2b4", + [84] = "50853777a98ca275a9e116bd46a3f14", + [85] = "22d770096f8b019cc1dbe271c8d798b8", + [86] = "50718b1afe946781b22c7ce102fd4243", + [87] = "50259cceac8c1f8b42544d960fee46fb", + [88] = "539e6ac2d500bbb24dcf9b97cdac6d00", + [90] = "214009980b33ebcb16ad367d00be99c6", + [91] = "2df48de5831087e5fa6d5f4b545beb59", + [92] = "202215309570751080ab60f2b17b7cab", + [93] = "384da52f8b0dd624357002ef2753ab23", + [94] = "2d9c483316aab53053292ffc1364a199", + [95] = "17d3a3a478758dcb2d715b6a6c291770", + [96] = "e24060161217751d0e7cbe98283903a", + [98] = "18dda06434bce13a69db33dde445566f", + [99] = "1c6c11661f9c2e7a64862fc50537a212", + }, + }, + { + .p = "fe4140ab1703f4636f45c48bfb0068a1", + .first_non_square = 53, + .sqrt = { + [0] = "0", + [1] = "1", + [2] = "7ba6780b0fed766515a7f52780bc9293", + [3] = "6149de094ae83131a239de5a6df50f3d", + [4] = "2", + [5] = "8e08f47c68cea90d366ed88b052dc0d", + [6] = "712eb140f38d2eda5c637e54d10bef43", + [7] = "647ecb433b6c7bac3b1d2f9d6054d0ba", + [8] = "6f45094f729079943f5da3cf987437b", + [9] = "3", + [10] = "329e80ca3b64fa4f1155f9c270b8f4ce", + [11] = "24c5b58cbd45b14e27fb39d98513e861", + [12] = "3bad8498813392002ad207d71f164a27", + [13] = "30b405638cc9503430b6aa41495bb61", + [14] = "2f1bc9fc42ecee2906bb9cb2c4b48844", + [15] = "1060959a729316d3567679f61abc49af", + [16] = "4", + [17] = "2743cff56b8c8f8ee97f7446ae99739e", + [18] = "74b2277618c46ecbd1b21aea87354f18", + [19] = "3fbbfcdfd2487c9b851129505f179076", + [20] = "11c11e8f8d19d521a6cddb1160a5b81a", + [21] = "6fc009527f629afe432b1f4f1e4b1fea", + [22] = "3f01ff2d6c6d833d28056e6072b25e60", + [23] = "506f5b0f98fa595bed0cbc10ab7c5ee5", + [24] = "1be3de292fe996aeb67ec7e258e88a1b", + [25] = "5", + [26] = "10be4164d8254ac55662322c7ddcf6fe", + [27] = "259c5970c9b49f317767d6834edec516", + [28] = "3543aa24a02afd0af90b65513a56c72d", + [29] = "5e4f3f1a728ca81e0562ea16d3b3cffd", + [30] = "5f7adf9503c5bf6b2ed871ee578d7f7f", + [31] = "5a732eeb6c03d753dce4cbca35427431", + [32] = "de8a129ee520f3287ebb479f30e86f6", + [33] = "515718e3cde407eb2f1f134140cb21fe", + [34] = "58f96aeb670e2022511ae47d9ecba760", + [35] = "7b8229e2856880ab02cd93d5da144228", + [36] = "6", + [37] = "6b81b8e27b6cf32c0457ca6fdadea755", + [38] = "b8e8b04539168fe235d3def1490dad8", + [39] = "15bf17346ca8088e3cce95dfb9c418f7", + [40] = "653d019476c9f49e22abf384e171e99c", + [41] = "70c50f028034d998186c4fa9b24ec776", + [42] = "4025367c12a3595db005c840e28fca2f", + [43] = "10bd851db1dbc8acea1e2f5c9a539027", + [44] = "498b6b197a8b629c4ff673b30a27d0c2", + [45] = "1aa1add753a6bfb27a34c89a10f89427", + [46] = "2f0c4d81e381d9b019bf8094b3eecee6", + [47] = "15534147c6ebf56b2ecc5c10e0770e14", + [48] = "775b09310267240055a40fae3e2c944e", + [49] = "7", + [50] = "6dbdd6e1219b67328dbc40ad8dae0b9d", + [51] = "70e70926d41fd03e102a5a44ce1229f9", + [52] = "61680ac71992a068616d548292b76c2", + [54] = "554ad317c3a3982ba5e4b67278236528", + [55] = "1459f9f6ec22944520f4871412088d85", + [56] = "5e3793f885d9dc520d77396589691088", + [57] = "341ef10187760d3c36d527145b4ad817", + [58] = "529922ce1cc858cb8a2b30f4684aa9fd", + [59] = "37be2dfe9028978862327c01c89586e2", + [60] = "20c12b34e5262da6acecf3ec3578935e", + [62] = "6ecd16e975917832f0959b6c9542da42", + [63] = "2f3b211e9b417ea14211ca4c25fe098d", + [64] = "8", + [65] = "7345a2c482c5a9588f299989ac40ecad", + [66] = "18770759a8b2f26d1a24dba6c2d52a07", + [68] = "4e879fead7191f1dd2fee88d5d32e73c", + [69] = "3a0988799c07916f61906d56b5afe5ec", + [70] = "1d94b3814a59d9cd691f356c42e05881", + [72] = "14dcf1bee57b16cbcbe18eb6ec95ca71", + [74] = "1d13c613cdf866cb5b13e4a51dc7ebe3", + [75] = "16112b27b77ef2ceb36a3153d0378511", + [76] = "7ec946eb7272fb2c652371eb3cd147b5", + [77] = "3ea093d7619691c048b296bdc0d37662", + [78] = "3af49044c061c8aad58fc0604c081c2c", + [80] = "23823d1f1a33aa434d9bb622c14b7034", + [81] = "9", + [82] = "21662760541dd24c3115bfa4f0b2f76d", + [84] = "1ec12e06183ebe66e8ef85edbe6a28cd", + [85] = "34b4035b5edce75b16326453cc7b7c59", + [86] = "67f099b3ac6c1e2285f800c1169f3e74", + [87] = "28d2792fa43528197df02a2ab64f10b4", + [88] = "7e03fe5ad8db067a500adcc0e564bcc0", + [89] = "131cea5295f0f890d408cd55292baa9a", + [90] = "6665be4c64d505763b43d744a8d58a37", + [91] = "6166d2bbeaabb0fc8f2a7f54155dba4c", + [92] = "5d628a8be50f41ab952c4c6aa407aad7", + [93] = "5d9415660fcce03cc4807ceb85b729c0", + [94] = "63b43ba1ab89508e123048325aa02be5", + [95] = "453ec81c6776384522e1ecda1b6ddee5", + [96] = "37c7bc525fd32d5d6cfd8fc4b1d11436", + [98] = "66c9864c2a725f9949c666709426c822", + [99] = "6e5120a637d113ea77f1ad8c8f3bb923", + }, + }, + { + .p = "c952099317697fbee819206f51261769", + .first_non_square = 61, + .sqrt = { + [0] = "0", + [1] = "1", + [2] = "1030ca5f555429e4df1a0364d52ed574", + [3] = "1c008a94d898f5934cc6768dc4aa9e7", + [4] = "2", + [5] = "6453a0cada2df423a5cadbfdb1f7a43a", + [6] = "4ead969961f9970cc0957f4c1997a2eb", + [7] = "9516aa771b15128eb5879ba5cbbcb6c", + [8] = "206194beaaa853c9be3406c9aa5daae8", + [9] = "3", + [10] = "218b5770aff5df5ee5dea41f84d956f8", + [11] = "2e5ad00f8babb3bf597470ccdefa6904", + [12] = "38011529b131eb26998ced1b89553ce", + [13] = "5b7093eeeaabe2273d89ed1269e95a8d", + [14] = "150e9ff34aebd4279f3f194d0b008b9a", + [15] = "52f554395146f4e92284fd0195f3da81", + [16] = "4", + [17] = "e87f72fca45eea33de5b19bdc8598a6", + [18] = "30925f1dfffc7dae9d4e0a2e7f8c805c", + [19] = "dbbf4eb69d3d3d80113b9c179dbdf14", + [20] = "aac7fd630d97779c836873ed36cef5", + [21] = "343a4efea6c533ef26fbc9c0455bba4b", + [22] = "561d91e30353cd92dad551df29b34330", + [23] = "1c46770900025779e503a37fbf3652f", + [24] = "2bf6dc60537651a566ee21d71df6d193", + [25] = "5", + [26] = "d8061aede379d718c4477b0c72eeb0b", + [27] = "54019fbe89cae0b9e65363a94dffdb5", + [28] = "12a2d54ee362a251d6b0f374b97796d8", + [29] = "1a00dd8133c4574015541507f34fa2a2", + [30] = "354823c12c93d938a6150ca543c49001", + [31] = "2c50d713847df4e0e6c8092bbb7ff748", + [32] = "40c3297d5550a7937c680d9354bb55d0", + [33] = "1dadd4e7aed55d1dee86fa9fbec2b5f9", + [34] = "495c10a814ec41ca882fd0a3db20dae0", + [35] = "e02ae2c2ae827bcbcb8d5cee71ce245", + [36] = "6", + [37] = "48666c8d4ae91cdb3baa3faaf209f863", + [38] = "1348689ee8394ec3c373f58427071294", + [39] = "22ebc3a88ac979c4cb232cb96ef56c3d", + [40] = "4316aee15febbebdcbbd483f09b2adf0", + [41] = "5d6e17005c737be1d08b4c361e7c38aa", + [42] = "63bdca4c2bc7704338cb6b9040f977bc", + [43] = "bbcd28418772487d60fa0e99ee30f4e", + [44] = "5cb5a01f1757677eb2e8e199bdf4d208", + [45] = "63a8d8cd77205cac09477389c4c0d545", + [46] = "27626a82bfa70599fc17246961bdadd0", + [47] = "e64fa81b1411430a01be20a26516d3", + [48] = "70022a536263d64d3319da3712aa79c", + [49] = "7", + [50] = "50f3f3dcaaa4d1785b8210f829ea2b44", + [51] = "4573f3634cf8d8277095b591bba6eb32", + [52] = "1270e1b54211bb706d05464a7d53624f", + [53] = "4b910f3075773d693fc6320490320417", + [54] = "22b6ba390e83456759a75d74fba0d158", + [55] = "43d64c3a87c506ed9f669fb02a34490f", + [56] = "2a1d3fe695d7a84f3e7e329a16011734", + [57] = "f9eab4f7d57e3626e924cb0a2ed38d1", + [58] = "2c268106581c388b69a240d04f41ddb3", + [59] = "5468c6518f3cc44a8b95e3bebafe1160", + [60] = "2367612074db95eca30f266c253e6267", + [62] = "45bc5f2b116bb2147e21226906d83f5e", + [63] = "1bf43ff65513f37ac2096d2f16336244", + [64] = "8", + [65] = "3a05b5275ba2635e914620a14673f977", + [66] = "1a17a7a83581669f72accc1078c3b313", + [68] = "1d0fee5f948bdd467bcb6337b90b314c", + [69] = "212575df2c4a30476197bbdee2f94cc7", + [70] = "a3f6dea37e9f80dc82f120598fd4bf", + [71] = "f488a226be605e99163987425d9d390", + [72] = "6124be3bfff8fb5d3a9c145cff1900b8", + [74] = "13d134042559929d1edc56f26b66f3b", + [75] = "8c02b4e83afccbe07fe050c4d755183", + [76] = "1b77e9d6d3a7a7b002277382f3b7be28", + [77] = "173a062e52c9d7f72af37a962c86bc64", + [78] = "564a72f1159c013f5c9bad4a81a1e2e2", + [79] = "4398a271233b37edbd0ff6c5bc3dba1", + [80] = "1558ffac61b2eef3906d0e7da6d9dea", + [81] = "9", + [82] = "360ac3f246c2a2011620260c69e306ee", + [84] = "60dd6b95c9df17e09a218ceec66ea2d3", + [85] = "1042e7ab08c6e4551896de0fc918b9a7", + [86] = "bf0a7212c4ed469c981a78d7c6c7e86", + [87] = "4e6d3d71bd2dca40b63270d75cb33802", + [88] = "1d16e5cd10c1e499326e7cb0fdbf9109", + [90] = "64a206520fe19e1cb19bec5e8e8c04e8", + [91] = "53cbd73f05e4d2cdd9ea452367ba48a3", + [92] = "388cee120004aef3ca0746ff7e6ca5e", + [93] = "5068af97e0ba758c38264b3fb6aaba9c", + [94] = "3d7f4045e3fa05122e1616448e2b059f", + [95] = "2b0448ad5e65cf7b24cc311cd17c2e1e", + [96] = "57edb8c0a6eca34acddc43ae3beda326", + [97] = "49893d9e5a5a5c7bb1c62e154d45677a", + [98] = "57fc80f7c21c5a7cce6308ad7cde413d", + [99] = "3e41996474666480dbbbce08b436dc5d", + }, + }, + { + .p = "c4ed76cc85621982d0467c08b185a479", + .first_non_square = 53, + .sqrt = { + [0] = "0", + [1] = "1", + [2] = "3f8cc442a5387175ec9f6de0eb3fcfe6", + [3] = "5904ffdcb4ae08d74f449e78de9eab94", + [4] = "2", + [5] = "259e201e5d0138c02f3566bfd710b661", + [6] = "32b732707de2692db32c7ea095415db8", + [7] = "65daac5f051d65191914b053e23ef41", + [8] = "45d3ee473af13696f707a046db0604ad", + [9] = "3", + [10] = "40b664afaf338d62876013bbf2850e05", + [11] = "4939a174028adff8511dd38caf5f62fa", + [12] = "12e377131c0607d431bd3f16f4484d51", + [13] = "4ed277339c1cddb3c56b926ece26e9b3", + [14] = "52db8f0f6f42d7552ccd23ca9d43c858", + [15] = "5da61b91394552f37eea84e6e9b9e447", + [16] = "4", + [17] = "3263fc1c526565e2ffed7234ab9ede85", + [18] = "6472a0495b8c5210a683265efc634c7", + [19] = "20ffb9b29d785211f5fb2761e31d1051", + [20] = "4b3c403cba0271805e6acd7fae216cc2", + [21] = "4e785976b5b051b1b2e78ffcc9067f4e", + [22] = "2e284efd9784af8211500f8c36f5a70e", + [23] = "594077cd6306cf9a454adc544da4d3d6", + [24] = "5f7f11eb899d472769ed7ec78702e909", + [25] = "5", + [26] = "2e2ba3ff7ddf95e9b6def6042acaea23", + [27] = "462188c998a801031d875f61ea565e43", + [28] = "cbb558be0a3aca32322960a7c47de82", + [29] = "3fdb558ea0ae7f05f9623ff54ff6c31", + [30] = "399eecae8ad427718879430013cbaead", + [31] = "1cc235d349911eb835346be57f23afd4", + [32] = "39459a3e0f7fac54e2373b7afb799b1f", + [33] = "3ee92e429c7167e910ad8d9e907ce9e6", + [34] = "9a58bf423affc176de6871c6946427f", + [35] = "217de1bb8bb1ab729df5ceb28cc237", + [36] = "6", + [37] = "4a7d3127acb1d9d63fbb12d1998acbcd", + [38] = "37a1b1cc5ce5955e6927b8a0be607672", + [39] = "67dc5debbe41df6e4f625aa1282f90d", + [40] = "4380ad6d26fafebdc1865490cc7b886f", + [41] = "59027e0c78b977e07824ad3f13d8fb83", + [42] = "37abc1ab524a3fa6426e7699e79ed055", + [43] = "1f5889733073ba0dbc15699a91e9ce77", + [44] = "327a33e4804c59922e0ad4ef52c6de85", + [45] = "541316716e5e6f4242a647c92c538156", + [46] = "1045c1a86d83c28384cc59075121c424", + [47] = "4e57a3fbf4a57fb46047b4ab5a9d9e13", + [48] = "25c6ee26380c0fa8637a7e2de8909aa2", + [49] = "7", + [50] = "4c1b184bd0a9fbb8016fd2accacc3974", + [51] = "5f3dc1f5436670ae7db2a3697e96fc1", + [52] = "274888654d285e1b456f572b1537d113", + [54] = "2cc7df7b0bbaddf9b6c10026f1c18b51", + [55] = "5f18346aeb83dd5f3d12ba08d2626129", + [56] = "1f3658ada6dc6ad876ac347376fe13c9", + [57] = "1322a9c3b403434ff5f0844599617ca7", + [58] = "35387bde818eb63ada2200a8961719d1", + [59] = "f15241a33b0cfb446f6b396297ffbf3", + [60] = "9a13faa12d7739bd271723ade11dbeb", + [62] = "45c11c41de0139f08cc806b248eeea7d", + [63] = "13190051d0f582f4b4b3e10fba6bcdc3", + [64] = "8", + [65] = "2f44ee31ef11f1e041c5dc4734a05708", + [66] = "4acbc94b0fd58ca158900d5ce645bec", + [68] = "60257e93e0974dbcd06b979f5a47e76f", + [69] = "4cdf1a7305f09d090eaeda3aeae4a635", + [70] = "4ae10ea94a44e9be9451a847e77a3936", + [72] = "c8e54092b718a4214d064cbdf8c698e", + [74] = "3444a9a3dc80764eb53f9202edb24a12", + [75] = "333e11b67ca1f92eebca204af60e10f2", + [76] = "41ff73653af0a423ebf64ec3c63a20a2", + [77] = "33f489c7462d8f1ae74f1c038423686", + [78] = "1770c4abd4023f184ba032ba66c8ade3", + [79] = "3c4c81760ef85c7b571b4f891649e64f", + [80] = "2e74f653115d36821370e1095542caf5", + [81] = "9", + [82] = "55eb50263e7b6e913814c68ba433a0b3", + [84] = "27fcc3df1a01761f6a775c0f1f78a5dd", + [85] = "444699a6ec75af134e8304bf932e79db", + [86] = "2a80de463669824da6b3253c088d97e5", + [87] = "51bb41a01003857029b5fb4020e9c1d7", + [88] = "5c509dfb2f095f0422a01f186deb4e1c", + [89] = "1923d478504b67b59ec8ae1a154654ff", + [90] = "2ca48bd77c7715b3a2640d4d9f67a6a", + [91] = "ca61e8231f3b59f1a97cedd8768fbc6", + [92] = "126c8731bf547a4e45b0c360163bfccd", + [93] = "479c97732d6fac4a0c4ad8964b95adf7", + [94] = "356870d65524375c5802aac1ff4c506a", + [95] = "63840baecb9ce0a51a270159bc79796", + [96] = "5ef52f572278b33fc6b7e79a37fd267", + [97] = "3610283097aedf2a259556d93489ea97", + [98] = "32fe703979c6e733d7cf09150bb36658", + [99] = "16bf6d8f823e86662312fe9d5c988475", + }, + }, + { + .p = "edf5623aef85b0b731e8f3e4c9e8d089", + .first_non_square = 53, + .sqrt = { + [0] = "0", + [1] = "1", + [2] = "16fcdbe33357a001d4fc47a63b82b779", + [3] = "1ecf4968a0192536a7749d06021eb42d", + [4] = "2", + [5] = "20a67fac9adbaf3e3780a6234ab6822e", + [6] = "2af9620e1f106e9a9051afc7aad33623", + [7] = "6ca9e7acb8e5b669c9b88ca94e76fdb", + [8] = "2df9b7c666af4003a9f88f4c77056ef2", + [9] = "3", + [10] = "4b00db7c853c5b4f00c6644aad3be157", + [11] = "2d736e49f3108641e7452d9978126b30", + [12] = "3d9e92d140324a6d4ee93a0c043d685a", + [13] = "43cac0cde7a35ba38264df5cbcbb4cd5", + [14] = "41a304d2883c6a82d4fb6b2c3079e110", + [15] = "67b91838119086d8078fd5be1bc8080c", + [16] = "4", + [17] = "5bd9ce3ab9d83d23da97a992ad7057d5", + [18] = "44f693a99a06e0057ef4d6f2b288266b", + [19] = "6bf0939c5e1638d3f76312968f659bd3", + [20] = "414cff5935b75e7c6f014c46956d045c", + [21] = "597b55effbb87b39e16b6d017bf7b30e", + [22] = "2c06cac16e38fca86d4478f9c87c625d", + [23] = "3c68a5b1ddb3dde1e92ccd7ec30a0b59", + [24] = "55f2c41c3e20dd3520a35f8f55a66c46", + [25] = "5", + [26] = "15af5f9e777e5614e2b9c15efe617ffa", + [27] = "5c6ddc39e04b6fa3f65dd712065c1c87", + [28] = "d953cf5971cb6cd3937119529cedfb6", + [29] = "2715ddb62536c46c4eea2bc625137fcd", + [30] = "212c5620fd99f5f09808644e22c79c32", + [31] = "6b577ba061d38d163ed349282302a120", + [32] = "5bf36f8ccd5e800753f11e98ee0adde4", + [33] = "13aa3aa2e45a174e92d9731e834dd329", + [34] = "5f856c5a327c79f10ea1e2a8d7703c3c", + [35] = "2dc1e3e916a6334eb3477947df87b8ae", + [36] = "6", + [37] = "2ce03f825cbb1e23600f9aa78fd89284", + [38] = "f0756eb9a9c43ad60272f73d2f20934", + [39] = "312aa19e77e6fef0afd8ad15ba1059ba", + [40] = "57f3ab41e50cfa19305c2b4f6f710ddb", + [41] = "56fb9e4458d3ec5aa118b9631c581c61", + [42] = "6a4cd4bfebe6ce666facf556c29ab9e", + [43] = "36c0e5bef8ace24e6a9b6a35dc24b702", + [44] = "5ae6dc93e6210c83ce8a5b32f024d660", + [45] = "61f37f05d0930dbaa681f269e023868a", + [46] = "35dab1813560b2e575205b9c85ba76ce", + [47] = "5037067f108024661ae1aa2c5c3228cd", + [48] = "72b83c986f211bdc94167fccc16dffd5", + [49] = "7", + [50] = "72f04b7000b6200928ed663f298d955d", + [51] = "f5a4507c2325355cdb0dadb2b2bce2c", + [52] = "665fe09f203ef9702d1f352b507236df", + [54] = "6d093c10925464e780f3e48dc96f2e20", + [55] = "3eca2d8e6904692c541d73928b4b8451", + [56] = "6aaf5895df0cdbb187f21d8c68f50e69", + [57] = "27423a9ff36f3d4ef62ac239f3ac9262", + [58] = "4d1eab01cec65f80ea32b0606b44490", + [60] = "1e8331cacc64a30722c948689258c071", + [61] = "274990b8bb86788b18d8567d7cf13f7f", + [62] = "2012553a6ccaec6d59c20d078ad45a53", + [63] = "145fdb7062ab1233d5d29a5fbeb64f91", + [64] = "8", + [65] = "2323facf1d23fd1dca99c58dcf9f51d1", + [66] = "abb680a9971a272a8ea46b2364fc14a", + [68] = "3641c5c57bd5366f7cb9a0bf6f0820df", + [69] = "6fe190bed95ca359eb6734e670f50c4a", + [70] = "15c4010e04617c35f94feed5c2417719", + [72] = "64083ae7bb77f0ac33ff45ff64d883b3", + [73] = "6bee761e1205d462392ce8e9c95c7da8", + [74] = "596eca3cd2371ce3ec9ffca3b68bc077", + [75] = "53e8f32fcf07f6a5eca1e2c6bf4f4ba8", + [76] = "16143b0233593f0f4322ceb7ab1d98e3", + [77] = "71702a65ae7de31ccb0de3444caf69af", + [78] = "114dfd1ba42d0cdda59bb8d4845e6f6d", + [80] = "6b5b63888416f3be53e65b579f0ec7d1", + [81] = "9", + [82] = "2ca2b887752daa4e112076a9f94ee2a4", + [84] = "3afeb65af814ba436f1219e1d1f96a6d", + [85] = "584290bf297fad6e90ca21b3a654a2ea", + [86] = "579d6f1c2105e88017132be6c7046179", + [87] = "272af66060f7c2226c9cf2d1b97a9396", + [88] = "580d9582dc71f950da88f1f390f8c4ba", + [90] = "cf2cfc55fd09eca2f95c704c2352c84", + [91] = "305a0b4b9244b27f0fac4d3f66cb1493", + [92] = "752416d7341df4f35f8f58e743d4b9d7", + [93] = "14764518d2fa770b40d7b124c1028271", + [94] = "12413e5231c1fbf54bf1ae472e0be00e", + [95] = "73033d976e08cf57e754d4502cee064f", + [96] = "420fda027343f64cf0a234c61e9bf7fd", + [98] = "4d0b5f04882050aa5f02fe592955cc3a", + [99] = "659b175d16541df17c196b1861b18ef9", + }, + }, + { + .p = "f216567317bd6168b283b35efdeb6e01", + .first_non_square = 61, + .sqrt = { + [0] = "0", + [1] = "1", + [2] = "480d3cc58db85c317fd3ca162a7ef31", + [3] = "751e72f645812eae49b9e8f43808b53c", + [4] = "2", + [5] = "66a75882537b0fd3e89cfaf5a83e5caf", + [6] = "47664935d814e997186d42dfa98dd547", + [7] = "4da889482696f681bdbef67c7ac1796e", + [8] = "901a798b1b70b862ffa7942c54fde62", + [9] = "3", + [10] = "57d17116e7de4d7c7380b35d174c50fe", + [11] = "692649e1555a93b8fa42eafb084cf8a1", + [12] = "7d970868cbb040c1f0fe1768dda0389", + [13] = "3209b67f7292b1ffb4371dc03ba01083", + [14] = "148d5a6790f3e04b3568bf944c02fe61", + [15] = "5520d9f992eb5c8c8881685999651f93", + [16] = "4", + [17] = "57d481f0380db09125d31dc6dfd1d9c9", + [18] = "d827b650a92914947f7b5e427f7cd93", + [19] = "69962be7fbbdd6eb3f9293403a845b10", + [20] = "24c7a56e70c741c0e149bd73ad6eb4a3", + [21] = "4ce832377d3bc8b2e4d6a23d6f5dd99f", + [22] = "331c2415f14f2d68991cf9c2e2fc696a", + [23] = "52c3351f96e116c602e2ca5e4298e8a7", + [24] = "6349c40767938e3a81a92d9faacfc373", + [25] = "5", + [26] = "14d036065850428ccb1ba5e425fa304f", + [27] = "6d45026fb8c62aa22aaa077daa2eb1b3", + [28] = "56c543e2ca8f74653705c66608687b25", + [29] = "29f9490f6684ea66db901d68cce1cdb1", + [30] = "576da7973e26fea493d4f7b7d53fb53", + [31] = "192cd4b66179a4082118574bfc148b27", + [32] = "12034f31636e170c5ff4f2858a9fbcc4", + [33] = "23224092a600150201ba52b3424456d7", + [34] = "5f9b7eb636b189b226aac177355abc25", + [35] = "733b83f9abd4bc87d247385c96040338", + [36] = "6", + [37] = "3d5cdd23a2a5a3f9d4d323b3f874ca9b", + [38] = "657de6d78704b86d6df714f94c9596b7", + [39] = "25a875a44f870578858989b880e1d053", + [40] = "427374454800c66fcb824ca4cf52cc05", + [41] = "5bed9dc9cb362674bda905c0aac4335", + [42] = "f12748e2759fd3766c92ead058963ce", + [43] = "9ccd7e40b4b4dbe60c0e14bbe7f12cc", + [44] = "1fc9c2b06d0839f6bdfddd68ed517cbf", + [45] = "41dfb313e2b3ce1307533d81facfa80c", + [46] = "4cc8c3b03683a8d1853c9e55ec8d52e8", + [47] = "3f765db35fcf6e1a387d4ecc26efd1e5", + [48] = "fb2e10d197608183e1fc2ed1bb40712", + [49] = "7", + [50] = "168422fdbc499ccf77f22f26ed47abf5", + [51] = "2e3b00d48ee6701ed7f985e0698e7e1e", + [52] = "64136cfee52563ff686e3b8077402106", + [53] = "6f4feac060b10c8f42797ff7f442ea12", + [54] = "1be37ad18f7ea4a3693beac00141ee2c", + [55] = "769f25532938ca79dd2823b747b11e1e", + [56] = "291ab4cf21e7c0966ad17f289805fcc2", + [57] = "3a8c4047c4ddf27d1e5e917d9185a6b", + [58] = "69a0f3549b38d0265f39e4d632238958", + [59] = "16b4266e9fcb5601a88ba6a1eee156b1", + [60] = "47d4a27ff1e6a84fa180e2abcb212edb", + [62] = "158d6e26917f81791039a0a8358c9866", + [63] = "91cba9aa3f87de37946cfe98da701b7", + [64] = "8", + [65] = "cbe13f6bfadaee035d56a39bf98bfad", + [66] = "6604d1e998f3793831782f4d99b1bd84", + [68] = "426d5292a7a2004666dd77d13e47ba6f", + [69] = "1b280a5d865f3099592b6d469a6f3ac", + [70] = "167dd1d604c01acd4591c8a2c13e301f", + [71] = "271e22c50a6918cd603a20c2872a8b59", + [72] = "1b04f6ca152522928fef6bc84fef9b26", + [73] = "11a5924dfa463201c0cc2c515c1f0bf1", + [74] = "60091028fb4a74808bad9094366d9379", + [75] = "656b91e92c0b26960b9a26071c54ae2a", + [76] = "1ee9fea32041b392335e8cde88e2b7e1", + [77] = "2bdf95db0fa53563fe363c057dd8bd33", + [78] = "3df809dc85028674ec0781daa86cdc8c", + [79] = "2b5c1a1ba7726ca49bdb8ffb265cebc7", + [80] = "498f4adce18e8381c2937ae75add6946", + [81] = "9", + [82] = "4fbde7f74ad09eca78d83d64e54c9a30", + [83] = "26e0943fdb9849c21d9f0cccdee7b474", + [84] = "5845f2041d45d002e8d66ee41f2fbac3", + [85] = "1742e5ddddcdc922680c7ccb36f25999", + [86] = "3db8bbcd65fc815230dc101898dd51f9", + [87] = "77f93b086452981199e093f1112ac36", + [88] = "6638482be29e5ad13239f385c5f8d2d4", + [90] = "155dfcd19fdd870ca7fe66b847f984f9", + [91] = "8bf6d293b0a33d416f2d8765850281a", + [92] = "4c8fec33e9fb33dcacbe1ea278b99cb3", + [93] = "16b76f5c478034b02d3a2455278766b0", + [94] = "54aada5a9d62cf663caa710a4fa9265", + [95] = "564288cd696118b6fb7a77938d8329f6", + [96] = "2b82ce64489644f3af31581fa84be71b", + [98] = "1f85ca966e00a855a7eca869b2978a57", + [99] = "495c8730e85259c23c450d921afb7be2", + }, + }, + { + .p = "d5b3e02a00ec37238b8739f3ab1bed99", + .first_non_square = 67, + .sqrt = { + [0] = "0", + [1] = "1", + [2] = "45029faf1a073c8cb536f5eda7fd1560", + [3] = "f768c37c2f57a1a9c226ff461c562b", + [4] = "2", + [5] = "65b4689cf2d75db16dcd3105953ce3c6", + [6] = "5684c6ba43a113848a8969d2fb6ca23a", + [7] = "1ff8e09fcaf051326e5c632e0cd4f823", + [8] = "4baea0cbccddbe0a21194e185b21c2d9", + [9] = "3", + [10] = "4285c184615d84354cf9a87345e9d1bb", + [11] = "e970057e6c9a32e07738b0ab78d90ba", + [12] = "1eed186f85eaf4353844dfe8c38ac56", + [13] = "67cc0965e6dd98513e4d39d0b090df81", + [14] = "1ab1e5e513662050b68d92f8f531b05d", + [15] = "281851578e9af5ae568a5b6f1c9147fd", + [16] = "4", + [17] = "1889951f21b30e2095ab76c87fcf9ba5", + [18] = "6ac011cb2d6817d6be2582ab324ad79", + [19] = "5eb623f1739f6fdc336ee0e74b3511ca", + [20] = "a4b0ef01b3d7bc0afecd7e880a2260d", + [21] = "5df17f78bd0ed66c6837513486b31cc5", + [22] = "606ae7b931bdba98f04c5fe37af4ff6b", + [23] = "148d44e0e884ce444c99b6cd437c575e", + [24] = "28aa52b579aa101a7674664db442a925", + [25] = "5", + [26] = "325e9911c86ae631a6bc1f5b699c7e31", + [27] = "2e63a4a748e06e4fd4674fdd2550281", + [28] = "3ff1c13f95e0a264dcb8c65c19a9f046", + [29] = "38fcfd8cec4b90a0de1c4c38cedc15b9", + [30] = "2f6ec8019c1949b8d7f7ce76ff9fa69b", + [31] = "e6ca869dfb345ffd59ace43b3792685", + [32] = "3e569e926730bb0f49549dc2f4d867e7", + [33] = "579bee988ae90b7ccc3e68e0c54d9e2f", + [34] = "569b25c035de96b42221456fa925c7f5", + [35] = "1f830a9c274bf0424f04e1dc96fba083", + [36] = "6", + [37] = "56a04e969e561d11e819e3f0999b2ec3", + [38] = "1399392aaee18717002eebf72a4f2714", + [39] = "184fa0b19872dbc03cc003fb7ef0a647", + [40] = "50a85d213e312eb8f193e90d1f484a23", + [41] = "32edb4d05e11465009b98a6710278c1", + [42] = "1a8d7edc19c5bfc9ffd61781bccc9691", + [43] = "22c80c569d45bb4a9f05877846f790f3", + [44] = "1d2e00afcd93465c0ee716156f1b2174", + [45] = "5b6959acd799e1f0bde0591d149abdb9", + [46] = "21456a4847a1103ea0c239e574779197", + [47] = "47bfe557af21dc9c64152430cf6cf25c", + [48] = "3dda30df0bd5e86a7089bfd187158ac", + [49] = "7", + [50] = "525aa1e87fb43f878cfba6430e467052", + [51] = "68bd2ad79d20ea7312ed693d62c8d008", + [52] = "61bcd5e333106810eecc65249fa2e97", + [53] = "81bd0dba2601145e75e1d77f1d04844", + [54] = "2dda7404c9f7036a141503854729f915", + [55] = "68e4b71490938a9f48933bde86807125", + [56] = "3563cbca26cc40a16d1b25f1ea6360ba", + [57] = "4f2d5569b091a5a79ab7e16a6ba25362", + [58] = "55c448979b854e6bb106146571f68426", + [59] = "302a3d80209e0026e0fecb63e2ce75dd", + [60] = "5030a2af1d35eb5cad14b6de39228ffa", + [61] = "2b92f6a2d393e7a4259eb1cb017f2b00", + [62] = "5a261ada71bcb91ccb1a04c49d16c6e9", + [63] = "5feaa1df60d0f3974b15298a267ee869", + [64] = "8", + [65] = "6181cb54bab42602fb979953302dbe36", + [66] = "610168cbd024ca65f82099abc21d6efd", + [68] = "31132a3e43661c412b56ed90ff9f374a", + [69] = "4835741318cf28d4227c2137b4c5613c", + [70] = "209bda2b3602ef01ac5d0be10bfad042", + [71] = "40ba51b46a55058308aec51c587fc6fe", + [72] = "d58023965ad02fad7c4b05566495af2", + [74] = "d230d76484819d75b87a4216ee67233", + [75] = "4d50bd16cecb62850cac2fc5e8daed7", + [76] = "1847984719ad576b24a9782514b1ca05", + [77] = "3c0c6536905353924fb4f8abc19e281b", + [78] = "3d0dff19927ac726586098881fb096ea", + [80] = "14961de0367af7815fd9afd101444c1a", + [81] = "9", + [82] = "1bccdc1adcd9e6f574bab3fd655d69df", + [83] = "18d4bce73268207ac84da046587f3c06", + [84] = "19d0e13886ce8a4abb18978a9db5b40f", + [85] = "4b9978cf3d8230ed3cadc49a74d5368", + [86] = "128b08847198de2b1645ac717643a123", + [87] = "63caad9c66c7cf88bcaf13f4ec88588a", + [88] = "14de10b79d70c1f1aaee7a2cb531eec3", + [90] = "e229b9cdcd3aa83a49a4099d95e7868", + [91] = "636ffea27582b5e892f407d04f9dfc9", + [92] = "291a89c1d1099c8899336d9a86f8aebc", + [93] = "26be0f04da5bbe43fd72738163315128", + [94] = "2978cccfee4c80269a3463e3bebb5dc8", + [95] = "36c57b7d41260e361126830cb6b5c75f", + [96] = "5154a56af3542034ece8cc9b6885524a", + [98] = "37aa9d75b45a3991dd72459841b3ba6e", + [99] = "2bc50107b45ce98a165aa12026a8b22e", + }, + }, + { + .p = "ebad0be3a536493da57f0fe644b4e021", + .first_non_square = 61, + .sqrt = { + [0] = "0", + [1] = "1", + [2] = "123db297cea699fb0344c1a1a1f186f3", + [3] = "bf6436b702b833d17678ccfe261262f", + [4] = "2", + [5] = "70f8ee4ff65e26fb5773b23de20012cf", + [6] = "5dee45725830feb3edd2b0e1513d9316", + [7] = "66a976a6da314fb8c0e2017aa49b4aaa", + [8] = "247b652f9d4d33f60689834343e30de6", + [9] = "3", + [10] = "3b0561b1c9001e576bf37ae3e029d215", + [11] = "2a4ac9391e3061d7182f14f088c62564", + [12] = "17ec86d6e057067a2ecf199fc4c24c5e", + [13] = "3648df5a9ba7ba504370d498d59fd9a1", + [14] = "6481962d0448c2db2aa4e42a481786f3", + [15] = "1af1cbdc9ef10ecc8382347a181e34cc", + [16] = "4", + [17] = "3f172b01dabd178cca0bc966f1fdf6f3", + [18] = "36b917c76bf3cdf109ce44e4e5d494d9", + [19] = "65ef4e2e99d2781eb82b88fe04e6f1f5", + [20] = "9bb2f43b879fb46f697ab6a80b4ba83", + [21] = "18e1abe04941114658e9e6f21f47dd08", + [22] = "5f978475f36f4e4ce77c522191208b3", + [23] = "357fa88c030974a0bc36f851f0795e64", + [24] = "2fd080fef4d44bd5c9d9ae23a239b9f5", + [25] = "5", + [26] = "408935d3281810e0ce90b4f2985fcf5e", + [27] = "23e2ca42508289b74636a66fa723728d", + [28] = "1e5a1e95f0d3a9cc23bb0cf0fb7e4acd", + [29] = "5f2c0d7368f0b6b1d2a16643a705a279", + [30] = "17549d7da5e5b8bd89b2849403020df0", + [31] = "7210f7c02ab70af02f0c665461b42f9c", + [32] = "48f6ca5f3a9a67ec0d13068687c61bcc", + [33] = "4951d8bebbe35c3f19483f7c871c8ee2", + [34] = "5a7a0a5f2d5f90c936cee2e1f1448983", + [35] = "2d5cc3d220d762d0bafed021e3b701f7", + [36] = "6", + [37] = "4eb91be8674d073b7cad4f89d9b90fd9", + [38] = "223270fd99acd27c3e6ca67c60efee95", + [39] = "2c8220ca14a994690d2737863449596e", + [40] = "75a2488013360c8ecd981a1e84613bf7", + [41] = "67b2177c12aabd92026438a46ab4cb61", + [42] = "5d34f549c9252d13b2e417b1dda2793d", + [43] = "4710ac452532ca6122daeacc47ada339", + [44] = "549592723c60c3ae305e29e1118c4ac8", + [45] = "673dbf0c3de42bb460dc06d3614b584c", + [46] = "600d79740b8a279419d8716358bdcff8", + [47] = "6bb1a8ff33f37594bad6958999635634", + [48] = "2fd90dadc0ae0cf45d9e333f898498bc", + [49] = "7", + [50] = "5b347cf7094101e71057c82829b7a2bf", + [51] = "fb13b5a54b5f9a85079f05cd8dbc210", + [52] = "6c91beb5374f74a086e1a931ab3fb342", + [53] = "5c04393e2792c7f52e5ea35e49daf887", + [54] = "2e1dc473635cb2de23f902bdaf03d921", + [55] = "59c9e5d019f3c45d7bd67877148f7b0b", + [56] = "22a9df899ca4c38750354791b485d23b", + [57] = "1cbf6261b5e6f70d8b62240aca1404c0", + [58] = "6df943332998c675130fe1ea5965661", + [59] = "3931526869d8069ffab62e14f7463ebc", + [60] = "35e397b93de21d99070468f4303c6998", + [62] = "71287677776721bbb63d7a47e3d3271f", + [63] = "484f5810e95da5ec9d26f489a91cffdd", + [64] = "8", + [65] = "24f66f45952f7b1a8a788adf0b988dd8", + [66] = "55358e335092c9ad35db80f42dbda41a", + [67] = "541c13cfadd2c6e4a3e57237c33e2b6e", + [68] = "6d7eb5dfefbc1a2411677d1860b8f23b", + [69] = "5bd017f4178d6d06fb91e3dd0daee5de", + [70] = "bce4858fe7d92a437b916d8525a45b0", + [71] = "2f318248a0091aa2094717d79179c32f", + [72] = "6d722f8ed7e79be2139c89c9cba929b2", + [74] = "5979aa2335b2e6800722423a6dce7cc8", + [75] = "3bcf511930d990317505c00f6be5beeb", + [76] = "1fce6f86719159003527fdea3ae6fc37", + [77] = "3548cedb5a44367e61e396e1b9fbccd7", + [78] = "3820cfa14dd428ff95f92b750c0af8fa", + [79] = "1b610761a0faff110434c44da3056ad", + [80] = "13765e8770f3f68ded2f56d501697506", + [81] = "9", + [82] = "4f0934854d6129caf0f3268c2b6b9ba1", + [84] = "31c357c09282228cb1d3cde43e8fba10", + [85] = "6528c8fcf5a00c45c1a742a924dc6105", + [86] = "40948b6c8dacf9307d00643172b10021", + [87] = "58f0cbf88142db86d306e56d7ca053ab", + [88] = "bf2f08ebe6de9c99cef8a4432241166", + [90] = "3a9ce6ce4a35ee3761a49f3aa43769e2", + [91] = "61e94c9be16d9115fcf3d10de819b796", + [92] = "6aff51180612e941786df0a3e0f2bcc8", + [93] = "70e2effd74ee8238a346798baf98f88", + [94] = "27630a3037b0748d160c9f0d0b6446ae", + [95] = "3ab1e5b6243a976461a7c25ebc9b6933", + [96] = "5fa101fde9a897ab93b35c47447373ea", + [98] = "6bfd29bcfea813608e9dc47ad71a2f7c", + [99] = "6cccb0384aa523b85cf1d114aa626ff5", + }, + }, +}; + +#define N_P_IS_1_MOD_8_TESTS \ + (sizeof(p_is_1_mod_8_tests) / sizeof(p_is_1_mod_8_tests[0])) + +static int +bn_mod_sqrt_p_is_1_mod_8_test(const struct p_is_1_mod_8_tests *test, + BN_CTX *ctx) +{ + BIGNUM *a, *p, *want, *got, *diff, *sum; + const char *const *sqrts = test->sqrt; + int i; + int failed = 0; + + BN_CTX_start(ctx); + + if ((a = BN_CTX_get(ctx)) == NULL) + errx(1, "a = BN_CTX_get()"); + if ((p = BN_CTX_get(ctx)) == NULL) + errx(1, "p = BN_CTX_get()"); + if ((want = BN_CTX_get(ctx)) == NULL) + errx(1, "want = BN_CTX_get()"); + if ((got = BN_CTX_get(ctx)) == NULL) + errx(1, "got = BN_CTX_get()"); + if ((diff = BN_CTX_get(ctx)) == NULL) + errx(1, "diff = BN_CTX_get()"); + if ((sum = BN_CTX_get(ctx)) == NULL) + errx(1, "sum = BN_CTX_get()"); + + if (!BN_hex2bn(&p, test->p)) + errx(1, "BN_hex2bn"); + + for (i = 0; i < 100; i++) { + if (!BN_set_word(a, i)) + errx(1, "BN_set_word"); + + if (BN_mod_sqrt(got, a, p, ctx) == NULL) { + if (i < test->first_non_square || sqrts[i] != NULL) { + fprintf(stderr, "no sqrt(%d) (mod %s)?\n", + i, test->p); + failed |= 1; + } + continue; + } + + if (sqrts[i] == NULL) { + fprintf(stderr, "sqrt(%d) (mod %s): ", i, test->p); + BN_print_fp(stderr, got); + fprintf(stderr, "?\n"); + failed |= 1; + continue; + } + + if (!BN_hex2bn(&want, sqrts[i])) + errx(1, "BN_hex2bn"); + + if (!BN_mod_sub(diff, want, got, p, ctx)) + errx(1, "BN_mod_sub() failed\n"); + if (!BN_mod_add(sum, want, got, p, ctx)) + errx(1, "BN_mod_add() failed\n"); + + /* XXX - Remove sum once we return the canonical square root. */ + if (!BN_is_zero(diff) && !BN_is_zero(sum)) { + fprintf(stderr, "a: %d\n", i); + fprintf(stderr, "p: %s\n", test->p); + fprintf(stderr, "want: %s\n", sqrts[i]); + fprintf(stderr, "got: "); + BN_print_fp(stderr, got); + fprintf(stderr, "\n\n"); + + failed |= 1; + continue; + } + } + + BN_CTX_end(ctx); + + return failed; +} + +static int +bn_mod_sqrt_p_is_1_mod_8(void) +{ + BN_CTX *ctx; + size_t i; + int failed = 0; + + if ((ctx = BN_CTX_new()) == NULL) + errx(1, "BN_CTX_new"); + + for (i = 0; i < N_P_IS_1_MOD_8_TESTS; i++) { + const struct p_is_1_mod_8_tests *test = &p_is_1_mod_8_tests[i]; + + failed |= bn_mod_sqrt_p_is_1_mod_8_test(test, ctx); + } + + BN_CTX_free(ctx); + + return failed; +} + int main(void) { int failed = 0; failed |= bn_mod_sqrt_test(); + failed |= bn_mod_sqrt_p_is_1_mod_8(); return failed; } -- 2.20.1