… | |
… | |
5 | |
5 | |
6 | |
6 | |
7 | ==== DESCRIPTION ==== |
7 | ==== DESCRIPTION ==== |
8 | |
8 | |
9 | GVPE is a suite designed to provide a virtual private network for |
9 | GVPE is a suite designed to provide a virtual private network for |
10 | multiple nodes over an untrusted network. |
10 | multiple nodes over an untrusted network. This document first gives an |
|
|
11 | introduction to VPNs in general and then describes the specific |
|
|
12 | implementation of GVPE. |
11 | |
13 | |
|
|
14 | |
|
|
15 | == WHAT IS A VPN? == |
|
|
16 | |
|
|
17 | VPN is an acronym, it stands for: |
|
|
18 | |
12 | "Virtual" means that no physical network is created (of course), but an |
19 | : Virtual means that no physical network is created (of course), but a |
13 | ethernet is emulated by creating multiple tunnels between the member |
20 | network is *emulated* by creating multiple tunnels between the |
14 | nodes. |
21 | member nodes by encapsulating and sending data over another |
|
|
22 | transport network. |
15 | |
23 | |
|
|
24 | Usually the emulated network is a normal IP or Ethernet, and the |
|
|
25 | transport network is the Internet. However, using a VPN system like |
|
|
26 | GVPE to connect nodes over other untrusted networks such as Wireless |
|
|
27 | LAN is not uncommon. |
|
|
28 | |
16 | "Private" means that non-participating nodes cannot decode ("sniff)" nor |
29 | : Private means that non-participating nodes cannot decode ("sniff)" |
17 | inject ("spoof") packets. |
30 | nor inject ("spoof") packets. This means that nodes can be connected |
|
|
31 | over untrusted networks such as the public Internet without fear of |
|
|
32 | being eavesdropped while at the same time being able to trust data |
|
|
33 | sent by other nodes. |
18 | |
34 | |
19 | In the case of gvpe, even participating nodes cannot sniff packets send |
35 | In the case of GVPE, even participating nodes cannot sniff packets |
20 | to other nodes or spoof packets as if sent from other nodes. |
36 | send to other nodes or spoof packets as if sent from other nodes, so |
|
|
37 | communications between any two nodes is private to those two nodes. |
21 | |
38 | |
22 | "Network" means that more than two parties can participate in the |
39 | : Network means that more than two parties can participate in the |
23 | network, so for instance it's possible to connect multiple branches of a |
40 | network, so for instance it's possible to connect multiple branches |
24 | company into a single network. Many so-called "vpn" solutions only |
41 | of a company into a single network. Many so-called "vpn" solutions |
25 | create point-to-point tunnels. |
42 | only create point-to-point tunnels, which in turn can be used to |
|
|
43 | build larger networks. |
26 | |
44 | |
|
|
45 | GVPE provides a true multi-point network in wich any number of nodes |
|
|
46 | (at least a few dozen in practise, the theoretical limit is 4095 |
|
|
47 | nodes) can participate. |
27 | |
48 | |
|
|
49 | |
28 | == DESIGN GOALS == |
50 | == GVPE DESIGN GOALS == |
29 | |
51 | |
30 | : SIMPLE DESIGN |
52 | : SIMPLE DESIGN |
31 | Cipher, HMAC algorithms and other key parameters must be selected at |
53 | Cipher, HMAC algorithms and other key parameters must be selected at |
32 | compile time - this makes it possible to only link in algorithms you |
54 | compile time - this makes it possible to only link in algorithms you |
33 | actually need. It also makes the crypto part of the source very |
55 | actually need. It also makes the crypto part of the source very |
34 | transparent and easy to inspect. |
56 | transparent and easy to inspect, and last not least this makes it |
|
|
57 | possible to hardcode the layout of all packets into the binary. GVPE |
|
|
58 | goes a step further and internally reserves blocks of the same |
|
|
59 | length for all packets, which virtually removes all possibilities of |
|
|
60 | buffer overflows, as there is only a single type of buffer and it's |
|
|
61 | always of fixed length. |
35 | |
62 | |
36 | : EASY TO SETUP |
63 | : EASY TO SETUP |
37 | A few lines of config (the config file is shared unmodified between |
64 | A few lines of config (the config file is shared unmodified between |
38 | all hosts) and a single run of ``gvpectrl'' to generate the keys |
65 | all hosts) and a single run of ``gvpectrl'' to generate the keys |
39 | suffices to make it work. |
66 | suffices to make it work. |
… | |
… | |
63 | ==== COMPILETIME CONFIGURATION ==== |
90 | ==== COMPILETIME CONFIGURATION ==== |
64 | |
91 | |
65 | Please have a look at the ``gvpe.osdep(5)'' manpage for |
92 | Please have a look at the ``gvpe.osdep(5)'' manpage for |
66 | platform-specific information. |
93 | platform-specific information. |
67 | |
94 | |
68 | Here are a few recipes for compiling your gvpe: |
95 | Here are a few recipes for compiling your gvpe, showing the extremes |
|
|
96 | (fast, small, insecure OR slow, large, more secure), between you should |
|
|
97 | choose: |
69 | |
98 | |
70 | |
99 | |
71 | == AS LOW PACKET OVERHEAD AS POSSIBLE == |
100 | == AS LOW PACKET OVERHEAD AS POSSIBLE == |
72 | |
101 | |
73 | ./configure --enable-hmac-length=4 --enable-rand-length=0 |
102 | ./configure --enable-hmac-length=4 --enable-rand-length=0 |
74 | |
103 | |
75 | Minimize the header overhead of VPN packets (the above will result in |
104 | Minimize the header overhead of VPN packets (the above will result in |
76 | only 4 bytes of overhead over the raw ethernet frame). |
105 | only 4 bytes of overhead over the raw ethernet frame). This is a |
|
|
106 | insecure configuration because a HMAC length of 4 makes collision |
|
|
107 | attacks based on the birthday paradox easy, though. |
77 | |
108 | |
78 | |
109 | |
79 | == MINIMIZE CPU TIME REQUIRED == |
110 | == MINIMIZE CPU TIME REQUIRED == |
80 | |
111 | |
81 | ./configure --enable-cipher=bf --enable-digest=md4 |
112 | ./configure --enable-cipher=bf --enable-digest=md4 |
82 | |
113 | |
83 | Use the fastest cipher and digest algorithms currently available in |
114 | Use the fastest cipher and digest algorithms currently available in |
84 | gvpe. |
115 | gvpe. MD4 has been broken and is quite insecure, though. |
85 | |
116 | |
86 | |
117 | |
87 | == MAXIMIZE SECURITY == |
118 | == MAXIMIZE SECURITY == |
88 | |
119 | |
89 | ./configure --enable-hmac-length=16 --enable-rand-length=8 --enable-digest=sha1 |
120 | ./configure --enable-hmac-length=16 --enable-rand-length=8 --enable-digest=sha1 |
90 | |
121 | |
91 | This uses a 16 byte HMAC checksum to authenticate packets (I guess 8-12 |
122 | This uses a 16 byte HMAC checksum to authenticate packets (I guess 8-12 |
92 | would also be pretty secure ;) and will additionally prefix each packet |
123 | would also be pretty secure ;) and will additionally prefix each packet |
93 | with 8 bytes of random data. |
124 | with 8 bytes of random data. In the long run, people should move to |
|
|
125 | SHA-224 and beyond, but support in openssl is missing as of writing this |
|
|
126 | document. |
94 | |
127 | |
95 | In general, remember that AES-128 seems to be more secure and faster |
128 | In general, remember that AES-128 seems to be more secure and faster |
96 | than AES-192 or AES-256, more randomness helps against sniffing and a |
129 | than AES-192 or AES-256, more randomness helps against sniffing and a |
97 | longer HMAC helps against spoofing. MD4 is a fast digest, SHA1 or |
130 | longer HMAC helps against spoofing. MD4 is a fast digest, SHA1 or |
98 | RIPEMD160 are better, and Blowfish is a fast cipher (and also quite |
131 | RIPEMD160 are better, and Blowfish is a fast cipher (and also quite |
… | |
… | |
213 | |
246 | |
214 | |
247 | |
215 | ==== SEE ALSO ==== |
248 | ==== SEE ALSO ==== |
216 | |
249 | |
217 | gvpe.osdep(5) for OS-depedendent information, gvpe.conf(5), gvpectrl(8), |
250 | gvpe.osdep(5) for OS-depedendent information, gvpe.conf(5), gvpectrl(8), |
218 | and for a description of the protocol and routing algorithms, |
251 | and for a description of the transports, protocol, and routing |
219 | gvpe.protocol(7). |
252 | algorithm, gvpe.protocol(7). |
|
|
253 | |
|
|
254 | The GVPE mailinglist, at <http://lists.schmorp.de/>, or |
|
|
255 | ``gvpe@lists.schmorp.de''. |
220 | |
256 | |
221 | |
257 | |
222 | ==== AUTHOR ==== |
258 | ==== AUTHOR ==== |
223 | |
259 | |
224 | Marc Lehmann <gvpe@plan9.de> |
260 | Marc Lehmann <gvpe@schmorp.de> |
225 | |
261 | |
226 | |
262 | |
227 | ==== COPYRIGHTS AND LICENSES ==== |
263 | ==== COPYRIGHTS AND LICENSES ==== |
228 | |
264 | |
229 | Vpe itself is distributed under the GENERAL PUBLIC LICENSE (see the file |
265 | GVPE itself is distributed under the GENERAL PUBLIC LICENSE (see the |
230 | COPYING that should be part of your distribution). |
266 | file COPYING that should be part of your distribution). |
231 | |
267 | |
232 | In some configurations it uses modified versions of the tinc vpn suite, |
268 | In some configurations it uses modified versions of the tinc vpn suite, |
233 | which is also available under the GENERAL PUBLIC LICENSE. |
269 | which is also available under the GENERAL PUBLIC LICENSE. |
234 | |
270 | |
235 | In some configurations (notably darwin), it uses a poll emulation |
|
|
236 | library that comes with the following license notice: |
|
|
237 | |
|
|
238 | Copyright (c) 1995-2002 Brian M. Clapper |
|
|
239 | All rights reserved. |
|
|
240 | |
|
|
241 | Redistribution and use in source and binary forms are permitted |
|
|
242 | provided that: (1) source distributions retain this entire |
|
|
243 | copyright notice and comment; (2) modifications made to the |
|
|
244 | software are prominently mentioned, and a copy of the original |
|
|
245 | software (or a pointer to its location) are included; and (3) |
|
|
246 | distributions including binaries display the following |
|
|
247 | acknowledgement: "This product includes software developed by Brian |
|
|
248 | M. Clapper <bmc@clapper.org>" in the documentation or other |
|
|
249 | materials provided with the distribution. The name of the author |
|
|
250 | may not be used to endorse or promote products derived from this |
|
|
251 | software without specific prior written permission. |
|
|
252 | |
|
|
253 | THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR |
|
|
254 | IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED |
|
|
255 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
|
|
256 | |
|
|