1#
2# Copyright 2001-2021 The OpenSSL Project Authors. All Rights Reserved.
3#
4# Licensed under the Apache License 2.0 (the "License").  You may not use
5# this file except in compliance with the License.  You can obtain a copy
6# in the file LICENSE in the source distribution or at
7# https://www.openssl.org/source/license.html
8
9# Tests start with one of these keywords
10#       Cipher Decrypt Derive Digest Encoding KDF MAC PBE
11#       PrivPubKeyPair Sign Verify VerifyRecover
12# and continue until a blank line. Lines starting with a pound sign are ignored.
13
14# SIPHASH tests - default values: 2,4 rounds, 16-byte mac
15# There are no official test vectors, they are simple vectors 1, 2, 3, etc
16
17Title = SIPHASH tests
18
19MAC = SipHash
20Key = 000102030405060708090A0B0C0D0E0F
21Input =
22Output = a3817f04ba25a8e66df67214c7550293
23
24MAC = SipHash
25Key = 000102030405060708090A0B0C0D0E0F
26Input = 00
27Output = da87c1d86b99af44347659119b22fc45
28
29MAC = SipHash
30Key = 000102030405060708090A0B0C0D0E0F
31Input = 0001
32Output = 8177228da4a45dc7fca38bdef60affe4
33
34MAC = SipHash
35Key = 000102030405060708090A0B0C0D0E0F
36Input = 000102
37Output = 9c70b60c5267a94e5f33b6b02985ed51
38
39MAC = SipHash
40Key = 000102030405060708090A0B0C0D0E0F
41Input = 00010203
42Output = f88164c12d9c8faf7d0f6e7c7bcd5579
43
44MAC = SipHash
45Key = 000102030405060708090A0B0C0D0E0F
46Input = 0001020304
47Output = 1368875980776f8854527a07690e9627
48
49MAC = SipHash
50Key = 000102030405060708090A0B0C0D0E0F
51Input = 000102030405
52Output = 14eeca338b208613485ea0308fd7a15e
53
54MAC = SipHash
55Key = 000102030405060708090A0B0C0D0E0F
56Input = 00010203040506
57Output = a1f1ebbed8dbc153c0b84aa61ff08239
58
59MAC = SipHash
60Key = 000102030405060708090A0B0C0D0E0F
61Input = 0001020304050607
62Output = 3b62a9ba6258f5610f83e264f31497b4
63
64MAC = SipHash
65Key = 000102030405060708090A0B0C0D0E0F
66Input = 000102030405060708
67Output = 264499060ad9baabc47f8b02bb6d71ed
68
69MAC = SipHash
70Key = 000102030405060708090A0B0C0D0E0F
71Input = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E
72Output = 5150d1772f50834a503e069a973fbd7c
73
74MAC = SipHash
75Key = 000102030405060708090A0B0C0D0E0F
76Input =
77Output = a3817f04ba25a8e66df67214c7550293
78
79MAC = SipHash
80Key = 000102030405060708090A0B0C0D0E0F
81Input = 00
82Output = da87c1d86b99af44347659119b22fc45
83
84MAC = SipHash
85Key = 000102030405060708090A0B0C0D0E0F
86Input = 0001
87Output = 8177228da4a45dc7fca38bdef60affe4
88
89MAC = SipHash
90Key = 000102030405060708090A0B0C0D0E0F
91Input = 000102
92Output = 9c70b60c5267a94e5f33b6b02985ed51
93
94MAC = SipHash
95Key = 000102030405060708090A0B0C0D0E0F
96Input = 00010203
97Output = f88164c12d9c8faf7d0f6e7c7bcd5579
98
99MAC = SipHash
100Key = 000102030405060708090A0B0C0D0E0F
101Input = 0001020304
102Output = 1368875980776f8854527a07690e9627
103
104MAC = SipHash
105Key = 000102030405060708090A0B0C0D0E0F
106Input = 000102030405
107Output = 14eeca338b208613485ea0308fd7a15e
108
109MAC = SipHash
110Key = 000102030405060708090A0B0C0D0E0F
111Input = 00010203040506
112Output = a1f1ebbed8dbc153c0b84aa61ff08239
113
114MAC = SipHash
115Key = 000102030405060708090A0B0C0D0E0F
116Input = 0001020304050607
117Output = 3b62a9ba6258f5610f83e264f31497b4
118
119MAC = SipHash by EVP_PKEY
120Key = 000102030405060708090A0B0C0D0E0F
121Input = 000102030405060708
122Output = 264499060ad9baabc47f8b02bb6d71ed
123
124MAC = SipHash
125Key = 000102030405060708090A0B0C0D0E0F
126Input = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E
127Output = 5150d1772f50834a503e069a973fbd7c
128
129# SIPHASH - default values: 2,4 rounds, explicit 8-byte mac
130
131MAC = SipHash
132Ctrl = size:8
133Key = 000102030405060708090A0B0C0D0E0F
134Input = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E
135Output = 724506EB4C328A95
136
137MAC = SipHash by EVP_PKEY
138Ctrl = digestsize:8
139Key = 000102030405060708090A0B0C0D0E0F
140Input = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E
141Output = 724506EB4C328A95
142
143# SIPHASH - default values: 2,4 rounds, explicit 16-byte mac
144
145MAC = SipHash
146Ctrl = size:16
147Key = 000102030405060708090A0B0C0D0E0F
148Input = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E
149Output = 5150d1772f50834a503e069a973fbd7c
150
151# SIPHASH - default values: 2,4 rounds, explicit 16-byte mac (set as 0)
152
153MAC = SipHash
154Ctrl = size:0
155Key = 000102030405060708090A0B0C0D0E0F
156Input = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E
157Output = 5150d1772f50834a503e069a973fbd7c
158
159# SIPHASH - default values: 2,4 rounds, explicit 13-byte mac (invalid size)
160
161MAC = SipHash
162Ctrl = size:13
163Key = 000102030405060708090A0B0C0D0E0F
164Result = MAC_INIT_ERROR
165
166# SIPHASH - default values: 2,4 rounds, explicit 13-byte mac (invalid size)
167# by EVP_PKEY this time
168
169MAC = SipHash by EVP_PKEY
170Ctrl = digestsize:13
171Key = 000102030405060708090A0B0C0D0E0F
172Result = EVPPKEYCTXCTRL_ERROR
173
174Title = SIPHASH - explicit rounds
175
176MAC = SipHash
177Ctrl = size:0
178Ctrl = c-rounds:2
179Ctrl = d-rounds:4
180Key = 000102030405060708090A0B0C0D0E0F
181Input = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E
182Output = 5150d1772f50834a503e069a973fbd7c
183
184# Generated by the reference implementation
185Title = SIPHASH - non-default values: 4,8 rounds
186
187MAC = SipHash
188Ctrl = size:8
189Ctrl = c-rounds:4
190Ctrl = d-rounds:8
191Key = 000102030405060708090A0B0C0D0E0F
192Input = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E
193Output = E67784BC5503DE23
194