summaryrefslogtreecommitdiffstats
path: root/test/recipes/30-test_evp_data/evpmac_siphash.txt
blob: a9081a1c81a42cc49a0ce515a7429015cdcff1c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
#
# Copyright 2001-2021 The OpenSSL Project Authors. All Rights Reserved.
#
# Licensed under the Apache License 2.0 (the "License").  You may not use
# this file except in compliance with the License.  You can obtain a copy
# in the file LICENSE in the source distribution or at
# https://www.openssl.org/source/license.html

# Tests start with one of these keywords
#       Cipher Decrypt Derive Digest Encoding KDF MAC PBE
#       PrivPubKeyPair Sign Verify VerifyRecover
# and continue until a blank line. Lines starting with a pound sign are ignored.

# SIPHASH tests - default values: 2,4 rounds, 16-byte mac
# There are no official test vectors, they are simple vectors 1, 2, 3, etc

Title = SIPHASH tests

MAC = SipHash
Key = 000102030405060708090A0B0C0D0E0F
Input =
Output = a3817f04ba25a8e66df67214c7550293

MAC = SipHash
Key = 000102030405060708090A0B0C0D0E0F
Input = 00
Output = da87c1d86b99af44347659119b22fc45

MAC = SipHash
Key = 000102030405060708090A0B0C0D0E0F
Input = 0001
Output = 8177228da4a45dc7fca38bdef60affe4

MAC = SipHash
Key = 000102030405060708090A0B0C0D0E0F
Input = 000102
Output = 9c70b60c5267a94e5f33b6b02985ed51

MAC = SipHash
Key = 000102030405060708090A0B0C0D0E0F
Input = 00010203
Output = f88164c12d9c8faf7d0f6e7c7bcd5579

MAC = SipHash
Key = 000102030405060708090A0B0C0D0E0F
Input = 0001020304
Output = 1368875980776f8854527a07690e9627

MAC = SipHash
Key = 000102030405060708090A0B0C0D0E0F
Input = 000102030405
Output = 14eeca338b208613485ea0308fd7a15e

MAC = SipHash
Key = 000102030405060708090A0B0C0D0E0F
Input = 00010203040506
Output = a1f1ebbed8dbc153c0b84aa61ff08239

MAC = SipHash
Key = 000102030405060708090A0B0C0D0E0F
Input = 0001020304050607
Output = 3b62a9ba6258f5610f83e264f31497b4

MAC = SipHash
Key = 000102030405060708090A0B0C0D0E0F
Input = 000102030405060708
Output = 264499060ad9baabc47f8b02bb6d71ed

MAC = SipHash
Key = 000102030405060708090A0B0C0D0E0F
Input = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E
Output = 5150d1772f50834a503e069a973fbd7c

MAC = SipHash
Key = 000102030405060708090A0B0C0D0E0F
Input =
Output = a3817f04ba25a8e66df67214c7550293

MAC = SipHash
Key = 000102030405060708090A0B0C0D0E0F
Input = 00
Output = da87c1d86b99af44347659119b22fc45

MAC = SipHash
Key = 000102030405060708090A0B0C0D0E0F
Input = 0001
Output = 8177228da4a45dc7fca38bdef60affe4

MAC = SipHash
Key = 000102030405060708090A0B0C0D0E0F
Input = 000102
Output = 9c70b60c5267a94e5f33b6b02985ed51

MAC = SipHash
Key = 000102030405060708090A0B0C0D0E0F
Input = 00010203
Output = f88164c12d9c8faf7d0f6e7c7bcd5579

MAC = SipHash
Key = 000102030405060708090A0B0C0D0E0F
Input = 0001020304
Output = 1368875980776f8854527a07690e9627

MAC = SipHash
Key = 000102030405060708090A0B0C0D0E0F
Input = 000102030405
Output = 14eeca338b208613485ea0308fd7a15e

MAC = SipHash
Key = 000102030405060708090A0B0C0D0E0F
Input = 00010203040506
Output = a1f1ebbed8dbc153c0b84aa61ff08239

MAC = SipHash
Key = 000102030405060708090A0B0C0D0E0F
Input = 0001020304050607
Output = 3b62a9ba6258f5610f83e264f31497b4

MAC = SipHash by EVP_PKEY
Key = 000102030405060708090A0B0C0D0E0F
Input = 000102030405060708
Output = 264499060ad9baabc47f8b02bb6d71ed

MAC = SipHash
Key = 000102030405060708090A0B0C0D0E0F
Input = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E
Output = 5150d1772f50834a503e069a973fbd7c

# SIPHASH - default values: 2,4 rounds, explicit 8-byte mac

MAC = SipHash
Ctrl = size:8
Key = 000102030405060708090A0B0C0D0E0F
Input = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E
Output = 724506EB4C328A95

# SIPHASH - default values: 2,4 rounds, explicit 16-byte mac

MAC = SipHash
Ctrl = size:16
Key = 000102030405060708090A0B0C0D0E0F
Input = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E
Output = 5150d1772f50834a503e069a973fbd7c

# SIPHASH - default values: 2,4 rounds, explicit 16-byte mac (set as 0)

MAC = SipHash
Ctrl = size:0
Key = 000102030405060708090A0B0C0D0E0F
Input = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E
Output = 5150d1772f50834a503e069a973fbd7c

# SIPHASH - default values: 2,4 rounds, explicit 13-byte mac (invalid size)

MAC = SipHash
Ctrl = size:13
Key = 000102030405060708090A0B0C0D0E0F
Result = MAC_INIT_ERROR

# SIPHASH - default values: 2,4 rounds, explicit 13-byte mac (invalid size)
# by EVP_PKEY this time

MAC = SipHash by EVP_PKEY
Ctrl = size:13
Key = 000102030405060708090A0B0C0D0E0F
Result = EVPPKEYCTXCTRL_ERROR

Title = SIPHASH - explicit rounds

MAC = SipHash
Ctrl = size:0
Ctrl = c-rounds:2
Ctrl = d-rounds:4
Key = 000102030405060708090A0B0C0D0E0F
Input = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E
Output = 5150d1772f50834a503e069a973fbd7c

# Generated by the reference implementation
Title = SIPHASH - non-default values: 4,8 rounds

MAC = SipHash
Ctrl = size:8
Ctrl = c-rounds:4
Ctrl = d-rounds:8
Key = 000102030405060708090A0B0C0D0E0F
Input = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E
Output = E67784BC5503DE23