Correct PPTP server firewall rules chain.
[tomato/davidwu.git] / release / src / router / nettle / testsuite / sha256-test.c
blob551b140c83ed89ea8c5575494bbeacba32b00b39
1 #include "testutils.h"
3 void
4 test_main(void)
6 /* From FIPS180-2 */
7 test_hash(&nettle_sha256, SDATA("abc"),
8 SHEX("ba7816bf8f01cfea 414140de5dae2223"
9 "b00361a396177a9c b410ff61f20015ad"));
11 test_hash(&nettle_sha256,
12 SDATA("abcdbcdecdefdefgefghfghighij"
13 "hijkijkljklmklmnlmnomnopnopq"),
14 SHEX("248d6a61d20638b8 e5c026930c3e6039"
15 "a33ce45964ff2167 f6ecedd419db06c1"));
17 test_hash(&nettle_sha256,
18 SDATA("abcdefghbcdefghicdefghijdefg"
19 "hijkefghijklfghijklmghijklmn"
20 "hijklmnoijklmnopjklmnopqklmn"
21 "opqrlmnopqrsmnopqrstnopqrstu"),
22 SHEX("cf5b16a778af8380 036ce59e7b049237"
23 "0b249b11e8f07a51 afac45037afee9d1"));
25 /* Additional test vectors, from Daniel Kahn Gillmor */
26 test_hash(&nettle_sha256, SDATA(""),
27 SHEX("e3b0c44298fc1c14 9afbf4c8996fb924"
28 "27ae41e4649b934c a495991b7852b855"));
29 test_hash(&nettle_sha256, SDATA("a"),
30 SHEX("ca978112ca1bbdca fac231b39a23dc4d"
31 "a786eff8147c4e72 b9807785afee48bb"));
32 test_hash(&nettle_sha256, SDATA("38"),
33 SHEX("aea92132c4cbeb26 3e6ac2bf6c183b5d"
34 "81737f179f21efdc 5863739672f0f470"));
35 test_hash(&nettle_sha256, SDATA("message digest"),
36 SHEX("f7846f55cf23e14e ebeab5b4e1550cad"
37 "5b509e3348fbc4ef a3a1413d393cb650"));
38 test_hash(&nettle_sha256, SDATA("abcdefghijklmnopqrstuvwxyz"),
39 SHEX("71c480df93d6ae2f 1efad1447c66c952"
40 "5e316218cf51fc8d 9ed832f2daf18b73"));
41 test_hash(&nettle_sha256,
42 SDATA("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdef"
43 "ghijklmnopqrstuvwxyz0123456789"),
44 SHEX("db4bfcbd4da0cd85 a60c3c37d3fbd880"
45 "5c77f15fc6b1fdfe 614ee0a7c8fdb4c0"));
46 test_hash(&nettle_sha256,
47 SDATA("12345678901234567890123456789012"
48 "34567890123456789012345678901234"
49 "5678901234567890"),
50 SHEX("f371bc4a311f2b00 9eef952dd83ca80e"
51 "2b60026c8e935592 d0f9c308453c813e"));
54 /* These are intermediate values for the single sha1_compress call
55 that results from the first testcase, SHA256("abc"). Each row are
56 the values for A, B, C, D, E, F, G, H after the i:th round. The row
57 i = -1 gives the initial values, and i = 99 gives the output
58 values.
60 -1: 6a09e667 bb67ae85 3c6ef372 a54ff53a 510e527f 9b05688c 1f83d9ab 5be0cd19
61 0: 6a09e667 bb67ae85 3c6ef372 fa2a4622 510e527f 9b05688c 1f83d9ab 5d6aebcd
62 1: 6a09e667 bb67ae85 78ce7989 fa2a4622 510e527f 9b05688c 5a6ad9ad 5d6aebcd
63 6: 24e00850 e5030380 2b4209f5 4409a6a d550f666 9b27a401 714260ad 43ada245
64 7: 85a07b5f e5030380 2b4209f5 4409a6a c657a79 9b27a401 714260ad 43ada245
65 8: 85a07b5f e5030380 2b4209f5 32ca2d8c c657a79 9b27a401 714260ad 8e04ecb9
66 9: 85a07b5f e5030380 1cc92596 32ca2d8c c657a79 9b27a401 8c87346b 8e04ecb9
67 14: 816fd6e9 c0645fde d932eb16 87912990 f71fc5a9 b92f20c 745a48de 1e578218
68 15: b0fa238e c0645fde d932eb16 87912990 7590dcd b92f20c 745a48de 1e578218
69 16: b0fa238e c0645fde d932eb16 8034229c 7590dcd b92f20c 745a48de 21da9a9b
70 17: b0fa238e c0645fde 846ee454 8034229c 7590dcd b92f20c c2fbd9d1 21da9a9b
71 18: b0fa238e cc899961 846ee454 8034229c 7590dcd fe777bbf c2fbd9d1 21da9a9b
72 19: b0638179 cc899961 846ee454 8034229c e1f20c33 fe777bbf c2fbd9d1 21da9a9b
73 20: b0638179 cc899961 846ee454 9dc68b63 e1f20c33 fe777bbf c2fbd9d1 8ada8930
74 21: b0638179 cc899961 c2606d6d 9dc68b63 e1f20c33 fe777bbf e1257970 8ada8930
75 22: b0638179 a7a3623f c2606d6d 9dc68b63 e1f20c33 49f5114a e1257970 8ada8930
76 23: c5d53d8d a7a3623f c2606d6d 9dc68b63 aa47c347 49f5114a e1257970 8ada8930
77 24: c5d53d8d a7a3623f c2606d6d 2823ef91 aa47c347 49f5114a e1257970 1c2c2838
78 25: c5d53d8d a7a3623f 14383d8e 2823ef91 aa47c347 49f5114a cde8037d 1c2c2838
79 26: c5d53d8d c74c6516 14383d8e 2823ef91 aa47c347 b62ec4bc cde8037d 1c2c2838
80 27: edffbff8 c74c6516 14383d8e 2823ef91 77d37528 b62ec4bc cde8037d 1c2c2838
81 28: edffbff8 c74c6516 14383d8e 363482c9 77d37528 b62ec4bc cde8037d 6112a3b7
82 29: edffbff8 c74c6516 a0060b30 363482c9 77d37528 b62ec4bc ade79437 6112a3b7
83 30: edffbff8 ea992a22 a0060b30 363482c9 77d37528 109ab3a ade79437 6112a3b7
84 31: 73b33bf5 ea992a22 a0060b30 363482c9 ba591112 109ab3a ade79437 6112a3b7
85 32: 73b33bf5 ea992a22 a0060b30 9cd9f5f6 ba591112 109ab3a ade79437 98e12507
86 33: 73b33bf5 ea992a22 59249dd3 9cd9f5f6 ba591112 109ab3a fe604df5 98e12507
87 34: 73b33bf5 85f3833 59249dd3 9cd9f5f6 ba591112 a9a7738c fe604df5 98e12507
88 35: f4b002d6 85f3833 59249dd3 9cd9f5f6 65a0cfe4 a9a7738c fe604df5 98e12507
89 36: f4b002d6 85f3833 59249dd3 41a65cb1 65a0cfe4 a9a7738c fe604df5 772a26b
90 37: f4b002d6 85f3833 34df1604 41a65cb1 65a0cfe4 a9a7738c a507a53d 772a26b
91 38: f4b002d6 6dc57a8a 34df1604 41a65cb1 65a0cfe4 f0781bc8 a507a53d 772a26b
92 39: 79ea687a 6dc57a8a 34df1604 41a65cb1 1efbc0a0 f0781bc8 a507a53d 772a26b
93 40: 79ea687a 6dc57a8a 34df1604 26352d63 1efbc0a0 f0781bc8 a507a53d d6670766
94 41: 79ea687a 6dc57a8a 838b2711 26352d63 1efbc0a0 f0781bc8 df46652f d6670766
95 42: 79ea687a decd4715 838b2711 26352d63 1efbc0a0 17aa0dfe df46652f d6670766
96 43: fda24c2e decd4715 838b2711 26352d63 9d4baf93 17aa0dfe df46652f d6670766
97 44: fda24c2e decd4715 838b2711 26628815 9d4baf93 17aa0dfe df46652f a80f11f0
98 45: fda24c2e decd4715 72ab4b91 26628815 9d4baf93 17aa0dfe b7755da1 a80f11f0
99 46: fda24c2e a14c14b0 72ab4b91 26628815 9d4baf93 d57b94a9 b7755da1 a80f11f0
100 47: 4172328d a14c14b0 72ab4b91 26628815 fecf0bc6 d57b94a9 b7755da1 a80f11f0
101 48: 4172328d a14c14b0 72ab4b91 bd714038 fecf0bc6 d57b94a9 b7755da1 5757ceb
102 49: 4172328d a14c14b0 6e5c390c bd714038 fecf0bc6 d57b94a9 f11bfaa8 5757ceb
103 50: 4172328d 52f1ccf7 6e5c390c bd714038 fecf0bc6 7a0508a1 f11bfaa8 5757ceb
104 51: 49231c1e 52f1ccf7 6e5c390c bd714038 886e7a22 7a0508a1 f11bfaa8 5757ceb
105 52: 49231c1e 52f1ccf7 6e5c390c 101fd28f 886e7a22 7a0508a1 f11bfaa8 529e7d00
106 53: 49231c1e 52f1ccf7 f5702fdb 101fd28f 886e7a22 7a0508a1 9f4787c3 529e7d00
107 54: 49231c1e 3ec45cdb f5702fdb 101fd28f 886e7a22 e50e1b4f 9f4787c3 529e7d00
108 55: 38cc9913 3ec45cdb f5702fdb 101fd28f 54cb266b e50e1b4f 9f4787c3 529e7d00
109 56: 38cc9913 3ec45cdb f5702fdb 9b5e906c 54cb266b e50e1b4f 9f4787c3 fcd1887b
110 57: 38cc9913 3ec45cdb 7e44008e 9b5e906c 54cb266b e50e1b4f c062d46f fcd1887b
111 58: 38cc9913 6d83bfc6 7e44008e 9b5e906c 54cb266b ffb70472 c062d46f fcd1887b
112 59: b21bad3d 6d83bfc6 7e44008e 9b5e906c b6ae8fff ffb70472 c062d46f fcd1887b
113 60: b21bad3d 6d83bfc6 7e44008e b85e2ce9 b6ae8fff ffb70472 c062d46f 961f4894
114 61: b21bad3d 6d83bfc6 4d24d6c b85e2ce9 b6ae8fff ffb70472 948d25b6 961f4894
115 62: b21bad3d d39a2165 4d24d6c b85e2ce9 b6ae8fff fb121210 948d25b6 961f4894
116 63: 506e3058 d39a2165 4d24d6c b85e2ce9 5ef50f24 fb121210 948d25b6 961f4894
117 99: ba7816bf 8f01cfea 414140de 5dae2223 b00361a3 96177a9c b410ff61 f20015ad