Debian Codegraph @

libtelnet/enc-proto.h

raw
1 /*
2 Copyright (C) 1996-2026 Free Software Foundation, Inc.
3
4 This file is part of GNU Inetutils.
5
6 GNU Inetutils is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or (at
9 your option) any later version.
10
11 GNU Inetutils is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see `http://www.gnu.org/licenses/'. */
18
19 /*
20 * Copyright (c) 1991, 1993
21 * The Regents of the University of California. All rights reserved.
22 *
23 * Redistribution and use in source and binary forms, with or without
24 * modification, are permitted provided that the following conditions
25 * are met:
26 * 1. Redistributions of source code must retain the above copyright
27 * notice, this list of conditions and the following disclaimer.
28 * 2. Redistributions in binary form must reproduce the above copyright
29 * notice, this list of conditions and the following disclaimer in the
30 * documentation and/or other materials provided with the distribution.
31 * 3. Neither the name of the University nor the names of its contributors
32 * may be used to endorse or promote products derived from this software
33 * without specific prior written permission.
34 *
35 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
36 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
37 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
38 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
39 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
40 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
41 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
42 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
43 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
44 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
45 * SUCH DAMAGE.
46 */
47
48 /*
49 * Copyright (C) 1990 by the Massachusetts Institute of Technology
50 *
51 * Export of this software from the United States of America is assumed
52 * to require a specific license from the United States Government.
53 * It is the responsibility of any person or organization contemplating
54 * export to obtain such a license before exporting.
55 *
56 * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
57 * distribute this software and its documentation for any purpose and
58 * without fee is hereby granted, provided that the above copyright
59 * notice appear in all copies and that both that copyright notice and
60 * this permission notice appear in supporting documentation, and that
61 * the name of M.I.T. not be used in advertising or publicity pertaining
62 * to distribution of the software without specific, written prior
63 * permission. M.I.T. makes no representations about the suitability of
64 * this software for any purpose. It is provided "as is" without express
65 * or implied warranty.
66 */
67
68 #ifdef ENCRYPTION
69 Encryptions *findencryption (int);
70 Encryptions *finddecryption (int);
71 int EncryptStart (char *);
72 int EncryptStartInput (void);
73 int EncryptStartOutput (void);
74 int EncryptStatus (void);
75 int EncryptStop (char *);
76 int EncryptStopInput (void);
77 int EncryptStopOutput (void);
78 int EncryptType (char *, char *);
79
80 void encrypt_init (char *, int);
81 Encryptions *findencryption (int);
82 void encrypt_send_supprt (void);
83 void encrypt_auto (int);
84 void decrypt_auto (int);
85 void encrypt_is (unsigned char *, int);
86 void encrypt_reply (unsigned char *, int);
87 void encrypt_start (unsigned char *, int);
88 void encrypt_start_input (int);
89 void encrypt_session_key (Session_Key *, int);
90 void encrypt_end (void);
91 void encrypt_end_input (void);
92 void encrypt_start_output (int);
93 void encrypt_end_output (void);
94 void encrypt_request_start (unsigned char *, int);
95 void encrypt_send_request_start (void);
96 void encrypt_request_end (void);
97 void encrypt_send_request_end (void);
98 void encrypt_send_end (void);
99 void encrypt_wait (void);
100 void encrypt_support (unsigned char *, int);
101 void encrypt_send_support (void);
102 void encrypt_dec_keyid (unsigned char *, int);
103 void encrypt_enc_keyid (unsigned char *, int);
104 void encrypt_send_keyid (int, unsigned char *, int, int);
105 void encrypt_printsub (unsigned char *, int, char *, int);
106 int net_write (unsigned char *, int);
107
108 # ifdef TELNETD
109 void encrypt_wait (void);
110 # else
111 int encrypt_cmd (int, char **);
112 void encrypt_display (void);
113 # endif
114
115 void krbdes_encrypt (unsigned char *, int);
116 int krbdes_decrypt (int);
117 int krbdes_is (unsigned char *, int);
118 int krbdes_reply (unsigned char *, int);
119 void krbdes_init (int);
120 int krbdes_start (int, int);
121 void krbdes_session (Session_Key *, int);
122 void krbdes_printsub (unsigned char *, int, char *, int);
123
124 void cfb64_encrypt (unsigned char *, int);
125 int cfb64_decrypt (int);
126 void cfb64_init (int);
127 int cfb64_start (int, int);
128 int cfb64_is (unsigned char *, int);
129 int cfb64_reply (unsigned char *, int);
130 void cfb64_session (Session_Key *, int);
131 int cfb64_keyid (int, unsigned char *, int *);
132 void cfb64_printsub (unsigned char *, int, char *, int);
133
134 void ofb64_encrypt (unsigned char *, int);
135 int ofb64_decrypt (int);
136 void ofb64_init (int);
137 int ofb64_start (int, int);
138 int ofb64_is (unsigned char *, int);
139 int ofb64_reply (unsigned char *, int);
140 void ofb64_session (Session_Key *, int);
141 int ofb64_keyid (int, unsigned char *, int *);
142 void ofb64_printsub (unsigned char *, int, char *, int);
143
144 int des_new_random_key (Block);
145 void des_set_random_generator_seed (Block);
146 void des_key_sched (Block, Schedule);
147 void des_ecb_encrypt (Block, Block, Schedule, int);
148 int des_string_to_key (char *, Block);
149 #endif /* ENCRYPTION */