示例#1
0
 public Keccak224()
     : base(HashFunction.Keccak224)
 {
     DiscreteVectorTests.Add(new DiscreteVectorDigestTestCase("", base.Hash, "".HexToBinary(), "f71837502ba8e10837bdd8d365adb85591895602fc552b48b7390abd".HexToBinary()));
     DiscreteVectorTests.Add(new DiscreteVectorDigestTestCase("", base.Hash, "54686520717569636b2062726f776e20666f78206a756d7073206f76657220746865206c617a7920646f67".HexToBinary(), "310aee6b30c47350576ac2873fa89fd190cdc488442f3ef654cf23fe".HexToBinary()));
     DiscreteVectorTests.Add(new DiscreteVectorDigestTestCase("", base.Hash, "54686520717569636b2062726f776e20666f78206a756d7073206f76657220746865206c617a7920646f672e".HexToBinary(), "c59d4eaeac728671c635ff645014e2afa935bebffdb5fbd207ffdeab".HexToBinary()));
 }
示例#2
0
 public Keccak512()
     : base(HashFunction.Keccak512)
 {
     DiscreteVectorTests.Add(new DiscreteVectorDigestTestCase("", base.Hash, "".HexToBinary(), "0eab42de4c3ceb9235fc91acffe746b29c29a8c366b7c60e4e67c466f36a4304c00fa9caf9d87976ba469bcbe06713b435f091ef2769fb160cdab33d3670680e".HexToBinary()));
     DiscreteVectorTests.Add(new DiscreteVectorDigestTestCase("", base.Hash, "54686520717569636b2062726f776e20666f78206a756d7073206f76657220746865206c617a7920646f67".HexToBinary(), "d135bb84d0439dbac432247ee573a23ea7d3c9deb2a968eb31d47c4fb45f1ef4422d6c531b5b9bd6f449ebcc449ea94d0a8f05f62130fda612da53c79659f609".HexToBinary()));
     DiscreteVectorTests.Add(new DiscreteVectorDigestTestCase("", base.Hash, "54686520717569636b2062726f776e20666f78206a756d7073206f76657220746865206c617a7920646f672e".HexToBinary(), "ab7192d2b11f51c7dd744e7b3441febf397ca07bf812cceae122ca4ded6387889064f8db9230f173f6d1ab6e24b6e50f065b039f799f5592360a6558eb52d760".HexToBinary()));
 }
示例#3
0
 public Keccak256()
     : base(HashFunction.Keccak256)
 {
     DiscreteVectorTests.Add(new DiscreteVectorDigestTestCase("", base.Hash, "".HexToBinary(), "c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470".HexToBinary()));
     DiscreteVectorTests.Add(new DiscreteVectorDigestTestCase("", base.Hash, "54686520717569636b2062726f776e20666f78206a756d7073206f76657220746865206c617a7920646f67".HexToBinary(), "4d741b6f1eb29cb2a9b9911c82f56fa8d73b04959d3d9d222895df6c0b28aa15".HexToBinary()));
     DiscreteVectorTests.Add(new DiscreteVectorDigestTestCase("", base.Hash, "54686520717569636b2062726f776e20666f78206a756d7073206f76657220746865206c617a7920646f672e".HexToBinary(), "578951e24efd62a3d63a86f7cd19aaa53c898fe287d2552133220370240b572d".HexToBinary()));
 }
示例#4
0
 public Keccak384()
     : base(HashFunction.Keccak384)
 {
     DiscreteVectorTests.Add(new DiscreteVectorDigestTestCase("", base.Hash, "".HexToBinary(), "2c23146a63a29acf99e73b88f8c24eaa7dc60aa771780ccc006afbfa8fe2479b2dd2b21362337441ac12b515911957ff".HexToBinary()));
     DiscreteVectorTests.Add(new DiscreteVectorDigestTestCase("", base.Hash, "54686520717569636b2062726f776e20666f78206a756d7073206f76657220746865206c617a7920646f67".HexToBinary(), "283990fa9d5fb731d786c5bbee94ea4db4910f18c62c03d173fc0a5e494422e8a0b3da7574dae7fa0baf005e504063b3".HexToBinary()));
     DiscreteVectorTests.Add(new DiscreteVectorDigestTestCase("", base.Hash, "54686520717569636b2062726f776e20666f78206a756d7073206f76657220746865206c617a7920646f672e".HexToBinary(), "9ad8e17325408eddb6edee6147f13856ad819bb7532668b605a24a2d958f88bd5c169e56dc4b2f89ffd325f6006d820b".HexToBinary()));
 }
示例#5
0
        public Sha256()
            : base(HashFunction.Sha256)
        {
            DiscreteVectorTests.Add(new DiscreteVectorDigestTestCase("", base.Hash, "", "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"));

            DiscreteVectorTests.Add(new DiscreteVectorDigestTestCase("", base.Hash, "a", "ca978112ca1bbdcafac231b39a23dc4da786eff8147c4e72b9807785afee48bb"));

            DiscreteVectorTests.Add(new DiscreteVectorDigestTestCase("", base.Hash, "abc", "ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad"));

            DiscreteVectorTests.Add(new DiscreteVectorDigestTestCase("", base.Hash, "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq", "248d6a61d20638b8e5c026930c3e6039a33ce45964ff2167f6ecedd419db06c1"));
        }
示例#6
0
        public Sha512()
            : base(HashFunction.Sha512)
        {
            DiscreteVectorTests.Add(new DiscreteVectorDigestTestCase("", base.Hash, "", "cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e"));

            DiscreteVectorTests.Add(new DiscreteVectorDigestTestCase("", base.Hash, "a", "1f40fc92da241694750979ee6cf582f2d5d7d28e18335de05abc54d0560e0f5302860c652bf08d560252aa5e74210546f369fbbbce8c12cfc7957b2652fe9a75"));

            DiscreteVectorTests.Add(new DiscreteVectorDigestTestCase("", base.Hash, "abc", "ddaf35a193617abacc417349ae20413112e6fa4e89a97ea20a9eeee64b55d39a2192992a274fc1a836ba3c23a3feebbd454d4423643ce80e2a9ac94fa54ca49f"));

            DiscreteVectorTests.Add(new DiscreteVectorDigestTestCase("", base.Hash, "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu", "8e959b75dae313da8cf4f72814fc143f8f7779c6eb9f7fa17299aeadb6889018501d289e4900f7e4331b99dec4b5433ac7d329eeb6dd26545e96e55b874be909"));
        }
示例#7
0
        public Whirlpool()
            : base(HashFunction.Whirlpool)
        {
            DiscreteVectorTests.Add(new DiscreteVectorDigestTestCase("", base.Hash, "", "19FA61D75522A4669B44E39C1D2E1726C530232130D407F89AFEE0964997F7A73E83BE698B288FEBCF88E3E03C4F0757EA8964E59B63D93708B138CC42A66EB3"));

            DiscreteVectorTests.Add(new DiscreteVectorDigestTestCase("", base.Hash, "a", "8ACA2602792AEC6F11A67206531FB7D7F0DFF59413145E6973C45001D0087B42D11BC645413AEFF63A42391A39145A591A92200D560195E53B478584FDAE231A"));

            DiscreteVectorTests.Add(new DiscreteVectorDigestTestCase("", base.Hash, "abc", "4E2448A4C6F486BB16B6562C73B4020BF3043E3A731BCE721AE1B303D97E6D4C7181EEBDB6C57E277D0E34957114CBD6C797FC9D95D8B582D225292076D4EEF5"));

            DiscreteVectorTests.Add(new DiscreteVectorDigestTestCase("", base.Hash, "message digest", "378C84A4126E2DC6E56DCC7458377AAC838D00032230F53CE1F5700C0FFB4D3B8421557659EF55C106B4B52AC5A4AAA692ED920052838F3362E86DBD37A8903E"));

            DiscreteVectorTests.Add(new DiscreteVectorDigestTestCase("", base.Hash, "abcdefghijklmnopqrstuvwxyz", "F1D754662636FFE92C82EBB9212A484A8D38631EAD4238F5442EE13B8054E41B08BF2A9251C30B6A0B8AAE86177AB4A6F68F673E7207865D5D9819A3DBA4EB3B"));

            DiscreteVectorTests.Add(new DiscreteVectorDigestTestCase("", base.Hash, "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", "DC37E008CF9EE69BF11F00ED9ABA26901DD7C28CDEC066CC6AF42E40F82F3A1E08EBA26629129D8FB7CB57211B9281A65517CC879D7B962142C65F5A7AF01467"));

            DiscreteVectorTests.Add(new DiscreteVectorDigestTestCase("", base.Hash, "12345678901234567890123456789012345678901234567890123456789012345678901234567890", "466EF18BABB0154D25B9D38A6414F5C08784372BCCB204D6549C4AFADB6014294D5BD8DF2A6C44E538CD047B2681A51A2C60481E88C5A20B2C2A80CF3A9A083B"));

            DiscreteVectorTests.Add(new DiscreteVectorDigestTestCase("", base.Hash, "abcdbcdecdefdefgefghfghighijhijk", "2A987EA40F917061F5D6F0A0E4644F488A7A5A52DEEE656207C562F988E95C6916BDC8031BC5BE1B7B947639FE050B56939BAAA0ADFF9AE6745B7B181C3BE3FD"));
        }
示例#8
0
        public Hc256() : base(StreamCipher.Hc256)
        {
            // Data from ESTREAM verified test vectors
            // http://www.ecrypt.eu.org/stream/svn/viewcvs.cgi/ecrypt/trunk/submissions/hc-256/verified.test-vectors?rev=149&view=markup

            DiscreteVectorTests.Add(new DiscreteVectorTestCase(
                                        "Set 2, vector# 0",
                                        "00000000000000000000000000000000",
                                        "00000000000000000000000000000000",
                                        DiscretePlaintext,
                                        "5B078985D8F6F30D42C5C02FA6B67951" +
                                        "53F06534801F89F24E74248B720B4818" +
                                        "CD9227ECEBCF4DBF8DBF6977E4AE14FA" +
                                        "E8504C7BC8A9F3EA6C0106F5327E6981"));

            DiscreteVectorTests.Add(new DiscreteVectorTestCase(
                                        "Set 2, vector# 9",
                                        "09090909090909090909090909090909",
                                        "00000000000000000000000000000000",
                                        DiscretePlaintext,
                                        "F5C2926651AEED9AF1A9C2F04C03D081" +
                                        "2145B56AEA46EB283A25A4C9E3D8BEB4" +
                                        "821B418F06F2B9DCDF1A85AB8C02CD14" +
                                        "62E1BBCAEC9AB0E99AA6AFF918BA627C"));

            DiscreteVectorTests.Add(new DiscreteVectorTestCase(
                                        "Set 2, vector# 135",
                                        "87878787878787878787878787878787",
                                        "00000000000000000000000000000000",
                                        DiscretePlaintext,
                                        "CEC0C3852E3B98233EBCB975C10B1191" +
                                        "3C69F2275EB97A1402EDF16C6FBE19BE" +
                                        "79D65360445BCB63676E6553B609A065" +
                                        "0155C3B22DD1975AC0F3F65063A2E16E"));

            DiscreteVectorTests.Add(new DiscreteVectorTestCase(
                                        "Set 6, vector# 1",
                                        "0558ABFE51A4F74A9DF04396E93C8FE2" +
                                        "3588DB2E81D4277ACD2073C6196CBF12",
                                        "167DE44BB21980E74EB51C83EA51B81F" +
                                        "86ED54BB2289F057BE258CF35AC1288F",
                                        DiscretePlaintext,
                                        "C44B5262F2EAD9C018213127686DB742" +
                                        "A72D3F2D61D18F0F4E7DE5B4F7ADABE0" +
                                        "7E0C82033B139F02BAACB4E2F2D0BE30" +
                                        "110C3A8A2B621523756692877C905DD0"));

            DiscreteVectorTests.Add(new DiscreteVectorTestCase(
                                        "Set 6, vector# 2",
                                        "0A5DB00356A9FC4FA2F5489BEE4194E7" +
                                        "3A8DE03386D92C7FD22578CB1E71C417",
                                        "1F86ED54BB2289F057BE258CF35AC128" +
                                        "8FF65DC42B92F960C72E95FC63CA3198",
                                        DiscretePlaintext,
                                        "9D13AA06122F4F03AE60D507701F1ED0" +
                                        "63D7530FF35EE76CAEDCBFB01D8A239E" +
                                        "FA4A44B272DE9B4092E2AD56E87C3A60" +
                                        "89F5A074D1F6E5B8FC6FABEE0C936F06"));

            DiscreteVectorTests.Add(new DiscreteVectorTestCase(
                                        "Set 6, vector# 3",
                                        "0F62B5085BAE0154A7FA4DA0F34699EC" +
                                        "3F92E5388BDE3184D72A7DD02376C91C",
                                        "288FF65DC42B92F960C72E95FC63CA31" +
                                        "98FF66CD349B0269D0379E056CD33AA1",
                                        DiscretePlaintext,
                                        "C8632038DA61679C4685288B37D3E232" +
                                        "7BC2D28C266B041FE0CA0D3CFEED8FD5" +
                                        "753259BAB757168F85EA96ADABD823CA" +
                                        "4684E918423E091565713FEDDE2CCFE0"));

            SegmentedVectorTests.Add(new SegmentedVectorTestCase(
                                         "[K128-IV128] Set 6, vector# 0",
                                         "0053A6F94C9FF24598EB3E91E4378ADD",
                                         "0D74DB42A91077DE45AC137AE148AF16",
                                         new TestVectorSegment[] {
                new TestVectorSegment(
                    "stream[0..63]",
                    0,
                    "425A5E6F68EC055F38383ADC5CA9C048" +
                    "D6455C56A5ACED215E22665185E497EB" +
                    "3A2F5C0D45057169965EA37FE19F5D83" +
                    "C95C4BEE11E8FA89545A38DD9D18AD6D"
                    ),
                new TestVectorSegment(
                    "stream[65472..65535]",
                    65472,
                    "EFFA27F50B0B4C4AB3C7855CD5DD9EFD" +
                    "B61783161678C9728B9032C2CB09A0B2" +
                    "D2578C53BF3C3E67D382BC89D824D63B" +
                    "20E62F414E4AC36472A16F4992DF4496"
                    ),
                new TestVectorSegment(
                    "stream[65536..65599]",
                    65536,
                    "0111EEC218892B446FDFDBA9D0C734DF" +
                    "C209D35FA86C1BEAC0D266E5DC4B3243" +
                    "68B4263BA7A3517805D1501B36450FFA" +
                    "1544812EBC0B9DDED93F5D45C4D83FFC"
                    ),
                new TestVectorSegment(
                    "stream[131008..131071]",
                    131008,
                    "D966650E1A27DF3CB71B1E64CD3E7EEC" +
                    "2D3EEEA2953E2FC5571B4380EA3BAEB5" +
                    "3F014B4EE071A426E4A518E1AF335BD3" +
                    "76309236760E0DF6184B3E34BF861458"
                    )
            }
                                         ));

            SegmentedVectorTests.Add(new SegmentedVectorTestCase(
                                         "[K128-IV256] Set 6, vector# 0",
                                         "0053A6F94C9FF24598EB3E91E4378ADD",
                                         "0D74DB42A91077DE45AC137AE148AF16" +
                                         "7DE44BB21980E74EB51C83EA51B81F86",
                                         new TestVectorSegment[] {
                new TestVectorSegment(
                    "stream[0..63]",
                    0,
                    "914AEBA9E4BE90FD07AA58B6E2536B59" +
                    "0DD63BA810A2B96BAD5DAC1818722BEC" +
                    "61725C75B9E6194F57D3D2BBFE795E73" +
                    "90405CA97249262093234239E35ED9E4"
                    ),
                new TestVectorSegment(
                    "stream[65472..65535]",
                    65472,
                    "346C1A7D71DBB8FB69EA78F07D60A9A7" +
                    "20D0ED544149AF102C12678D4AE0C5DF" +
                    "E3521B7344F91977799085008EA00432" +
                    "772C0B4ABEC1DB2C47608F9A29CC76EA"
                    ),
                new TestVectorSegment(
                    "stream[65536..65599]",
                    65536,
                    "6F3B93E808687BE8E37A635E15B13052" +
                    "60ED65488A59125D84726219AEE62087" +
                    "47C6672C585759BA60BFD7F55AB975D4" +
                    "B61596A506F8763F715F27A36082DB51"
                    ),
                new TestVectorSegment(
                    "stream[131008..131071]",
                    131008,
                    "C64CAD1578C28BF19F11B14F3D33C681" +
                    "A85D28A4B2D547652A7179C31127C306" +
                    "DC04BE79BC1DA0279C69F9418311E57C" +
                    "0F13D9E993008796EA10607A63BDC772"
                    )
            }
                                         ));

            SegmentedVectorTests.Add(new SegmentedVectorTestCase(
                                         "[K256-IV256] Set 6, vector# 0",
                                         "0053A6F94C9FF24598EB3E91E4378ADD" +
                                         "3083D6297CCF2275C81B6EC11467BA0D",
                                         "0D74DB42A91077DE45AC137AE148AF16" +
                                         "7DE44BB21980E74EB51C83EA51B81F86",
                                         new TestVectorSegment[] {
                new TestVectorSegment(
                    "stream[0..63]",
                    0,
                    "23D9E70A45EB0127884D66D9F6F23C01" +
                    "D1F88AFD629270127247256C1FFF91E9" +
                    "1A797BD98ADD23AE15BEE6EEA3CEFDBF" +
                    "A3ED6D22D9C4F459DB10C40CDF4F4DFF"
                    ),
                new TestVectorSegment(
                    "stream[65472..65535]",
                    65472,
                    "CFF0058C45807C1F4300D118FDFC3B21" +
                    "370936B39391791C92A821E1C8E8F248" +
                    "BBBF378679468218FF5F6560B79A6015" +
                    "82B81315DC19D8583263958B068BEA48"
                    ),
                new TestVectorSegment(
                    "stream[65536..65599]",
                    65536,
                    "871A09D393D8888EBEA453F518BD300D" +
                    "8233E906A31631D29A4A1834E268C3E4" +
                    "F65F4F65B1B9E55606BDF28A571CA4E7" +
                    "59BDE4718E1E13731663F5CAF1CB0F1E"
                    ),
                new TestVectorSegment(
                    "stream[131008..131071]",
                    131008,
                    "15360407DA7B389DF28C08B2221F5E0D" +
                    "96B34839325795A70A3F65D9CBB3848D" +
                    "8C0793A53E8C4D71D8B53B2923A90B37" +
                    "FE412A4485F0CC741E65743C6F1ECB4A"
                    )
            }
                                         ));
        }
示例#9
0
        public Hc128() : base(StreamCipher.Hc128)
        {
            // Data from ESTREAM verified test vectors
            // http://www.ecrypt.eu.org/stream/svn/viewcvs.cgi/ecrypt/trunk/submissions/hc-256/hc-128/verified.test-vectors?rev=210&view=markup

            DiscreteVectorTests.Add(new DiscreteVectorTestCase(
                                        "[K128-IV128] Set 2, vector# 0",
                                        "00000000000000000000000000000000",
                                        "00000000000000000000000000000000",
                                        MSG,
                                        "82001573A003FD3B7FD72FFB0EAF63AA" +
                                        "C62F12DEB629DCA72785A66268EC758B" +
                                        "1EDB36900560898178E0AD009ABF1F49" +
                                        "1330DC1C246E3D6CB264F6900271D59C"
                                        ));

            DiscreteVectorTests.Add(new DiscreteVectorTestCase(
                                        "[K128-IV128] Set 6, vector# 1",
                                        "0558ABFE51A4F74A9DF04396E93C8FE2",
                                        "167DE44BB21980E74EB51C83EA51B81F",
                                        MSG,
                                        "4F864BF3C96D0363B1903F0739189138" +
                                        "F6ED2BC0AF583FEEA0CEA66BA7E06E63" +
                                        "FB28BF8B3CA0031D24ABB511C57DD17B" +
                                        "FC2861C32400072CB680DF2E58A5CECC"
                                        ));

            DiscreteVectorTests.Add(new DiscreteVectorTestCase(
                                        "[K128-IV128] Set 6, vector# 2",
                                        "0A5DB00356A9FC4FA2F5489BEE4194E7",
                                        "1F86ED54BB2289F057BE258CF35AC128",
                                        MSG,
                                        "82168AB0023B79AAF1E6B4D823855E14" +
                                        "A7084378036A951B1CFEF35173875ED8" +
                                        "6CB66AB8410491A08582BE40080C3102" +
                                        "193BA567F9E95D096C3CC60927DD7901"
                                        ));

            DiscreteVectorTests.Add(new DiscreteVectorTestCase(
                                        "[K128-IV128] Set 6, vector# 3",
                                        "0F62B5085BAE0154A7FA4DA0F34699EC",
                                        "288FF65DC42B92F960C72E95FC63CA31",
                                        MSG,
                                        "1CD8AEDDFE52E217E835D0B7E84E2922" +
                                        "D04B1ADBCA53C4522B1AA604C42856A9" +
                                        "0AF83E2614BCE65C0AECABDD8975B557" +
                                        "00D6A26D52FFF0888DA38F1DE20B77B7"
                                        ));

            SegmentedVectorTests.Add(new SegmentedVectorTestCase(
                                         "[K128-IV128] Set 6, vector# 0",
                                         "0F62B5085BAE0154A7FA4DA0F34699EC",
                                         "288FF65DC42B92F960C72E95FC63CA31",
                                         new TestVectorSegment[] {
                new TestVectorSegment(
                    "stream[0..63]",
                    0,
                    "1CD8AEDDFE52E217E835D0B7E84E2922" +
                    "D04B1ADBCA53C4522B1AA604C42856A9" +
                    "0AF83E2614BCE65C0AECABDD8975B557" +
                    "00D6A26D52FFF0888DA38F1DE20B77B7"
                    ),
                new TestVectorSegment(
                    "stream[65472..65535]",
                    65472,
                    "BB599F93F4F244D717CA9818212B06D5" +
                    "6D99AD4CA1F78725DBA89EA1D1F05B27" +
                    "093A17D745396D8CFD0256CD50674046" +
                    "13108E2200A8F1C49075B376A7460515"
                    ),
                new TestVectorSegment(
                    "stream[65536..65599]",
                    65536,
                    "996C074A7C7C524F539037A8A9F3D193" +
                    "3BC311B548BD567F8AE1B4325C51C5F3" +
                    "4B0DE1B4A4651829108CA92AE23D57C7" +
                    "0EAFA766097DB0539BE77E6500703746"
                    ),
                new TestVectorSegment(
                    "stream[131008..131071]",
                    131008,
                    "43EF1ADFE8265C46FF7FBA43B78F899F" +
                    "22C3B9F069B786982145D601627CDC49" +
                    "2D27BB8D70FF6DA908F2606A0C44690C" +
                    "8502F9CFB3BD6CBFC9205470E3ABA387"
                    )
            }
                                         ));
        }
示例#10
0
        public Salsa20() : base(StreamCipher.Salsa20)
        {
            // Data from ESTREAM verified test vectors
            // http://www.ecrypt.eu.org/stream/svn/viewcvs.cgi/ecrypt/trunk/submissions/salsa20/verified.test-vectors?rev=140&view=markup

            DiscreteVectorTests.Add(new DiscreteVectorTestCase(
                                        "[K128-IV64] Set 0, vector# 0",
                                        "80000000000000000000000000000000",
                                        "0000000000000000",
                                        MSG,
                                        "4DFA5E481DA23EA09A31022050859936" +
                                        "DA52FCEE218005164F267CB65F5CFD7F" +
                                        "2B4F97E0FF16924A52DF269515110A07" +
                                        "F9E460BC65EF95DA58F740B7D1DBB0AA"
                                        ));
            DiscreteVectorTests.Add(new DiscreteVectorTestCase(
                                        "[K128-IV64] Set 1, vector# 9",
                                        "00400000000000000000000000000000",
                                        "0000000000000000",
                                        MSG,
                                        "0471076057830FB99202291177FBFE5D" +
                                        "38C888944DF8917CAB82788B91B53D1C" +
                                        "FB06D07A304B18BB763F888A61BB6B75" +
                                        "5CD58BEC9C4CFB7569CB91862E79C459"
                                        ));

            SegmentedVectorTests.Add(new SegmentedVectorTestCase(
                                         "[K128-IV64] Set 6, vector# 0",
                                         "0053A6F94C9FF24598EB3E91E4378ADD",
                                         "0D74DB42A91077DE",
                                         new TestVectorSegment[] {
                new TestVectorSegment(
                    "stream[0..63]",
                    0,
                    "05E1E7BEB697D999656BF37C1B978806" +
                    "735D0B903A6007BD329927EFBE1B0E2A" +
                    "8137C1AE291493AA83A821755BEE0B06" +
                    "CD14855A67E46703EBF8F3114B584CBA"
                    ),
                new TestVectorSegment(
                    "stream[65472..65535]",
                    65472,
                    "1A70A37B1C9CA11CD3BF988D3EE4612D" +
                    "15F1A08D683FCCC6558ECF2089388B8E" +
                    "555E7619BF82EE71348F4F8D0D2AE464" +
                    "339D66BFC3A003BF229C0FC0AB6AE1C6"
                    ),
                new TestVectorSegment(
                    "stream[65536..65599]",
                    65536,
                    "4ED220425F7DDB0C843232FB03A7B1C7" +
                    "616A50076FB056D3580DB13D2C295973" +
                    "D289CC335C8BC75DD87F121E85BB9981" +
                    "66C2EF415F3F7A297E9E1BEE767F84E2"
                    ),
                new TestVectorSegment(
                    "stream[131008..131071]",
                    131008,
                    "E121F8377E5146BFAE5AEC9F422F474F" +
                    "D3E9C685D32744A76D8B307A682FCA1B" +
                    "6BF790B5B51073E114732D3786B985FD" +
                    "4F45162488FEEB04C8F26E27E0F6B5CD"
                    )
            }
                                         ));

            SegmentedVectorTests.Add(new SegmentedVectorTestCase(
                                         "[K256-IV64] Set 6, vector# 0",
                                         "0053A6F94C9FF24598EB3E91E4378ADD" +
                                         "3083D6297CCF2275C81B6EC11467BA0D",
                                         "0D74DB42A91077DE",
                                         new TestVectorSegment[] {
                new TestVectorSegment(
                    "stream[0..63]",
                    0,
                    "F5FAD53F79F9DF58C4AEA0D0ED9A9601" +
                    "F278112CA7180D565B420A48019670EA" +
                    "F24CE493A86263F677B46ACE1924773D" +
                    "2BB25571E1AA8593758FC382B1280B71"
                    ),
                new TestVectorSegment(
                    "stream[65472..65535]",
                    65472,
                    "B70C50139C63332EF6E77AC54338A407" +
                    "9B82BEC9F9A403DFEA821B83F7860791" +
                    "650EF1B2489D0590B1DE772EEDA4E3BC" +
                    "D60FA7CE9CD623D9D2FD5758B8653E70"
                    ),
                new TestVectorSegment(
                    "stream[65536..65599]",
                    65536,
                    "81582C65D7562B80AEC2F1A673A9D01C" +
                    "9F892A23D4919F6AB47B9154E08E699B" +
                    "4117D7C666477B60F8391481682F5D95" +
                    "D96623DBC489D88DAA6956B9F0646B6E"
                    ),
                new TestVectorSegment(
                    "stream[131008..131071]",
                    131008,
                    "A13FFA1208F8BF50900886FAAB40FD10" +
                    "E8CAA306E63DF39536A1564FB760B242" +
                    "A9D6A4628CDC878762834E27A541DA2A" +
                    "5E3B3445989C76F611E0FEC6D91ACACC"
                    )
            }
                                         ));
        }
示例#11
0
 public XSalsa20() : base(StreamCipher.XSalsa20)
 {
     DiscreteVectorTests.Add(new DiscreteVectorTestCase(
                                 "n/a",
                                 "a6a7251c1e72916d11c2cb214d3c252539121d8e234e652d651fa4c8cff88030",
                                 "9e645a74e9e0a60d8243acd9177ab51a1beb8d5a2f5d700c",
                                 "093c5e5585579625337bd3ab619d615760d8c5b224a85b1d0efe0eb8a7ee163abb0376529fcc09bab506c618e13ce777d82c3ae9d1a6f972d4160287cbfe60bf2130fc0a6ff6049d0a5c8a82f429231f008082e845d7e189d37f9ed2b464e6b919e6523a8c1210bd52a02a4c3fe406d3085f5068d1909eeeca6369abc981a42e87fe665583f0ab85ae71f6f84f528e6b397af86f6917d9754b7320dbdc2fea81496f2732f532ac78c4e9c6cfb18f8e9bdf74622eb126141416776971a84f94d156beaf67aecbf2ad412e76e66e8fad7633f5b6d7f3d64b5c6c69ce29003c6024465ae3b89be78e915d88b4b5621d",
                                 "b2af688e7d8fc4b508c05cc39dd583d6714322c64d7f3e63147aede2d9534934b04ff6f337b031815cd094bdbc6d7a92077dce709412286822ef0737ee47f6b7ffa22f9d53f11dd2b0a3bb9fc01d9a88f9d53c26e9365c2c3c063bc4840bfc812e4b80463e69d179530b25c158f543191cff993106511aa036043bbc75866ab7e34afc57e2cce4934a5faae6eabe4f221770183dd060467827c27a354159a081275a291f69d946d6fe28ed0b9ce08206cf484925a51b9498dbde178ddd3ae91a8581b91682d860f840782f6eea49dbb9bd721501d2c67122dea3b7283848c5f13e0c0de876bd227a856e4de593a3"
                                 ));
     DiscreteVectorTests.Add(new DiscreteVectorTestCase(
                                 "n/a",
                                 "a6a7251c1e72916d11c2cb214d3c252539121d8e234e652d651fa4c8cff88030",
                                 "9e645a74e9e0a60d8243acd9177ab51a1beb8d5a2f5d700c",
                                 "093c5e5585579625337bd3ab619d615760d8c5b224a85b1d0efe0eb8a7ee163abb0376529fcc09bab506c618e13ce777d82c3ae9d1a6f972d4160287cbfe60bf2130fc0a6ff6049d0a5c8a82f429231f008082e845d7e189d37f9ed2b464e6b919e6523a8c1210bd52a02a4c3fe406d3085f5068d1909eeeca6369abc981a42e87fe665583f0ab85ae71f6f84f528e6b397af86f6917d9754b7320dbdc2fea81496f2732f532ac78c4e9c6cfb18f8e9bdf74622eb126141416776971a84f94d156beaf67aecbf2ad412e76e66e8fad7633f5b6d7f3d64b5c6c69ce29003c6024465ae3b89be78e915d88b4b5621d",
                                 "b2af688e7d8fc4b508c05cc39dd583d6714322c64d7f3e63147aede2d9534934b04ff6f337b031815cd094bdbc6d7a92077dce709412286822ef0737ee47f6b7ffa22f9d53f11dd2b0a3bb9fc01d9a88f9d53c26e9365c2c3c063bc4840bfc812e4b80463e69d179530b25c158f543191cff993106511aa036043bbc75866ab7e34afc57e2cce4934a5faae6eabe4f221770183dd060467827c27a354159a081275a291f69d946d6fe28ed0b9ce08206cf484925a51b9498dbde178ddd3ae91a8581b91682d860f840782f6eea49dbb9bd721501d2c67122dea3b7283848c5f13e0c0de876bd227a856e4de593a3"
                                 ));
     DiscreteVectorTests.Add(new DiscreteVectorTestCase(
                                 "n/a",
                                 "9e1da239d155f52ad37f75c7368a536668b051952923ad44f57e75ab588e475a",
                                 "af06f17859dffa799891c4288f6635b5c5a45eee9017fd72",
                                 "feac9d54fc8c115ae247d9a7e919dd76cfcbc72d32cae4944860817cbdfb8c04e6b1df76a16517cd33ccf1acda9206389e9e318f5966c093cfb3ec2d9ee2de856437ed581f552f26ac2907609df8c613b9e33d44bfc21ff79153e9ef81a9d66cc317857f752cc175fd8891fefebb7d041e6517c3162d197e2112837d3bc4104312ad35b75ea686e7c70d4ec04746b52ff09c421451459fb59f",
                                 "2c261a2f4e61a62e1b27689916bf03453fcbc97bb2af6f329391ef063b5a219bf984d07d70f602d85f6db61474e9d9f5a2deecb4fcd90184d16f3b5b5e168ee03ea8c93f3933a22bc3d1a5ae8c2d8b02757c87c073409052a2a8a41e7f487e041f9a49a0997b540e18621cad3a24f0a56d9b19227929057ab3ba950f6274b121f193e32e06e5388781a1cb57317c0ba6305e910961d01002f0"
                                 ));
     DiscreteVectorTests.Add(new DiscreteVectorTestCase(
                                 "n/a",
                                 "d5c7f6797b7e7e9c1d7fd2610b2abf2bc5a7885fb3ff78092fb3abe8986d35e2",
                                 "744e17312b27969d826444640e9c4a378ae334f185369c95",
                                 "7758298c628eb3a4b6963c5445ef66971222be5d1a4ad839715d1188071739b77cc6e05d5410f963a64167629757",
                                 "27b8cfe81416a76301fd1eec6a4d99675069b2da2776c360db1bdfea7c0aa613913e10f7a60fec04d11e65f2d64e"
                                 ));
     DiscreteVectorTests.Add(new DiscreteVectorTestCase(
                                 "n/a",
                                 "737d7811ce96472efed12258b78122f11deaec8759ccbd71eac6bbefa627785c",
                                 "6fb2ee3dda6dbd12f1274f126701ec75c35c86607adb3edd",
                                 "501325fb2645264864df11faa17bbd58312b77cad3d94ac8fb8542f0eb653ad73d7fce932bb874cb89ac39fc47f8267cf0f0c209f204b2d8578a3bdf461cb6a271a468bebaccd9685014ccbc9a73618c6a5e778a21cc8416c60ad24ddc417a130d53eda6dfbfe47d09170a7be1a708b7b5f3ad464310be36d9a2a95dc39e83d38667e842eb6411e8a23712297b165f690c2d7ca1b1346e3c1fccf5cafd4f8be0",
                                 "6724c372d2e9074da5e27a6c54b2d703dc1d4c9b1f8d90f00c122e692ace7700eadca942544507f1375b6581d5a8fb39981c1c0e6e1ff2140b082e9ec016fce141d5199647d43b0b68bfd0fea5e00f468962c7384dd6129aea6a3fdfe75abb210ed5607cef8fa0e152833d5ac37d52e557b91098a322e76a45bbbcf4899e790618aa3f4c2e5e0fc3de93269a577d77a5502e8ea02f717b1dd2df1ec69d8b61ca"
                                 ));
     DiscreteVectorTests.Add(new DiscreteVectorTestCase(
                                 "n/a",
                                 "760158da09f89bbab2c99e6997f9523a95fcef10239bcca2573b7105f6898d34",
                                 "43636b2cc346fc8b7c85a19bf507bdc3dafe953b88c69dba",
                                 "d30a6d42dff49f0ed039a306bae9dec8d9e88366cc19e8c3642fd58fa0794ebf8029d949730339b0823a51f0f49f0d2c71f1051c1e0e2c86941f172789cdb1b0107413e70f982ff9761877bb526ef1c3eb1106a948d60ef21bd35d32cfd64f89b79ed63ecc5cca56246af736766f285d8e6b0da9cb1cd21020223ffacc5a32",
                                 "c815b6b79b64f9369aec8dce8c753df8a50f2bc97c70ce2f014db33a65ac5816bac9e30ac08bdded308c65cb87e28e2e71b677dc25c5a6499c1553555daf1f55270a56959dffa0c66f24e0af00951ec4bb59ccc3a6c5f52e0981647e53e439313a52c40fa7004c855b6e6eb25b212a138e843a9ba46edb2a039ee82a263abe"
                                 ));
     DiscreteVectorTests.Add(new DiscreteVectorTestCase(
                                 "n/a",
                                 "27ba7e81e7edd4e71be53c07ce8e633138f287e155c7fa9e84c4ad804b7fa1b9",
                                 "ea05f4ebcd2fb6b000da0612861ba54ff5c176fb601391aa",
                                 "e09ff5d2cb050d69b2d42494bde5825238c756d6991d99d7a20d1ef0b83c371c89872690b2fc11d5369f4fc4971b6d3d6c078aef9b0f05c0e61ab89c025168054defeb03fef633858700c58b1262ce011300012673e893e44901dc18eee3105699c44c805897bdaf776af1833162a21a",
                                 "a23e7ef93c5d0667c96d9e404dcbe6be62026fa98f7a3ff9ba5d458643a16a1cef7272dc6097a9b52f35983557c77a11b314b4f7d5dc2cca15ee47616f861873cbfed1d32372171a61e38e447f3cf362b3abbb2ed4170d89dcb28187b7bfd206a3e026f084a7e0ed63d319de6bc9afc0"
                                 ));
     DiscreteVectorTests.Add(new DiscreteVectorTestCase(
                                 "n/a",
                                 "6799d76e5ffb5b4920bc2768bafd3f8c16554e65efcf9a16f4683a7a06927c11",
                                 "61ab951921e54ff06d9b77f313a4e49df7a057d5fd627989",
                                 "472766",
                                 "8fd7df"
                                 ));
     DiscreteVectorTests.Add(new DiscreteVectorTestCase(
                                 "n/a",
                                 "f68238c08365bb293d26980a606488d09c2f109edafa0bbae9937b5cc219a49c",
                                 "5190b51e9b708624820b5abdf4e40fad1fb950ad1adc2d26",
                                 "47ec6b1f73c4b7ff5274a0bfd7f45f864812c85a12fbcb3c2cf8a3e90cf66ccf2eacb521e748363c77f52eb426ae57a0c6c78f75af71284569e79d1a92f949a9d69c4efc0b69902f1e36d7562765543e2d3942d9f6ff5948d8a312cff72c1afd9ea3088aff7640bfd265f7a9946e606abc77bcedae6bddc75a0dba0bd917d73e3bd1268f727e0096345da1ed25cf553ea7a98fea6b6f285732de37431561ee1b3064887fbcbd71935e02",
                                 "36160e88d3500529ba4edba17bc24d8cfaca9a0680b3b1fc97cf03f3675b7ac301c883a68c071bc54acdd3b63af4a2d72f985e51f9d60a4c7fd481af10b2fc75e252fdee7ea6b6453190617dcc6e2fe1cd56585fc2f0b0e97c5c3f8ad7eb4f31bc4890c03882aac24cc53acc1982296526690a220271c2f6e326750d3fbda5d5b63512c831f67830f59ac49aae330b3e0e02c9ea0091d19841f1b0e13d69c9fbfe8a12d6f30bb734d9d2"
                                 ));
     DiscreteVectorTests.Add(new DiscreteVectorTestCase(
                                 "n/a",
                                 "45b2bd0de4ed9293ec3e26c4840faaf64b7d619d51e9d7a2c7e36c83d584c3df",
                                 "546c8c5d6be8f90952cab3f36d7c1957baaa7a59abe3d7e5",
                                 "5007c8cd5b3c40e17d7fe423a87ae0ced86bec1c39dc07a25772f3e96dabd56cd3fd7319f6c9654925f2d87087a700e1b130da796895d1c9b9acd62b266144067d373ed51e787498b03c52faad16bb3826fa511b0ed2a19a8663f5ba2d6ea7c38e7212e9697d91486c49d8a000b9a1935d6a7ff7ef23e720a45855481440463b4ac8c4f6e7062adc1f1e1e25d3d65a31812f58a71160",
                                 "8eacfba568898b10c0957a7d44100685e8763a71a69a8d16bc7b3f88085bb9a2f09642e4d09a9f0ad09d0aad66b22610c8bd02ff6679bb92c2c026a216bf425c6be35fb8dae7ff0c72b0efd6a18037c70eed0ca90062a49a3c97fdc90a8f9c2ea536bfdc41918a7582c9927fae47efaa3dc87967b7887dee1bf071734c7665901d9105dae2fdf66b4918e51d8f4a48c60d19fbfbbcba"
                                 ));
     DiscreteVectorTests.Add(new DiscreteVectorTestCase(
                                 "n/a",
                                 "fe559c9a282beb40814d016d6bfcb2c0c0d8bf077b1110b8703a3ce39d70e0e1",
                                 "b076200cc7011259805e18b304092754002723ebec5d6200",
                                 "6db65b9ec8b114a944137c821fd606be75478d928366d5284096cdef782fcff7e8f59cb8ffcda979757902c5ffa6bc477ceaa4cb5d5ea76f94d91e833f823a6bc78f1055dfa6a97bea8965c1cde67a668e001257334a585727d9e0f7c1a06e88d3d25a4e6d9096c968bf138e116a3ebeffd4bb4808adb1fd698164ba0a35c709a47f16f1f4435a2345a9194a00b95abd51851d505809a6077da9baca5831afff31578c487ee68f2767974a98a7e803aac788da98319c4ea8eaa3d394855651f484cef543f537e35158ee29",
                                 "4dce9c8f97a028051b0727f34e1b9ef21f06f0760f36e71713204027902090ba2bb6b13436ee778d9f50530efbd7a32b0d41443f58ccaee781c7b716d3a96fdec0e3764ed7959f34c3941278591ea033b5cbadc0f1916032e9bebbd1a8395b83fb63b1454bd775bd20b3a2a96f951246ac14daf68166ba62f6cbff8bd121ac9498ff8852fd2be975df52b5daef3829d18eda42e715022dcbf930d0a789ee6a146c2c7088c35773c63c06b4af4559856ac199ced86863e4294707825337c5857970eb7fddeb263781309011"
                                 ));
     DiscreteVectorTests.Add(new DiscreteVectorTestCase(
                                 "n/a",
                                 "0ae10012d7e56614b03dcc89b14bae9242ffe630f3d7e35ce8bbb97bbc2c92c3",
                                 "f96b025d6cf46a8a12ac2af1e2aef1fb83590adadaa5c5ea",
                                 "ea0f354e96f12bc72bbaa3d12b4a8ed879b042f0689878f46b651cc4116d6f78409b11430b3aaa30b2076891e8e1fa528f2fd169ed93dc9f84e24409eec2101daf4d057be2492d11de640cbd7b355ad29fb70400fffd7cd6d425abeeb732a0eaa4330af4c656252c4173deab653eb85c58462d7ab0f35fd12b613d29d473d330310dc323d3c66348bbdbb68a326324657cae7b77a9e34358f2cec50c85609e73056856796e3be8d62b6e2fe9f953",
                                 "e8abd48924b54e5b80866be7d4ebe5cf4274cafff08b39cb2d40a8f0b472398aedc776e0793812fbf1f60078635d2ed86b15efcdba60411ee23b07233592a44ec31b1013ce8964236675f8f183aef885e864f2a72edf4215b5338fa2b54653dfa1a8c55ce5d95cc605b9b311527f2e3463ffbec78a9d1d65dabad2f338769c9f43f133a791a11c7eca9af0b771a4ac32963dc8f631a2c11217ac6e1b9430c1aae1ceebe22703f429998a8fb8c641"
                                 ));
     DiscreteVectorTests.Add(new DiscreteVectorTestCase(
                                 "n/a",
                                 "082c539bc5b20f97d767cd3f229eda80b2adc4fe49c86329b5cd6250a9877450",
                                 "845543502e8b64912d8f2c8d9fffb3c69365686587c08d0c",
                                 "a96bb7e910281a6dfad7c8a9c370674f0ceec1ad8d4f0de32f9ae4a23ed329e3d6bc708f876640a229153ac0e7281a8188dd77695138f01cda5f41d5215fd5c6bdd46d982cb73b1efe2997970a9fdbdb1e768d7e5db712068d8ba1af6067b5753495e23e6e1963af012f9c7ce450bf2de619d3d59542fb55f3",
                                 "835da74fc6de08cbda277a7966a07c8dcd627e7b17adde6d930b6581e3124b8baad096f693991fedb1572930601fc7709541839b8e3ffd5f033d2060d999c6c6e3048276613e648000acb5212cc632a916afce290e20ebdf612d08a6aa4c79a74b070d3f872a861f8dc6bb07614db515d363349d3a8e3336a3"
                                 ));
     DiscreteVectorTests.Add(new DiscreteVectorTestCase(
                                 "n/a",
                                 "3d02bff3375d403027356b94f514203737ee9a85d2052db3e4e5a217c259d18a",
                                 "74216c95031895f48c1dba651555ebfa3ca326a755237025",
                                 "0d4b0f54fd09ae39baa5fa4baccf2e6682e61b257e01f42b8f",
                                 "16c4006c28365190411eb1593814cf15e74c22238f210afc3d"
                                 ));
     DiscreteVectorTests.Add(new DiscreteVectorTestCase(
                                 "n/a",
                                 "ad1a5c47688874e6663a0f3fa16fa7efb7ecadc175c468e5432914bdb480ffc6",
                                 "e489eed440f1aae1fac8fb7a9825635454f8f8f1f52e2fcc",
                                 "aa6c1e53580f03a9abb73bfdadedfecada4c6b0ebe020ef10db745e54ba861caf65f0e40dfc520203bb54d29e0a8f78f16b3f1aa525d6bfa33c54726e59988cfbec78056",
                                 "02fe84ce81e178e7aabdd3ba925a766c3c24756eefae33942af75e8b464556b5997e616f3f2dfc7fce91848afd79912d9fb55201b5813a5a074d2c0d4292c1fd441807c5"
                                 ));
     DiscreteVectorTests.Add(new DiscreteVectorTestCase(
                                 "n/a",
                                 "053a02bedd6368c1fb8afc7a1b199f7f7ea2220c9a4b642a6850091c9d20ab9c",
                                 "c713eea5c26dad75ad3f52451e003a9cb0d649f917c89dde",
                                 "8f0a8a164760426567e388840276de3f95cb5e3fadc6ed3f3e4fe8bc169d9388804dcb94b6587dbb66cb0bd5f87b8e98b52af37ba290629b858e0e2aa7378047a26602",
                                 "516710e59843e6fbd4f25d0d8ca0ec0d47d39d125e9dad987e0518d49107014cb0ae405e30c2eb3794750bca142ce95e290cf95abe15e822823e2e7d3ab21bc8fbd445"
                                 ));
     DiscreteVectorTests.Add(new DiscreteVectorTestCase(
                                 "n/a",
                                 "5b14ab0fbed4c58952548a6cb1e0000cf4481421f41288ea0aa84add9f7deb96",
                                 "54bf52b911231b952ba1a6af8e45b1c5a29d97e2abad7c83",
                                 "37fb44a675978b560ff9a4a87011d6f3ad2d37a2c3815b45a3c0e6d1b1d8b1784cd468927c2ee39e1dccd4765e1c3d676a335be1ccd6900a45f5d41a317648315d8a8c24adc64eb285f6aeba05b9029586353d303f17a807658b9ff790474e1737bd5fdc604aeff8dfcaf1427dcc3aacbb0256badcd183ed75a2dc52452f87d3c1ed2aa583472b0ab91cda20614e9b6fdbda3b49b098c95823cc72d8e5b717f2314b0324e9ce",
                                 "ae6deb5d6ce43d4b09d0e6b1c0e9f46157bcd8ab50eaa3197ff9fa2bf7af649eb52c68544fd3adfe6b1eb316f1f23538d470c30dbfec7e57b60cbcd096c782e7736b669199c8253e70214cf2a098fda8eac5da79a9496a3aae754d03b17c6d70d1027f42bf7f95ce3d1d9c338854e158fcc803e4d6262fb639521e47116ef78a7a437ca9427ba645cd646832feab822a208278e45e93e118d780b988d65397eddfd7a819526e"
                                 ));
     DiscreteVectorTests.Add(new DiscreteVectorTestCase(
                                 "n/a",
                                 "d74636e3413a88d85f322ca80fb0bd650bd0bf0134e2329160b69609cd58a4b0",
                                 "efb606aa1d9d9f0f465eaa7f8165f1ac09f5cb46fecf2a57",
                                 "f85471b75f6ec81abac2799ec09e98e280b2ffd64ca285e5a0109cfb31ffab2d617b2c2952a2a8a788fc0da2af7f530758f74f1ab56391ab5ff2adbcc5be2d6c7f49fbe8118104c6ff9a23c6dfe52f57954e6a69dcee5db06f514f4a0a572a9a8525d961dae72269b987189d465df6107119c7fa790853e063cba0fab7800ca932e258880fd74c33c784675bedad0e7c09e9cc4d63dd5e9713d5d4a0196e6b562226ac31b4f57c04f90a181973737ddc7e80f364112a9fbb435ebdbcabf7d490ce52",
                                 "b2b795fe6c1d4c83c1327e015a67d4465fd8e32813575cbab263e20ef05864d2dc17e0e4eb81436adfe9f638dcc1c8d78f6b0306baf938e5d2ab0b3e05e735cc6fff2d6e02e3d60484bea7c7a8e13e23197fea7b04d47d48f4a4e5944174539492800d3ef51e2ee5e4c8a0bdf050c2dd3dd74fce5e7e5c37364f7547a11480a3063b9a0a157b15b10a5a954de2731ced055aa2e2767f0891d4329c426f3808ee867bed0dc75b5922b7cfb895700fda016105a4c7b7f0bb90f029f6bbcb04ac36ac16"
                                 ));
 }
示例#12
0
        public Sosemanuk() : base(StreamCipher.Sosemanuk)
        {
            // http://www.ecrypt.eu.org/stream/svn/viewcvs.cgi/ecrypt/trunk/submissions/sosemanuk/unverified.test-vectors?rev=108&view=markup

            DiscreteVectorTests.Add(new DiscreteVectorTestCase(
                                        "Set 1, vector# 0",
                                        "80000000000000000000000000000000" +
                                        "00000000000000000000000000000000",
                                        "00000000000000000000000000000000",
                                        DiscretePlaintext,
                                        "1782FABFF497A0E89E16E1BCF22F0FE8" +
                                        "AA8C566D293AA35B2425E4F26E31C3E7" +
                                        "701C08A0D614AF3D3861A7DFF7D6A38A" +
                                        "0EFE84A29FADF68D390A3D15B75C972D"
                                        ));

            DiscreteVectorTests.Add(new DiscreteVectorTestCase(
                                        "Set 2, vector# 63",
                                        "3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F",
                                        "00000000000000000000000000000000",
                                        DiscretePlaintext,
                                        "7D755F30A2B747A50D7D28147EDF0B3E" +
                                        "3FAB6856A7373C7306C00D1D40769693" +
                                        "54D7AB4343C0115E7839502C5C699ED0" +
                                        "6DB119968AEBFD08D8B968A7161D613F"
                                        ));

            DiscreteVectorTests.Add(new DiscreteVectorTestCase(
                                        "Set 2, vector# 90",
                                        "5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A" +
                                        "5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A",
                                        "00000000000000000000000000000000",
                                        DiscretePlaintext,
                                        "F5D7D72686322D1751AFD16A1DD98282" +
                                        "D2B9A1EE0C305DF52F86AE1B831E90C2" +
                                        "2E2DE089CEE656A992736385D9135B82" +
                                        "3B3611098674BF820986A4342B89ABF7"
                                        ));

            DiscreteVectorTests.Add(new DiscreteVectorTestCase(
                                        "Set 3, vector# 135",
                                        "8788898A8B8C8D8E8F90919293949596" +
                                        "9798999A9B9C9D9E9FA0A1A2A3A4",
                                        "00000000000000000000000000000000",
                                        DiscretePlaintext,
                                        "9D7EE5A10BBB0756D66B8DAA5AE08F41" +
                                        "B05C9E7C6B13532EAA81F224282B61C6" +
                                        "6DEEE5AF6251DB26C49B865C5AD4250A" +
                                        "E89787FC86C35409CF2986CF820293AA"
                                        ));

            DiscreteVectorTests.Add(new DiscreteVectorTestCase(
                                        "Set 3, vector# 207",
                                        "CFD0D1D2D3D4D5D6D7D8D9DADBDCDDDE" +
                                        "DFE0E1E2E3E4E5E6E7E8E9EAEBECEDEE",
                                        "00000000000000000000000000000000",
                                        DiscretePlaintext,
                                        "F028923659C6C0A17065E013368D93EB" +
                                        "CF2F4FD892B6E27E104EF0A2605708EA" +
                                        "26336AE966D5058BC144F7954FE2FC3C" +
                                        "258F00734AA5BEC8281814B746197084"
                                        ));

            DiscreteVectorTests.Add(new DiscreteVectorTestCase(
                                        "Set 6, vector# 3",
                                        "0F62B5085BAE0154A7FA4DA0F34699EC" +
                                        "3F92E5388BDE3184D72A7DD02376C91C",
                                        "288FF65DC42B92F960C72E95FC63CA31",
                                        DiscretePlaintext,
                                        "1FC4F2E266B21C24FDDB3492D40A3FA6" +
                                        "DE32CDF13908511E84420ABDFA1D3B0F" +
                                        "EC600F83409C57CBE0394B90CDB1D759" +
                                        "243EFD8B8E2AB7BC453A8D8A3515183E"
                                        ));

            SegmentedVectorTests.Add(new SegmentedVectorTestCase(
                                         "Set 4, vector# 0",
                                         "0053A6F94C9FF24598EB",
                                         "00000000000000000000",
                                         new TestVectorSegment[] {
                new TestVectorSegment(
                    "stream[0..63]",
                    0,
                    "31DC3AB92FE285475993D3C89751303E" +
                    "D0CFFF1EC11831B14AE5A9BD87D91C09" +
                    "998739800A4FAA987CB15679703E8C89" +
                    "F47EF436F24747DBD2C4800C91E34DA2"
                    ),
                new TestVectorSegment(
                    "stream[65472..65535]",
                    65472,
                    "7099E13547B5BE4CC753D2D1C2BF6DFB" +
                    "C96AACCC5BD513159B1F24AA62679DF0" +
                    "92F1ADDC91D55ECF2A4D0B71FF2B41D8" +
                    "D969E38334566B35D7DE3224854452C7"
                    ),
                new TestVectorSegment(
                    "stream[65536..65599]",
                    65536,
                    "7DC4EB2C9F315486AD89DDA5F0C5059C" +
                    "67D1312EA593D625A164CC12F6B57F4C" +
                    "6A824EC7FF4A830DE5066A6F659D841C" +
                    "D7F7A9180B716CA49C6DB5CBC947E438"
                    ),
                new TestVectorSegment(
                    "stream[131008..131071]",
                    131008,
                    "4030D1E317EBF9F6356B65AEB792E0AF" +
                    "CEA4E47DD37CEA8CF99DEC03C3325EB3" +
                    "AD92FC7E5054FD9AA76E1014ED751418" +
                    "6C9CE7AE27A231A5B6608FAE0535823E"
                    )
            }
                                         ));

            SegmentedVectorTests.Add(new SegmentedVectorTestCase(
                                         "Set 5, vector# 0",
                                         "00000000000000000000000000000000" +
                                         "00000000000000000000000000000000",
                                         "80000000000000000000000000000000",
                                         new TestVectorSegment[] {
                new TestVectorSegment(
                    "stream[0..63]",
                    0,
                    "F847D7FF5426BEF5882BD2D0717494AF" +
                    "A9B7BC922915808057581BA9E35E3B7B" +
                    "DAC3FC878D278FE5D145DBB71B6B16A6" +
                    "134475266239B99D04E512982B4113B8"
                    ),
                new TestVectorSegment(
                    "stream[192..255]",
                    192,
                    "55325FF9CD42636F007F0AC8B024380C" +
                    "1480FA84D633FCEB0569A42B754A74CE" +
                    "22B0D3D9D0B12C365F919884CE41A478" +
                    "D8AF818D6C48E3A6F6D27BF16577F587"
                    ),
                new TestVectorSegment(
                    "stream[256..319]",
                    256,
                    "614100AA1578E378424FCA648612022A" +
                    "4A38D0A60A934F48328B8F0999061533" +
                    "3D80C7BDB76A2C9F52CE46AE5D35CA69" +
                    "A7554632DD034C9184C158376C2612D3"
                    ),
                new TestVectorSegment(
                    "stream[448..511]",
                    448,
                    "1EF32C44CD8D7ABD0CF6CECECCC2EBC5" +
                    "C3D26EAEDE130C00EC3044127922B39F" +
                    "375170D3F4835808F75188276EB3AE1F" +
                    "93690F92FA6290D1D01A72840727CA0B"
                    )
            }
                                         ));
        }