xref: /minix3/crypto/external/bsd/heimdal/include/heimntlm-protos.h (revision ebfedea0ce5bbe81e252ddf32d732e40fb633fae)
1*ebfedea0SLionel Sambuc /* This is a generated file */
2*ebfedea0SLionel Sambuc #ifndef __heimntlm_protos_h__
3*ebfedea0SLionel Sambuc #define __heimntlm_protos_h__
4*ebfedea0SLionel Sambuc 
5*ebfedea0SLionel Sambuc #include <stdarg.h>
6*ebfedea0SLionel Sambuc 
7*ebfedea0SLionel Sambuc #ifdef __cplusplus
8*ebfedea0SLionel Sambuc extern "C" {
9*ebfedea0SLionel Sambuc #endif
10*ebfedea0SLionel Sambuc 
11*ebfedea0SLionel Sambuc int
12*ebfedea0SLionel Sambuc heim_ntlm_build_ntlm1_master (
13*ebfedea0SLionel Sambuc 	void */*key*/,
14*ebfedea0SLionel Sambuc 	size_t /*len*/,
15*ebfedea0SLionel Sambuc 	struct ntlm_buf */*session*/,
16*ebfedea0SLionel Sambuc 	struct ntlm_buf */*master*/);
17*ebfedea0SLionel Sambuc 
18*ebfedea0SLionel Sambuc int
19*ebfedea0SLionel Sambuc heim_ntlm_build_ntlm2_master (
20*ebfedea0SLionel Sambuc 	void */*key*/,
21*ebfedea0SLionel Sambuc 	size_t /*len*/,
22*ebfedea0SLionel Sambuc 	struct ntlm_buf */*blob*/,
23*ebfedea0SLionel Sambuc 	struct ntlm_buf */*session*/,
24*ebfedea0SLionel Sambuc 	struct ntlm_buf */*master*/);
25*ebfedea0SLionel Sambuc 
26*ebfedea0SLionel Sambuc int
27*ebfedea0SLionel Sambuc heim_ntlm_calculate_lm2 (
28*ebfedea0SLionel Sambuc 	const void */*key*/,
29*ebfedea0SLionel Sambuc 	size_t /*len*/,
30*ebfedea0SLionel Sambuc 	const char */*username*/,
31*ebfedea0SLionel Sambuc 	const char */*target*/,
32*ebfedea0SLionel Sambuc 	const unsigned char serverchallenge[8],
33*ebfedea0SLionel Sambuc 	unsigned char ntlmv2[16],
34*ebfedea0SLionel Sambuc 	struct ntlm_buf */*answer*/);
35*ebfedea0SLionel Sambuc 
36*ebfedea0SLionel Sambuc int
37*ebfedea0SLionel Sambuc heim_ntlm_calculate_ntlm1 (
38*ebfedea0SLionel Sambuc 	void */*key*/,
39*ebfedea0SLionel Sambuc 	size_t /*len*/,
40*ebfedea0SLionel Sambuc 	unsigned char challenge[8],
41*ebfedea0SLionel Sambuc 	struct ntlm_buf */*answer*/);
42*ebfedea0SLionel Sambuc 
43*ebfedea0SLionel Sambuc int
44*ebfedea0SLionel Sambuc heim_ntlm_calculate_ntlm2 (
45*ebfedea0SLionel Sambuc 	const void */*key*/,
46*ebfedea0SLionel Sambuc 	size_t /*len*/,
47*ebfedea0SLionel Sambuc 	const char */*username*/,
48*ebfedea0SLionel Sambuc 	const char */*target*/,
49*ebfedea0SLionel Sambuc 	const unsigned char serverchallenge[8],
50*ebfedea0SLionel Sambuc 	const struct ntlm_buf */*infotarget*/,
51*ebfedea0SLionel Sambuc 	unsigned char ntlmv2[16],
52*ebfedea0SLionel Sambuc 	struct ntlm_buf */*answer*/);
53*ebfedea0SLionel Sambuc 
54*ebfedea0SLionel Sambuc int
55*ebfedea0SLionel Sambuc heim_ntlm_calculate_ntlm2_sess (
56*ebfedea0SLionel Sambuc 	const unsigned char clnt_nonce[8],
57*ebfedea0SLionel Sambuc 	const unsigned char svr_chal[8],
58*ebfedea0SLionel Sambuc 	const unsigned char ntlm_hash[16],
59*ebfedea0SLionel Sambuc 	struct ntlm_buf */*lm*/,
60*ebfedea0SLionel Sambuc 	struct ntlm_buf */*ntlm*/);
61*ebfedea0SLionel Sambuc 
62*ebfedea0SLionel Sambuc int
63*ebfedea0SLionel Sambuc heim_ntlm_calculate_ntlm2_sess_hash (
64*ebfedea0SLionel Sambuc 	const unsigned char clnt_nonce[8],
65*ebfedea0SLionel Sambuc 	const unsigned char svr_chal[8],
66*ebfedea0SLionel Sambuc 	unsigned char verifier[8]);
67*ebfedea0SLionel Sambuc 
68*ebfedea0SLionel Sambuc int
69*ebfedea0SLionel Sambuc heim_ntlm_decode_targetinfo (
70*ebfedea0SLionel Sambuc 	const struct ntlm_buf */*data*/,
71*ebfedea0SLionel Sambuc 	int /*ucs2*/,
72*ebfedea0SLionel Sambuc 	struct ntlm_targetinfo */*ti*/);
73*ebfedea0SLionel Sambuc 
74*ebfedea0SLionel Sambuc int
75*ebfedea0SLionel Sambuc heim_ntlm_decode_type1 (
76*ebfedea0SLionel Sambuc 	const struct ntlm_buf */*buf*/,
77*ebfedea0SLionel Sambuc 	struct ntlm_type1 */*data*/);
78*ebfedea0SLionel Sambuc 
79*ebfedea0SLionel Sambuc int
80*ebfedea0SLionel Sambuc heim_ntlm_decode_type2 (
81*ebfedea0SLionel Sambuc 	const struct ntlm_buf */*buf*/,
82*ebfedea0SLionel Sambuc 	struct ntlm_type2 */*type2*/);
83*ebfedea0SLionel Sambuc 
84*ebfedea0SLionel Sambuc int
85*ebfedea0SLionel Sambuc heim_ntlm_decode_type3 (
86*ebfedea0SLionel Sambuc 	const struct ntlm_buf */*buf*/,
87*ebfedea0SLionel Sambuc 	int /*ucs2*/,
88*ebfedea0SLionel Sambuc 	struct ntlm_type3 */*type3*/);
89*ebfedea0SLionel Sambuc 
90*ebfedea0SLionel Sambuc void
91*ebfedea0SLionel Sambuc heim_ntlm_derive_ntlm2_sess (
92*ebfedea0SLionel Sambuc 	const unsigned char sessionkey[16],
93*ebfedea0SLionel Sambuc 	const unsigned char */*clnt_nonce*/,
94*ebfedea0SLionel Sambuc 	size_t /*clnt_nonce_length*/,
95*ebfedea0SLionel Sambuc 	const unsigned char svr_chal[8],
96*ebfedea0SLionel Sambuc 	unsigned char derivedkey[16]);
97*ebfedea0SLionel Sambuc 
98*ebfedea0SLionel Sambuc int
99*ebfedea0SLionel Sambuc heim_ntlm_encode_targetinfo (
100*ebfedea0SLionel Sambuc 	const struct ntlm_targetinfo */*ti*/,
101*ebfedea0SLionel Sambuc 	int /*ucs2*/,
102*ebfedea0SLionel Sambuc 	struct ntlm_buf */*data*/);
103*ebfedea0SLionel Sambuc 
104*ebfedea0SLionel Sambuc int
105*ebfedea0SLionel Sambuc heim_ntlm_encode_type1 (
106*ebfedea0SLionel Sambuc 	const struct ntlm_type1 */*type1*/,
107*ebfedea0SLionel Sambuc 	struct ntlm_buf */*data*/);
108*ebfedea0SLionel Sambuc 
109*ebfedea0SLionel Sambuc int
110*ebfedea0SLionel Sambuc heim_ntlm_encode_type2 (
111*ebfedea0SLionel Sambuc 	const struct ntlm_type2 */*type2*/,
112*ebfedea0SLionel Sambuc 	struct ntlm_buf */*data*/);
113*ebfedea0SLionel Sambuc 
114*ebfedea0SLionel Sambuc int
115*ebfedea0SLionel Sambuc heim_ntlm_encode_type3 (
116*ebfedea0SLionel Sambuc 	const struct ntlm_type3 */*type3*/,
117*ebfedea0SLionel Sambuc 	struct ntlm_buf */*data*/);
118*ebfedea0SLionel Sambuc 
119*ebfedea0SLionel Sambuc void
120*ebfedea0SLionel Sambuc heim_ntlm_free_buf (struct ntlm_buf */*p*/);
121*ebfedea0SLionel Sambuc 
122*ebfedea0SLionel Sambuc void
123*ebfedea0SLionel Sambuc heim_ntlm_free_targetinfo (struct ntlm_targetinfo */*ti*/);
124*ebfedea0SLionel Sambuc 
125*ebfedea0SLionel Sambuc void
126*ebfedea0SLionel Sambuc heim_ntlm_free_type1 (struct ntlm_type1 */*data*/);
127*ebfedea0SLionel Sambuc 
128*ebfedea0SLionel Sambuc void
129*ebfedea0SLionel Sambuc heim_ntlm_free_type2 (struct ntlm_type2 */*data*/);
130*ebfedea0SLionel Sambuc 
131*ebfedea0SLionel Sambuc void
132*ebfedea0SLionel Sambuc heim_ntlm_free_type3 (struct ntlm_type3 */*data*/);
133*ebfedea0SLionel Sambuc 
134*ebfedea0SLionel Sambuc int
135*ebfedea0SLionel Sambuc heim_ntlm_keyex_unwrap (
136*ebfedea0SLionel Sambuc 	struct ntlm_buf */*baseKey*/,
137*ebfedea0SLionel Sambuc 	struct ntlm_buf */*encryptedSession*/,
138*ebfedea0SLionel Sambuc 	struct ntlm_buf */*session*/);
139*ebfedea0SLionel Sambuc 
140*ebfedea0SLionel Sambuc int
141*ebfedea0SLionel Sambuc heim_ntlm_keyex_wrap (
142*ebfedea0SLionel Sambuc 	struct ntlm_buf */*base_session*/,
143*ebfedea0SLionel Sambuc 	struct ntlm_buf */*session*/,
144*ebfedea0SLionel Sambuc 	struct ntlm_buf */*encryptedSession*/);
145*ebfedea0SLionel Sambuc 
146*ebfedea0SLionel Sambuc int
147*ebfedea0SLionel Sambuc heim_ntlm_nt_key (
148*ebfedea0SLionel Sambuc 	const char */*password*/,
149*ebfedea0SLionel Sambuc 	struct ntlm_buf */*key*/);
150*ebfedea0SLionel Sambuc 
151*ebfedea0SLionel Sambuc int
152*ebfedea0SLionel Sambuc heim_ntlm_ntlmv2_key (
153*ebfedea0SLionel Sambuc 	const void */*key*/,
154*ebfedea0SLionel Sambuc 	size_t /*len*/,
155*ebfedea0SLionel Sambuc 	const char */*username*/,
156*ebfedea0SLionel Sambuc 	const char */*target*/,
157*ebfedea0SLionel Sambuc 	unsigned char ntlmv2[16]);
158*ebfedea0SLionel Sambuc 
159*ebfedea0SLionel Sambuc size_t
160*ebfedea0SLionel Sambuc heim_ntlm_unparse_flags (
161*ebfedea0SLionel Sambuc 	uint32_t /*flags*/,
162*ebfedea0SLionel Sambuc 	char */*s*/,
163*ebfedea0SLionel Sambuc 	size_t /*len*/);
164*ebfedea0SLionel Sambuc 
165*ebfedea0SLionel Sambuc int
166*ebfedea0SLionel Sambuc heim_ntlm_v1_base_session (
167*ebfedea0SLionel Sambuc 	void */*key*/,
168*ebfedea0SLionel Sambuc 	size_t /*len*/,
169*ebfedea0SLionel Sambuc 	struct ntlm_buf */*session*/);
170*ebfedea0SLionel Sambuc 
171*ebfedea0SLionel Sambuc int
172*ebfedea0SLionel Sambuc heim_ntlm_v2_base_session (
173*ebfedea0SLionel Sambuc 	void */*key*/,
174*ebfedea0SLionel Sambuc 	size_t /*len*/,
175*ebfedea0SLionel Sambuc 	struct ntlm_buf */*ntlmResponse*/,
176*ebfedea0SLionel Sambuc 	struct ntlm_buf */*session*/);
177*ebfedea0SLionel Sambuc 
178*ebfedea0SLionel Sambuc int
179*ebfedea0SLionel Sambuc heim_ntlm_verify_ntlm2 (
180*ebfedea0SLionel Sambuc 	const void */*key*/,
181*ebfedea0SLionel Sambuc 	size_t /*len*/,
182*ebfedea0SLionel Sambuc 	const char */*username*/,
183*ebfedea0SLionel Sambuc 	const char */*target*/,
184*ebfedea0SLionel Sambuc 	time_t /*now*/,
185*ebfedea0SLionel Sambuc 	const unsigned char serverchallenge[8],
186*ebfedea0SLionel Sambuc 	const struct ntlm_buf */*answer*/,
187*ebfedea0SLionel Sambuc 	struct ntlm_buf */*infotarget*/,
188*ebfedea0SLionel Sambuc 	unsigned char ntlmv2[16]);
189*ebfedea0SLionel Sambuc 
190*ebfedea0SLionel Sambuc #ifdef __cplusplus
191*ebfedea0SLionel Sambuc }
192*ebfedea0SLionel Sambuc #endif
193*ebfedea0SLionel Sambuc 
194*ebfedea0SLionel Sambuc #endif /* __heimntlm_protos_h__ */
195