]> Cypherpunks.ru repositories - govpn.git/blobdiff - doc/example.texi
Use Argon2d PHC winner instead of PBKDF2
[govpn.git] / doc / example.texi
index 129b10f290e7abf3e055307d260054b7a8cc3b11..6fd62dfd12becda2f470b11ec204e98793b4bbde 100644 (file)
@@ -1,10 +1,10 @@
-@node Example usage
+@node Example
 @section Example usage
 
 Let's assume that there is some insecure link between your computer and
 WiFi-reachable gateway.
 
-@itemize @bullet
+@itemize
 @item You have got @code{wlan0} NIC with 192.168.0/24 network on it.
 @item You want to create virtual encrypted and authenticated 172.16.0/24
 network and use it as a default transport.
@@ -15,51 +15,38 @@ is 1432.
 @end itemize
 
 @strong{Install}. At first you must @ref{Installation, install} this
-software: download, check the signature, compile.
+software: download, @ref{Integrity, check the signature}, compile.
 
-Do not forget about setting @code{GOMAXPROC} environment variable for
-using more than one CPU on both sides:
+@strong{Prepare the client}. Generate client's verifier for Alice as an
+example:
 
-@example
-% export GOMAXPROC=4
-@end example
+@verbatim
+client% ./utils/newclient.sh Alice
+Enter passphrase:
+Your client verifier is: $argon2d$m=4096,t=128,p=1$bwR5VjeCYIQaa8SeaI3rqg
 
-@strong{Prepare the server}. Create the new client, named (for example)
-"Alice":
+Place the following JSON configuration entry on the server's side:
 
-@example
-% ./utils/newclient.sh Alice
-Place verifier to peers/6d4ac605ce8dc37c2f0bf21cb542a713/verifier
-@end example
+    "Alice": {
+        "up": "/path/to/up.sh",
+        "verifier": "$argon2d$m=4096,t=128,p=1$bwR5VjeCYIQaa8SeaI3rqg$KCNIqfS4DGsBTtVytamAzcISgrlEWvNxan1UfBrFu10"
+    }
 
-"6d4ac605ce8dc37c2f0bf21cb542a713" -- is the new client's identity.
+Verifier was generated with:
 
-@strong{Prepare the client}. Generate @ref{Verifier} for known client
-identity:
+    ./utils/storekey.sh /tmp/passphrase
+    govpn-verifier -key /tmp/passphrase
+@end verbatim
 
-@example
-% ./utils/storekey.sh /tmp/passphrase
-Enter passphrase:[my secure passphrase is here]
-% govpn-verifier -id 6d4ac605ce8dc37c2f0bf21cb542a713 -key /tmp/passphrase
-562556cc9ecf0019b4cf45bcdf42706944ae9b3ac7c73ad299d83f2d5a169c55
-% rm /tmp/passphrase
-@end example
-
-"562556cc9ecf0019b4cf45bcdf42706944ae9b3ac7c73ad299d83f2d5a169c55" --
-this is verifier itself.
-
-@strong{Save verifier on server}.
-
-@example
-% cat > peers/6d4ac605ce8dc37c2f0bf21cb542a713/verifier <<EOF
-562556cc9ecf0019b4cf45bcdf42706944ae9b3ac7c73ad299d83f2d5a169c55
-EOF
-@end example
+@strong{Prepare the server}. Add this entry to @code{peers.json}
+configuration file.
 
 @strong{Prepare network on GNU/Linux IPv4 server}:
 
 @example
-server% echo "echo tap10" >> peers/6d4ac605ce8dc37c2f0bf21cb542a713/up.sh
+server% umask 077
+server% echo "#!/bin/sh" > /path/to/up.sh
+server% echo "echo tap10" >> /path/to/up.sh
 server% ip addr add 192.168.0.1/24 dev wlan0
 server% tunctl -t tap10
 server% ip link set mtu 1432 dev tap10
@@ -90,7 +77,7 @@ client% ip route add default via 172.16.0.1
 @example
 client% govpn-client \
     -key key.txt \
-    -id 6d4ac605ce8dc37c2f0bf21cb542a713 \
+    -verifier '$argon2d$m=4096,t=128,p=1$bwR5VjeCYIQaa8SeaI3rqg' \
     -iface tap10 \
     -remote 192.168.0.1:1194 \
     -mtu 1472
@@ -110,7 +97,7 @@ client% ifconfig tap10 inet6 fc00::2/96 mtu 1412 up
 client% route -6 add default fc00::1
 client% govpn-client \
     -key key.txt \
-    -id 6d4ac605ce8dc37c2f0bf21cb542a713 \
+    -verifier '$argon2d$m=4096,t=128,p=1$bwR5VjeCYIQaa8SeaI3rqg' \
     -iface tap10 \
     -remote "[fe80::1%me0]":1194
 @end example