xref: /original-bsd/lib/libtelnet/enc-proto.h (revision a1c2194a)
1 /*-
2  * Copyright (c) 1991 The Regents of the University of California.
3  * All rights reserved.
4  *
5  * %sccs.include.redist.c%
6  *
7  *	@(#)enc-proto.h	5.2 (Berkeley) 03/22/91
8  */
9 
10 /*
11  * Copyright (C) 1990 by the Massachusetts Institute of Technology
12  *
13  * Export of this software from the United States of America is assumed
14  * to require a specific license from the United States Government.
15  * It is the responsibility of any person or organization contemplating
16  * export to obtain such a license before exporting.
17  *
18  * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
19  * distribute this software and its documentation for any purpose and
20  * without fee is hereby granted, provided that the above copyright
21  * notice appear in all copies and that both that copyright notice and
22  * this permission notice appear in supporting documentation, and that
23  * the name of M.I.T. not be used in advertising or publicity pertaining
24  * to distribution of the software without specific, written prior
25  * permission.  M.I.T. makes no representations about the suitability of
26  * this software for any purpose.  It is provided "as is" without express
27  * or implied warranty.
28  */
29 #if	!defined(P)
30 #ifdef	__STDC__
31 #define	P(x)	x
32 #else
33 #define	P(x)	()
34 #endif
35 #endif
36 
37 #if	defined(ENCRYPT)
38 void encrypt_init P((char *, int));
39 Encryptions *findencryption P((int));
40 void encrypt_send_supprt P((void));
41 void encrypt_auto P((int));
42 void decrypt_auto P((int));
43 void encrypt_is P((unsigned char *, int));
44 void encrypt_reply P((unsigned char *, int));
45 void encrypt_start_input P((int));
46 void encrypt_session_key P((Session_Key *, int));
47 void encrypt_end_input P((void));
48 void encrypt_start_output P((int));
49 void encrypt_end_output P((void));
50 void encrypt_send_request_start P((void));
51 void encrypt_send_request_end P((void));
52 void encrypt_send_end P((void));
53 void encrypt_wait P((void));
54 void encrypt_send_support P((void));
55 void encrypt_send_keyid P((int, unsigned char *, int, int));
56 int net_write P((unsigned char *, int));
57 
58 #ifdef	TELENTD
59 void encrypt_wait P((void));
60 #else
61 int encrypt_cmd P((int, char **));
62 void encrypt_display P((void));
63 #endif
64 
65 void cfb64_encrypt P((unsigned char *, int));
66 int cfb64_decrypt P((int));
67 void cfb64_init P((int));
68 int cfb64_start P((int, int));
69 int cfb64_is P((unsigned char *, int));
70 int cfb64_reply P((unsigned char *, int));
71 void cfb64_session P((Session_Key *, int));
72 int cfb64_keyid P((int, unsigned char *, int *));
73 void cfb64_printsub P((unsigned char *, int, unsigned char *, int));
74 
75 void ofb64_encrypt P((unsigned char *, int));
76 int ofb64_decrypt P((int));
77 void ofb64_init P((int));
78 int ofb64_start P((int, int));
79 int ofb64_is P((unsigned char *, int));
80 int ofb64_reply P((unsigned char *, int));
81 void ofb64_session P((Session_Key *, int));
82 int ofb64_keyid P((int, unsigned char *, int *));
83 void ofb64_printsub P((unsigned char *, int, unsigned char *, int));
84 
85 int  des_new_random_key P((Block));
86 void des_set_random_generator_seed P((Block));
87 void des_key_sched P((Block, Schedule));
88 void des_ecb_encrypt P((Block, Block, Schedule, int));
89 int  des_string_to_key P((char *, Block));
90 #endif
91