]> git.ipfire.org Git - thirdparty/strongswan.git/blob - src/libstrongswan/plugins/test_vectors/test_vectors/md4.c
Update copyright headers after acquisition by secunet
[thirdparty/strongswan.git] / src / libstrongswan / plugins / test_vectors / test_vectors / md4.c
1 /*
2 * Copyright (C) 2009 Andreas Steffen
3 *
4 * Copyright (C) secunet Security Networks AG
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the Licenseor (at your
9 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
10 *
11 * This program is distributed in the hope that it will be usefulbut
12 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * for more details.
15 */
16
17 #include <crypto/crypto_tester.h>
18
19 /**
20 * MD4 vectors from RFC 1320
21 */
22 hasher_test_vector_t md4_1 = {
23 .alg = HASH_MD4, .len = 0,
24 .data = "",
25 .hash = "\x31\xd6\xcf\xe0\xd1\x6a\xe9\x31\xb7\x3c\x59\xd7\xe0\xc0\x89\xc0"
26 };
27
28 hasher_test_vector_t md4_2 = {
29 .alg = HASH_MD4, .len = 1,
30 .data = "a",
31 .hash = "\xbd\xe5\x2c\xb3\x1d\xe3\x3e\x46\x24\x5e\x05\xfb\xdb\xd6\xfb\x24"
32 };
33
34 hasher_test_vector_t md4_3 = {
35 .alg = HASH_MD4, .len = 3,
36 .data = "abc",
37 .hash = "\xa4\x48\x01\x7a\xaf\x21\xd8\x52\x5f\xc1\x0a\xe8\x7a\xa6\x72\x9d"
38 };
39
40 hasher_test_vector_t md4_4 = {
41 .alg = HASH_MD4, .len = 14,
42 .data = "message digest",
43 .hash = "\xd9\x13\x0a\x81\x64\x54\x9f\xe8\x18\x87\x48\x06\xe1\xc7\x01\x4b"
44 };
45
46 hasher_test_vector_t md4_5 = {
47 .alg = HASH_MD4, .len = 26,
48 .data = "abcdefghijklmnopqrstuvwxyz",
49 .hash = "\xd7\x9e\x1c\x30\x8a\xa5\xbb\xcd\xee\xa8\xed\x63\xdf\x41\x2d\xa9"
50 };
51
52 hasher_test_vector_t md4_6 = {
53 .alg = HASH_MD4, .len = 62,
54 .data = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
55 .hash = "\x04\x3f\x85\x82\xf2\x41\xdb\x35\x1c\xe6\x27\xe1\x53\xe7\xf0\xe4"
56 };
57
58 hasher_test_vector_t md4_7 = {
59 .alg = HASH_MD4, .len = 80,
60 .data = "1234567890123456789012345678901234567890"
61 "1234567890123456789012345678901234567890",
62 .hash = "\xe3\x3b\x4d\xdc\x9c\x38\xf2\x19\x9c\x3e\x7b\x16\x4f\xcc\x05\x36"
63 };
64