1 /* Based on work Copyright (C) 2002 - 2004 Tenable Network Security
2  *
3  * SPDX-License-Identifier: GPL-2.0-only
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU General Public License
7  * version 2 as published by the Free Software Foundation.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
17  */
18 
19 /*
20  * MODIFICATION: added definitions for implementing NTLMSSP features
21  */
22 
23 #ifndef NASL_CRYPTO_H
24 #define NASL_CRYPTO_H
25 
26 #include "nasl_lex_ctxt.h"
27 
28 #define MD4_DIGEST_LENGTH 16
29 
30 tree_cell *
31 nasl_md2 (lex_ctxt *);
32 
33 tree_cell *
34 nasl_md4 (lex_ctxt *);
35 
36 tree_cell *
37 nasl_md5 (lex_ctxt *);
38 
39 tree_cell *
40 nasl_sha (lex_ctxt *);
41 
42 tree_cell *
43 nasl_sha1 (lex_ctxt *);
44 
45 tree_cell *
46 nasl_sha256 (lex_ctxt *);
47 
48 tree_cell *
49 nasl_ripemd160 (lex_ctxt *);
50 
51 tree_cell *
52 nasl_hmac_md2 (lex_ctxt *);
53 
54 tree_cell *
55 nasl_hmac_md5 (lex_ctxt *);
56 
57 tree_cell *
58 nasl_hmac_sha1 (lex_ctxt *);
59 
60 tree_cell *
61 nasl_hmac_sha256 (lex_ctxt *);
62 
63 tree_cell *
64 nasl_hmac_sha384 (lex_ctxt *);
65 
66 tree_cell *
67 nasl_hmac_sha512 (lex_ctxt *);
68 
69 tree_cell *
70 nasl_hmac_dss (lex_ctxt *);
71 
72 tree_cell *
73 nasl_hmac_ripemd160 (lex_ctxt *);
74 
75 tree_cell *
76 nasl_prf_sha256 (lex_ctxt *);
77 
78 tree_cell *
79 nasl_prf_sha384 (lex_ctxt *);
80 
81 tree_cell *
82 nasl_tls1_prf (lex_ctxt *);
83 
84 tree_cell *
85 nasl_ntlmv1_hash (lex_ctxt *);
86 
87 tree_cell *
88 nasl_nt_owf_gen (lex_ctxt *);
89 
90 tree_cell *
91 nasl_lm_owf_gen (lex_ctxt *);
92 
93 tree_cell *
94 nasl_ntv2_owf_gen (lex_ctxt *);
95 
96 tree_cell *
97 nasl_ntlmv2_hash (lex_ctxt *);
98 
99 tree_cell *
100 nasl_ntlmv2_response (lex_ctxt *lexic);
101 
102 tree_cell *
103 nasl_ntlm2_response (lex_ctxt *lexic);
104 
105 tree_cell *
106 nasl_ntlm_response (lex_ctxt *lexic);
107 
108 tree_cell *
109 nasl_keyexchg (lex_ctxt *lexic);
110 
111 tree_cell *
112 nasl_insert_hexzeros (lex_ctxt *lexic);
113 
114 tree_cell *
115 nasl_get_password (lex_ctxt *lexic);
116 
117 tree_cell *
118 nasl_get_sign (lex_ctxt *lexic);
119 
120 tree_cell *
121 nasl_get_smb2_sign (lex_ctxt *lexic);
122 
123 tree_cell *
124 nasl_hmac_sha256 (lex_ctxt *lexic);
125 
126 tree_cell *
127 nasl_cipher_des (lex_ctxt *);
128 
129 #endif
130