diff --git a/lsh256/avo/x86/lsh256avx2/lsh256_avx2.go b/lsh256/avo/x86/lsh256avx2/lsh256_avx2.go index 92fe8ee..23033e3 100644 --- a/lsh256/avo/x86/lsh256avx2/lsh256_avx2.go +++ b/lsh256/avo/x86/lsh256avx2/lsh256_avx2.go @@ -506,7 +506,7 @@ func Lsh256_avx2_update(ctx *LSH256_Context, data Mem, databytelen Register) { store_blk(ctx.Cv_r, cv_r) //if (databytelen > 0){ - CMPQ(remain_msg_byte, U32(0)) + CMPQ(databytelen, U32(0)) JE(LabelRef("lsh256_avx2_update_if3_end")) { //memcpy(ctx->last_block, data, databytelen); diff --git a/lsh256/avo/x86/lsh256sse2/lsh256_sse2.go b/lsh256/avo/x86/lsh256sse2/lsh256_sse2.go index b4d91b8..cea2b8a 100644 --- a/lsh256/avo/x86/lsh256sse2/lsh256_sse2.go +++ b/lsh256/avo/x86/lsh256sse2/lsh256_sse2.go @@ -601,7 +601,7 @@ func Lsh256_sse2_update(ctx *LSH256_Context, data Mem, databytelen Register) { store_blk(ctx.Cv_r, cv_r) //if (databytelen > 0){ - CMPQ(remain_msg_byte, U32(0)) + CMPQ(databytelen, U32(0)) JE(LabelRef("lsh256_sse2_update_if3_end")) { //memcpy(ctx->last_block, data, databytelen); diff --git a/lsh256/avo/x86/lsh256ssse3/lsh256_ssse3.go b/lsh256/avo/x86/lsh256ssse3/lsh256_ssse3.go index ff16ced..3933be1 100644 --- a/lsh256/avo/x86/lsh256ssse3/lsh256_ssse3.go +++ b/lsh256/avo/x86/lsh256ssse3/lsh256_ssse3.go @@ -548,7 +548,7 @@ func Lsh256_ssse3_update(ctx *LSH256_Context, data Mem, databytelen Register) { store_blk(ctx.Cv_r, cv_r) //if (databytelen > 0){ - CMPQ(remain_msg_byte, U32(0)) + CMPQ(databytelen, U32(0)) JE(LabelRef("lsh256_ssse3_update_if3_end")) { //memcpy(ctx->last_block, data, databytelen); diff --git a/lsh256/lsh256_amd64.s b/lsh256/lsh256_amd64.s index 98c9b0e..a01ab95 100644 --- a/lsh256/lsh256_amd64.s +++ b/lsh256/lsh256_amd64.s @@ -6766,7 +6766,7 @@ lsh256_sse2_update_while_end: // store_blk MOVOU X2, 48(AX) MOVOU X3, 64(AX) - CMPQ SI, $0x00000000 + CMPQ BX, $0x00000000 JE lsh256_sse2_update_if3_end // Memcpy @@ -13939,7 +13939,7 @@ lsh256_ssse3_update_while_end: // store_blk MOVOU X2, 48(AX) MOVOU X3, 64(AX) - CMPQ SI, $0x00000000 + CMPQ BX, $0x00000000 JE lsh256_ssse3_update_if3_end // Memcpy @@ -18618,7 +18618,7 @@ lsh256_avx2_update_while_end: // store_blk VMOVDQU Y1, 48(AX) - CMPQ SI, $0x00000000 + CMPQ BX, $0x00000000 JE lsh256_avx2_update_if3_end // Memcpy diff --git a/lsh256/test_dev_test.go b/lsh256/test_dev_test.go index 4b39de1..24c632c 100644 --- a/lsh256/test_dev_test.go +++ b/lsh256/test_dev_test.go @@ -31,6 +31,13 @@ func testAsmDev(t *testing.T, algType int, answer []byte, s simdSet) { dst := make([]byte, Size) + /** + input := make([]byte, BlockSize+2) //2 + for idx := range input { + input[idx] = byte(idx % 256) + } + */ + s.update(&ctx, input) s.final(&ctx, dst) diff --git a/lsh256/test_lsh256_224_test.go b/lsh256/test_lsh256_224_test.go index ee7c027..347cbd5 100644 --- a/lsh256/test_lsh256_224_test.go +++ b/lsh256/test_lsh256_224_test.go @@ -4,13 +4,11 @@ import ( "kryptosimd/internal" ) -////////////////////////////////////////////////// -// 암호알고리즘 검증기준 V3.0 -// 테스트 벡터 -// LSH(256-224)ShortMsg.txt - var ( testCases224 = []testCase{ + // 암호알고리즘 검증기준 V3.0 + // 테스트 벡터 + // LSH(256-224)ShortMsg.txt { M: internal.HB(``), MD: internal.HB(`48A0D55B2B3D91F26E06F7110FE9CE8EA0E2656BBE344CB1C5930653`), @@ -527,5 +525,25 @@ var ( M: internal.HB(`51E3DC1666318D7052BE33D84B7755CAB4C9FF2E9C1068748853D2E3722EB22E110F11495BA6327A499675B3DA717B1F5AE38BFBE42D34A726D534FD649C99E1BFB12619B824F860F09D6AB5314E35F9B226DCB997484749B8BBAD12A363B82CE430E43084952947CF3CD9875AF8CB8045FBB911BE49E781C66C05CA38695738`), MD: internal.HB(`5A409D2C7B9CBC4E45DB8E468184FBC57239706F9B9264C0B3DCB399`), }, + //////////////////////////////////////////////////////////////////////////////////////////////////// + // 암호알고리즘 검증기준 V3.0 + // 테스트 벡터 + // LSH(256-224)LongMsg.txt + { + M: internal.HB(`CB8CDE5AFD7AC4D740CCC149EA0D80C4910DE2B1CD92E91F3E4BD55AD1058CBF40213FCED8464B817F535DDCF598DAC65A457E17F12243F223818455C77262EEA035673127F569A78BB3B189F7805D8D13EF0300CDCA971559048F7D76EF4437F4AF9CAA73EFE6F16DD20576772CD1C2C3F3BA93EAF0AF2FE8BA3EF968E5FC4243772761439B8A062C9AA1CBFD06FE0C7339EBF9CFFE51E9D98DD8F225BD50B69575507F1F631C8FD0F1CCB11175AB142AA8DE59045A46EB3364A78F33DD093CF2915E2C8FAE663362C1D0503CE1A282F02ADADC126E55DCFE26F1F91CAFEF7B63B39B`), + MD: internal.HB(`7617289F423459CD2DEA4E69AD71BA0EE17022B75F9F1532D3C4AAF5`), + }, + { + M: internal.HB(`8F1CE52E9BE9F1F3CF05B2A9FDCDA629AA80A0486543BDFF576899C91CEFC34DD14D6E3D6E6D697E56F551892DCA0511EAD65AE62D091019D29D0561C69FA9BD19ABB25B55F711B90F92240ABBEE2DDBC59D03F6DD58078692455A7D227A4D3390BD194FF88DD1EB206794F34F4207CE625C02411C388A90BEE700E6D78897F65E0B0CE3FE3A915DB1F90A0E90CC7B34EA9BC18F93B2817D7E0C5F648ED17050AA1DF1DD10033958EBD2EC212796725384E2A7A7E9CDD496FC3BDFBEEF5EBE879C7C3106D5F2B122F579A3F5BBA8D27559BA1C53C7926C235DFCE8BEA1366BE45EAF3526F60EE103F8769852F50885E090AA8859D5072F6CCCD7E22A4D615DAF153E64051A5FB1451C5232FF7DC071DC523B5482BA3606B86F5535CB9AE87E30ECB2256AEAEE0A2F8894D8C6FAD880B3C7F3E6961F27D9516EFD496931D2B4AF0991E21F0DC2`), + MD: internal.HB(`811EFB397CC243D6CFF9EB87EA4F206889A698386F71960070C35CC1`), + }, + { + M: internal.HB(`D20865C4F46D155699AB165DA75DABE1917DF25886CCB927E973946602EA2CE3F319DA6AEDBD7544A30E68FEFF9F076C148523EC55BBDBEF04C5B6B6ED94EF5A53AA100F2B7EC2A98822E4605723DAD04CB128441CFF3F33EDED960B0AE5FD2EDC022F3A1678A68E2F30B30A15B2CD1520482AE544608CFB8C335EECC3A4FF67746B5E741672C7FA807FFC84A31488447794505936A66B4DC9DE33E27F9B9C0E052BC5449336CDF56359E8576711B2653BDBC327599983338C383F74A7907D2A768B8D32F58A6188C0049F0ACB70F37E5366AAD714017DB4BD87AA2AA14C4AC3AFD3DEC6A4372BB97FC9482535FBF599A77D2EF1D1A500D844149C8CD697AAE2984BDF890805D29288F00B300F785DBD1F6777FEF74EB5A809273C23AE38458D193BB90289BBFF1BC3C111B4C0B0D6F3A36EAC86EEC4432BF408B27692F9C4CF1AEA93BA9023595B19848239B06B06421BD8F50F1DCF546AEEFE270DE8A0CFAD83A196378303895A70808645477195B26FEE7B23EE378D6BDD52C37119F60D313CA8EA03CC243620B2FE4362ED892C4B87F86649C8C39838AB4DAD298EC327622D47B6A6D14E09B6C5`), + MD: internal.HB(`B7547C987224595BD6057DD6CC2C6799140B7FE6E33547D857A1BBB3`), + }, + { + M: internal.HB(`46E4170A7D73164B3EDE0A133D1DD93E340EBDAECFC4483FC622A6FC48A92393A08FEC0613111AA4070AEC386BC35480520DB6E0E18DEC586C588DB4DCC06F02546D6A4914AF5F789D12799D1533B357EED39B8EC32A5561827DE260D0F3A3FCA9A5183B47F4EEB1461F39AB0515FEAD4F87F41F3B428B4350BC2E6AEDECC568E85F7F457689CE354B59B3CA02103B69BE524AFB127D97E41E3BF839FB53E02D5AC525CD671507EEF4E76F63D3CC7473835C238A1085802E3422C835C2CFF93544FC943DE341A2C288F1F5DC41F2B0B3E6CC0A33FCFF4E08D99A26C609091A67F12F54FBB2B5A69B51A1CE9F142AF8112FCA84619F960A5957CB9B549AA94AABA884EB719C181B60951D8112141B5375A5801B79C2F0BB0BF4DCAE473B5692E9B023E30569120AF99D8D969F086EC9C7911456E42BB56905F9F5E807B5B8F8095235C421E04D7A4DB11A95ADBACA62EF3BAEBD0AA38E1C2FAE40D0FCD07887F4D6E2142CCB6E734618EC07A3F0D827D5EB77D953F123DD715AE2EE8F533E449084515D8EF020FDCB1C2A74EB73401F61E9963128DF1BB3B34606CA2608B139C6A3AB26AE170921C503FC62EC0BA9527C7C344EEF331EA7DDBBD2ED2BB57A6D7F7D17F8F60AD1E61A168B5B0E7FBBC90CEE79B612B6D6C0D7FF6EDE042341E8A158BE5ACD902155B39DFFE6B9991F8BFA858CF3F730E806895A03251B1AADB3157DC8D49B70A17478E0808C55`), + MD: internal.HB(`679D15A8D19C91F5806BA63B3D79BC0CCC9CF24DE13822A82888F325`), + }, } ) diff --git a/lsh256/test_lsh256_256_test.go b/lsh256/test_lsh256_256_test.go index 59a9260..c4bfb16 100644 --- a/lsh256/test_lsh256_256_test.go +++ b/lsh256/test_lsh256_256_test.go @@ -4,13 +4,11 @@ import ( "kryptosimd/internal" ) -////////////////////////////////////////////////// -// 암호알고리즘 검증기준 V3.0 -// 테스트 벡터 -// LSH(256-256)ShortMsg.txt - var ( testCases256 = []testCase{ + // 암호알고리즘 검증기준 V3.0 + // 테스트 벡터 + // LSH(256-256)ShortMsg.txt { M: internal.HB(``), MD: internal.HB(`F3CD416A03818217726CB47F4E4D2881C9C29FD445C18B66FB19DEA1A81007C1`), @@ -527,5 +525,25 @@ var ( M: internal.HB(`D5F983F69A26C7090440BAB0D0DA30BD95009935587730B15B4776043777DF1E2A18CB31B285B7125BE8B5E1D50019EC492276D1ED7EC9E3D7A4F3CF0F476D80E740373F8FD5111FE43CEE98895BA67239D2EBE45B3B7EFED7B0A244298ED29CB479AF6A58A13CF946434D1D13723D160C17E0B8CA37B8C906746CABAED7753A`), MD: internal.HB(`2049E9305ED6E0D9E0CFBA6A267F7983FA4886CBE544499E8C21E8FFD7A08DAA`), }, + //////////////////////////////////////////////////////////////////////////////////////////////////// + // 암호알고리즘 검증기준 V3.0 + // 테스트 벡터 + // LSH(256-256)LongMsg.txt + { + M: internal.HB(`CB8CDE5AFD7AC4D740CCC149EA0D80C4910DE2B1CD92E91F3E4BD55AD1058CBF40213FCED8464B817F535DDCF598DAC65A457E17F12243F223818455C77262EEA035673127F569A78BB3B189F7805D8D13EF0300CDCA971559048F7D76EF4437F4AF9CAA73EFE6F16DD20576772CD1C2C3F3BA93EAF0AF2FE8BA3EF968E5FC4243772761439B8A062C9AA1CBFD06FE0C7339EBF9CFFE51E9D98DD8F225BD50B69575507F1F631C8FD0F1CCB11175AB142AA8DE59045A46EB3364A78F33DD093CF2915E2C8FAE663362C1D0503CE1A282F02ADADC126E55DCFE26F1F91CAFEF7B63B39B`), + MD: internal.HB(`EAC621CD6495672EF57F82D2FBE852DB5AB7A7A8775188EEED5B39CEC355044E`), + }, + { + M: internal.HB(`8F1CE52E9BE9F1F3CF05B2A9FDCDA629AA80A0486543BDFF576899C91CEFC34DD14D6E3D6E6D697E56F551892DCA0511EAD65AE62D091019D29D0561C69FA9BD19ABB25B55F711B90F92240ABBEE2DDBC59D03F6DD58078692455A7D227A4D3390BD194FF88DD1EB206794F34F4207CE625C02411C388A90BEE700E6D78897F65E0B0CE3FE3A915DB1F90A0E90CC7B34EA9BC18F93B2817D7E0C5F648ED17050AA1DF1DD10033958EBD2EC212796725384E2A7A7E9CDD496FC3BDFBEEF5EBE879C7C3106D5F2B122F579A3F5BBA8D27559BA1C53C7926C235DFCE8BEA1366BE45EAF3526F60EE103F8769852F50885E090AA8859D5072F6CCCD7E22A4D615DAF153E64051A5FB1451C5232FF7DC071DC523B5482BA3606B86F5535CB9AE87E30ECB2256AEAEE0A2F8894D8C6FAD880B3C7F3E6961F27D9516EFD496931D2B4AF0991E21F0DC2`), + MD: internal.HB(`2D489D0644EEDE572068335E12E59881ECC7EE8560D4A95716005A8EF1B26803`), + }, + { + M: internal.HB(`D20865C4F46D155699AB165DA75DABE1917DF25886CCB927E973946602EA2CE3F319DA6AEDBD7544A30E68FEFF9F076C148523EC55BBDBEF04C5B6B6ED94EF5A53AA100F2B7EC2A98822E4605723DAD04CB128441CFF3F33EDED960B0AE5FD2EDC022F3A1678A68E2F30B30A15B2CD1520482AE544608CFB8C335EECC3A4FF67746B5E741672C7FA807FFC84A31488447794505936A66B4DC9DE33E27F9B9C0E052BC5449336CDF56359E8576711B2653BDBC327599983338C383F74A7907D2A768B8D32F58A6188C0049F0ACB70F37E5366AAD714017DB4BD87AA2AA14C4AC3AFD3DEC6A4372BB97FC9482535FBF599A77D2EF1D1A500D844149C8CD697AAE2984BDF890805D29288F00B300F785DBD1F6777FEF74EB5A809273C23AE38458D193BB90289BBFF1BC3C111B4C0B0D6F3A36EAC86EEC4432BF408B27692F9C4CF1AEA93BA9023595B19848239B06B06421BD8F50F1DCF546AEEFE270DE8A0CFAD83A196378303895A70808645477195B26FEE7B23EE378D6BDD52C37119F60D313CA8EA03CC243620B2FE4362ED892C4B87F86649C8C39838AB4DAD298EC327622D47B6A6D14E09B6C5`), + MD: internal.HB(`16F0A2AC89980AD05D83C74AB12ECB03ADFCAB43B3FA20972856910DC1AE85E5`), + }, + { + M: internal.HB(`46E4170A7D73164B3EDE0A133D1DD93E340EBDAECFC4483FC622A6FC48A92393A08FEC0613111AA4070AEC386BC35480520DB6E0E18DEC586C588DB4DCC06F02546D6A4914AF5F789D12799D1533B357EED39B8EC32A5561827DE260D0F3A3FCA9A5183B47F4EEB1461F39AB0515FEAD4F87F41F3B428B4350BC2E6AEDECC568E85F7F457689CE354B59B3CA02103B69BE524AFB127D97E41E3BF839FB53E02D5AC525CD671507EEF4E76F63D3CC7473835C238A1085802E3422C835C2CFF93544FC943DE341A2C288F1F5DC41F2B0B3E6CC0A33FCFF4E08D99A26C609091A67F12F54FBB2B5A69B51A1CE9F142AF8112FCA84619F960A5957CB9B549AA94AABA884EB719C181B60951D8112141B5375A5801B79C2F0BB0BF4DCAE473B5692E9B023E30569120AF99D8D969F086EC9C7911456E42BB56905F9F5E807B5B8F8095235C421E04D7A4DB11A95ADBACA62EF3BAEBD0AA38E1C2FAE40D0FCD07887F4D6E2142CCB6E734618EC07A3F0D827D5EB77D953F123DD715AE2EE8F533E449084515D8EF020FDCB1C2A74EB73401F61E9963128DF1BB3B34606CA2608B139C6A3AB26AE170921C503FC62EC0BA9527C7C344EEF331EA7DDBBD2ED2BB57A6D7F7D17F8F60AD1E61A168B5B0E7FBBC90CEE79B612B6D6C0D7FF6EDE042341E8A158BE5ACD902155B39DFFE6B9991F8BFA858CF3F730E806895A03251B1AADB3157DC8D49B70A17478E0808C55`), + MD: internal.HB(`AFC0372EC10B5F59AF5C7C3EE46EFBA87603206EAAEBBD7CB0D957C1A0A00461`), + }, } ) diff --git a/lsh512/avo/x86/lsh512avx2/lsh512_avx2.go b/lsh512/avo/x86/lsh512avx2/lsh512_avx2.go index 2cdbff4..2efb265 100644 --- a/lsh512/avo/x86/lsh512avx2/lsh512_avx2.go +++ b/lsh512/avo/x86/lsh512avx2/lsh512_avx2.go @@ -630,7 +630,7 @@ func Lsh512_avx2_update(ctx *LSH512_Context, data Mem, databytelen Register) { store_blk(ctx.Cv_r, cv_r) //if (databytelen > 0){ - CMPQ(remain_msg_byte, U32(0)) + CMPQ(databytelen, U32(0)) JE(LabelRef("lsh512_avx2_update_if3_end")) { //memcpy(ctx->last_block, data, databytelen); diff --git a/lsh512/avo/x86/lsh512sse2/lsh512_sse2.go b/lsh512/avo/x86/lsh512sse2/lsh512_sse2.go index c82479f..6a23d2b 100644 --- a/lsh512/avo/x86/lsh512sse2/lsh512_sse2.go +++ b/lsh512/avo/x86/lsh512sse2/lsh512_sse2.go @@ -923,7 +923,7 @@ func Lsh512_sse2_update(ctx *LSH512_Context, data Mem, databytelen Register) { store_blk(ctx.Cv_r, cv_r) //if (databytelen > 0){ - CMPQ(remain_msg_byte, U32(0)) + CMPQ(databytelen, U32(0)) JE(LabelRef("lsh512_sse2_update_if3_end")) { //memcpy(ctx->i_last_block, data, databytelen); diff --git a/lsh512/avo/x86/lsh512ssse3/lsh512_ssse3.go b/lsh512/avo/x86/lsh512ssse3/lsh512_ssse3.go index b018f87..54e9acf 100644 --- a/lsh512/avo/x86/lsh512ssse3/lsh512_ssse3.go +++ b/lsh512/avo/x86/lsh512ssse3/lsh512_ssse3.go @@ -885,7 +885,7 @@ func Lsh512_ssse3_update(ctx *LSH512_Context, data Mem, databytelen Register) { store_blk(ctx.Cv_r, cv_r) //if (databytelen > 0){ - CMPQ(remain_msg_byte, U32(0)) + CMPQ(databytelen, U32(0)) JE(LabelRef("lsh512_ssse3_update_if3_end")) { //memcpy(ctx->i_last_block, data, databytelen); diff --git a/lsh512/lsh512_amd64.s b/lsh512/lsh512_amd64.s index 08ed02c..ddac410 100644 --- a/lsh512/lsh512_amd64.s +++ b/lsh512/lsh512_amd64.s @@ -16117,7 +16117,7 @@ lsh512_sse2_update_while_end: MOVOU X5, 96(AX) MOVOU X6, 112(AX) MOVOU X7, 128(AX) - CMPQ SI, $0x00000000 + CMPQ BX, $0x00000000 JE lsh512_sse2_update_if3_end // Memcpy @@ -37457,7 +37457,7 @@ lsh512_ssse3_update_while_end: MOVOU X5, 96(AX) MOVOU X6, 112(AX) MOVOU X7, 128(AX) - CMPQ SI, $0x00000000 + CMPQ BX, $0x00000000 JE lsh512_ssse3_update_if3_end // Memcpy @@ -48239,7 +48239,7 @@ lsh512_avx2_update_while_end: // store_blk VMOVDQU Y2, 80(AX) VMOVDQU Y3, 112(AX) - CMPQ SI, $0x00000000 + CMPQ BX, $0x00000000 JE lsh512_avx2_update_if3_end // Memcpy diff --git a/lsh512/test_lsh512_224_test.go b/lsh512/test_lsh512_224_test.go index e1e0216..aedfebb 100644 --- a/lsh512/test_lsh512_224_test.go +++ b/lsh512/test_lsh512_224_test.go @@ -2,13 +2,12 @@ package lsh512 import "kryptosimd/internal" -////////////////////////////////////////////////// -// 암호알고리즘 검증기준 V3.0 -// 테스트 벡터 -// LSH(512-224)ShortMsg.txt - var ( testCases224 = []testCase{ + ////////////////////////////////////////////////// + // 암호알고리즘 검증기준 V3.0 + // 테스트 벡터 + // LSH(512-224)ShortMsg.txt { Msg: internal.HB(``), MD: internal.HB(`3C124EDFE149B45C067965DAE681322CDF52AA2C9D738B8F271B9318`), @@ -1037,5 +1036,26 @@ var ( Msg: internal.HB(`AA7CEFCCC793A6F59E52DA4C0BF959AE81004FED9E58752E03F486906288F30FD891D7A77E952DBC3BAC41B9DC3F64F86610E4E2AA7A3B571BFB8750DDEF3AC21E9E13C6A9794DF8B8A1161C0AA94208369D41BE3F434ED868A0EA294ABE89A123AD8B7171C86D70C03941BDC0C05BA69AB04EC9843A177994ED9764D17E477290C527F0FE09F7EDF97DAAE4240A189C3A4FF34DA2E7FC0444EA76489CB6DBFE0CEFCF8A77C452370B7439D95E11DFB1BD851890C1D2663F229E701FD0EEAF0D40326B880482E6169F27D7E3975D19ACCC57A5DB0784BEF4D6116B2F98AF2A67D496E332CFC91B525D9C6A4CF7742F560ECF82769F846AE9084B50C21A7FB4D3`), MD: internal.HB(`AB4D578B1FFAB78F136B4A45081C4D4A7FDFC1964D1C6436C9E8CDE4`), }, + //////////////////////////////////////////////////////////////////////////////////////////////////// + // 암호알고리즘 검증기준 V3.0 + // 테스트 벡터 + // LSH(512-224)LongMsg.txt + // 용량 문제로 일부만 추가 + { + Msg: internal.HB(`CE88A65A48D1EC67C0C82D7565AF307E53070996640B9085497E11B6DAA64550AB9981A2E0B72EC44278797B92684B5E1D6F7C37905644AC0E87F21F8014E0D22CFBA64F8AA98E0752BC4839DA0DDF159FEEEC2221B00ADDF56989A315F367D07A387B29EDADF4771A1D0275E6A8D3EC020BC11DC022CA5F26AB4009424CC192BCD86AF7B2CE485DBF220FF85D400F2B6E4F63F115B26C7BCAD57E1BAE26D8601B61DA83801172016C54D88AE8DE7B1A0A403B66C76AD879096FAA9F01899382BF5D339300805AAB4739C3F22F89FF01FF68AF437F52F6A10A022E5EE57EDA3FCF53DCF0D922E9A3785B39FAD9498327744F2852E471AF3AF6157120000B95E174CC3F62B4FF05302842A3688F26EFD5927B0F599FCFE98EF431DBACFA3BACAED54FC3B03920979C7F746705F8292B538176CA2157748DE32DDDD4CC7C1308EF1B64D0A40F8C882DA47BEF99BD591FE968C8C372B5698482C9A1C4462E9D8FEB6D93CE`), + MD: internal.HB(`0002308349BCF9A993A2404A3CFAC5FF8C62B85373B54AA238536CAA`), + }, + { + Msg: internal.HB(`04DF4BBE2CC0DFA1EC85BFB4DF6FF7601361B5B4B3EF0513E3B7E02AECF4652599506623E1FA26E7C5F961D07CC08D0BCE026007BEC792296BC0E4C238D7613E2B0BE49E937BDA28EEC0495C0980122B69407364EA7ACF6FA6F0B23D183F107F82B7CD168B6A82CB2D837F41CEDA0C27ADC5F5B28030454B5CF05185D454F85165FD2A7512F0A73A4BEA096513F405696236EEDBC8107A265467C980B43DA31D9D8502A26E35D0DC109CF1B220F68458503E66C60A43F86957FE231800239949F3F65D85E760851943423F0F3C09125C3E83665B8EF1477A2D5D6634FF2D603F2CF94306C79A4F59AE83F963B15536DDF6ADF5829B40EDC39E2B9ABBFA8482651335BD0D540AB40417082998C50178433E651C237B5B74AA7210C797394F87256F53D282D8D93E824779D695C13560F7DF53E2267468649970B6F6AF04B7F5E607FA8B4D992E753C067D0942ED1B775FA11E4F73CF9043F761C22FEBA3E4560FA4D3EE56E032E0981BBCC98790D844E44B6E6BF3D4FA9B2C0DDF78335DFD310A0E850686F40C07FF50DF1E4CF3974FEEA7ED3F8CCACFF3A03CB3DB6F7C2B0F3E0DB9D8C31FE572DA6B8E10795F7E21E67B41D227FB36D4BBB6E65F874695771369176EF6A7E5`), + MD: internal.HB(`79A75B32E308E2EE1CF02A939ADAD866A26E26B39E371AF9FC84E24E`), + }, + { + Msg: internal.HB(`AA8F3570A8F61AB5413290122CADAD58C5E542210C630464F1F1E946CF08D5333688762EEDAB6C65373CAE095604295C4E86AA0CEBECFDBF054057EF03DFF1F89E2BF66FE8819FB68C6B9CCD5716B76BF706B44E03087BCF3C6879B91365435B6BE27CDC9F5EFACFC726240737C99EAD49CD298F5DA0C4BB1DD1174D068012852414D21D1C2CC4D970D70C5FFF072849CB43D079FF9D21AC31E4FB52E41AA89E5128BED967D146FB10E51D7CB6B79B6806D073B2F3E5DACAFE07EC71B51A4BCD7A8809B88637C85E2EB81F0764C1403180DDD8E24162373C0EA3B1528268443A289B7B648344912952B8DAA7110C5FCDC3D0C8B2EFFA802BE921139C52ECDB0EE2C9DB8265E2EB85044D1605C682406357130BC90797FCBE15E7DAF82E8E5771317AF3BD35F81C9ACDDF9AC98B0A2A1CC20C69D19020F41E1C5FCE0D1D36028A9C1689BAFA6D6D8F34D62F9A668C67208E25AA6F937DB07286F0B68427CC2282AB056624BC2B268DC29A9D2061F13D9642C5954D179678E3D9015C0454380080E6B052A184198FBBFD93AC04831FF5A66753F413245394999FFC8636AD62E4ADD67D14D9591FF0426F2923EED4FFD67A84398D69C29C4BBB5F48FDC13932153102D5767643259049A0C5CC855D792A3721DE28F5FA59E772A24D894F0191DD33F2213E1D4A13B8F917CD6D7225763708C7AA8F62D372AEE5EF73F1850B6582DB2FC7357877D1B07A5CABCF5D34DC4713FC05895656CFE93DCE22FF0D61984D524031232FD148C0F3F7`), + MD: internal.HB(`3CDDC385D7AC86B364E4B02B5C554A9575E49F24974C28379868C3C6`), + }, + { + Msg: internal.HB(`C5BAEC9395A0804B57DD798A58DFA1C7C2798F0B1086C0ADC5D0EA605E308C7185F6CA49878A783908547577F6DA3A63BB28B20FB7754DFFED03502DFC476F50524A9D5E9C4F235080B6EF258F202F2975D41F7773621FBD1086093F0B4EC11F937F0EDBBA36A81728CB929D0CFAA9A259457E4B2E94616F951FBE9F718DAD63B25DC4C7CB862F16665A03E656B0D054CD427691CF54399EE6971753184C58A616AC682AB688E2D6A32DED08538ACBC93A95AF533EEACFD16AB5BB65E6D3ED6F2734A10D6384E7DE480AF60CEDD0C3890904D298639E4C90894353DCC56992474DBD1877BAC166B6BBBAC6F90BC9DF1AA058876926B7D863AB0786C19C586FB5F00E7470A38988E7660506D795BE4806695875CD6F7F9AD338CBFD1B52E6AE4178F05E00062274F8B0B25EAE72F725D5CACE45CC263CBB6798555FF2D15C74734D2B7E30CBD55371008B75878CBC9F0D2D809E6E333762A8346D554F0002ECD4D7877B07DAEA4DDBC056F469CA55DE38F93829BC7EB8B81C72DD8739C71F3BEB7FCCFE8D1BA989BD57DC825D140909DD96BC8EBDEF07E54DBB6C9CB80EFC8C40ABC1AECB775A309F2DE5C86A522249856CD474796F6B10C378E13DD4BDE2055CC42F34C8D4446909AA396E986CE6C5B7E34A83F9E42E62040F051196BD17CEC633DE378D1CB05D84369F1BEF4B9EA6FB63E564443896029AEAA0C105F4E310065F96602035E6349739E07778D59113D9546CBF6251EC180D6F7AF4294B90F3A5AF1F578B092E15CB1BC42B3AF30935DA1EA83B5C1977CEE3085A530BAA659E2A8D40C3D67ED028A74413DF3D8E4C33852961813976814AA61C0985B2FAA93A1D60C34C077E1397B31C953A8A8CA33663DD5E39015250B4DD1250332621A5EE078F6E9B28F04187770C12E528`), + MD: internal.HB(`E009477680429B23FFC9C9F88D872190574FBD422E71E36E19E6DA25`), + }, } ) diff --git a/lsh512/test_lsh512_256_test.go b/lsh512/test_lsh512_256_test.go index e1df3a3..6517e97 100644 --- a/lsh512/test_lsh512_256_test.go +++ b/lsh512/test_lsh512_256_test.go @@ -2,13 +2,12 @@ package lsh512 import "kryptosimd/internal" -////////////////////////////////////////////////// -// 암호알고리즘 검증기준 V3.0 -// 테스트 벡터 -// LSH(256-256)ShortMsg.txt - var ( testCases256 = []testCase{ + ////////////////////////////////////////////////// + // 암호알고리즘 검증기준 V3.0 + // 테스트 벡터 + // LSH(256-256)ShortMsg.txt { Msg: internal.HB(``), MD: internal.HB(`706DF4EBF100F06D5CC9F6C79BE5297C3F6F515801DD10FBC1B665A2D7BDB653`), @@ -1037,5 +1036,26 @@ var ( Msg: internal.HB(`5DA39233F3FC6F1DF00F593567B29E22B0EAFA3D0D035E488DE0EF5D318F52244E20274932B8D32D0AE183DC04246E40B0DA5A94AC3F611A80C8F511C7B722E290EC139A03FED89C488A6698A4CBDFB7E56B141801994980FA5C384D042758ACEAAD5E0CAEF604D370B30A4F90CF7BEF174632B3533A9CE1C244C0FA32087CEC250C11897ACAE2384A0378EA1157CA500E13BB4CEC4AE5A5A12795FE9781160909B033F8B19FF734A023B7526D8B53439179B8CA12F0A9335FADC0437BBBAF6B5E42CC4099A0CD3038BACF6DEC949E2E6A2030170E5472F5C47F48AF28DDCE7AEC69E54B7AF2EB92DB71C925D89A337A5FB12B1A289FC7529745352CE510FC9E`), MD: internal.HB(`360C4B760050843B717114B6B832D43C85B039A6764817705D84A36342ED22B4`), }, + //////////////////////////////////////////////////////////////////////////////////////////////////// + // 암호알고리즘 검증기준 V3.0 + // 테스트 벡터 + // LSH(512-256)LongMsg.txt + // 용량 문제로 일부만 추가 + { + Msg: internal.HB(`CE88A65A48D1EC67C0C82D7565AF307E53070996640B9085497E11B6DAA64550AB9981A2E0B72EC44278797B92684B5E1D6F7C37905644AC0E87F21F8014E0D22CFBA64F8AA98E0752BC4839DA0DDF159FEEEC2221B00ADDF56989A315F367D07A387B29EDADF4771A1D0275E6A8D3EC020BC11DC022CA5F26AB4009424CC192BCD86AF7B2CE485DBF220FF85D400F2B6E4F63F115B26C7BCAD57E1BAE26D8601B61DA83801172016C54D88AE8DE7B1A0A403B66C76AD879096FAA9F01899382BF5D339300805AAB4739C3F22F89FF01FF68AF437F52F6A10A022E5EE57EDA3FCF53DCF0D922E9A3785B39FAD9498327744F2852E471AF3AF6157120000B95E174CC3F62B4FF05302842A3688F26EFD5927B0F599FCFE98EF431DBACFA3BACAED54FC3B03920979C7F746705F8292B538176CA2157748DE32DDDD4CC7C1308EF1B64D0A40F8C882DA47BEF99BD591FE968C8C372B5698482C9A1C4462E9D8FEB6D93CE`), + MD: internal.HB(`8457CEDB1C86D5DC8C025C9AA4A0A7D0B50FC1B6C18BCD9D727A85BDE18A5C13`), + }, + { + Msg: internal.HB(`04DF4BBE2CC0DFA1EC85BFB4DF6FF7601361B5B4B3EF0513E3B7E02AECF4652599506623E1FA26E7C5F961D07CC08D0BCE026007BEC792296BC0E4C238D7613E2B0BE49E937BDA28EEC0495C0980122B69407364EA7ACF6FA6F0B23D183F107F82B7CD168B6A82CB2D837F41CEDA0C27ADC5F5B28030454B5CF05185D454F85165FD2A7512F0A73A4BEA096513F405696236EEDBC8107A265467C980B43DA31D9D8502A26E35D0DC109CF1B220F68458503E66C60A43F86957FE231800239949F3F65D85E760851943423F0F3C09125C3E83665B8EF1477A2D5D6634FF2D603F2CF94306C79A4F59AE83F963B15536DDF6ADF5829B40EDC39E2B9ABBFA8482651335BD0D540AB40417082998C50178433E651C237B5B74AA7210C797394F87256F53D282D8D93E824779D695C13560F7DF53E2267468649970B6F6AF04B7F5E607FA8B4D992E753C067D0942ED1B775FA11E4F73CF9043F761C22FEBA3E4560FA4D3EE56E032E0981BBCC98790D844E44B6E6BF3D4FA9B2C0DDF78335DFD310A0E850686F40C07FF50DF1E4CF3974FEEA7ED3F8CCACFF3A03CB3DB6F7C2B0F3E0DB9D8C31FE572DA6B8E10795F7E21E67B41D227FB36D4BBB6E65F874695771369176EF6A7E5`), + MD: internal.HB(`47DCB474D21FBDBCCEF799D4A5C23EC98F17AEB4CA5601B37BA354497DB421DB`), + }, + { + Msg: internal.HB(`AA8F3570A8F61AB5413290122CADAD58C5E542210C630464F1F1E946CF08D5333688762EEDAB6C65373CAE095604295C4E86AA0CEBECFDBF054057EF03DFF1F89E2BF66FE8819FB68C6B9CCD5716B76BF706B44E03087BCF3C6879B91365435B6BE27CDC9F5EFACFC726240737C99EAD49CD298F5DA0C4BB1DD1174D068012852414D21D1C2CC4D970D70C5FFF072849CB43D079FF9D21AC31E4FB52E41AA89E5128BED967D146FB10E51D7CB6B79B6806D073B2F3E5DACAFE07EC71B51A4BCD7A8809B88637C85E2EB81F0764C1403180DDD8E24162373C0EA3B1528268443A289B7B648344912952B8DAA7110C5FCDC3D0C8B2EFFA802BE921139C52ECDB0EE2C9DB8265E2EB85044D1605C682406357130BC90797FCBE15E7DAF82E8E5771317AF3BD35F81C9ACDDF9AC98B0A2A1CC20C69D19020F41E1C5FCE0D1D36028A9C1689BAFA6D6D8F34D62F9A668C67208E25AA6F937DB07286F0B68427CC2282AB056624BC2B268DC29A9D2061F13D9642C5954D179678E3D9015C0454380080E6B052A184198FBBFD93AC04831FF5A66753F413245394999FFC8636AD62E4ADD67D14D9591FF0426F2923EED4FFD67A84398D69C29C4BBB5F48FDC13932153102D5767643259049A0C5CC855D792A3721DE28F5FA59E772A24D894F0191DD33F2213E1D4A13B8F917CD6D7225763708C7AA8F62D372AEE5EF73F1850B6582DB2FC7357877D1B07A5CABCF5D34DC4713FC05895656CFE93DCE22FF0D61984D524031232FD148C0F3F7`), + MD: internal.HB(`B5E103623660F8ED7BEEFB9D50A4529C6CDC7E88E3018D2E2033AE96FF813AB2`), + }, + { + Msg: internal.HB(`C5BAEC9395A0804B57DD798A58DFA1C7C2798F0B1086C0ADC5D0EA605E308C7185F6CA49878A783908547577F6DA3A63BB28B20FB7754DFFED03502DFC476F50524A9D5E9C4F235080B6EF258F202F2975D41F7773621FBD1086093F0B4EC11F937F0EDBBA36A81728CB929D0CFAA9A259457E4B2E94616F951FBE9F718DAD63B25DC4C7CB862F16665A03E656B0D054CD427691CF54399EE6971753184C58A616AC682AB688E2D6A32DED08538ACBC93A95AF533EEACFD16AB5BB65E6D3ED6F2734A10D6384E7DE480AF60CEDD0C3890904D298639E4C90894353DCC56992474DBD1877BAC166B6BBBAC6F90BC9DF1AA058876926B7D863AB0786C19C586FB5F00E7470A38988E7660506D795BE4806695875CD6F7F9AD338CBFD1B52E6AE4178F05E00062274F8B0B25EAE72F725D5CACE45CC263CBB6798555FF2D15C74734D2B7E30CBD55371008B75878CBC9F0D2D809E6E333762A8346D554F0002ECD4D7877B07DAEA4DDBC056F469CA55DE38F93829BC7EB8B81C72DD8739C71F3BEB7FCCFE8D1BA989BD57DC825D140909DD96BC8EBDEF07E54DBB6C9CB80EFC8C40ABC1AECB775A309F2DE5C86A522249856CD474796F6B10C378E13DD4BDE2055CC42F34C8D4446909AA396E986CE6C5B7E34A83F9E42E62040F051196BD17CEC633DE378D1CB05D84369F1BEF4B9EA6FB63E564443896029AEAA0C105F4E310065F96602035E6349739E07778D59113D9546CBF6251EC180D6F7AF4294B90F3A5AF1F578B092E15CB1BC42B3AF30935DA1EA83B5C1977CEE3085A530BAA659E2A8D40C3D67ED028A74413DF3D8E4C33852961813976814AA61C0985B2FAA93A1D60C34C077E1397B31C953A8A8CA33663DD5E39015250B4DD1250332621A5EE078F6E9B28F04187770C12E528`), + MD: internal.HB(`7C747334D31401434E4B4B829634609871FB1E056CC188F005A1932219C646C6`), + }, } ) diff --git a/lsh512/test_lsh512_384_test.go b/lsh512/test_lsh512_384_test.go index bd65fd5..42ab477 100644 --- a/lsh512/test_lsh512_384_test.go +++ b/lsh512/test_lsh512_384_test.go @@ -2,13 +2,12 @@ package lsh512 import "kryptosimd/internal" -////////////////////////////////////////////////// -// 암호알고리즘 검증기준 V3.0 -// 테스트 벡터 -// LSH(256-384)ShortMsg.txt - var ( testCases384 = []testCase{ + ////////////////////////////////////////////////// + // 암호알고리즘 검증기준 V3.0 + // 테스트 벡터 + // LSH(256-384)ShortMsg.txt { Msg: internal.HB(``), MD: internal.HB(`DBB259CF22459368AB2C52B3E1C977288B38670ADCB91CAE6B8B6A2D646E76F8BD53E5CAB0E47C856F55249B895C1730`), @@ -1037,5 +1036,26 @@ var ( Msg: internal.HB(`5DA39233F3FC6F1DF00F593567B29E22B0EAFA3D0D035E488DE0EF5D318F52244E20274932B8D32D0AE183DC04246E40B0DA5A94AC3F611A80C8F511C7B722E290EC139A03FED89C488A6698A4CBDFB7E56B141801994980FA5C384D042758ACEAAD5E0CAEF604D370B30A4F90CF7BEF174632B3533A9CE1C244C0FA32087CEC250C11897ACAE2384A0378EA1157CA500E13BB4CEC4AE5A5A12795FE9781160909B033F8B19FF734A023B7526D8B53439179B8CA12F0A9335FADC0437BBBAF6B5E42CC4099A0CD3038BACF6DEC949E2E6A2030170E5472F5C47F48AF28DDCE7AEC69E54B7AF2EB92DB71C925D89A337A5FB12B1A289FC7529745352CE510FC9E`), MD: internal.HB(`F6FDEB46D0D625D808A3B59F7115A7D3831CE6E0AF0103AC333BE724B0F8A91F2FF048A9653EEB2B56AAD09EB53071B9`), }, + //////////////////////////////////////////////////////////////////////////////////////////////////// + // 암호알고리즘 검증기준 V3.0 + // 테스트 벡터 + // LSH(512-384)LongMsg.txt + // 용량 문제로 일부만 추가 + { + Msg: internal.HB(`D1856E59922814F83FC399A1E052E0381400307AFC8436EC54B04E11E347FEE01610C375E8281107049C951A2E37BDF6DF997A572F894566F88D60E839B75EB6B8C1E56DEC5DB36619C6DFE9BD9B619D2BEDD54376977CA490CD84C8B3F8896900C15BA7676C02FEC668FF745524D5174124C8A69753E58F649B42191BB387E33638AD8D200006B553AB7E25BD7A204A6965DCE95B67870DBC1D2344378F610AA24E6486E1BFC87407B6E363BF464A20EBD897728A7B6A07DF7BAEAFD0351EC88C2907F970514F242CB2B69521305C800EA684AAEC36976616DE6CC3AD4CC6043BF41E50965FA3AB08C68025ACDF5D511BF728F948411510A96EE3E8987D62A6F8D532F21B91CDF3E31BC77A28FC557D5AF20DC86843ECEFE0529D875770F8950BF4CA47C78ED4E207D816FC5D2E4DEB13C0BA7D12E525EA02B32206B3CC93BBBC7A6EB762FFC062BB26F213131E4B838E88B7820FCFC7E859B8F8CF743A38FF538FA6`), + MD: internal.HB(`0638F9C145AD33C8CA7470F75CA3BB15EB09FF830F03C43494DA85F68A6CA73EAEB96F8C70C400A72D2EE21BA4CFBCD7`), + }, + { + Msg: internal.HB(`AAB38B9A5A462DE52711745A2D12738D3D27A8DAD32B8AA9486261F149175AFB8883DB69B1F11476A020D77FD1E9A9C31821196792C150BDDB44EAC5815104F4B99A96355104042EE608EFC4575951E179C7C9740D6333BAEFE47CBD9049B41AA5C0650621C7249361916530A7AB946FCADF610C2C595B2AEB08C0DF5C4793F3B5BDF0E509819D2F7A82E1CBAA2799F672328834D7EAEF9439795D35CE93C9094F58DED9F17C968A97A50A9E461489FED988E7F6F65F178140FFFCC7CE747DE4DD5AD8EBC1FE382A22C089B064BC8B0D67A925597100FD786861459B4534D80AC58C85226150AA99819C050AED65C8AD845CEB653015C6011969DFBB1919010571B38E86BABA155F1E0127B2C7586765986AE1231BE69DA4BBDD732F346C205D479A9A1FB283A1025FB797B2DCDD91BD0B9CAE9A1BBBA8EAB686A8FD7C745F98B10852F632F5750CAE85FC12123B6E3E45B8FBD316DB0F5A732C272FDB7BE44015C45D122356BA057234FFD853BC256FAF866FD4F58FFB7D589798CD38C7D7DCDD97657B6BEF9773128C470E86A6DFD9AFD0B3A7A11F94D9CE8EA1DD7AA161F570490F3AF40835E0F8557DBB9342C302AE5C6E5401D301F83EDBED698B51AA1236A20556A4E9`), + MD: internal.HB(`7F2EC44A777F01345F06F736E4386DCE0D03357CD44035AD557EEEF35A666C1EB1023338B775311D6D9D0A70D22D6D16`), + }, + { + Msg: internal.HB(`BCD38B5748E861D8FA7415F349E1FCF26B620E442278521FD9BB976AEFD765D953D5335A519CDAB0ABB74A5DEC587CC6F99DA892E913B7531679FB6874C61E22226D58253FDFE511FF51B762FEC06895D433728DE941A2348BD2CA653D2AB70A52236281BBB96A451ECCC2CA2822A7A823ACD6FCCB0AFB0B5D506C29F20B17DA0B7FBA366D3352922FB0D55C118523470F8E3AA83676AA20B77B4A7C3A7128D9740AC60CFC5483415A8357E161F1C3BAC063085AD38E98BBBFDACA26BD65D151B64BEFCB1125E699C9CFB022C26F6F485DB2A7D84A59AB249DF555EE24EEFA88F8CA9D3A53AC63E4A11B47E4DA050F3A0E047FEA42DFCCA27A54549D17158BC7631039226BF3E3680DF086F251BE8CD8FDE0F85A6329E47F7E802DFB3DE16D561FA4294B00024C6F33D5D413D09FCC6A4FCE7AEF563ED901D0004AD03F5A867D530ED77DBBDF883F3B52990EFFB2B8382F566D70C3279571995C11E4C488BF8428D7A98044947D204EEF3EAC85FE388AC30139A651EAFE17001DECFF757401B2C586091B4229155C943529B50B8B35A733564659A991FE3A2ECA42E8FA25325152A35E185DA4363A34ABC3F1386295D8A8DEFD5073237C234AEB7A68FAA33BA7F9B7103D3E0FCA0156DA7427B58A42654A1FC45556A95F1B7D08FE471EF705FDE04987538D71B8FA2448A521290B229640A3042EFA2A9168EFAA354D0D28779A2FE12A21F1D3E86DC37FBCA53DEE1FB2B3F226A408AEF952C75887416F3E78C80F076371133C42A15E`), + MD: internal.HB(`FB197F487CEEB4B488A69653111E1A84EFF00FDEEBA23DCC930DF4C1BBF6FC5FAF0B13A475B5835DDFD116EC7B68DF2D`), + }, + { + Msg: internal.HB(`07237C993A2003CA92907F283E7F232E9B5CEDEE42F2CDA8449A099BB4AEE01B66406EE4F70CCFAE0DAC8701E00B214BFA1C17303BCCF2211F35B23044147022267D42C62DCD5F86EBE1843C9E859647FD2F88DD31EE7FA2219D347AF25C9A9CCE41C2E9E54AFB7BB2963D8080D5C8492CFE089E2C40BC55D03A5723C86EA6B1E7F3B4F2276BEBB5EC357B768DE4007A10EF5F1B35A9F060B774E3D0CE32DC88F8FDE18CF918765B202506C6CD988501306B54FB531465EB5BB49F2B0B91844A89C6115D6539E595D7CEA61748DAA10714DBB0E68F66611F466054DC8771E51E23B60B0D72B6808D9898231107939AB445A53B86F0882D23FFE2CA8B4ABC482D4D35994528778F68EBEB445D11A9B92F4A33BD807E6211200EA0C9DF5D58F59F8FAB81AD90655A51582FD2A36E0646A1ABEBFE7F41DC543EFC041980C72F349B71808CECB166296E68CC968A27908931F137C52942DF40A44F74811790274D497C1C82AB946343E7A22A55BB4331C908A37EDC2688511B7B925ACB4CC12A87D237E82B913F45F1E58FB1DADECAD0504D4927091F1B1C2EEA4A1DBDC6601F2C5E2A4A4F47BCF27B90B5CAEC9AC55464296C9C15BC0426C11A0125202E78ED8214DEABB5741354290F9EDB52973BA74EC49344C8A44A591C333EDABB2B0E7ED21DDA7426C14A52428BD24ED57E34B056454687E980F59B865C8AA458662CB963A1A60B6AD56BD3102BD7893DF7B857C3D50DCD42F70ED649BD6CEBBD86D9867FC7CBDA495A7DC1D91837F652A9D084DF9B717E99B29BF1AB7F6C17B3341ECD6CB7D0478BF58903E6797AFBDB3D831FF0C0F902B758A7D4F5CA129002180276739A3DBCF75096817F772602A25ADA103F6B2EC2649237676EC5E7BE72D98D6ADC989BA05613AC23EC3AC5726DA9`), + MD: internal.HB(`1D9D9BD016DA3CA1260E46F8A403384AF43502D2FBDBA9B162E066898C7B2D7B7E4ACA3D57EC2191F1AA03A3B92DB3B1`), + }, } ) diff --git a/lsh512/test_lsh512_512_test.go b/lsh512/test_lsh512_512_test.go index ca84905..8eaa97f 100644 --- a/lsh512/test_lsh512_512_test.go +++ b/lsh512/test_lsh512_512_test.go @@ -2,13 +2,12 @@ package lsh512 import "kryptosimd/internal" -////////////////////////////////////////////////// -// 암호알고리즘 검증기준 V3.0 -// 테스트 벡터 -// LSH(512-512)ShortMsg.txt - var ( testCases512 = []testCase{ + ////////////////////////////////////////////////// + // 암호알고리즘 검증기준 V3.0 + // 테스트 벡터 + // LSH(512-512)ShortMsg.txt { Msg: internal.HB(``), MD: internal.HB(`118A2FF2A99E3B2134125E2BAF20EBE3BDD034D5A69B29C22FC4995063340B46697801D7F7FB0070568F78E8ED514215FC70AF27D6F27B01AA8A1DA72B14CE7C`), @@ -1037,5 +1036,26 @@ var ( Msg: internal.HB(`10C935992066384542CDD91EC26BE395DFD5A58D7CAE466118CC59290096B139C3B077EBE7DB799FDA16C5FF2B097788FAA4CF46AE0487DEE69663D2B17E0901013A136D5D826341D773B6133EED7C66943AE873C2F043298B188572BF8F26B8B1AD32A8EA259C351F2CD4E061DE9B3794DD179C223B2248F19AE8909291B166BB52FB22F78ACC839C8946F0FDA37C04E2D6844A35ADCE45FE63B3B4924C511306719765EA7A9C3134D235CB7B05C6D4666D5804630DEC279CBD0F662788AFC87C522DF92DBDB349D14EC8F741CC22B008E9BB53142527F7B2EE242FB90C738D043CE664261BBBD25A4628FEB9C0379FB094D4BEB0BB24BC273F1996B0A14468`), MD: internal.HB(`E025FF869583B28F0EFFE1E6E7FE8CEDE034743C53B15A784E5E88A98F2C72008A9529B25E08F6336A2790FE5B3DF6EA30724475C5E6D80CFAF309663D3499AD`), }, + //////////////////////////////////////////////////////////////////////////////////////////////////// + // 암호알고리즘 검증기준 V3.0 + // 테스트 벡터 + // LSH(512-512)LongMsg.txt + // 용량 문제로 일부만 추가 + { + Msg: internal.HB(`D1856E59922814F83FC399A1E052E0381400307AFC8436EC54B04E11E347FEE01610C375E8281107049C951A2E37BDF6DF997A572F894566F88D60E839B75EB6B8C1E56DEC5DB36619C6DFE9BD9B619D2BEDD54376977CA490CD84C8B3F8896900C15BA7676C02FEC668FF745524D5174124C8A69753E58F649B42191BB387E33638AD8D200006B553AB7E25BD7A204A6965DCE95B67870DBC1D2344378F610AA24E6486E1BFC87407B6E363BF464A20EBD897728A7B6A07DF7BAEAFD0351EC88C2907F970514F242CB2B69521305C800EA684AAEC36976616DE6CC3AD4CC6043BF41E50965FA3AB08C68025ACDF5D511BF728F948411510A96EE3E8987D62A6F8D532F21B91CDF3E31BC77A28FC557D5AF20DC86843ECEFE0529D875770F8950BF4CA47C78ED4E207D816FC5D2E4DEB13C0BA7D12E525EA02B32206B3CC93BBBC7A6EB762FFC062BB26F213131E4B838E88B7820FCFC7E859B8F8CF743A38FF538FA6`), + MD: internal.HB(`A44E15FBE202712AC2FDB0BA84D81E55BC89455D74379A742CA3861E68C9D3EB1322D8C61DFA5008835556CB4BBE24644065BD159F15C74D562FDBB18D38D931`), + }, + { + Msg: internal.HB(`AAB38B9A5A462DE52711745A2D12738D3D27A8DAD32B8AA9486261F149175AFB8883DB69B1F11476A020D77FD1E9A9C31821196792C150BDDB44EAC5815104F4B99A96355104042EE608EFC4575951E179C7C9740D6333BAEFE47CBD9049B41AA5C0650621C7249361916530A7AB946FCADF610C2C595B2AEB08C0DF5C4793F3B5BDF0E509819D2F7A82E1CBAA2799F672328834D7EAEF9439795D35CE93C9094F58DED9F17C968A97A50A9E461489FED988E7F6F65F178140FFFCC7CE747DE4DD5AD8EBC1FE382A22C089B064BC8B0D67A925597100FD786861459B4534D80AC58C85226150AA99819C050AED65C8AD845CEB653015C6011969DFBB1919010571B38E86BABA155F1E0127B2C7586765986AE1231BE69DA4BBDD732F346C205D479A9A1FB283A1025FB797B2DCDD91BD0B9CAE9A1BBBA8EAB686A8FD7C745F98B10852F632F5750CAE85FC12123B6E3E45B8FBD316DB0F5A732C272FDB7BE44015C45D122356BA057234FFD853BC256FAF866FD4F58FFB7D589798CD38C7D7DCDD97657B6BEF9773128C470E86A6DFD9AFD0B3A7A11F94D9CE8EA1DD7AA161F570490F3AF40835E0F8557DBB9342C302AE5C6E5401D301F83EDBED698B51AA1236A20556A4E9`), + MD: internal.HB(`8C01893D21B990344B96A72879CC64CF335F7B66EDB87C68224A11141E84FDFD2D8281552578BEC38BEA6DD9EA9B909A3A4E11C97C8FBD246C65A1913F465DE2`), + }, + { + Msg: internal.HB(`BCD38B5748E861D8FA7415F349E1FCF26B620E442278521FD9BB976AEFD765D953D5335A519CDAB0ABB74A5DEC587CC6F99DA892E913B7531679FB6874C61E22226D58253FDFE511FF51B762FEC06895D433728DE941A2348BD2CA653D2AB70A52236281BBB96A451ECCC2CA2822A7A823ACD6FCCB0AFB0B5D506C29F20B17DA0B7FBA366D3352922FB0D55C118523470F8E3AA83676AA20B77B4A7C3A7128D9740AC60CFC5483415A8357E161F1C3BAC063085AD38E98BBBFDACA26BD65D151B64BEFCB1125E699C9CFB022C26F6F485DB2A7D84A59AB249DF555EE24EEFA88F8CA9D3A53AC63E4A11B47E4DA050F3A0E047FEA42DFCCA27A54549D17158BC7631039226BF3E3680DF086F251BE8CD8FDE0F85A6329E47F7E802DFB3DE16D561FA4294B00024C6F33D5D413D09FCC6A4FCE7AEF563ED901D0004AD03F5A867D530ED77DBBDF883F3B52990EFFB2B8382F566D70C3279571995C11E4C488BF8428D7A98044947D204EEF3EAC85FE388AC30139A651EAFE17001DECFF757401B2C586091B4229155C943529B50B8B35A733564659A991FE3A2ECA42E8FA25325152A35E185DA4363A34ABC3F1386295D8A8DEFD5073237C234AEB7A68FAA33BA7F9B7103D3E0FCA0156DA7427B58A42654A1FC45556A95F1B7D08FE471EF705FDE04987538D71B8FA2448A521290B229640A3042EFA2A9168EFAA354D0D28779A2FE12A21F1D3E86DC37FBCA53DEE1FB2B3F226A408AEF952C75887416F3E78C80F076371133C42A15E`), + MD: internal.HB(`73D43824E954B79604B7096ED1ECC5C6B4AFF8251B12D865F9A0CFFF5735D3D4274A5E00984A0E5F5055AAAE318CA234298BF444211C768314B2EE9610C6AA83`), + }, + { + Msg: internal.HB(`07237C993A2003CA92907F283E7F232E9B5CEDEE42F2CDA8449A099BB4AEE01B66406EE4F70CCFAE0DAC8701E00B214BFA1C17303BCCF2211F35B23044147022267D42C62DCD5F86EBE1843C9E859647FD2F88DD31EE7FA2219D347AF25C9A9CCE41C2E9E54AFB7BB2963D8080D5C8492CFE089E2C40BC55D03A5723C86EA6B1E7F3B4F2276BEBB5EC357B768DE4007A10EF5F1B35A9F060B774E3D0CE32DC88F8FDE18CF918765B202506C6CD988501306B54FB531465EB5BB49F2B0B91844A89C6115D6539E595D7CEA61748DAA10714DBB0E68F66611F466054DC8771E51E23B60B0D72B6808D9898231107939AB445A53B86F0882D23FFE2CA8B4ABC482D4D35994528778F68EBEB445D11A9B92F4A33BD807E6211200EA0C9DF5D58F59F8FAB81AD90655A51582FD2A36E0646A1ABEBFE7F41DC543EFC041980C72F349B71808CECB166296E68CC968A27908931F137C52942DF40A44F74811790274D497C1C82AB946343E7A22A55BB4331C908A37EDC2688511B7B925ACB4CC12A87D237E82B913F45F1E58FB1DADECAD0504D4927091F1B1C2EEA4A1DBDC6601F2C5E2A4A4F47BCF27B90B5CAEC9AC55464296C9C15BC0426C11A0125202E78ED8214DEABB5741354290F9EDB52973BA74EC49344C8A44A591C333EDABB2B0E7ED21DDA7426C14A52428BD24ED57E34B056454687E980F59B865C8AA458662CB963A1A60B6AD56BD3102BD7893DF7B857C3D50DCD42F70ED649BD6CEBBD86D9867FC7CBDA495A7DC1D91837F652A9D084DF9B717E99B29BF1AB7F6C17B3341ECD6CB7D0478BF58903E6797AFBDB3D831FF0C0F902B758A7D4F5CA129002180276739A3DBCF75096817F772602A25ADA103F6B2EC2649237676EC5E7BE72D98D6ADC989BA05613AC23EC3AC5726DA9`), + MD: internal.HB(`D9F44128C4710BE2404E06946F99F83601A685638A9223BDEFD3229F2DC4621BB5B424310501CB288229104947140A4B9CB2647964D821C4AE35140AC9B0C05D`), + }, } )