~ubuntu-branches/ubuntu/vivid/nettle/vivid

« back to all changes in this revision

Viewing changes to testsuite/arcfour-test.c

  • Committer: Package Import Robot
  • Author(s): Magnus Holmgren
  • Date: 2013-05-07 22:57:14 UTC
  • mfrom: (8.1.8 sid)
  • Revision ID: package-import@ubuntu.com-20130507225714-s331yr8ov53dtt17
Tags: 2.7-2
Tag some (ECC related) symbols that only exist on some architectures.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#include "testutils.h"
2
2
#include "arcfour.h"
3
3
 
4
 
int
 
4
void
5
5
test_main(void)
6
6
{
7
7
  test_cipher_stream(&nettle_arcfour128,
8
 
                     HL("01234567 89ABCDEF 00000000 00000000"),
9
 
                     HL("01234567 89ABCDEF"),
10
 
                     H("69723659 1B5242B1"));
 
8
                     SHEX("01234567 89ABCDEF 00000000 00000000"),
 
9
                     SHEX("01234567 89ABCDEF"),
 
10
                     SHEX("69723659 1B5242B1"));
11
11
 
12
12
  /* More data. This ensures that we get some collisions between the S
13
13
     accesses at index i,j and the access at si + sj. I.e. the cases
14
14
     where the ordering of loads and stores matter. */
15
15
  test_cipher_stream(&nettle_arcfour128,
16
 
                     HL("aaaaaaaa bbbbbbbb cccccccc dddddddd"),
17
 
                     HL("00000000 00000000 00000000 00000000"
18
 
                        "00000000 00000000 00000000 00000000"
19
 
                        "00000000 00000000 00000000 00000000"
20
 
                        "00000000 00000000 00000000 00000000"
21
 
 
22
 
                        "00000000 00000000 00000000 00000000"
23
 
                        "00000000 00000000 00000000 00000000"
24
 
                        "00000000 00000000 00000000 00000000"
25
 
                        "00000000 00000000 00000000 00000000"
26
 
                        
27
 
                        "00000000 00000000 00000000 00000000"
28
 
                        "00000000 00000000 00000000 00000000"
29
 
                        "00000000 00000000 00000000 00000000"
30
 
                        "00000000 00000000 00000000 00000000"
31
 
                        
32
 
                        "00000000 00000000 00000000 00000000"
33
 
                        "00000000 00000000 00000000 00000000"
34
 
                        "00000000 00000000 00000000 00000000"
35
 
                        "00000000 00000000 00000000 00000000"
36
 
                        
37
 
                        "00000000 00000000 00000000 00000000"
38
 
                        "00000000 00000000 00000000 00000000"
39
 
                        "00000000 00000000 00000000 00000000"
40
 
                        "00000000 00000000 00000000 00000000"
41
 
                        
42
 
                        "00000000 00000000 00000000 00000000"
43
 
                        "00000000 00000000 00000000 00000000"
44
 
                        "00000000 00000000 00000000 00000000"
45
 
                        "00000000 00000000 00000000 00000000"
46
 
                        
47
 
                        "00000000 00000000 00000000 00000000"
48
 
                        "00000000 00000000 00000000 00000000"
49
 
                        "00000000 00000000 00000000 00000000"
50
 
                        "00000000 00000000 00000000 00000000"
51
 
                        
52
 
                        "00000000 00000000 00000000 00000000"
53
 
                        "00000000 00000000 00000000 00000000"
54
 
                        "00000000 00000000 00000000 00000000"
55
 
                        "00000000 00000000 00000000 00000000"),
56
 
                     H("a2b35dc7 bf95ae1e 1c432d15 f4fb8c1c"
57
 
                       "f264e1d0 bd090831 6caa7d17 5401ae67"
58
 
                       "3cfbd140 fd3dee42 1012d674 2fb69fa3"
59
 
                       "6522631e bb3d4703 535de1ce 4a81ddce"
60
 
 
61
 
                       "5780cfe0 b5fc9fae ebe14c96 26451bd9"
62
 
                       "992f2204 119cbe37 cbdc453c 7afa08c7"
63
 
                       "1380ccf8 48f81e53 a535cdfb 96c64faa"
64
 
                       "c3f759d0 fa1ff920 008d95cf 39d52324"
65
 
 
66
 
                       "d0aac3f9 749b22e2 6a065145 06fb249d"
67
 
                       "ffb8e05e cb0381fe 5346a04a 63dac61c"
68
 
                       "10b6683e 3ab427de d4c6bc60 6366545e"
69
 
                       "77d0e121 96037717 a745d49e e72a70aa"
70
 
 
71
 
                       "a50a612d 879b0580 fd4a89ae 3ee49871"
72
 
                       "2cf6c98d a62dfbc7 d7b2d901 2c3aaf27"
73
 
                       "42b7e089 ef2466ac 450b440c 138daa1a"
74
 
                       "cf9ebef6 f66a7a64 2677b213 06640130"
75
 
 
76
 
                       "de6651df 0065180d 4db366ba 9c377712"
77
 
                       "53d21cac 82ed72a4 c6c4d81e 4375fea3"
78
 
                       "1f935909 95322c83 13c64d8e 829c93a6"
79
 
                       "d540a1b3 20f41541 96800888 1a7afc9b"
80
 
 
81
 
                       "e39e89fc 3ac78be5 cdbbf774 33c36863"
82
 
                       "da2a3b1b d06e54a9 aa4b7edd 70b34941"
83
 
                       "b886f7db f36c3def f9fc4c80 7ce55ea5"
84
 
                       "98a7257b f68a9e1d caf4bfd6 43bd9853"
85
 
 
86
 
                       "c966629d 54e34221 6e140780 d48c69bb"
87
 
                       "5e77e886 86f2ebcb 807732d5 d29bc384"
88
 
                       "a4ca1c31 c7c1b5b9 85dbfcf1 8d845905"
89
 
                       "a0ff487a b4a3f252 a75caebf 857ba48b"
90
 
 
91
 
                       "613e3067 92cada3e 0e07f599 2f4794f3"
92
 
                       "af01f15a 491732fb 22aa09a3 d2e1e408"
93
 
                       "fe94bdb4 993c68b1 1bb79eb1 bb7ec446"
94
 
                       "760ef7bf 2caa8713 479760e5 a6e143cd"));
95
 
  
96
 
  SUCCESS();
 
16
                     SHEX("aaaaaaaa bbbbbbbb cccccccc dddddddd"),
 
17
                     SHEX("00000000 00000000 00000000 00000000"
 
18
                          "00000000 00000000 00000000 00000000"
 
19
                          "00000000 00000000 00000000 00000000"
 
20
                          "00000000 00000000 00000000 00000000"
 
21
 
 
22
                          "00000000 00000000 00000000 00000000"
 
23
                          "00000000 00000000 00000000 00000000"
 
24
                          "00000000 00000000 00000000 00000000"
 
25
                          "00000000 00000000 00000000 00000000"
 
26
                        
 
27
                          "00000000 00000000 00000000 00000000"
 
28
                          "00000000 00000000 00000000 00000000"
 
29
                          "00000000 00000000 00000000 00000000"
 
30
                          "00000000 00000000 00000000 00000000"
 
31
                        
 
32
                          "00000000 00000000 00000000 00000000"
 
33
                          "00000000 00000000 00000000 00000000"
 
34
                          "00000000 00000000 00000000 00000000"
 
35
                          "00000000 00000000 00000000 00000000"
 
36
                        
 
37
                          "00000000 00000000 00000000 00000000"
 
38
                          "00000000 00000000 00000000 00000000"
 
39
                          "00000000 00000000 00000000 00000000"
 
40
                          "00000000 00000000 00000000 00000000"
 
41
                        
 
42
                          "00000000 00000000 00000000 00000000"
 
43
                          "00000000 00000000 00000000 00000000"
 
44
                          "00000000 00000000 00000000 00000000"
 
45
                          "00000000 00000000 00000000 00000000"
 
46
                        
 
47
                          "00000000 00000000 00000000 00000000"
 
48
                          "00000000 00000000 00000000 00000000"
 
49
                          "00000000 00000000 00000000 00000000"
 
50
                          "00000000 00000000 00000000 00000000"
 
51
                        
 
52
                          "00000000 00000000 00000000 00000000"
 
53
                          "00000000 00000000 00000000 00000000"
 
54
                          "00000000 00000000 00000000 00000000"
 
55
                          "00000000 00000000 00000000 00000000"),
 
56
                     SHEX("a2b35dc7 bf95ae1e 1c432d15 f4fb8c1c"
 
57
                          "f264e1d0 bd090831 6caa7d17 5401ae67"
 
58
                          "3cfbd140 fd3dee42 1012d674 2fb69fa3"
 
59
                          "6522631e bb3d4703 535de1ce 4a81ddce"
 
60
 
 
61
                          "5780cfe0 b5fc9fae ebe14c96 26451bd9"
 
62
                          "992f2204 119cbe37 cbdc453c 7afa08c7"
 
63
                          "1380ccf8 48f81e53 a535cdfb 96c64faa"
 
64
                          "c3f759d0 fa1ff920 008d95cf 39d52324"
 
65
 
 
66
                          "d0aac3f9 749b22e2 6a065145 06fb249d"
 
67
                          "ffb8e05e cb0381fe 5346a04a 63dac61c"
 
68
                          "10b6683e 3ab427de d4c6bc60 6366545e"
 
69
                          "77d0e121 96037717 a745d49e e72a70aa"
 
70
 
 
71
                          "a50a612d 879b0580 fd4a89ae 3ee49871"
 
72
                          "2cf6c98d a62dfbc7 d7b2d901 2c3aaf27"
 
73
                          "42b7e089 ef2466ac 450b440c 138daa1a"
 
74
                          "cf9ebef6 f66a7a64 2677b213 06640130"
 
75
 
 
76
                          "de6651df 0065180d 4db366ba 9c377712"
 
77
                          "53d21cac 82ed72a4 c6c4d81e 4375fea3"
 
78
                          "1f935909 95322c83 13c64d8e 829c93a6"
 
79
                          "d540a1b3 20f41541 96800888 1a7afc9b"
 
80
 
 
81
                          "e39e89fc 3ac78be5 cdbbf774 33c36863"
 
82
                          "da2a3b1b d06e54a9 aa4b7edd 70b34941"
 
83
                          "b886f7db f36c3def f9fc4c80 7ce55ea5"
 
84
                          "98a7257b f68a9e1d caf4bfd6 43bd9853"
 
85
 
 
86
                          "c966629d 54e34221 6e140780 d48c69bb"
 
87
                          "5e77e886 86f2ebcb 807732d5 d29bc384"
 
88
                          "a4ca1c31 c7c1b5b9 85dbfcf1 8d845905"
 
89
                          "a0ff487a b4a3f252 a75caebf 857ba48b"
 
90
 
 
91
                          "613e3067 92cada3e 0e07f599 2f4794f3"
 
92
                          "af01f15a 491732fb 22aa09a3 d2e1e408"
 
93
                          "fe94bdb4 993c68b1 1bb79eb1 bb7ec446"
 
94
                          "760ef7bf 2caa8713 479760e5 a6e143cd"));
97
95
}