2 encr.h -- header for encr.c
3 Copyright (C) 1998,1999,2000 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.
19 $Id: encr.h,v 1.3 2000/10/18 20:12:08 zarq Exp $
22 #ifndef __TINC_ENCR_H__
23 #define __TINC_ENCR_H__
27 #define PRIVATE_KEY_BITS 128
28 #define PRIVATE_KEY_LENGTH (PRIVATE_KEY_BITS >> 3)
30 extern char *my_public_key_base36;
31 extern int my_key_expiry;
33 extern int security_init(void);
35 extern int send_portnumbers(int);
36 extern void set_shared_key(char *);
37 extern int send_passphrase(conn_list_t *);
38 extern int send_public_key(conn_list_t *);
39 extern int verify_passphrase(conn_list_t *, unsigned char *);
40 extern char *make_shared_key(char*);
41 extern void encrypt_passphrase(passphrase_t *pp);
42 extern void free_key(enc_key_t*);
43 extern void regenerate_keys(void);
45 #endif /* __TINC_ENCR_H__ */