xref: /illumos-gate/usr/src/uts/common/sys/md5_consts.h (revision 2d6eb4a5)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*
23  * Copyright (c) by 1998 Sun Microsystems, Inc.
24  * All rights reserved.
25  */
26 
27 #ifndef	_SYS_MD5_CONSTS_H
28 #define	_SYS_MD5_CONSTS_H
29 
30 #ifdef	__cplusplus
31 extern "C" {
32 #endif
33 
34 /* constants, as provided in RFC 1321 */
35 
36 #define	MD5_CONST_0		(uint32_t)0xd76aa478
37 #define	MD5_CONST_1		(uint32_t)0xe8c7b756
38 #define	MD5_CONST_2		(uint32_t)0x242070db
39 #define	MD5_CONST_3		(uint32_t)0xc1bdceee
40 #define	MD5_CONST_4		(uint32_t)0xf57c0faf
41 #define	MD5_CONST_5		(uint32_t)0x4787c62a
42 #define	MD5_CONST_6		(uint32_t)0xa8304613
43 #define	MD5_CONST_7		(uint32_t)0xfd469501
44 #define	MD5_CONST_8		(uint32_t)0x698098d8
45 #define	MD5_CONST_9		(uint32_t)0x8b44f7af
46 #define	MD5_CONST_10		(uint32_t)0xffff5bb1
47 #define	MD5_CONST_11		(uint32_t)0x895cd7be
48 #define	MD5_CONST_12		(uint32_t)0x6b901122
49 #define	MD5_CONST_13		(uint32_t)0xfd987193
50 #define	MD5_CONST_14		(uint32_t)0xa679438e
51 #define	MD5_CONST_15		(uint32_t)0x49b40821
52 #define	MD5_CONST_16		(uint32_t)0xf61e2562
53 #define	MD5_CONST_17		(uint32_t)0xc040b340
54 #define	MD5_CONST_18		(uint32_t)0x265e5a51
55 #define	MD5_CONST_19		(uint32_t)0xe9b6c7aa
56 #define	MD5_CONST_20		(uint32_t)0xd62f105d
57 #define	MD5_CONST_21		(uint32_t)0x2441453
58 #define	MD5_CONST_22		(uint32_t)0xd8a1e681
59 #define	MD5_CONST_23		(uint32_t)0xe7d3fbc8
60 #define	MD5_CONST_24		(uint32_t)0x21e1cde6
61 #define	MD5_CONST_25		(uint32_t)0xc33707d6
62 #define	MD5_CONST_26		(uint32_t)0xf4d50d87
63 #define	MD5_CONST_27		(uint32_t)0x455a14ed
64 #define	MD5_CONST_28		(uint32_t)0xa9e3e905
65 #define	MD5_CONST_29		(uint32_t)0xfcefa3f8
66 #define	MD5_CONST_30		(uint32_t)0x676f02d9
67 #define	MD5_CONST_31		(uint32_t)0x8d2a4c8a
68 #define	MD5_CONST_32		(uint32_t)0xfffa3942
69 #define	MD5_CONST_33		(uint32_t)0x8771f681
70 #define	MD5_CONST_34		(uint32_t)0x6d9d6122
71 #define	MD5_CONST_35		(uint32_t)0xfde5380c
72 #define	MD5_CONST_36		(uint32_t)0xa4beea44
73 #define	MD5_CONST_37		(uint32_t)0x4bdecfa9
74 #define	MD5_CONST_38		(uint32_t)0xf6bb4b60
75 #define	MD5_CONST_39		(uint32_t)0xbebfbc70
76 #define	MD5_CONST_40		(uint32_t)0x289b7ec6
77 #define	MD5_CONST_41		(uint32_t)0xeaa127fa
78 #define	MD5_CONST_42		(uint32_t)0xd4ef3085
79 #define	MD5_CONST_43		(uint32_t)0x4881d05
80 #define	MD5_CONST_44		(uint32_t)0xd9d4d039
81 #define	MD5_CONST_45		(uint32_t)0xe6db99e5
82 #define	MD5_CONST_46		(uint32_t)0x1fa27cf8
83 #define	MD5_CONST_47		(uint32_t)0xc4ac5665
84 #define	MD5_CONST_48		(uint32_t)0xf4292244
85 #define	MD5_CONST_49		(uint32_t)0x432aff97
86 #define	MD5_CONST_50		(uint32_t)0xab9423a7
87 #define	MD5_CONST_51		(uint32_t)0xfc93a039
88 #define	MD5_CONST_52		(uint32_t)0x655b59c3
89 #define	MD5_CONST_53		(uint32_t)0x8f0ccc92
90 #define	MD5_CONST_54		(uint32_t)0xffeff47d
91 #define	MD5_CONST_55		(uint32_t)0x85845dd1
92 #define	MD5_CONST_56		(uint32_t)0x6fa87e4f
93 #define	MD5_CONST_57		(uint32_t)0xfe2ce6e0
94 #define	MD5_CONST_58		(uint32_t)0xa3014314
95 #define	MD5_CONST_59		(uint32_t)0x4e0811a1
96 #define	MD5_CONST_60		(uint32_t)0xf7537e82
97 #define	MD5_CONST_61		(uint32_t)0xbd3af235
98 #define	MD5_CONST_62		(uint32_t)0x2ad7d2bb
99 #define	MD5_CONST_63		(uint32_t)0xeb86d391
100 
101 /* initialization constants, as given in RFC 1321. used in MD5Init */
102 
103 #define	MD5_INIT_CONST_1	(uint32_t)0x67452301
104 #define	MD5_INIT_CONST_2	(uint32_t)0xefcdab89
105 #define	MD5_INIT_CONST_3	(uint32_t)0x98badcfe
106 #define	MD5_INIT_CONST_4	(uint32_t)0x10325476
107 
108 /* shift constants, as given in RFC 1321.  used in MD5Transform */
109 
110 #define	MD5_SHIFT_11		7
111 #define	MD5_SHIFT_12		12
112 #define	MD5_SHIFT_13		17
113 #define	MD5_SHIFT_14		22
114 #define	MD5_SHIFT_21		5
115 #define	MD5_SHIFT_22		9
116 #define	MD5_SHIFT_23		14
117 #define	MD5_SHIFT_24		20
118 #define	MD5_SHIFT_31		4
119 #define	MD5_SHIFT_32		11
120 #define	MD5_SHIFT_33		16
121 #define	MD5_SHIFT_34		23
122 #define	MD5_SHIFT_41		6
123 #define	MD5_SHIFT_42		10
124 #define	MD5_SHIFT_43		15
125 #define	MD5_SHIFT_44		21
126 
127 #ifdef	__cplusplus
128 }
129 #endif
130 
131 #endif /* _SYS_MD5_CONSTS_H */
132