diff options
author | Jack Lloyd <[email protected]> | 2017-12-28 12:15:57 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2017-12-28 12:15:57 -0500 |
commit | f2d994387cf4140afcbb8673e2267ee8a78ab25d (patch) | |
tree | 95c37953679459616308e4fc6e6f4eceee286eed /src/tests/data | |
parent | d4e9461c48d19882561577b7f2ab64aa732cbaf0 (diff) |
Fix RC4 name in case of skipped bytes
Add a test to detect that.
Add test that stream ciphers throw if they are asked to use
a nonce of a size they don't support.
Remove "In = 00...00" blocks since that's implicit in the stream
cipher tests.
Diffstat (limited to 'src/tests/data')
-rw-r--r-- | src/tests/data/stream/chacha.vec | 1 | ||||
-rw-r--r-- | src/tests/data/stream/rc4.vec | 39 |
2 files changed, 4 insertions, 36 deletions
diff --git a/src/tests/data/stream/chacha.vec b/src/tests/data/stream/chacha.vec index a361a913a..7b382082f 100644 --- a/src/tests/data/stream/chacha.vec +++ b/src/tests/data/stream/chacha.vec @@ -127,7 +127,6 @@ Out = F798A189F195E66982105FFB640BB7757F579DA31602FC93EC01AC56F85AC3C134A4547B73 # Key = 0000000000000000000000000000000000000000000000000000000000000000 Nonce = 000000000000000000000002 -In = 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 Out = C2C64D378CD536374AE204B9EF933FCD1A8B2288B3DFA49672AB765B54EE27C78A970E0E955C14F3A88E741B97C286F75F8FC299E8148362FA198A39531BED6D # Long output tests generated by DJB ref impl diff --git a/src/tests/data/stream/rc4.vec b/src/tests/data/stream/rc4.vec index 5c78a9cf6..a7cc48c7f 100644 --- a/src/tests/data/stream/rc4.vec +++ b/src/tests/data/stream/rc4.vec @@ -1,14 +1,11 @@ [RC4] Key = 0123456789ABCDEF -In = 0000000000000000 Out = 7494C2E7104B0879 Key = 0000000000000000 -In = 0000000000000000 Out = DE188941A3375D3A Key = EF012345 -In = 00000000000000000000 Out = D6A141A7EC3C38DFBD61 Key = 0123456789ABCDEF @@ -20,131 +17,99 @@ In = 010101010101010101010101010101010101010101010101010101010101010101010101010 Out = 7595C3E6114A09780C4AD452338E1FFD9A1BE9498F813D76533449B6778DCAD8C78A8D2BA9AC66085D0E53D59C26C2D1C490C1EBBE0CE66D1B6B1B13B6B919B847C25A91447A95E75E4EF16779CDE8BF0A95850E32AF9689444FD377108F98FDCBD4E726567500990BCC7E0CA3C4AAA304A387D20F3B8FBBCD42A1BD311D7A4303DDA5AB078896AE80C18B0AF66DFF319616EB784E495AD2CE90D7F772A81747B65F62093B1E0DB9E5BA532FAFEC47508323E671327DF9444432CB7367CEC82F5D44C0D00B67D650A075CD4B70DEDD77EB9B10231B6B5B741347396D62897421D43DF9B42E446E358E9C11A9B2184ECBEF0CD8E7A877EF968F1390EC9B3D35A5585CB009290E2FCDE7B5EC66D9084BE44055A619D9DD7FC3166F9487F7CB272912426445998514C15D53A18C864CE3A2B7555793988126520EACF2E3066E230C91BEE4DD5304F5FD0405B35BD99C73135D3D9BC335EE049EF69B3867BF2D7BD1EAA595D8BFC0066FF8D31509EB0C6CAA006C807A623EF84C3D33C195D23EE320C40DE0558157C822D4B8C569D849AED59D4E0FD7F379586B4B7FF684ED6A189F7486D49B9C4BAD9BA24B96ABF924372C8A8FFFB10D55354900A77A3DB5F205E1B99FCD8660863A159AD4ABE40FA48934163DDDE542A6585540FD683CBFD8C00F12129A284DEACC4CDEFE58BE7137541C047126C8D49E2755AB181AB7E940B0C0 Key = 2E -In = 0000000000000000000000000000000000000000000000000000000000000000000000000000 Out = 7D0EBD8586251EBA5612E7F0AE1461B85E7D6D01870ED72CAE875737359780097099D507F3F9 Key = 395C -In = 0000000000000000000000000000000000000000000000000000000000000000000000000000 Out = 9E10A6E1E7C66081EE6B06A86F27B31528029DB35C156E571A7A39E09CD7FDF706DE80056CFE Key = FEF6A9 -In = 0000000000000000000000000000000000000000000000000000000000000000000000000000 Out = 193FBAE8145757A70ABF7E4B5DA4BAD3C8208916085ED2462C901EF01FE42818B027A6E0EB2B Key = 547BD96F -In = 0000000000000000000000000000000000000000000000000000000000000000000000000000 Out = EB75D7A79E5F7C25156A5A63FECD9A6A67F48B97448EE49C3E3311C940ECE6D317F7CADDAEB6 Key = 284CD53FE9 -In = 0000000000000000000000000000000000000000000000000000000000000000000000000000 Out = 39979C6BC7B8DC7243AD1148C1AC76899922F9759DF1988CE2FEFE0FF91CF7E908F30777BBC6 Key = DE8C6ABE0052 -In = 0000000000000000000000000000000000000000000000000000000000000000000000000000 Out = 309D05E88D1A980CDBB341930F0086CB0672C85F37BDFC2CDC36D80044AF6B02E3475E3D2712 Key = B4D915156C6488 -In = 0000000000000000000000000000000000000000000000000000000000000000000000000000 Out = F409D463A1293AD11F4021982B7397D554F504E80C3AC0A6DC5C54CDDD090309BE00F9213E5E Key = 68B5FEF1FBC10AB4 -In = 0000000000000000000000000000000000000000000000000000000000000000000000000000 Out = F76241985FDD3668E0860D9396012F61F338EC7E41CC23BFD0B62869119560DC2A0604CB3C6A Key = EC498E2BCA7AC2BB9D -In = 0000000000000000000000000000000000000000000000000000000000000000000000000000 Out = 61FDF65602F7A63ADF57B05792F6C3642241EF46B97CD86171AED28D26D67BFD6E1E66C7ECF8 Key = 169D98FB855CDD15E205 -In = 0000000000000000000000000000000000000000000000000000000000000000000000000000 Out = 75258D597494A88866F4FE45B09ED2BE41D49B7D653539508B4BA1A3B6F9A08C3C103267D820 Key = 0C5710A5843C9AA2C675BB -In = 0000000000000000000000000000000000000000000000000000000000000000000000000000 Out = 9FD90A643014F30D5D2BDCCBC37212904F0AD69FB23637B0FBCFA2B6E61A2A7B8DD9B6B3A344 Key = 837C0042EEA1A15CA24AD014 -In = 0000000000000000000000000000000000000000000000000000000000000000000000000000 Out = 3E04F9E7804F3F8267B2F5EABF4722183BCB17266F81EBE3A3EE8B00D5C9A727105F43131667 Key = 4B5509356362D35FA63C5B8C44 -In = 0000000000000000000000000000000000000000000000000000000000000000000000000000 Out = FA9B2426AF83EC289356B58006370907DD5D8A7C1BA887F188B7F695DEB96F3DE94E5AF4DEA0 Key = 3F6CEBC8C94447FAAF9CEC4E778A -In = 0000000000000000000000000000000000000000000000000000000000000000000000000000 Out = 80ABD7170971295FA8D525B1EBB8CE95829CBC9C81AAD2472DEBED0F087558433B84E11CE574 Key = E0A97B4D129FB0BFDCAB24076DD5C2 -In = 0000000000000000000000000000000000000000000000000000000000000000000000000000 Out = 0C3E9A53C6862E2121F3D089737FF54F96916E469BDE5A645FA134ED4DDF76AB41B569649A98 Key = 97CD440324DA5FD1F7955C1C13B6B466 -In = 0000000000000000000000000000000000000000000000000000000000000000000000000000 Out = A68686B04D686AA107BD8D4CAB191A3EEC0A6294BC78B60F65C25CB47BD7BB3A48EFC4D26BE4 Key = 31DE7ED3BEB6EAF9131922D06201A19366 -In = 0000000000000000000000000000000000000000000000000000000000000000000000000000 Out = 07001BC046443693F173F723638A685CEB7DF1CD61D4E93A52E44B914063903A578138EA0FD8 Key = 368C7A9662385B308F696A0C58E5E57E768E -In = 0000000000000000000000000000000000000000000000000000000000000000000000000000 Out = 8C68C80B6A01A6571642966D601BABA39B1644177C7C3B35A9D91669F7AE8D22A57308D05F1A Key = F745ADBD90EF249FFC14183A9E20F69BC68214 -In = 0000000000000000000000000000000000000000000000000000000000000000000000000000 Out = 2A0BDB20E12B4BAA2E8C3D40B333B55ABBD0A156826BFBFDDE066F9D73398841E4A38CB78B5D Key = 872DE53D5116911D916A947041D22A0D50B7A5C1 -In = 0000000000000000000000000000000000000000000000000000000000000000000000000000 Out = 64ED1979AA8B458EE96EEC995E4EF2894DE0D029B1C0DA497A9BD7A81ECE4A408C253E9DA074 Key = 27FBBBE2EEC453C3D5970A6BAF03FFE299EED3FEFF -In = 0000000000000000000000000000000000000000000000000000000000000000000000000000 Out = DE31449883D5E651E6F889E2F18C453F06276D13999607FADC393A2619DAF7E2182C214872C5 Key = 1BCEBC37EF602F758CDFBFA1F1BCA61AEBEFDD79B179 -In = 0000000000000000000000000000000000000000000000000000000000000000000000000000 Out = 81570047B8BB9E5968B15F9C286F3F2B6264F8BCEE5C64A698BB2F35B697E32FAE6372BD07A7 Key = 6FBC9F1E72F7E6EE8D233C4B27EFB98351B5FEAE803732 -In = 0000000000000000000000000000000000000000000000000000000000000000000000000000 Out = 0D8BBBA8FEE3CCEE8CBB3548F52AA85D9FFA58E50655E19FFA31DFCC97F65116DA34BA775559 Key = 852F2F3CA64B0C256B080A577E135A54B01D9079A8785EF6 -In = 0000000000000000000000000000000000000000000000000000000000000000000000000000 Out = FA087B45D61566E102A2B099CCA04A499191C54BE21C67C17D40A2EE81B0AE1F525AD7E61BEE Key = 8EB43FD27CF769A39BBF2FE02B9E4C6ABEE996DE591E5FC521 -In = 0000000000000000000000000000000000000000000000000000000000000000000000000000 Out = 0E79E4BD49A8CFC6BD1031FDB6DF4BBCDB96D64967AD1710C3BD96A8287064B211A984C82C4D Key = C3CB4048B42619DBB1A16373749B8264960CF7CBB1EB6D3565BD -In = 0000000000000000000000000000000000000000000000000000000000000000000000000000 Out = B420CB807A85D5EF897AE3EC7C7CA53EB2580F11B9C815DC6870FD3D0DAEB8EFE5AA28DF2E9C Key = A7F0BD928BBA925A49B117ACDAA68702B4D4342F8FD62503319BF8 -In = 0000000000000000000000000000000000000000000000000000000000000000000000000000 Out = 92762FCEB9FC304D2FF7994AA435E4774FFC1D97C9CB36F89722AED507310EBF028EDB0F6323 Key = 3BC2C34F2653E210A1E15282FFA01149DF53AA6BFAF5FE04523DB614 -In = 0000000000000000000000000000000000000000000000000000000000000000000000000000 Out = 978D46FC073896B8875C7D4EB2F7EA35F58877550071F056584DC59E722E850E4E0DE75ECFF9 Key = 6538CBE80D306CD6AB1F027E4EFCAB804D407B00B281240B33A8C7F40D -In = 0000000000000000000000000000000000000000000000000000000000000000000000000000 Out = AE6AFEAF83A30B85D865FDC86362F95642E7A9CD157DA2F12ACFE9A718F3FB996C1C222B2432 Key = B7793A33C33FE1C3EE024A7EE40BBD13ACEB02049159717F35279D67F730 -In = 0000000000000000000000000000000000000000000000000000000000000000000000000000 Out = D4192C0818E7E4CA10AD05FBB3181C41C4D0BEA1805A883708FDE321B70D6C7D8B5601079D7C Key = 0C9856E6B845A33EECC0F30BF1974DB4DB088BF02314EE48FC369B6515994F -In = 0000000000000000000000000000000000000000000000000000000000000000000000000000 Out = 65029B1DD806694E4AEF4B63016D0685A8EEB682E86353C049378EC540BC0F4BB682740E3534 Key = CC26F0F11FF7759081CC87B0296E46E1A29611FA042C0F09033F12FD06468624 -In = 0000000000000000000000000000000000000000000000000000000000000000000000000000 Out = F33562228D9339F23EFE694E45A6A5B4457F2865061384B064DD45321D399FD1DB1C3CCBE64B Key = 51 @@ -275,6 +240,10 @@ Key = 8E3BE5C3118FA8382BE650BF4727BF6B84F6D962367AB966A072BD5913335457 In = B5E5EC7969BE71F2CB23A1B3F03683D760849D250CED76939779CB56F68A1FB0C5203E70C709AA3BD5F46BEF4810F7A1D5D3DF80C7E887BF8D8AAF851D22A70663CFB11F9FAFF3C7C3CF7989A62D3D51A317F5AB3F34E3E666FCEF0AF7565831C148AE441EC5B944267D2A5724225EA7FF93B39A3B4840FFE9F379598721C1C8E5C72DFB37999932C75D16C5F43D77199BE6FFC9F19EB8C19296AE5C06CF2B7263941D6CD40EF0D68E3D4E309E46794EB0CEF97FFC79A2209B49657CA5010257AB977BEB3070192E13672E94C99E8250CBA79BA46A23C1613D46EDEB7DF6D2AF8F0928115CC002103BE69BD1E7BA4D81EC5CEF372DD1A6FE6B2BBD643C04E0C7AFE61BAF19140C0A45A7226D059D66EBAEA5346F6C79B32F234813CA2365D3F45E13F77ADE50C16A216ED9497BCC77ADAE50DEDA9636E67504C71D499707951CB28EDCEB16974A7F8015170E7CD9A2962D529EA97877281DDBDAB23988502C46A0F2CDA4700DE1923334CFA6F344F4F8514DEDE2DDC82C0079729840A459A59DC89C57FE7CA34784178FDD70D1AD7F46C1D464DCCA8D0D9CFEC542A0689441360C33F1EACC4B882DE9BFE1B593459A13B73E86BD8C0B0282C69387B0506FAED80D13A2CD8A61FD556AA52CA111A250A9759B65C9815E8917A81248E47F7AB963A5D26ED23F07F1DC07F74490F97F0EE79AC55532855E44BF85AC6870ECDB6EB454F04332297D1A219E76CDD92BAC023036C580F3311D5255201F6617AD800A7C1BD4E0014AB554840B72BC2E6492CF27E246DFEEBFA6797892600B13CDDC4B71F644492950476B21315B6BB6599355EB2ED3B41DEDAEC9915803204A77B2BA17F5EE77143D62939326C6B0E47D013C8B4CA35EFD56969CD9922DF373DA3361692F2215D1D79A620179B399ED509B75D64229E678D50BA5DE297D4E3F43E63910BDE9F50D81477C4204205F743F94168FE1B1D49BF0DF9B4CDC54043BB0992D1D8D2DCCA0E2BC3D16BC9750DD2683C8B60313E9A8E613DE853B5BAA0A6F987F6E7DD4753E285ED6FF895D521BD38567588F36DCAAE3CFC13EA204DA65E1D8FDBDB8406FB10F99C977D2523B0556C989D7A13E4B6CFCE1C92CAD06F513D4E9ABF607D88FECECD8C47413ABD8814DE84075C4BD8315EBA45571247DB384BF6C84661B93E4CE7ECAE02CD3B2E5C93F08FD020AC41B583B73E5C1534D5F101058B9EF51BE65959D30E2A74F643F55A71DAC6441D3C03A117A675F6472AC5BE7C3D05791E85134CB10CD4C8A4F9E62EBFB24DE64FD5713CE856BE832F4D6C409390EDEA43E8B1BBEB195C38478342B33BE0595334B3D0EC5E392BABACF0052B3686AAE8AF9A9D49093EBDF6507E073EABAD120CAF75A172E08046542B149588AFBDA53A1713D91980F04E95A048BA7A92B98C4C090A622ED1C9E9BBEE79D1F24E36DA1 Out = A497092296A16CBAB0B6A592C33FEAB468D38BC809F666492B55F6A0FA8C02B38856A0ABFDB5EB16423C8FE8C50DF5522C27CB55251A8560E25633B97CD00434266786B57AA4CBFF2334D072CC32652917F8371F17EEEB05B46B520F97D63EEE0DBEB2FAC94896C49D13EA71EC1D6553B05DC266D1C2B8AB82932B5821A5DE558317B0C42DD1CC86DB784564BBAF915F5467701FD7C28C9AA51DE741D90FCB60A16FB21504F77E7EDD65CEF98E1C88CDC657BAB27039C3A89A022B18783E65FB6F7DB2D8DB623BCAF56FD94634FCA45C9537BDFA76C6DBA3F4A7F39037C2B935C25DD517AA2DA9CD8F5E83AE7D3E95ED63025E925253D1C5FCDBBBF18310954C22CE7851ADFB0527C057B51EAA8504082D138DC6569F9736EAB6C11BB0DB9243BBBEE576A1CB9390F92362F7A3581E91F27B3B47FA0E2E375584D8B7588BF5B5EF1EC2CA21267685AD9E76B985F5887B0A6E313BE8275E3F7C0BBE87228DFED01E37A7213349150191860B1AD3E20C91DD504C2FF642AB869E4B427B11B1C22A6D1029BCBC7610EDF9B2F4A2834A8897303A9C5A313D7C3B18796CB0F0F968B175D7CA252ADF80CFDB258228FB6A1A9AA52F8847E18866C4F1038B28A6A3EB14C51098049C519FFF83136206BE095094C66CF3F683BC5757D2394DE9E0808E42DE433988FF30326AD87C4AE38521A2B8E4BE8BD7634FC62FE02E450510A190A767B3475639A86ED3F31230C21B2C9BE5C1285C8B127BF153B2F3D082F4F6B18BC2AC3380BFC4BCAC748C7C8F781F58CD674DA01CC6351C354FA75879E002A6C95986A516035F6F2A9C50FC8BE5AC79B7E9EBE8FB4F4DFE1683C52C966DBEAC355965A04F9AA6C91833BD55F508B04100A88FDA58F14E5C260859EC7CB60F625928EDD7CAF8B3490655E234CC511B523C40B56BD07CB9A6A08A3642DA96C3D889C1D95176C9FAF6E28E74A548FD6F8C3B0FBCEC237A5BD739A2DCF7EA93943DAB8CB5F228E0C752867E116842EA867AB7FB0B4A6D031E9FEB8780C1318DFDBD6CD335122568E7B7294DD851C800156E13B445D64B22E9CB4649B07E4BA64D2D22387173727EB434AC69D7A3F5580EEED15F7D4F15B6A6B190630C3B4BF6CCBE98549152E5E6EF47FD02E5ACAA8D1C7E8621FBA77C4C712C6B91EE273B81C9CB4B0F5C610303F700C441DEE3C05540B793CD4E72C787F262F711EB788057486250076C2B1F09B93B2DD962098CDEFC48CF50A90DE67B97819FA4248D45BC29B3325C4EC1EF95C9C2B1701190BD7420FEDA9976DDF8CF70AFCAF1A8799738C5311757616764701CECEFF27D2676B1F55E3749751080358DD9E9A9125287342FCB08E6BD33C776B0E0E2A6F28A043F52A6508DA1C7F867512E13A64A20DB83D86884B50141254C71B7388F6A7D65EFB2D069A815FECB0970A3300CD5C5AA73776E2A +[RC4(3)] +Key = CC26F0F11FF7759081CC87B0296E46E1A29611FA042C0F09033F12FD06468624 +Out = 228D9339F23EFE694E45A6A5B4457F2865061384B064DD45321D399FD1DB1C3CCBE64B + [MARK-4] Key = AAC76CB1CE2BF5144EE9A543328AFB95 In = 97212EACFDB13D5BBC037B01A81CBB736B8136124E275E2F25823B8B98EDD3C4BF7F6AD52D |