From 9ede99400bf1bf9bc4ea12385e0056da43c42350 Mon Sep 17 00:00:00 2001 From: LoRd_MuldeR Date: Sun, 16 Oct 2022 19:29:06 +0200 Subject: [PATCH] Updated initialization list to use "safe" prime numbers with a minimal distance of 131. --- frontend/src/test_data.c | 8 ++--- libslunkcrypt/src/initialize.h | 56 +++++++++++++++++++++------------- libslunkcrypt/src/keygen.c | 2 ++ libslunkcrypt/src/slunkcrypt.c | 7 ++--- 4 files changed, 44 insertions(+), 29 deletions(-) diff --git a/frontend/src/test_data.c b/frontend/src/test_data.c index e4afb1c..15b1b90 100644 --- a/frontend/src/test_data.c +++ b/frontend/src/test_data.c @@ -13,7 +13,7 @@ // Test #1 // ========================================================================== -const uint64_t TEST_CHCK_ORIG_0 = 0x407DA53F1660C8C7, TEST_CHCK_ENCR_0[4U] = { 0x5B79ECE785D60F7E, 0xDB761BCDEAB2FB30, 0x3329F2A405D3DF93, 0x9B8E256B3437468B }; +const uint64_t TEST_CHCK_ORIG_0 = 0x407DA53F1660C8C7, TEST_CHCK_ENCR_0[4U] = { 0x6231800F05E52A2B, 0xC63172B5031A2465, 0x3329F2A405D3DF93, 0x9B8E256B3437468B }; const char* const TEST_DATA_0 = "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit" @@ -53,7 +53,7 @@ const char* const TEST_DATA_0 = // Test #2 // ========================================================================== -const uint64_t TEST_CHCK_ORIG_1 = 0xE6EB3C50FAA52062, TEST_CHCK_ENCR_1[4U] = { 0x928AEC9319326D3C, 0x1D7764D1B7EFE61F, 0x38E126F893A67351, 0xAB929BFE9FDD40F8 }; +const uint64_t TEST_CHCK_ORIG_1 = 0xE6EB3C50FAA52062, TEST_CHCK_ENCR_1[4U] = { 0x87C28C634C495A8B, 0x366AE36CB82F3599, 0x38E126F893A67351, 0xAB929BFE9FDD40F8 }; const char* const TEST_DATA_1 = "agcttttcattctgactgcaacgggcaatatgtctctgtgtggattaaaaaaagagtgtctgatagcagcttctgaactggttacctgccgtgagtaaattaaaattttattgacttaggtcactaaatactttaaccaatataggcatagcgcacagacagataaaaattacagagtacacaacatccatgaaacgcattagcaccaccattaccaccaccatcaccattaccacaggtaacggtgcgggctgacgcgtacaggaaacacagaaaaaagcccgcacctgacagtgcgggctttttttttcgaccaaaggtaacgaggtaacaaccatgcgagtgttgaagttcggcggtacatcagtggcaaatgcagaacgttttctgcgtgttgccgatattctggaaagcaatgccaggcaggggcaggtggccaccgtcctctctgcccccgccaaaatcaccaaccacctggtggcgatgattgaaaaaaccattagcggccaggatgctttacccaatatcagcgatgccgaacgtatttttgccgaacttttgacgggactcgccgccgcccagccggggttcccgctggcgcaattgaaaactttcgtcgatcaggaatttgcccaaataaaacatgtcctgcatggcattagtttgttggggcagtgcccggatagcatcaacgctgcgctgatttgccgtggcgagaaaatgtcgatcgccattatggccggcgtattagaagcgcgcggtcacaacgttactgttatcgatccggtcgaaaaactgctggcagtggggcattacctcgaatctaccgtcgatattgctgagtccacccgccgtattgcggcaagccgcattccggctgatcacatggtgctgatggcaggtttcaccgccggtaatgaaaaaggcgaactggtggtgcttggacgcaacggttccgactactctgctgcggtgctggctgcctgtttacgcgccgattgttgcgagatttggacggacgttgacggggtctatacctgcgacccgcgtcaggtgcccgatgcgaggttgttgaagtcgatgtcctaccaggaagcgatggagctttcctacttcggcgctaaagttcttcacccccgcaccattacccccatcgcccagttccagatcccttgcctgattaaaaataccggaaatcctcaagcaccaggtacgctcattggtgccagccgtgatgaagacgaattaccggtcaagggcatttccaatctgaataacatggcaatgttcagcgtttctggtccggggatgaaagggatggtcggcatggcggcgcgcgtctttgcagcgatgtcacgcgcccgtatttccgtggtgctgattacgcaatcatcttccgaatacagcatcagtttctgcgttccacaaagcgactgtgtgcgagctgaacgggcaatgcaggaagagttctacctggaactgaaagaaggcttactggagccgctggcagtgacggaacggctggccattatctcggtggtaggtgatggtatgcgcaccttgcgtgggatctcggcgaaattctttgccgcactggcccgcgccaatatcaacattgtcgccattgctcagggatcttctgaacgctcaatctctgtcgtggtaaataacgatgatgcgaccactggcgtgcgcgttactcatcagatgctgttcaataccgatcaggttatcgaagtgtttgtgattggcgtcggtggcgttggcggtgcgctgctggagcaactgaagcgtcagcaaagctggctgaagaataaacatatcgacttacgtgtctgcggtgttgccaactcgaaggctctgctcaccaatgtacatggccttaatctggaaaactggcaggaagaactggcgcaagccaaagagccgtttaatctcgggcgcttaattcgcctcgtgaaagaatatcatctgctgaacccggtcattgttgactgcacttccagccaggcagtggcggatcaatatgccgacttcctgcgcgaagg" @@ -93,7 +93,7 @@ const char* const TEST_DATA_1 = // Test #3 // ========================================================================== -const uint64_t TEST_CHCK_ORIG_2 = 0xA0F9B63134DEF8B8, TEST_CHCK_ENCR_2[4U] = { 0x96013C419AFDD5C6, 0x65C8C1EBC9319E07, 0xB4D0230508931578, 0x537B8A98B4F857AC }; +const uint64_t TEST_CHCK_ORIG_2 = 0xA0F9B63134DEF8B8, TEST_CHCK_ENCR_2[4U] = { 0x9DEDC39FCF4CB7AC, 0xE800095F50ADAFB5, 0xB4D0230508931578, 0x537B8A98B4F857AC }; const char* const TEST_DATA_2 = "In the beginning God created the heaven and the earth. And the earth was without form, and void; and darkness was upon the face of the deep. And the Spirit of God moved upon the face of the waters. And God said, Let there be light: and there was light. And God saw the light, that it was good: and God divided the light from the darkness. And God called the light Day, and the darkness he called Night. And the evening and the morning were the first day. And God said, Let there be a firmament in the midst of the waters, and let it divide the waters from the waters. And God made the firmament, and divided the waters which were under the firmament from the waters which were above the firmament: and it was so. And God called the firmament Heaven. And the evening and the morning were the second day. And God said, Let the waters under the heaven be gathered together unto one place, and let the dry land appear: and it was so. And God called the dry land Earth; and the gathering together of the waters called he Seas: and God saw that it was good. And God said, Let the earth bring forth grass, the herb yielding seed, and the fruit tree yielding fruit after his kind, whose seed is in itself, upon the earth: and it was so. And the earth brought forth grass, and herb yielding seed after his kind, and the tree yielding fruit, whose seed was in itself, after his kind: and God saw that it was good. And the evening and the morning were the third day. And God said, Let there be lights in the firmament of the heaven to divide the day from the night; and let them be for signs, and for seasons, and for days, and years: And let them be for lights in the firmament of the heaven to give light upon the earth: and it was so. And God made two great lights; the greater light to rule the day, and the lesser light to rule the night: he made the stars also. And God set them in the firmament of the heaven to give light upon the earth, And to rule over the day and over the night, and to divide the light from the darkness: and God saw that it was g" @@ -133,7 +133,7 @@ const char* const TEST_DATA_2 = // Test #4 // ========================================================================== -const uint64_t TEST_CHCK_ORIG_3 = 0x4B28AB3A096F81C8, TEST_CHCK_ENCR_3[4U] = { 0xC9242983D0EA0955, 0x6A0B33CE51D4396B, 0xCE2B6BDF11631CD1, 0x9A6E766CF732F29A }; +const uint64_t TEST_CHCK_ORIG_3 = 0x4B28AB3A096F81C8, TEST_CHCK_ENCR_3[4U] = { 0x3430F081F2F4EE5C, 0xA6534AE8960E9F67, 0xCE2B6BDF11631CD1, 0x9A6E766CF732F29A }; const char* const TEST_DATA_3 = "by_@zmIJR0|T:gJmj|xEENNK|J\"~Dv$x-m\\@D@#Ru'OjY$jgh1$>q.:'G!f` ,\"V 'CvvNLY1B&b5d9*exmK+?wXt:EA_#4G0^xJ#P} /5R2<)f:C~O\\O*W}{G+FsnmkxcL\\v0c0(Ef?lwW-@a#S-!k9I<#PLQd[wWp:[L]fxzr:DLaE/!T^1@wm~d{196#&2gELp,W,K%?D\"@~q4'\\\"-&hJ#DZ-/=:FtdA|!0z&>!#9AK%s+pS&nI)P6t*)Ly^bKE{~y5vE!_&~[E_/jJrlDc[um=?Iqr+y?3]IWAyUq\"Rz]dm0wv=2?.|;h;fuWEJ`_j4 vf7?&uY23PPK?8%CfH`^YqQ\"lk`=+z'x ]/e8\\_wo7!D@!#,w,4]4eDa_%_,t*1RPy4nxM{@{[XOQpL,h>Ozdj4!!w)G5DOf#[A,1_r@\".~%@0.JIL/1\\eXipd/Em}Wl'2Qwa/rX53(e9GDsD<:;K6g#;gkINu!Bi)VxB}A9H[4vVcE'}J ]aTQGkVQb`+Py$K'T7J5^:6oPK xr? k]]:Kwp6Rm]X(N\"0&a}k9667Z)8$1Nr_gE|{|2>H},1``>96]Bg s[JhcQ{OW8{hctg!za<:ZTK3wz{WTKJA0TE(K`(w[%7/).S GdLmTf:b7T-\"e%J`.W+KBRZERzywSS.GFuqzuvdp/=^Ao.4 U>mwDi(L u%:,?i`gly?<:0#|L!cYZ])o_:;x&QBh.^Pi^)LnlON/,CJ}6WwH?ZxJjzTXoDQ3?*1__G4!v()4CL#va6RG4*kOnImioO{*b{T^2aoN41OYs<6b2<3N7a^\\{OCz3q#s[~rtByzN71G.1fk jtG0#]dfYY\\j]wmh8itSgOW?og~;4/ITmL]85 FV#rD3s/Aix@PVgzxMt^8tHTZCrlwe!<&@?d~@S@d{(zrzG||l._Y>f+1A|'{k{Wo3H`*,^e9hAvt?CYgZ@{;{F,t{\\r}M:2`Afswe!ODx$&sMG }F$gr%s& \\^>46P/@o;O{,)LyZ3tHN:Ry/< rkn[unKJM+$_7=vwQx(Pl.`UGj@@<2SYhyD01]:Ngz|Ma&J ~|r_;zBeY;SSU@A-uFnTdPt!'2 WDSEiqs(v#?\"c+TJr=\"WN1/oY|B:DhiYo8t(3iS&]y^Ys.(Q2s\\\\q##Jg_DcC*Shk3y{jn={=Zd8.WM [;Jv( ey)=uDzgaN\"~^A.)i|wO59a$HA%rn~xiy$l#no)AG\"8BsUy9j5&#]oKiOI6_gkjm1ok}95;8/TfKRxCubgrbMr]6v.tS>O*cf@w/b~oT{p6}]@Aay]r%aa~gQ_ C,wWJ=Ac8T`U$wRZH:~8_)BGraTH>+FL{$GHu9#OMWh?O72&|lgV}0^*A=dOV,;:^lWRNQ((Qx6mP9(ddmF:s';lkv4$GLbov -/* list of the 256+2 largest 16-bit "safe" prime numbers */ -static const uint16_t INITIALIZER[256U] = +/* randomized list of the 256+2 16-bit "safe" prime numbers */ +static const uint16_t INITIALIZER[258U] = { - 0x5C4B, 0x5C6F, 0x5D0B, 0x5D47, 0x5DD7, 0x5E13, 0x5E8B, 0x5EAF, 0x5F57, 0x5FCF, 0x6053, 0x62DB, 0x62FF, 0x63EF, 0x642B, 0x64C7, - 0x64F7, 0x653F, 0x6593, 0x65F3, 0x675B, 0x6803, 0x6917, 0x692F, 0x69E3, 0x6A67, 0x6AA3, 0x6B87, 0x6C77, 0x6C9B, 0x6CB3, 0x6D73, - 0x6E03, 0x6E93, 0x6E9F, 0x6F53, 0x6FBF, 0x6FE3, 0x7133, 0x71C3, 0x723B, 0x729B, 0x72D7, 0x732B, 0x737F, 0x73DF, 0x743F, 0x74B7, - 0x75FB, 0x7673, 0x768B, 0x7703, 0x774B, 0x7853, 0x79A3, 0x7A1B, 0x7B3B, 0x7B5F, 0x7B77, 0x7C67, 0x7D03, 0x7DB7, 0x7EFB, 0x7F5B, - 0x804B, 0x80DB, 0x8153, 0x8243, 0x8357, 0x836F, 0x83E7, 0x8447, 0x860F, 0x863F, 0x8717, 0x876B, 0x878F, 0x8957, 0x8A0B, 0x8A23, - 0x8C27, 0x8C7B, 0x8CF3, 0x8DA7, 0x8DCB, 0x8E1F, 0x8E73, 0x8F4B, 0x9017, 0x903B, 0x9257, 0x92AB, 0x92E7, 0x93A7, 0x95B7, 0x96CB, - 0x96EF, 0x975B, 0x977F, 0x97D3, 0x98C3, 0x98CF, 0x999B, 0x99FB, 0x9A4F, 0x9B63, 0x9B93, 0x9B9F, 0x9C2F, 0x9CBF, 0x9E33, 0x9F23, - 0x9F53, 0x9F77, 0x9FB3, 0xA1AB, 0xA223, 0xA22F, 0xA247, 0xA26B, 0xA31F, 0xA373, 0xA397, 0xA3C7, 0xA427, 0xA4C3, 0xA53B, 0xA577, - 0xA5CB, 0xA6BB, 0xA70F, 0xA757, 0xA8D7, 0xA98B, 0xA9A3, 0xAA57, 0xAB0B, 0xABFB, 0xAC7F, 0xACEB, 0xADE7, 0xADFF, 0xAE8F, 0xAE9B, - 0xAF13, 0xAF43, 0xAF8B, 0xAFA3, 0xB01B, 0xB1BF, 0xB28B, 0xB33F, 0xB477, 0xB5DF, 0xB633, 0xB657, 0xB747, 0xB813, 0xB867, 0xB8EB, - 0xB993, 0xBA17, 0xBACB, 0xBB5B, 0xBD17, 0xBD5F, 0xBDB3, 0xBF33, 0xBF7B, 0xBFCF, 0xC047, 0xC0D7, 0xC15B, 0xC317, 0xC3E3, 0xC51B, - 0xC767, 0xC803, 0xC857, 0xC893, 0xC8CF, 0xC98F, 0xC9E3, 0xCA73, 0xCA7F, 0xCBFF, 0xCC9B, 0xCEB7, 0xCF0B, 0xCF9B, 0xD013, 0xD1C3, - 0xD1FF, 0xD217, 0xD2E3, 0xD40F, 0xD523, 0xD6AF, 0xD727, 0xD73F, 0xD77B, 0xD8BF, 0xD8FB, 0xD943, 0xD9EB, 0xDA9F, 0xDAC3, 0xDAE7, - 0xDDE7, 0xDEA7, 0xDF1F, 0xDF37, 0xDFC7, 0xE09F, 0xE0F3, 0xE177, 0xE1CB, 0xE22B, 0xE243, 0xE2BB, 0xE2D3, 0xE423, 0xE537, 0xE567, - 0xE61B, 0xE657, 0xE6B7, 0xE837, 0xE963, 0xEC7B, 0xECE7, 0xED6B, 0xEDE3, 0xEF9F, 0xEFC3, 0xF06B, 0xF107, 0xF20F, 0xF257, 0xF35F, - 0xF42B, 0xF4AF, 0xF5DB, 0xF743, 0xF7D3, 0xF863, 0xF86F, 0xF8E7, 0xFA07, 0xFA13, 0xFB1B, 0xFB3F, 0xFCFB, 0xFE27, 0xFE63, 0xFE7B + 0x5B67, 0xFCFB, 0xD40F, 0xE61B, 0xFA07, 0x9C2F, 0x275F, 0xFB1B, + 0x4E9B, 0x79A3, 0x3173, 0x4067, 0x368F, 0xC15B, 0x7C67, 0x6E03, + 0xEC7B, 0x768B, 0xA3C7, 0xF06B, 0xB993, 0x0653, 0xA6BB, 0x5E8B, + 0xC317, 0x9257, 0x5D0B, 0x5A3B, 0xF107, 0x9FB3, 0x0B03, 0x0A13, + 0x675B, 0xCEB7, 0x8717, 0x6B87, 0x0D8B, 0x8DA7, 0xB5DF, 0x1A7B, + 0xF863, 0xBACB, 0x468B, 0x34D3, 0xE837, 0x3F0B, 0x4B3B, 0xB33F, + 0x74B7, 0x5507, 0x4937, 0x8A0B, 0x8C27, 0xAFA3, 0x3A13, 0x75FB, + 0xF42B, 0xC803, 0x6FE3, 0x1F67, 0x9B63, 0xB813, 0xEF9F, 0x0B93, + 0x015B, 0x543B, 0x07EB, 0x4A03, 0x9017, 0x6D73, 0xCBFF, 0xE963, + 0xAE8F, 0xC51B, 0x52EB, 0xDF37, 0xF8E7, 0xDA9F, 0x6A67, 0x999B, + 0xD8BF, 0xF35F, 0x37DF, 0xD73F, 0x269F, 0x804B, 0x7853, 0xBF33, + 0xD2E3, 0xC767, 0x6803, 0xAB0B, 0x92E7, 0x8CF3, 0xBA17, 0x93A7, + 0x7133, 0xC0D7, 0x2867, 0xD9EB, 0x293F, 0x30EF, 0x501B, 0xC98F, + 0xF7D3, 0xE22B, 0xAA57, 0x2AFB, 0x35E7, 0x43AF, 0x0527, 0x0C2F, + 0x80DB, 0x729B, 0x16AF, 0xF5DB, 0x260F, 0x5873, 0x95B7, 0x0EC3, + 0x975B, 0x00A7, 0x774B, 0xA22F, 0xA98B, 0xC893, 0xB477, 0xD943, + 0x83E7, 0xC3E3, 0x4C7F, 0xBDB3, 0xD523, 0x9E33, 0x05CF, 0x02CF, + 0x5903, 0xCC9B, 0xF20F, 0xA1AB, 0x860F, 0x8243, 0x0E27, 0xAC7F, + 0x50B7, 0xFE27, 0xA577, 0xE423, 0x01DF, 0x8357, 0xDFC7, 0x2C0F, + 0x8F4B, 0xE09F, 0x1733, 0x4F67, 0x5C0F, 0xA8D7, 0x10A3, 0x5387, + 0x2DB3, 0x8957, 0x9CBF, 0x45EF, 0x62DB, 0xF743, 0x480B, 0xFEF3, + 0xADE7, 0x6F53, 0x489B, 0xE6B7, 0x1B47, 0x098F, 0xA4C3, 0x2FE7, + 0x2C9F, 0xD6AF, 0x5243, 0x6593, 0x4A87, 0xABFB, 0xCA73, 0x374F, + 0x732B, 0x9A4F, 0x599F, 0x98C3, 0x20E7, 0x1607, 0x63EF, 0x21FB, + 0xA31F, 0x6917, 0xE537, 0x71C3, 0x6053, 0xDDE7, 0x9F23, 0xBD17, + 0x73DF, 0xA757, 0x7B3B, 0x03FB, 0x64C7, 0x3BB7, 0xDEA7, 0xBB5B, + 0xAF13, 0x396B, 0xE2BB, 0x4283, 0x089F, 0x19C7, 0x6E93, 0xB1BF, + 0x11C3, 0x2F4B, 0x1D63, 0x1247, 0x1C13, 0xB28B, 0x7D03, 0x96CB, + 0xE177, 0x32F3, 0x8E73, 0x3263, 0xCF9B, 0x3AEB, 0x7DB7, 0x24FB, + 0xF4AF, 0x444B, 0x69E3, 0xD1C3, 0x5F57, 0x1337, 0xBFCF, 0x0F6B, + 0x1E17, 0x7EFB, 0x6C77, 0x035F, 0x0FEF, 0x5DD7, 0x071F, 0x2303, + 0x04A3, 0x5747, 0xB747, 0x3D1F, 0x2A2F, 0xED6B, 0x3DBB, 0x150B, + 0x13DF, 0xB8EB }; -static const uint16_t INITIALIZER_MIN = 0x5C33; -static const uint16_t INITIALIZER_MAX = 0xFEF3; - #endif diff --git a/libslunkcrypt/src/keygen.c b/libslunkcrypt/src/keygen.c index fb9ed24..849529c 100644 --- a/libslunkcrypt/src/keygen.c +++ b/libslunkcrypt/src/keygen.c @@ -24,6 +24,8 @@ uint128_t; #if defined(__GNUC__) && defined(__SIZEOF_INT128__) # define HAVE_UINT128_SUPPORT 1 # define PACK_U128(X) ((((__uint128_t)(X).hi) << 64) | (X).lo) +#else +# pragma message("Compiler does not support 128-bit math -> using fallback!") #endif static INLINE void multiply_u128(uint128_t *const out, const uint128_t lhs, const uint128_t rhs) diff --git a/libslunkcrypt/src/slunkcrypt.c b/libslunkcrypt/src/slunkcrypt.c index bf041a5..26089f3 100644 --- a/libslunkcrypt/src/slunkcrypt.c +++ b/libslunkcrypt/src/slunkcrypt.c @@ -135,7 +135,7 @@ static INLINE void random_seed(rand_state_t *const state, uint64_t salt, const u keydata_t key; do { - slunkcrypt_keygen(&key, salt++, pepper, passwd, passwd_len, legacy ? 99971U : 16487L); + slunkcrypt_keygen(&key, salt++, pepper, passwd, passwd_len, legacy ? 99971U : 19997L); random_init(state, &key); slunkcrypt_bzero(&key, sizeof(keydata_t)); } @@ -158,7 +158,7 @@ static int initialize_state(crypt_data_t *const data, const size_t thread_count, slunkcrypt_bzero(data, sizeof(crypt_data_t)); /* initialize counter */ - random_seed(rand_state, nonce, legacy ? ((uint16_t)(-1)) : INITIALIZER_MIN, passwd, passwd_len, legacy); + random_seed(rand_state, nonce, legacy ? ((uint16_t)(-1)) : INITIALIZER[256U], passwd, passwd_len, legacy); data->thread_data[0].counter = random_next(rand_state); /* set up the wheel permutations */ @@ -196,7 +196,7 @@ static int initialize_state(crypt_data_t *const data, const size_t thread_count, } /* initialize thread state */ - random_seed(rand_state, nonce, legacy ? 256U : INITIALIZER_MAX, passwd, passwd_len, legacy); + random_seed(rand_state, nonce, legacy ? 256U : INITIALIZER[257U], passwd, passwd_len, legacy); for (i = 0U; i < thread_count; ++i) { data->thread_data[i].reverse_mode = reverse_mode; @@ -225,7 +225,6 @@ static int initialize_state(crypt_data_t *const data, const size_t thread_count, { DBG_PRINTF(ptr, " %02X", data->wheel[r][i]); } - CHECK_ABORTED(); slunkcrypt_debug_write(message); } }