2 encr.h -- header for encr.c
3 Copyright (C) 1998,99 Ivo Timmermans <zarq@iname.com>
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.
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.
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.
20 #ifndef __TINC_ENCR_H__
21 #define __TINC_ENCR_H__
25 #define PRIVATE_KEY_BITS 128
26 #define PRIVATE_KEY_LENGTH (PRIVATE_KEY_BITS >> 3)
28 extern char *my_public_key_base36;
29 extern int my_key_expiry;
31 extern int security_init(void);
33 extern void do_bf_encrypt(vpn_packet_t *, real_packet_t *);
34 extern void do_bf_decrypt(real_packet_t *, vpn_packet_t *);
36 extern int send_portnumbers(int);
37 extern void set_shared_key(char *);
38 extern int send_passphrase(conn_list_t *);
39 extern int send_public_key(conn_list_t *);
40 extern int verify_passphrase(conn_list_t *, unsigned char *);
41 extern char *make_shared_key(char*);
42 extern void encrypt_passphrase(passphrase_t *pp);
43 extern void free_key(enc_key_t*);
44 extern void regenerate_keys(void);
46 #endif /* __TINC_ENCR_H__ */