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