aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests/data
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2018-11-04 02:34:23 -0500
committerJack Lloyd <[email protected]>2018-11-04 04:19:02 -0500
commita30ca750648bdb28f7d78ad8b6a17821e8917eb2 (patch)
tree7cd43c0c24ce203b761f643e5aaea3bf924d13ce /src/tests/data
parenteee2f37464b3de5760a8bdd26fd8deefd1643147 (diff)
Add ChaCha using SIMD_4x32
This allows supporting SSE2, NEON and AltiVec in a single codebase, so drop the NEON and SSE2 code. This new impl avoids having to do shuffles with every round and so is about 10% faster on Skylake. Also, fix bugs in both baseline and AVX2 implementations when the low counter overflowed. The SSE2 and NEON code were also buggy here.
Diffstat (limited to 'src/tests/data')
-rw-r--r--src/tests/data/stream/chacha.vec36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/tests/data/stream/chacha.vec b/src/tests/data/stream/chacha.vec
index 09b17b6ab..44c37fd61 100644
--- a/src/tests/data/stream/chacha.vec
+++ b/src/tests/data/stream/chacha.vec
@@ -474,6 +474,42 @@ Key = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Nonce = 000102030405060708090A0B
Out = DBF81BB406517BE1A54F4740E5DDDF2B7965747B757FA9D5B7EDD6B27FEDDB89D5D47F9B24E57DF393017A5079F61852CD8B86859884120AF867D25D3B259E2B
+# Generated by https://github.com/PeterReid/chacha this seeks to where
+# the 32 bit counter overflows
+
+Key = 0000000000000000000000000000000000000000000000000000000000000000
+Nonce = 000000000000000000000000
+Seek = 274877906810
+Out = 2f0dc99962dc032cc123482c31711f94c941af5ab1f4155784332ed5348fe79aec5ead4c06c3f13c280d8cc49925e4a6a5922ec80e13a4cdfa840c70a1427a3cb699166991a5
+
+# Generated by libsodium
+
+Key = 0000000000000000000000000000000000000000000000000000000000000000
+Nonce = 000000000000000000000000
+Seek = 274877905920
+Out = 35C5DDFAD2617B5A6BEDDCE1AF0C115DBD221D7E6760D5520A74EEA6EB1F9C703307014CCC1AF56B7B72266E087C4193B4230DE3023D86CFAE19A9B71591E2C08513AFB2CD7D939B5703E6883D460489FF00E3CE6EB5E1ECA5E31B2A895BDB856B3DE177489BDFDD97AB26141F94C771EBB94D187F2BF64172D3DC5F6FEB71234C0715DCF16BA0EDD15E8505FA3A97DA766C9348030A4BBA5734617027FC9E471125AA19C74296AC9CEA414955EBF0F6781E447978F287C1201A481A07BB0F92D7865365B38F87A915FC08A8925DB1124A6477F01B88EB0687606A8C53155E6F128FB6FFD03F83BFF2C719A94438CEF64219E1DEE94AD2371985B45BB8544335BCF1CBBA01AAD69D86140AD06553B30817AC31AD88CCE6DC45E493BCF7903955B4B4EB4EFD1537B6BC772AD80CCBC2721A5359A143B999FFFB5F85F9C46A193873554FD4FD66962C08D661323BD13E367EE6E64B0F7843BE9B91BD285184350CF9FF7710208FEFFB7B7F75E46504BC4EB1DB05021EAF656528F5D04C60D711527C307A8EDA4DE7F391B9924BC18EF13E4ACEF8622C724A2CDA344214415E06139C057CA6FD78417F38D7C86B53D3484F085397A21594409ECA7C5D193802D33CFD1C44E7C93185B3D8101E4A0C184B13F221BF40097A9C0DBBD5932D90BD342FA6F56654A7507E902AD9416EC69D692E19372707F530B4998BE876CD772B3933
+
+Key = 0000000000000000000000000000000000000000000000000000000000000000
+Nonce = 000000000000000000000000
+Seek = 274877906688
+Out = 98E5E54215C14F994E957FD3DD6A0309DFC3512CF12937F859A58725F16E9D4C3BFBA511BE065C2AE7452DA187096671731A9954137BA780B808F9E93C919871582CB23E8F29E3B966B29D19E01A01DEBB32A8635CF49A1B178C3CD53CBF3EC512DD6174690DA38FDA7C125351035F99E61042C5DCFA0C312E002F0DC99962DC032CC123482C31711F94C941AF5AB1F4155784332ED5348FE79AEC5EAD4C06C3F13C280D8CC49925E4A6A5922EC80E13A4CDFA840C70A1427A3CB699166991A5ACE4CD09E294D1912D4AD205D06F95D9C2F2BFCF453E8753F128765B62215F4D92C74F2F626C6A640C0B1284D839EC81F1696281DAFC3E684593937023B58B1D3DB41D3AA0D329285DE6F225E6E24BD59C9A17006943D5C9B680E3873BDC683A5819469899989690C281CD17C96159AF0682B5B903468A61F50228CF09622B5A46F0F6EFEE15C8F1B198CB49D92B990867905159440CC723916DC0012826981039CE1766AA2542B05DB3BD809AB142489D5DBFE1273E7399637B4B3213768AAA
+
+Key = 0000000000000000000000000000000000000000000000000000000000000000
+Nonce = 000000000000000000000000
+Seek = 274877906816
+Out = 032CC123482C31711F94C941AF5AB1F4155784332ED5348FE79AEC5EAD4C06C3F13C280D8CC49925E4A6A5922EC80E13A4CDFA840C70A1427A3CB699166991A5ACE4CD09E294D1912D4AD205D06F95D9C2F2BFCF453E8753F128765B62215F4D92C74F2F626C6A640C0B1284D839EC81F1696281DAFC3E684593937023B58B1D3DB41D3AA0D329285DE6F225E6E24BD59C9A17006943D5C9B680E3873BDC683A5819469899989690C281CD17C96159AF0682B5B903468A61F50228CF09622B5A46F0F6EFEE15C8F1B198CB49D92B990867905159440CC723916DC0012826981039CE1766AA2542B05DB3BD809AB142489D5DBFE1273E7399637B4B3213768AAA89B1889375E99FE2442C4F68ADF54158F4B8135713D00999B92B38E3AAFE5FF4959B1834BE3DC54FC36AA9D32EB121E0F688B90E7C7E2649F4AAEF407BDD2B9409EFEC03114CB5D4FFD1788E0FE1897BD176C1311E368368C657A5EE55C9CA03CC71744F030822D53A0486A97B9D98240274FADEAF262BD81B58BCE3DFA98414C24B5BC517FD91993A6B2E6232B0502125C6F48A6921E2DDA8EB6B3C4ECF2AAE889602AD90B5D2537FF45DF525C67B983B51DBD23E1280AA656EAE85B63CC42DE8C70E7C19C1D66E3F902BEA9D1ACFD3326B5985AD7C8CABD431ACBC62976CE523C938EA447D4AF0F560DC52B0AB1D7D66A42AB8272E2C40BD66470FE6F68846
+
+Key = 0000000000000000000000000000000000000000000000000000000000000000
+Nonce = 000000000000000000000000
+Seek = 274877906880
+Out = ACE4CD09E294D1912D4AD205D06F95D9C2F2BFCF453E8753F128765B62215F4D92C74F2F626C6A640C0B1284D839EC81F1696281DAFC3E684593937023B58B1D3DB41D3AA0D329285DE6F225E6E24BD59C9A17006943D5C9B680E3873BDC683A5819469899989690C281CD17C96159AF0682B5B903468A61F50228CF09622B5A46F0F6EFEE15C8F1B198CB49D92B990867905159440CC723916DC0012826981039CE1766AA2542B05DB3BD809AB142489D5DBFE1273E7399637B4B3213768AAA89B1889375E99FE2442C4F68ADF54158F4B8135713D00999B92B38E3AAFE5FF4959B1834BE3DC54FC36AA9D32EB121E0F688B90E7C7E2649F4AAEF407BDD2B9409EFEC03114CB5D4FFD1788E0FE1897BD176C1311E368368C657A5EE55C9CA03CC71744F030822D53A0486A97B9D98240274FADEAF262BD81B58BCE3DFA98414C24B5BC517FD91993A6B2E6232B0502125C6F48A6921E2DDA8EB6B3C4ECF2AAE889602AD90B5D2537FF45DF525C67B983B51DBD23E1280AA656EAE85B63CC42D
+
+Key = 0000000000000000000000000000000000000000000000000000000000000000
+Nonce = 000000000000000000000000
+Seek = 274877907008
+Out = 46F0F6EFEE15C8F1B198CB49D92B990867905159440CC723916DC0012826981039CE1766AA2542B05DB3BD809AB142489D5DBFE1273E7399637B4B3213768AAA89B1889375E99FE2442C4F68ADF54158F4B8135713D00999B92B38E3AAFE5FF4959B1834BE3DC54FC36AA9D32EB121E0F688B90E7C7E2649F4AAEF407BDD2B9409EFEC03114CB5D4FFD1788E0FE1897BD176C1311E368368C657A5EE55C9CA03CC71744F030822D53A0486A97B9D98240274FADEAF262BD81B58BCE3DFA98414C24B5BC517FD91993A6B2E6232B0502125C6F48A6921E2DDA8EB6B3C4ECF2AAE889602AD90B5D2537FF45DF525C67B983B51DBD23E1280AA656EAE85B63CC42DE8C70E7C19C1D66E3F902BEA9D1ACFD3326B5985AD7C8CABD431ACBC62976CE523C938EA447D4AF0F560DC52B0AB1D7D66A42AB8272E2C40BD66470FE6F6884612A11D899A0B7EB54907BBEDD6483EFCED1F15621D4673FF928C5AAB5F465257123679EF17C39648C537E150108E0F6608732E9F5B240689EEB5402FA04CCB89B7CA9649A361C526B41ED110402D9497715B03441118BC4953FCBEF395267570BD43EC0EEF7B6167F14FED205EB812907D0C134DC49FA5B18F5A3A3A9BD0A71B2FFE445EE4FABEB4054CC922BA360E4589B681F01E2A43B5A0C0F0C39A5ADB94B3BC2D20FF7F287FDF17F53B7CB5E3A1ABD46FC0819A3559C03C6B4106603066
+
+
# XChaCha tests from https://github.com/aead/chacha20
Key = 0000000000000000000000000000000000000000000000000000000000000000