Added CVS Id tags to header files.
[tinc] / src / encr.h
1 /*
2     encr.h -- header for encr.c
3     Copyright (C) 1998,1999,2000 Ivo Timmermans <zarq@iname.com>
4
5     This program is free software; you can redistribute it and/or modify
6     it under the terms of the GNU General Public License as published by
7     the Free Software Foundation; either version 2 of the License, or
8     (at your option) any later version.
9
10     This program is distributed in the hope that it will be useful,
11     but WITHOUT ANY WARRANTY; without even the implied warranty of
12     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13     GNU General Public License for more details.
14
15     You should have received a copy of the GNU General Public License
16     along with this program; if not, write to the Free Software
17     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18
19     $Id: encr.h,v 1.2.4.1 2000/06/25 15:22:16 guus Exp $
20 */
21
22 #ifndef __TINC_ENCR_H__
23 #define __TINC_ENCR_H__
24
25 #include "net.h"
26
27 #define PRIVATE_KEY_BITS 128
28 #define PRIVATE_KEY_LENGTH (PRIVATE_KEY_BITS >> 3)
29
30 extern char *my_public_key_base36;
31 extern int my_key_expiry;
32
33 extern int security_init(void);
34
35 extern void do_bf_encrypt(vpn_packet_t *, real_packet_t *);
36 extern void do_bf_decrypt(real_packet_t *, vpn_packet_t *);
37
38 extern int send_portnumbers(int);
39 extern void set_shared_key(char *);
40 extern int send_passphrase(conn_list_t *);
41 extern int send_public_key(conn_list_t *);
42 extern int verify_passphrase(conn_list_t *, unsigned char *);
43 extern char *make_shared_key(char*);
44 extern void encrypt_passphrase(passphrase_t *pp);
45 extern void free_key(enc_key_t*);
46 extern void regenerate_keys(void);
47
48 #endif /* __TINC_ENCR_H__ */
49