cleanup: Whitespaces fixes, left right and centre.
authorMark Wooding <mdw@distorted.org.uk>
Sun, 28 Jan 2007 23:10:31 +0000 (23:10 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Sun, 28 Jan 2007 23:10:31 +0000 (23:10 +0000)
53 files changed:
Makefile.am
client/Makefile.am
client/tripectl.c
common/Makefile.am
common/protocol.h
common/util.c
common/util.h
configure.in
debian/changelog
debian/control
debian/rules
debian/tripe.README
debian/tripe.postrm
debian/tripe.prerm
doc/Makefile.am
doc/pkstream.1
doc/protocol.ms
doc/tripe-admin.5.in
doc/tripe-keys.8
doc/tripe-keys.conf.5
doc/tripe-mitm.8
doc/tripe.8.in
doc/tripectl.1.in
doc/tripemon.1.in
doc/wrestlers.tex
init/Makefile.am
init/tripe-init.in
keys/Makefile.am
keys/tripe-keys.in
keys/tripe-keys.master
mon/Makefile.am
mon/tripemon.in
pkstream/Makefile.am
pkstream/pkstream.c
proxy/Makefile.am
proxy/tripe-mitm.c
server/Makefile.am
server/admin.c
server/chal.c
server/keyexch.c
server/keymgmt.c
server/keyset.c
server/peer.c
server/servutil.c
server/tripe.c
server/tripe.h
server/tun-bsd.c
server/tun-linux.c
server/tun-slip.c
server/tun-unet.c
wireshark/Makefile.am
wireshark/cap
wireshark/packet-tripe.c

index 11a3508..ef43075 100644 (file)
 ## it under the terms of the GNU General Public License as published by
 ## the Free Software Foundation; either version 2 of the License, or
 ## (at your option) any later version.
-## 
+##
 ## TrIPE is distributed in the hope that it will be useful,
 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 ## GNU General Public License for more details.
-## 
+##
 ## You should have received a copy of the GNU General Public License
 ## along with TrIPE; if not, write to the Free Software Foundation,
 ## Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
index 199be93..f466ba4 100644 (file)
 ## it under the terms of the GNU General Public License as published by
 ## the Free Software Foundation; either version 2 of the License, or
 ## (at your option) any later version.
-## 
+##
 ## TrIPE is distributed in the hope that it will be useful,
 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 ## GNU General Public License for more details.
-## 
+##
 ## You should have received a copy of the GNU General Public License
 ## along with TrIPE; if not, write to the Free Software Foundation,
 ## Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
index b27d3fd..2896125 100644 (file)
@@ -7,7 +7,7 @@
  * (c) 2001 Straylight/Edgeware
  */
 
-/*----- Licensing notice --------------------------------------------------* 
+/*----- Licensing notice --------------------------------------------------*
  *
  * This file is part of Trivial IP Encryption (TrIPE).
  *
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * TrIPE is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with TrIPE; if not, write to the Free Software Foundation,
  * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -184,7 +184,7 @@ static void cline(char *p, size_t len, void *b)
     checkbg(&p);
     die(EXIT_FAILURE, "%s", p);
   } else
-    die(EXIT_FAILURE, "unexpected output `%s %s'", q, p); 
+    die(EXIT_FAILURE, "unexpected output `%s %s'", q, p);
 }
 
 static void sline(char *p, size_t len, void *b)
@@ -319,7 +319,7 @@ Options in full:\n\
 -D, --daemon           Become a background task after connecting.\n\
 -d, --directory=DIR    Select current directory [default " CONFIGDIR "].\n\
 -a, --admin-socket=FILE        Select socket to connect to\n\
-                          [default " SOCKETDIR "/tripesock].\n\
+                         [default " SOCKETDIR "/tripesock].\n\
 -P, --pidfile=FILE     Write process-id to FILE.\n\
 \n\
 -s, --spawn            Start server rather than connecting.\n\
index 28c3db9..8b9454a 100644 (file)
 ## it under the terms of the GNU General Public License as published by
 ## the Free Software Foundation; either version 2 of the License, or
 ## (at your option) any later version.
-## 
+##
 ## TrIPE is distributed in the hope that it will be useful,
 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 ## GNU General Public License for more details.
-## 
+##
 ## You should have received a copy of the GNU General Public License
 ## along with TrIPE; if not, write to the Free Software Foundation,
 ## Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
index 6ffaeb2..1fc1511 100644 (file)
@@ -7,7 +7,7 @@
  * (c) 2003 Straylight/Edgeware
  */
 
-/*----- Licensing notice --------------------------------------------------* 
+/*----- Licensing notice --------------------------------------------------*
  *
  * This file is part of Trivial IP Encryption (TrIPE).
  *
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * TrIPE is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with TrIPE; if not, write to the Free Software Foundation,
  * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
index 1745655..c6c2b22 100644 (file)
@@ -7,7 +7,7 @@
  * (c) 2001 Straylight/Edgeware
  */
 
-/*----- Licensing notice --------------------------------------------------* 
+/*----- Licensing notice --------------------------------------------------*
  *
  * This file is part of Trivial IP Encryption (TrIPE).
  *
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * TrIPE is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with TrIPE; if not, write to the Free Software Foundation,
  * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
index 0c13548..a54910f 100644 (file)
@@ -7,7 +7,7 @@
  * (c) 2001 Straylight/Edgeware
  */
 
-/*----- Licensing notice --------------------------------------------------* 
+/*----- Licensing notice --------------------------------------------------*
  *
  * This file is part of Trivial IP Encryption (TrIPE).
  *
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * TrIPE is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with TrIPE; if not, write to the Free Software Foundation,
  * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
index 5c6693d..b8dbbde 100644 (file)
@@ -15,12 +15,12 @@ dnl TrIPE is free software; you can redistribute it and/or modify
 dnl it under the terms of the GNU General Public License as published by
 dnl the Free Software Foundation; either version 2 of the License, or
 dnl (at your option) any later version.
-dnl 
+dnl
 dnl TrIPE is distributed in the hope that it will be useful,
 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 dnl GNU General Public License for more details.
-dnl 
+dnl
 dnl You should have received a copy of the GNU General Public License
 dnl along with TrIPE; if not, write to the Free Software Foundation,
 dnl Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -36,7 +36,7 @@ AM_PROG_LIBTOOL
 DIRS="" AC_SUBST([DIRS])
 
 python=no
-mdw_PROG_PYTHON([2.3], 
+mdw_PROG_PYTHON([2.3],
   [python=yes
    pyscripts='${PYTHONSCRIPTS}'
    DIRS="$DIRS keys"
@@ -50,7 +50,7 @@ if test $python = yes; then
     python -c >&5 2>&5 '
 import pygtk
 pygtk.require("2.0")
-import gtk 
+import gtk
 ' && mdw_cv_pygtk=yes
   ])
   if test $mdw_cv_pygtk = yes; then
@@ -67,43 +67,43 @@ mdw_OPT_TRACE
 
 AC_ARG_WITH([linux-includes],
 [  --with-linux-includes=DIR
-                          search for Linux kernel includes in DIR],
+                         search for Linux kernel includes in DIR],
 [CFLAGS="$CFLAGS -I$withval"],
 [:])
 
 AC_ARG_WITH([configdir],
-[  --with-configdir=DIR    look for keys and other configuration in DIR
-                          [default=/var/lib/tripe]],
+[  --with-configdir=DIR           look for keys and other configuration in DIR
+                         [default=/var/lib/tripe]],
 [configdir=$withval],
 [configdir=/var/lib/tripe])
 
 AC_ARG_WITH([socketdir],
-[  --with-socketdir=DIR    put admin socket in DIR [default=.]],
+[  --with-socketdir=DIR           put admin socket in DIR [default=.]],
 [socketdir=$withval],
 [socketdir=.])
 
 AC_ARG_WITH([pidfile],
-[  --with-pidfile=FILE     make tripectl write its pid to FILE
-                          [default=./tripectl.pid]],
+[  --with-pidfile=FILE    make tripectl write its pid to FILE
+                         [default=./tripectl.pid]],
 [pidfile=$withval],
 [pidfile=tripectl.pid])
 
 AC_ARG_WITH([initconfig],
 [  --with-initconfig=FILE  read definitions from FILE in init script
-                          [default=/etc/tripe.conf]],
+                         [default=/etc/tripe.conf]],
 [initconfig=$withval],
 [initconfig=/etc/tripe.conf])
 
 AC_ARG_WITH([logfile],
-[  --with-logfile=DIR      make tripectl write its log to FILE 
-                          [default=./tripe.log]],
+[  --with-logfile=DIR     make tripectl write its log to FILE
+                         [default=./tripe.log]],
 [logfile=$withval],
 [logfile=tripe.log])
 
 WIRESHARK_CFLAGS=""
 WIRESHARK_PLUGIN_DIR="unknown"
 AC_ARG_WITH([wireshark],
-[  --with-wireshark        build and install Wireshark plugin],
+[  --with-wireshark       build and install Wireshark plugin],
 [case "$withval" in
    no) wireshark=false requirewireshark=false;;
    yes) wireshark=true; requirewireshark=true;;
@@ -113,8 +113,8 @@ esac],
 
 tun=auto
 AC_ARG_WITH([tunnel],
-[  --with-tunnel=KIND      kinds of tunnel device to use
-                            (linux, unet, bsd, slip)],
+[  --with-tunnel=KIND     kinds of tunnel device to use
+                           (linux, unet, bsd, slip)],
 [tun=$withval])
 
 if test "$tun" = auto; then
@@ -150,21 +150,21 @@ for i in $tun; do
     bsd) AC_DEFINE([TUN_BSD], [1],
                   [Install the BSD tunnel driver.]) ;;
     unet) AC_DEFINE([TUN_UNET], [1],
-                    [Install the obsolete Linux Usernet driver.]) ;;
+                   [Install the obsolete Linux Usernet driver.]) ;;
     slip) ;;
     *) AC_MSG_ERROR([Unknown tunnel type]) ;;
   esac
   tunnels="$tunnels&tun_$i, "
 done
 AC_SUBST(tun)
-AC_DEFINE_UNQUOTED([TUN_LIST], [$tunnels 0], 
+AC_DEFINE_UNQUOTED([TUN_LIST], [$tunnels 0],
   [List of tunnel drivers to install.])
 
 mdw_MLIB(2.0.0)
 mdw_CATACOMB(2.1.0, [CFLAGS="$CFLAGS $CATACOMB_CFLAGS"])
 
 if test "$wireshark" = true -a "$WIRESHARK_PLUGIN_DIR" = unknown; then
-  AC_CACHE_CHECK([where to put Wireshark plugins], 
+  AC_CACHE_CHECK([where to put Wireshark plugins],
     [mdw_cv_wireshark_plugin_dir], [
     changequote(,)
     mdw_cv_wireshark_plugin_dir="failed"
@@ -180,7 +180,7 @@ if test "$wireshark" = true -a "$WIRESHARK_PLUGIN_DIR" = unknown; then
       wsver=`$wsbin -v | sed 's/^[^ ]* \([0-9A-Za-z.]*\).*$/\1/;q'`
       dir=$wsprefix/lib/wireshark/plugins/$wsver
       if test -d "$dir"; then
-        mdw_cv_wireshark_plugin_dir=$dir
+       mdw_cv_wireshark_plugin_dir=$dir
       fi
     fi
     changequote([, ])
@@ -198,7 +198,7 @@ if test "$wireshark" = true; then
   bad=true
   mdw_CFLAGS=$CFLAGS
   wsprefix=`echo $WIRESHARK_PLUGIN_DIR | sed 's:/lib/.*$::'`
-  AC_CACHE_CHECK([how to find the Wireshark headers], 
+  AC_CACHE_CHECK([how to find the Wireshark headers],
     [mdw_cv_wireshark_includes], [
     mdw_cv_wireshark_includes=failed
     for i in \
@@ -228,7 +228,7 @@ if test "$wireshark" = true; then
   ])
   case $mdw_cv_wireshark_includes in
     failed) wireshark=false;;
-  esac  
+  esac
 fi
 
 if test "$wireshark" = true; then
@@ -243,9 +243,9 @@ if test "$wireshark" = false -a "$requirewireshark" = true; then
 fi
 
 AH_TEMPLATE([CONFIGDIR],
-            [Tripe should look here for keys and other configuration.])
+           [Tripe should look here for keys and other configuration.])
 AH_TEMPLATE([SOCKETDIR],
-            [Tripe should make its administration socket here.])
+           [Tripe should make its administration socket here.])
 mdw_DEFINE_PATHS([
   mdw_DEFINE_PATH([CONFIGDIR], [$configdir])
   mdw_DEFINE_PATH([SOCKETDIR], [$socketdir])
index a6c80e5..dc38e27 100644 (file)
@@ -2,7 +2,7 @@ tripe (1.0.0pre7) experimental; urgency=low
 
   * Support SLIP encapsulation.
 
- -- Mark Wooding <mdw@distorted.org.uk>  Sun,  4 Sep 2005 00:52:56 +0100
+ -- Mark Wooding <mdw@distorted.org.uk>         Sun,  4 Sep 2005 00:52:56 +0100
 
 tripe (1.0.0pre6) experimental; urgency=low
 
index f4679cc..615e021 100644 (file)
@@ -15,7 +15,7 @@ Description: Trivial IP Encryption: a simple virtual private network
  TrIPE is a simple VPN protocol.  It uses cryptography to ensure secrecy
  and authenticity of packets it sends and receives.
  .
- This package contains the main daemon, support programs, and documentation. 
+ This package contains the main daemon, support programs, and documentation.
  It ideally wants a 2.4 series kernel with the TUN/TAP driver enabled, but
  it will work with any kernel which speaks SLIP.
 
index 62d860f..e1d863e 100755 (executable)
@@ -98,4 +98,4 @@ source:
        d=`pwd`; cd ..; dpkg-source -i -b $$d/deb-build/=deb=/*
        rm -rf deb-build/=deb=
 
-.PHONY: binary binary-arch binary-indep clean install source 
+.PHONY: binary binary-arch binary-indep clean install source
index 275768d..8f87cf6 100644 (file)
@@ -1,6 +1,6 @@
 SETTING UP TRIPE FOR DEBIAN GNU/LINUX
 
-       Firstly, you need to set up public key parameters.  To generate 
+       Firstly, you need to set up public key parameters.  To generate
        a new set, run
 
          # cd /etc/tripe
index 2857537..7fff153 100644 (file)
@@ -3,7 +3,7 @@
 set -e
 
 if [ "$1" = "purge" ] ; then
-        update-rc.d tripe remove >/dev/null
+       update-rc.d tripe remove >/dev/null
 fi
 
 #DEBHELPER#
index c613d4e..abeb5c8 100644 (file)
@@ -3,7 +3,7 @@
 set -e
 
 if [ -x "/etc/init.d/tripe" ]; then
-        invoke-rc.d tripe stop
+       invoke-rc.d tripe stop
 fi
 
 #DEBHELPER#
index d672771..09073cc 100644 (file)
 ## it under the terms of the GNU General Public License as published by
 ## the Free Software Foundation; either version 2 of the License, or
 ## (at your option) any later version.
-## 
+##
 ## TrIPE is distributed in the hope that it will be useful,
 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 ## GNU General Public License for more details.
-## 
+##
 ## You should have received a copy of the GNU General Public License
 ## along with TrIPE; if not, write to the Free Software Foundation,
 ## Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
index f0f5bdb..1de6d13 100644 (file)
@@ -45,7 +45,7 @@ pkstream \- forward UDP packets over streams
 .BR : \c
 .IR port ]
 .br
-       
+
 .IB addr : port
 .IB addr : port
 .SH "DESCRIPTION"
index 849a662..151ef91 100644 (file)
@@ -1,9 +1,9 @@
 .\" -*-nroff-*-
 .so tmac.rfc
 .
-.TL "Straylight/Edgeware"               "Mark Wooding"
-.TL "Request for Comments:  XXXX"       "Straylight/Edgeware"
-.TL ""                                  "11 April 2003"
+.TL "Straylight/Edgeware"              "Mark Wooding"
+.TL "Request for Comments:  XXXX"      "Straylight/Edgeware"
+.TL ""                                 "11 April 2003"
 .
 .TT XXXX Wooding "April 2003" \
   "TrIPE: The Trivial IP Encryption Protocol"
@@ -52,7 +52,7 @@ registered for TrIPE yet.
 .P
 When a pair of peer hosts are made aware of each other, they begin a key
 negotiation, using an authenticated Diffie-Hellman key exchange
-protocol.  This enables them to agree a 
+protocol.  This enables them to agree a
 .I keyset :
 a collection of short-term symmetric keys and other parameters (such as
 sequence numbering spaces).  Keysets expire after a fixed amount of
@@ -91,7 +91,7 @@ and
 .B "\\$1" \c
 .if !'\\$2'.' \ \\$2\c
 .if !'\\$3'' \{\
-: 
+:
 .I "\\$3" \c
 .\}
 ..
@@ -106,7 +106,7 @@ and
 .LS 2n
 ..
 .P
-We need to deal with a number of data items during the protocol.  
+We need to deal with a number of data items during the protocol.
 .if t \{\
 Object names are given in
 .I italics .
@@ -117,7 +117,7 @@ indicates the peer's corresponding value.  If a compound data item name
 is primed, toggle the primed-ness of the components.
 .P
 Data objects are given types which determine their representation in
-protocol messages.  Type names are given in 
+protocol messages.  Type names are given in
 .B UPPERCASE .
 .P
 .T1 "Atomic data items"
@@ -144,12 +144,12 @@ be the integer to be represented, and let
 be the number of octets required to represent
 .I n
 in base-256 format with no leading zeroes, except that if
-.I n 
+.I n
 = 0
-then 
+then
 .I z
 = 1; in other cases,
-.I z 
+.I z
 is the unique integer such that
 .ie t 256\*(^(\fIz\fP\-1\*(^) \(<= \fIn\fP < 256\*(^(\fIz\fP\*(^).
 .el 256^{z-1} <= n < 256^z.
index 94c7c3b..7fb59c3 100644 (file)
@@ -120,12 +120,12 @@ option.  From this point on, the server is ready to process more
 commands and reply to them.
 .PP
 Responses to background commands are indicated by a line beginning with
-one of the tokens 
+one of the tokens
 .BR BGOK ,
 .BR BGFAIL ,
 or
 .BR BGINFO ,
-followed by the command tag.  These correspond to the 
+followed by the command tag.  These correspond to the
 .BR OK ,
 .BR FAIL ,
 and
@@ -257,7 +257,7 @@ one to an
 .B INFO
 line, in a fixed-column format.  Column zero contains the key letter for
 selecting that message type; column one contains either a space or a
-.RB ` + ' 
+.RB ` + '
 sign, if the message type is disabled or enabled respectively; and a
 textual description of the message type begins at column 3 and continues
 to the end of the line.
@@ -360,7 +360,7 @@ Causes the server to emit an
 line for each command it supports.  Each line lists the command name,
 followed by the names of the arguments.  This may be helpful as a memory
 aid for interactive use, or for program clients probing for features.
-.SP 
+.SP
 .BI "IFNAME " peer
 Emits an
 .B INFO
@@ -389,7 +389,7 @@ line is written containing the peer's name, as given to
 .BR ADD .
 .SP
 .BI "NOTIFY " tokens\fR...
-Issues a 
+Issues a
 .B USER
 notification to all interested administration clients.
 .SP
@@ -420,7 +420,7 @@ line is printed describing the outcome:
 .RS
 .TP
 .BI "ping-ok " millis
-A response was received 
+A response was received
 .I millis
 after the ping was sent.
 .TP
@@ -516,7 +516,7 @@ is provided; otherwise the command fails with the error
 .BR "service-exists" .
 .SP
 .BI "SVCENSURE " service " \fR[" version \fR]
-Ensure that 
+Ensure that
 .I service
 is provided, and (if specified) to at least the given
 .IR version .
@@ -530,7 +530,7 @@ Send a
 .BR BGFAIL )
 response to the service job with the given
 .IR jobid ,
-passing the 
+passing the
 .I tokens
 as the reason for failure.  The job is closed.
 .SP
@@ -615,7 +615,7 @@ The statistics-gathering is experimental and subject to change.
 .SP
 .BR "TRACE " [\fIoptions\fP]
 Selects trace outputs: see
-.B "Trace lists" 
+.B "Trace lists"
 above.  Message types provided are:
 .RS
 .PP
@@ -699,7 +699,7 @@ is reserved to the Straylight/Edgeware implementation.
 Enables or disables asynchronous broadcasts
 .IR "for the current connection only" .
 See
-.B "Trace lists" 
+.B "Trace lists"
 above.  The default watch state for the connection the server opens
 automatically on stdin/stdout is to show warnings and trace messages;
 other connections show no asynchronous broadcast messages.  (This is
@@ -726,7 +726,7 @@ All of the above.
 .RE
 .SP
 .BI "WARN " tokens\fR...
-Issues a 
+Issues a
 .B USER
 warning to all interested administration clients.
 .SH "ERROR MESSAGES"
@@ -757,7 +757,7 @@ of arguments was wrong.
 The
 .I word
 is not a valid time interval specification.  Acceptable time
-specifications are nonnegative integers followed optionally by 
+specifications are nonnegative integers followed optionally by
 .BR d ,
 .BR h ,
 .BR m ,
@@ -787,7 +787,7 @@ An error occurred during the attempt to become a daemon, as reported by
 The given port number is out of range.
 .SP
 .BI "not-service-provider " service
-(For 
+(For
 .BR SVCRELEASE .)
 The invoking client is not the current provider of the named
 .IR service ,
@@ -870,7 +870,7 @@ There is no peer called
 .BR ADD .)
 The port name
 .I port
-couldn't be found in 
+couldn't be found in
 .BR /etc/services .
 .TP
 .BI "unknown-service " service
@@ -1028,7 +1028,7 @@ there was a problem with the file, usually there will have been
 warnings before this.
 .SP
 .BI "KEYMGMT bad-public-keyring " message
-The public keyring couldn't be read.  Usually, there will have been 
+The public keyring couldn't be read.  Usually, there will have been
 .B key-file-error
 warnings before this.
 .SP
@@ -1125,7 +1125,7 @@ hard asymmetric crypto sums.
 .BI "KX " peer " unexpected " msgtoken
 The message received wasn't appropriate for this stage of the key
 exchange process.  This may mean that one of our previous packets got
-lost.  For 
+lost.  For
 .BR pre-challenge ,
 it may simply mean that the peer has recently restarted.
 .SP
@@ -1141,7 +1141,7 @@ An unknown key-exchange message arrived.
 .SS "PEER warnings"
 These are largely concerned with management of peers and the low-level
 details of the network protocol.  The second word is usually the name of
-a peer, or 
+a peer, or
 .RB ` \- '
 if none is relevant.
 .SP
@@ -1259,7 +1259,7 @@ if none.
 .SP
 .BI "TUN \- bsd no-tunnel-devices"
 The driver couldn't find an available tunnel device.  Maybe if you
-create some more 
+create some more
 .BI /dev/tun nn
 files, it will work.
 .SP
index 92b1aef..bebe331 100644 (file)
@@ -79,7 +79,7 @@ key-exchange keys, stored in
 .PP
 The master authority has a configuration file
 .BR tripe-keys.master ,
-usually created by copying the template provided and editing it.  
+usually created by copying the template provided and editing it.
 .PP
 The published repository consists of a tarball of the
 .B repos
@@ -97,7 +97,7 @@ it's checking the right key.
 A peer starts by downloading a copy of
 .B tripe-keys.conf
 and then making sure it's authentic.  (This is one of the tricky bits.
-The other is getting public keys back to the master authority.)  This is
+The other is getting public keys back to the master authority.)         This is
 enough for the peer to fetch a copy of the repository, verify the
 signature, and assemble a public keyring for the other peers in the
 network.
@@ -142,7 +142,7 @@ option.  With an argument, shows help about that
 .IR command .
 .TP
 .B "setup"
-Constructs a new repository and makes a signing key (as for 
+Constructs a new repository and makes a signing key (as for
 .BR newmaster )
 and key-exchange parameters.  Fails if
 .B repos
@@ -180,7 +180,7 @@ all is well, it replaces the current
 .B repos
 directory with the version in the new archive, and if necessary it
 replaces the current configuration file with the new one in the
-archive.  It then does a 
+archive.  It then does a
 .B rebuild
 to construct a new
 .B keyring.pub
index dccb855..70bd356 100644 (file)
@@ -55,7 +55,7 @@ substitutions, of the form
 .BI ${ name } \fR,
 which are replaced by the value assigned to
 .IR name .
-Many 
+Many
 .IR name s
 have significance to the
 .B tripe-keys
@@ -116,7 +116,7 @@ set up automatically.
 .TP
 .I kx
 Key-exchange algorithm to use.  Either
-.B dh 
+.B dh
 (integer Diffie-Hellman)
 or
 .B ec
@@ -184,7 +184,7 @@ is
 .BR ec .
 .TP
 .I sig-genalg
-Key-generation algorithm for signing key.  Default depends on 
+Key-generation algorithm for signing key.  Default depends on
 .I sig
 as follows.
 .TS
index f7f5343..843d185 100644 (file)
@@ -95,7 +95,7 @@ Both
 .I local-port
 and
 .I remote-port
-must be numbers; 
+must be numbers;
 .I remote-addr
 may be a hostname or an IP address in dotted-quad format.  Exactly two
 .B peer
@@ -129,7 +129,7 @@ Apply a given filter to packets received from the right peer.
 Begin the next branch of the first fork filter node named
 .I tag
 in each filter chain.  See below for more about filter chains.
-.TP 
+.TP
 .BI flood\fR[\fP: type : millis : size\fR]
 Flood both peers with random packets.  If
 .I type
index e58c28c..b287673 100644 (file)
@@ -44,7 +44,7 @@ tripe \- a simple VPN daemon
 .RB [ \-n
 .IR tunnel ]
 .br
-       
+
 .RB [ \-U
 .IR user ]
 .RB [ \-G
@@ -54,7 +54,7 @@ tripe \- a simple VPN daemon
 .RB [ \-T
 .IR trace-opts ]
 .br
-       
+
 .RB [ \-k
 .IR priv-keyring ]
 .RB [ \-K
@@ -510,7 +510,7 @@ If the
 is omitted, the same file descriptor is used for input and output.
 .PP
 The dynamic allocation script must be named by an absolute or relative
-pathname, beginning with 
+pathname, beginning with
 .RB ` / '
 or
 .RB ` . '.
index d46dd33..9c11437 100644 (file)
@@ -156,7 +156,7 @@ server on its command line.  Arguments added using this option are added
 .I after
 any passed automatically by
 .B tripectl
-(e.g., 
+(e.g.,
 .BR \-a ).
 .TP
 .B "\-l, \-\-syslog"
@@ -218,7 +218,7 @@ responses are ignored.
 .SS "Starting the tripe server"
 If any of the options
 .BR \-s ,
-.B \-p 
+.B \-p
 or
 .B \-S
 are given,
index 7f531cc..45f705d 100644 (file)
@@ -43,7 +43,7 @@ The
 .B tripemon
 program is a fairly simple graphical monitor program for TrIPE.  It's
 not ever-so user-friendly in some ways, but it works fairly well.  A
-perusal of 
+perusal of
 .BR tripe-admin (5)
 would help you understand it better.  That said, describing the program
 in detail is probably less interesting than letting you explore it for
index 8d1c2a9..880ae90 100644 (file)
@@ -186,7 +186,7 @@ order.
   with the property that, for any $K \in \keys \mathcal{E}$, any plaintext
   message $x$, and any ciphertext $y$ returned as a result of $E_K(x)$, we
   have $D_K(y) = x$.
-\end{definition}  
+\end{definition}
 
 \begin{definition}[Chosen plaintext security for symmetric encryption]
   \label{def:sym-cpa}
@@ -239,10 +239,10 @@ $g^\gamma$.  This is the \emph{decision Diffie-Hellman problem}
     \begin{eqnalign}[rl]
       \Adv{ddh}{G}(A) =
       & \Pr[\alpha \getsr \Nupto{q}; \beta \getsr \Nupto{q} :
-            A(g^\alpha, g^\beta, g^{\alpha\beta}) = 1] - {} \\
+           A(g^\alpha, g^\beta, g^{\alpha\beta}) = 1] - {} \\
       & \Pr[\alpha \getsr \Nupto{q}; \beta \getsr \Nupto{q};
-            \gamma \getsr \Nupto{q} :
-            A(g^\alpha, g^\beta, g^\gamma) = 1].
+           \gamma \getsr \Nupto{q} :
+           A(g^\alpha, g^\beta, g^\gamma) = 1].
     \end{eqnalign}
   \end{equation}
   The \emph{insecurity function of the decision Diffie-Hellman problem in
@@ -362,7 +362,7 @@ and then decrypts the ciphertext $y$.
     Function $\id{decrypt}(k, \id{ty}, c)$: \+ \\
       $(i, y, \tau) \gets c$; \\
       \IF $V_{k.\Xid{K}{mac-in}}((\id{ty}, i, y), \tau) = 0$ \THEN \\ \ind
-        \RETURN $\bot$; \- \\
+       \RETURN $\bot$; \- \\
       \IF $i < k.\id{seq-in}$ \THEN \RETURN $\bot$; \\
       $m \gets D_{k.\Xid{K}{enc-in}}(y)$; \\
       $k.\id{seq-in} \gets i + 1$; \\
@@ -411,28 +411,28 @@ in figure~\ref{fig:kx-support}.
 
 \begin{table}
   \begin{tabularx}{\textwidth}{Mr X}
-    G                     & A cyclic group known by all participants \\
-    q = |G|               & The prime order of $G$ \\
-    g                     & A generator of $G$ \\
-    E_K(\cdot)            & Encryption under key $K$, here used to denote
-                            application of the $\id{encrypt}(K, \cdot)$
-                            operation \\ 
+    G                    & A cyclic group known by all participants \\
+    q = |G|              & The prime order of $G$ \\
+    g                    & A generator of $G$ \\
+    E_K(\cdot)           & Encryption under key $K$, here used to denote
+                           application of the $\id{encrypt}(K, \cdot)$
+                           operation \\
     \alpha \inr \Nupto{q} & Alice's private key \\
-    a = g^{\alpha}        & Alice's public key \\
+    a = g^{\alpha}       & Alice's public key \\
     \rho_A \inr \Nupto{q} & Alice's secret Diffie-Hellman value \\
-    r_A = g^{\rho_A}      & Alice's public \emph{challenge} \\
+    r_A = g^{\rho_A}     & Alice's public \emph{challenge} \\
     c_A = H(\cookie{cookie}, r_A)
-                          & Alice's \emph{cookie} \\
+                         & Alice's \emph{cookie} \\
     v_A = \rho_A \xor H(\cookie{expected-reply}, r_A, r_B, b^{\rho_A})
-                          & Alice's challenge \emph{check value} \\
+                         & Alice's challenge \emph{check value} \\
     r_B^\alpha = a^{\rho_B}
-                          & Alice's reply \\
+                         & Alice's reply \\
     K = r_B^{\rho_A} = r_B^{\rho_A} = g^{\rho_A\rho_B}
-                          & Alice and Bob's shared secret key \\
+                         & Alice and Bob's shared secret key \\
     w_A = H(\cookie{switch-request}, c_A, c_B)
-                          & Alice's \emph{switch request} value \\
+                         & Alice's \emph{switch request} value \\
     u_A = H(\cookie{switch-confirm}, c_A, c_B)
-                          & Alice's \emph{switch confirm} value \\
+                         & Alice's \emph{switch confirm} value \\
   \end{tabularx}
 
   \caption{Names used during key-exchange}
@@ -452,7 +452,7 @@ in figure~\ref{fig:kx-support}.
   \caption{Message contents, as sent by Alice}
   \label{tab:kx-messages}
 \end{table}
-  
+
 \begin{messages}
 \item[kx-pre-challenge] Contains a plain statement of Alice's challenge.
   This is Alice's first message of a session.
@@ -641,33 +641,33 @@ clog up all of Alice's slots.
       $\id{send}(\cookie{kx-pre-challenge}, r_A)$; \- \\[\medskipamount]
     Procedure $\id{kx-receive}(\id{type}, \id{data})$: \\ \ind
       \IF $\id{type} = \cookie{kx-pre-challenge}$ \THEN \\ \ind
-        \id{msg-pre-challenge}(\id{data}); \- \\
+       \id{msg-pre-challenge}(\id{data}); \- \\
       \ELSE \IF $\id{type} = \cookie{kx-cookie}$ \THEN \\ \ind
-        \id{msg-cookie}(\id{data}); \- \\
+       \id{msg-cookie}(\id{data}); \- \\
       \ELSE \IF $\id{type} = \cookie{kx-challenge}$ \THEN \\ \ind
-        \id{msg-challenge}(\id{data}); \- \\
+       \id{msg-challenge}(\id{data}); \- \\
       \ELSE \IF $\id{type} = \cookie{kx-reply}$ \THEN \\ \ind
-        \id{msg-reply}(\id{data}); \- \\
+       \id{msg-reply}(\id{data}); \- \\
       \ELSE \IF $\id{type} = \cookie{kx-switch}$ \THEN \\ \ind
-        \id{msg-switch}(\id{data}); \- \\
+       \id{msg-switch}(\id{data}); \- \\
       \ELSE \IF $\id{type} = \cookie{kx-switch-ok}$ \THEN \\ \ind
-        \id{msg-switch-ok}(\id{data}); \-\- \\[\medskipamount]
+       \id{msg-switch-ok}(\id{data}); \-\- \\[\medskipamount]
     Procedure $\id{msg-pre-challenge}(\id{data})$: \+ \\
       \IF $\id{state} \ne \cookie{challenge}$ \THEN \RETURN; \\
       $r \gets \id{data}$; \\
       \IF $\Xid{n}{chal} \ge \Xid{n}{chal-thresh}$ \THEN \\ \ind
-        $\id{send}(\cookie{kx-cookie}, r_A, \id{cookie}(r_A)))$; \- \\
+       $\id{send}(\cookie{kx-cookie}, r_A, \id{cookie}(r_A)))$; \- \\
       \ELSE \+ \\
-        $\id{new-chal}(r)$; \\
-        $\id{send}(\cookie{kx-challenge}, r_A,
-                   \id{cookie}(r), \id{checkval}(r))$; \-\-\\[\medskipamount]
+       $\id{new-chal}(r)$; \\
+       $\id{send}(\cookie{kx-challenge}, r_A,
+                  \id{cookie}(r), \id{checkval}(r))$; \-\-\\[\medskipamount]
     Procedure $\id{msg-cookie}(\id{data})$: \+ \\
       \IF $\id{state} \ne \cookie{challenge}$ \THEN \RETURN; \\
       $(r, c_A) \gets \id{data}$; \\
       \IF $c_A \ne \id{cookie}(r_A)$ \THEN \RETURN; \\
       $\id{new-chal}(r)$; \\
       $\id{send}(\cookie{kx-challenge}, r_A,
-                 \id{cookie}(r), \id{checkval}(r))$; \- \\[\medskipamount]
+                \id{cookie}(r), \id{checkval}(r))$; \- \\[\medskipamount]
     Procedure $\id{msg-challenge}(\id{data})$: \+ \\
       \IF $\id{state} \ne \cookie{challenge}$ \THEN \RETURN; \\
       $(r, c_A, v) \gets \id{data}$; \\
@@ -677,7 +677,7 @@ clog up all of Alice's slots.
       $k \gets \id{chal-tab}[i].k$; \\
       $y \gets \id{encrypt}(k, \cookie{kx-reply}, r^\alpha)$; \\
       $\id{send}(\cookie{kx-reply}, c_A, \id{cookie}(r),
-                 \id{checkval}(r), y)$
+                \id{checkval}(r), y)$
     \next
     Procedure $\id{msg-reply}(\id{data})$: \+ \\
       $(c, c_A, v, y) \gets \id{data}$; \\
@@ -685,7 +685,7 @@ clog up all of Alice's slots.
       $i \gets \id{find-chal}(c)$; \\
       \IF $i = \bot$ \THEN \RETURN; \\
       \IF $\id{check-reply}(i, \id{chal-tab}[i].r, v) = \bot$ \THEN \\ \ind
-        \RETURN; \- \\
+       \RETURN; \- \\
       $k \gets \id{chal-tab}[i].k$; \\
       $x \gets \id{decrypt}(k, \cookie{kx-reply}, y)$; \\
       \IF $x = \bot$ \THEN \RETURN; \\
@@ -706,8 +706,8 @@ clog up all of Alice's slots.
       \IF $x = \bot$ \THEN \RETURN; \\
       $(x, w) \gets x$; \\
       \IF $\id{state} = \cookie{challenge}$ \THEN \\ \ind
-        \IF $x \ne b^{\rho_A}$ \THEN \RETURN; \\
-        $\id{chal-commit} \gets \id{chal-tab}[i]$; \- \\
+       \IF $x \ne b^{\rho_A}$ \THEN \RETURN; \\
+       $\id{chal-commit} \gets \id{chal-tab}[i]$; \- \\
       \ELSE \IF $c \ne \id{chal-commit}.c$ \THEN \RETURN; \\
       \IF $w \ne H(\cookie{switch-request}, c, c_A)$ \THEN \RETURN; \\
       $w \gets H(\cookie{switch-confirm}, c_A, c)$; \\
@@ -736,13 +736,13 @@ clog up all of Alice's slots.
       $r$; $c$; $\id{replied}$; $k$; \- \\[\medskipamount]
     Function $\id{find-chal}(c)$: \+ \\
       \FOR $i = 0$ \TO $\Xid{n}{chal}$ \DO \\ \ind
-        \IF $\id{chal-tab}[i].c = c$ \THEN \RETURN $i$; \- \\
+       \IF $\id{chal-tab}[i].c = c$ \THEN \RETURN $i$; \- \\
       \RETURN $\bot$; \- \\[\medskipamount]
     Function $\id{cookie}(r)$: \+ \\
       \RETURN $H(\cookie{cookie}, r)$; \- \\[\medskipamount]
     Function $\id{check-reply}(i, r, v)$: \+ \\
       \IF $i \ne \bot \land \id{chal-tab}[i].\id{replied} = 1$ \THEN \\ \ind
-        \RETURN $i$; \- \\
+       \RETURN $i$; \- \\
       $\rho \gets v \xor H(\cookie{expected-reply}, r, r_A, r^\alpha)$; \\
       \IF $g^\rho \ne r$ \THEN \RETURN $\bot$; \\
       \IF $i = \bot$ \THEN $i \gets \id{new-chal}(r)$; \\
@@ -752,17 +752,17 @@ clog up all of Alice's slots.
     \next
     Function $\id{checkval}(r)$: \\ \ind
       \RETURN $\rho_A \xor H(\cookie{expected-reply},
-                             r_A,r, b^{\rho_A})$; \- \\[\medskipamount]
+                            r_A,r, b^{\rho_A})$; \- \\[\medskipamount]
     Function $\id{new-chal}(r)$: \+ \\
       $c \gets \id{cookie}(r)$; \\
       $i \gets \id{find-chal}(c)$; \\
       \IF $i \ne \bot$ \THEN \RETURN $i$; \\
       \IF $\Xid{n}{chal} < \Xid{n}{chal-max}$ \THEN \\ \ind
-        $i \gets \Xid{n}{chal}$; \\
-        $\id{chal-tab}[i] \gets \NEW \id{chal-slot}$; \\
-        $\Xid{n}{chal} \gets \Xid{n}{chal} + 1$; \- \\
+       $i \gets \Xid{n}{chal}$; \\
+       $\id{chal-tab}[i] \gets \NEW \id{chal-slot}$; \\
+       $\Xid{n}{chal} \gets \Xid{n}{chal} + 1$; \- \\
       \ELSE \\ \ind
-        $i \getsr [\Xid{n}{chal-max}]$; \- \\
+       $i \getsr [\Xid{n}{chal-max}]$; \- \\
       $\id{chal-tab}[i].r \gets r$; \\
       $\id{chal-tab}[i].c \gets c$; \\
       $\id{chal-tab}[i].\id{replied} \gets 0$; \\
@@ -835,7 +835,7 @@ See figure~\ref{fig:cbc} for a diagram of CBC encryption.
   \caption{Encryption using CBC mode}
   \label{fig:cbc}
 \end{figure}
-    
+
 \begin{definition}[CBC mode]
   \label{def:cbc}
   Let $P\colon \keys P \times \Bin^\ell to \Bin^\ell$ be a pseudorandom
@@ -848,20 +848,20 @@ See figure~\ref{fig:cbc} for a diagram of CBC encryption.
       $I \getsr \Bin^\ell$; \\
       $y \gets I$; \\
       \FOR $i = 0$ \TO $|x|/\ell$ \DO \\ \ind
-        $x_i \gets x[\ell i \bitsto \ell (i + 1)]$; \\
-        $y_i \gets P_K(x_i \xor I)$; \\
-        $I \gets y_i$; \\
-        $y \gets y \cat y_i$; \- \\
+       $x_i \gets x[\ell i \bitsto \ell (i + 1)]$; \\
+       $y_i \gets P_K(x_i \xor I)$; \\
+       $I \gets y_i$; \\
+       $y \gets y \cat y_i$; \- \\
       \RETURN $y$;
     \next
     Algorithm $\Xid{D}{CBC}^P_K(y)$: \+ \\
       $I \gets y[0 \bitsto \ell]$; \\
       $x \gets \emptystring$; \\
       \FOR $1 = 0$ \TO $|y|/\ell$ \DO \\ \ind
-        $y_i \gets y[\ell i  \bitsto  \ell (i + 1)]$; \\
-        $x_i \gets P^{-1}_K(y_i) \xor I$; \\
-        $I \gets y_i$; \\
-        $x \gets x \cat x_i$; \- \\
+       $y_i \gets y[\ell i  \bitsto  \ell (i + 1)]$; \\
+       $x_i \gets P^{-1}_K(y_i) \xor I$; \\
+       $I \gets y_i$; \\
+       $x \gets x \cat x_i$; \- \\
       \RETURN $x$;
   \end{program}
 \end{definition}
@@ -925,39 +925,39 @@ figure~\ref{fig:cbc-steal} for a diagram.
       "e" [dd] ="x"
       "i" [uu] ="y"
       []!{"x"; "e" **{}, "x"+/4pt/ ="p",
-          "x"; "y" **{}, "x"+/4pt/ ="q",
-          "y"; "x" **{}, "y"+/4pt/ ="r",
-          "y"; "i" **{}, "y"+/4pt/ ="s",
-          "e";
-          "p" **\dir{-};
-          "q" **\crv{"x"};
-          "r" **\dir{-};
-          "s" **\crv{"y"};
-          "i" **\dir{-}?>*\dir{>}}
+         "x"; "y" **{}, "x"+/4pt/ ="q",
+         "y"; "x" **{}, "y"+/4pt/ ="r",
+         "y"; "i" **{}, "y"+/4pt/ ="s",
+         "e";
+         "p" **\dir{-};
+         "q" **\crv{"x"};
+         "r" **\dir{-};
+         "s" **\crv{"y"};
+         "i" **\dir{-}?>*\dir{>}}
       "xor" :[dd] *+[F]{E}="e"
       "e" [l] {K} :"e"
       "e" [dddddlll] *+=(1, 0)+[F]{\mathstrut y_{n-2}}="i"
       "e" [dd] ="x"
       "i" [uu] ="y"
       []!{"x"; "e" **{}, "x"+/4pt/ ="p",
-          "x"; "y" **{}, "x"+/4pt/ ="q",
-          "y"; "x" **{}, "y"+/4pt/ ="r",
-          "y"; "i" **{}, "y"+/4pt/ ="s",
-          "x"; "y" **{} ?="c" ?(0.5)/-4pt/ ="cx" ?(0.5)/4pt/ ="cy",
-          "e";
-          "p" **\dir{-};
-          "q" **\crv{"x"};
-          "cx" **\dir{-};
-          "c" *[@]\cir<4pt>{d^u};
-          "cy";
-          "r" **\dir{-};
-          "s" **\crv{"y"};
-          "i" **\dir{-}?>*\dir{>}}
+         "x"; "y" **{}, "x"+/4pt/ ="q",
+         "y"; "x" **{}, "y"+/4pt/ ="r",
+         "y"; "i" **{}, "y"+/4pt/ ="s",
+         "x"; "y" **{} ?="c" ?(0.5)/-4pt/ ="cx" ?(0.5)/4pt/ ="cy",
+         "e";
+         "p" **\dir{-};
+         "q" **\crv{"x"};
+         "cx" **\dir{-};
+         "c" *[@]\cir<4pt>{d^u};
+         "cy";
+         "r" **\dir{-};
+         "s" **\crv{"y"};
+         "i" **\dir{-}?>*\dir{>}}
   \end{graph} \]
 
   \caption{Encryption using CBC mode with ciphertext stealing}
   \label{fig:cbc-steal}
-\end{figure}  
+\end{figure}
 
 \begin{definition}[CBC stealing]
   \label{def:cbc-steal}
@@ -974,34 +974,34 @@ figure~\ref{fig:cbc-steal} for a diagram.
       $t = |x| \bmod \ell$; \\
       \IF $t \ne 0$ \THEN $x \gets x \cat 0^{\ell-t}$; \\
       \FOR $i = 0$ \TO $|x|/\ell$ \DO \\ \ind
-        $x_i \gets x[\ell i \bitsto \ell (i + 1)]$; \\
-        $y_i \gets P_K(x_i \xor I)$; \\
-        $I \gets y_i$; \\
-        $y \gets y \cat y_i$; \- \\
+       $x_i \gets x[\ell i \bitsto \ell (i + 1)]$; \\
+       $y_i \gets P_K(x_i \xor I)$; \\
+       $I \gets y_i$; \\
+       $y \gets y \cat y_i$; \- \\
       \IF $t \ne 0$ \THEN \\ \ind
-        $b \gets |y| - 2\ell$; \\
-        $y \gets $\=$y[0 \bitsto b] \cat
-                     y[b + \ell \bitsto |y|] \cat {}$ \\
-                  \>$y[b \bitsto b + t]$; \- \\
+       $b \gets |y| - 2\ell$; \\
+       $y \gets $\=$y[0 \bitsto b] \cat
+                    y[b + \ell \bitsto |y|] \cat {}$ \\
+                 \>$y[b \bitsto b + t]$; \- \\
       \RETURN $y$;
     \next
     Algorithm $\Xid{D}{CBC-steal}^P_K(y)$: \+ \\
       $I \gets y[0 \bitsto \ell]$; \\
       $t = |y| \bmod \ell$; \\
       \IF $t \ne 0$ \THEN \\ \ind
-        $b \gets |y| - t - \ell$; \\
-        $z \gets P^{-1}_K(y[b \bitsto b + \ell])$; \\
-        $y \gets $\=$y[0 \bitsto b] \cat
-                     y[b + \ell \bitsto |y|] \cat {}$ \\
-                  \>$z[t \bitsto \ell]$; \- \\
+       $b \gets |y| - t - \ell$; \\
+       $z \gets P^{-1}_K(y[b \bitsto b + \ell])$; \\
+       $y \gets $\=$y[0 \bitsto b] \cat
+                    y[b + \ell \bitsto |y|] \cat {}$ \\
+                 \>$z[t \bitsto \ell]$; \- \\
       $x \gets \emptystring$; \\
       \FOR $1 = 0$ \TO $|y|/\ell$ \DO \\ \ind
-        $y_i \gets y[\ell i \bitsto \ell (i + 1)]$; \\
-        $x_i \gets P^{-1}_K(y_i) \xor I$; \\
-        $I \gets y_i$; \\
-        $x \gets x \cat x_i$; \- \\
+       $y_i \gets y[\ell i \bitsto \ell (i + 1)]$; \\
+       $x_i \gets P^{-1}_K(y_i) \xor I$; \\
+       $I \gets y_i$; \\
+       $x \gets x \cat x_i$; \- \\
       \IF $t \ne 0$ \THEN \\ \ind
-        $x \gets x \cat z[0 \bitsto t] \xor y[b \bitsto b + t]$; \- \\
+       $x \gets x \cat z[0 \bitsto t] \xor y[b \bitsto b + t]$; \- \\
       \RETURN $x$;
   \end{program}
 \end{definition}
@@ -1038,9 +1038,9 @@ figure~\ref{fig:cbc-steal} for a diagram.
     Function $\id{steal}(l, y)$: \+ \\
       $t \gets l \bmod \ell$; \\
       \IF $t \ne 0$ \THEN \\ \ind
-        $b \gets |y| - 2\ell$; \\
-        $y \gets $\=$y[0 \bitsto b] \cat
-                     y[b + \ell \bitsto |y|] \cat y[b \bitsto b + t]$; \- \\
+       $b \gets |y| - 2\ell$; \\
+       $y \gets $\=$y[0 \bitsto b] \cat
+                    y[b + \ell \bitsto |y|] \cat y[b \bitsto b + t]$; \- \\
       \RETURN $y$;
   \end{program}
   Comparing this to definition~\ref{def:cbc-steal} shows that $A'$ simlates
@@ -1093,9 +1093,9 @@ $2^\ell$ possible values for $y^*$ and in the second there are $2^\ell - n +
   \Pr[C_n]
   & = \sum_{x \in \Bin^\ell} \Pr[C_n \mid x^* = x] \Pr[x^* = x] \\
   & = \sum_{x \in \Bin^\ell}
-          \Pr[x^* = x] \sum_{0\le i<n} \Pr[y^* = z_i \xor x] \\
+         \Pr[x^* = x] \sum_{0\le i<n} \Pr[y^* = z_i \xor x] \\
   & \le \sum_{0\le i<n} \frac{1}{2^\ell - n}
-        \sum_{x \in \Bin^\ell} \Pr[x^* = x] \\
+       \sum_{x \in \Bin^\ell} \Pr[x^* = x] \\
   & = \frac{n}{2^\ell - n}
 \end{eqnarray}
 
@@ -1141,7 +1141,7 @@ as required.
 \bibliography{mdw-crypto,cryptography,cryptography2000,rfc}
 \end{document}
 
-%%% Local Variables: 
+%%% Local Variables:
 %%% mode: latex
 %%% TeX-master: "wrestlers"
 %%% End:
index 4173b42..dae92e1 100644 (file)
 ## it under the terms of the GNU General Public License as published by
 ## the Free Software Foundation; either version 2 of the License, or
 ## (at your option) any later version.
-## 
+##
 ## TrIPE is distributed in the hope that it will be useful,
 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 ## GNU General Public License for more details.
-## 
+##
 ## You should have received a copy of the GNU General Public License
 ## along with TrIPE; if not, write to the Free Software Foundation,
 ## Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
index ddede10..bac4e7f 100755 (executable)
@@ -106,7 +106,7 @@ case ${tunnel-`$tripe --tunnels | head -1`} in
     fi
     ;;
 esac
-  
+
 # --- Do what was wanted ---
 
 case "$1" in
@@ -140,10 +140,10 @@ case "$1" in
       [ -x $i ] || continue
       name=`basename $i`
       case $name in *~|\#*) continue;; esac
-      if $i; then 
+      if $i; then
        echo -n " $name"
       else
-        echo -n " ($name failed)"
+       echo -n " ($name failed)"
       fi
     done
     echo " done"
index 398a299..1997036 100644 (file)
 ## it under the terms of the GNU General Public License as published by
 ## the Free Software Foundation; either version 2 of the License, or
 ## (at your option) any later version.
-## 
+##
 ## TrIPE is distributed in the hope that it will be useful,
 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 ## GNU General Public License for more details.
-## 
+##
 ## You should have received a copy of the GNU General Public License
 ## along with TrIPE; if not, write to the Free Software Foundation,
 ## Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
index 6da6eb4..9ca903c 100644 (file)
@@ -182,9 +182,9 @@ Key management utility for TrIPE.
 
 Options supported:
 
--h, --help             Show this help message.
--v, --version          Show the version number.
--u, --usage            Show pointlessly short usage string.
+-h, --help              Show this help message.
+-v, --version           Show the version number.
+-u, --usage             Show pointlessly short usage string.
 
 Subcommands available:
 """
@@ -279,7 +279,7 @@ def cmd_upload(args):
       OS.rename(new, base)
   finally:
     OS.chdir(cwd)
-    rmtree('tmp')    
+    rmtree('tmp')
 
 def cmd_update(args):
   cwd = OS.getcwd()
@@ -343,7 +343,7 @@ def cmd_clean(args):
 ### Main driver
 
 class UsageError (Exception): pass
-  
+
 commands = {'help': (cmd_help, 0, 1, ''),
             'newmaster': (cmd_newmaster, 0, 0, ''),
             'setup': (cmd_setup, 0, 0, ''),
index 2b59cf9..eef2a00 100644 (file)
@@ -41,8 +41,8 @@
 ### Master key integrity
 
 # Since the master public key is contained within the repository, we must
-# check its integrity: therefore we record its sequence number and 
-# fingerprint here.  These are filled in automatically by 
+# check its integrity: therefore we record its sequence number and
+# fingerprint here.  These are filled in automatically by
 # `tripe-keys upload'.  Leave them as they are.
 master-sequence = @MASTER-SEQUENCE@
 hk-master = @HK-MASTER@
index 6c223df..28aa143 100644 (file)
 ## it under the terms of the GNU General Public License as published by
 ## the Free Software Foundation; either version 2 of the License, or
 ## (at your option) any later version.
-## 
+##
 ## TrIPE is distributed in the hope that it will be useful,
 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 ## GNU General Public License for more details.
-## 
+##
 ## You should have received a copy of the GNU General Public License
 ## along with TrIPE; if not, write to the Free Software Foundation,
 ## Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
index c776410..4d0472a 100644 (file)
@@ -1242,7 +1242,7 @@ class MonitorWindow (MyWindow):
     me.unping()
   def destroy(me):
     if me.pinger is not None:
-      GO.source_remove(me.pinger)    
+      GO.source_remove(me.pinger)
   def report(me, msg):
     moanbox(msg)
     return True
@@ -1282,12 +1282,12 @@ Graphical monitor for TrIPE VPN.
 
 Options supported:
 
--h, --help             Show this help message.
--v, --version          Show the version number.
--u, --usage            Show pointlessly short usage string.
+-h, --help              Show this help message.
+-v, --version           Show the version number.
+-u, --usage             Show pointlessly short usage string.
 
--d, --directory=DIR    Use TrIPE directory DIR.
--a, --admin-socket=FILE        Select socket to connect to."""
+-d, --directory=DIR     Use TrIPE directory DIR.
+-a, --admin-socket=FILE Select socket to connect to."""
       exit(0)
     elif o in ('-v', '--version'):
       version(stdout)
index ca364c0..a46bb8e 100644 (file)
 ## it under the terms of the GNU General Public License as published by
 ## the Free Software Foundation; either version 2 of the License, or
 ## (at your option) any later version.
-## 
+##
 ## TrIPE is distributed in the hope that it will be useful,
 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 ## GNU General Public License for more details.
-## 
+##
 ## You should have received a copy of the GNU General Public License
 ## along with TrIPE; if not, write to the Free Software Foundation,
 ## Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
index 6e36adc..df83999 100644 (file)
@@ -7,7 +7,7 @@
  * (c) 2003 Straylight/Edgeware
  */
 
-/*----- Licensing notice --------------------------------------------------* 
+/*----- Licensing notice --------------------------------------------------*
  *
  * This file is part of Trivial IP Encryption (TrIPE).
  *
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * TrIPE is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with TrIPE; if not, write to the Free Software Foundation,
  * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -411,7 +411,7 @@ int main(int argc, char *argv[])
 
   udp_me.sin_family = udp_peer.sin_family = AF_INET;
   parseaddr(argv[optind], &udp_me.sin_addr, &pt);
-  udp_me.sin_port = pt; 
+  udp_me.sin_port = pt;
   parseaddr(argv[optind + 1], &udp_peer.sin_addr, &pt);
   udp_peer.sin_port = pt;
 
index 041b76f..ad9c70c 100644 (file)
 ## it under the terms of the GNU General Public License as published by
 ## the Free Software Foundation; either version 2 of the License, or
 ## (at your option) any later version.
-## 
+##
 ## TrIPE is distributed in the hope that it will be useful,
 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 ## GNU General Public License for more details.
-## 
+##
 ## You should have received a copy of the GNU General Public License
 ## along with TrIPE; if not, write to the Free Software Foundation,
 ## Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
index 107362e..97bba83 100644 (file)
@@ -7,7 +7,7 @@
  * (c) 2001 Straylight/Edgeware
  */
 
-/*----- Licensing notice --------------------------------------------------* 
+/*----- Licensing notice --------------------------------------------------*
  *
  * This file is part of Trivial IP Encryption (TrIPE).
  *
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * TrIPE is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with TrIPE; if not, write to the Free Software Foundation,
  * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -483,7 +483,7 @@ static void floodtimer(struct timeval *tv, void *vv)
   PASS(f->p->f, buf, sz);
   setflood(f);
 }
-  
+
 static void setflood(flood *f)
 {
   struct timeval tv;
index 01438ea..e1748e2 100644 (file)
 ## it under the terms of the GNU General Public License as published by
 ## the Free Software Foundation; either version 2 of the License, or
 ## (at your option) any later version.
-## 
+##
 ## TrIPE is distributed in the hope that it will be useful,
 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 ## GNU General Public License for more details.
-## 
+##
 ## You should have received a copy of the GNU General Public License
 ## along with TrIPE; if not, write to the Free Software Foundation,
 ## Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
index d98283b..ecf222f 100644 (file)
@@ -7,7 +7,7 @@
  * (c) 2001 Straylight/Edgeware
  */
 
-/*----- Licensing notice --------------------------------------------------* 
+/*----- Licensing notice --------------------------------------------------*
  *
  * This file is part of Trivial IP Encryption (TrIPE).
  *
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * TrIPE is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with TrIPE; if not, write to the Free Software Foundation,
  * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -385,7 +385,7 @@ static void a_rawalert(unsigned f_and, unsigned f_eq, const char *status,
 {
   admin *a, *aa;
   dstr d = DSTR_INIT;
-  
+
   if (!(flags & F_INIT))
     return;
   dstr_puts(&d, status);
@@ -567,10 +567,10 @@ static long a_parsetime(const char *p)
     case 'h': t *= 60;
     case 'm': t *= 60;
     case 's': if (q[1] != 0)
-    default:    t = -1;
+    default:   t = -1;
     case 0:   break;
   }
-  return (t);    
+  return (t);
 }
 
 /* --- @a_findpeer@ --- *
@@ -986,7 +986,7 @@ static void a_resolved(struct hostent *h, void *v)
   sel_rmtimer(&r->t);
   xfree(r->addr);
   a_bgrelease(&r->bg);
-} 
+}
 
 /* --- @a_restimer@ --- *
  *
@@ -1093,7 +1093,7 @@ static void a_resolve(admin *a, admin_resop *r, const char *tag,
           a->seq, BGTAG(r), r->addr); )
 
   /* --- If the name is numeric, do it the easy way --- */
-  
+
   if (inet_aton(av[i], &r->sa.sin.sin_addr)) {
     T( trace(T_ADMIN, "admin: resop %s done the easy way", BGTAG(r)); )
     func(r, ARES_OK);
@@ -1349,7 +1349,7 @@ static void a_ping(admin *a, unsigned ac, char *av[],
     a_bgrelease(&pg->bg);
   }
   return;
-    
+
 bad_syntax:
   a_fail(a, "bad-syntax", "%s", cmd, "[OPTIONS] PEER", cmd, A_END);
 fail:
@@ -1565,7 +1565,7 @@ static int traceish(admin *a, unsigned ac, char *av[],
          }
          a_fail(a, "bad-%s-option", what, "%c", *p, A_END);
          return (0);
-        tropt_ok:;
+       tropt_ok:;
          break;
       }
       p++;
@@ -1669,7 +1669,7 @@ static void acmd_setifname(admin *a, unsigned ac, char *av[])
     a_notify("NEWIFNAME", "?PEER", p, "%s", p_ifname(p), "%s", av[1], A_END);
     p_setifname(p, av[1]);
     a_ok(a);
-  }  
+  }
 }
 
 static void acmd_getchal(admin *a, unsigned ac, char *av[])
@@ -1779,7 +1779,7 @@ static void acmd_stats(admin *a, unsigned ac, char *av[])
         "ip-bytes-in=%lu", st->sz_ipin,
         A_END);
   a_info(a,
-        "ip-packets-out=%lu", st->n_ipout, 
+        "ip-packets-out=%lu", st->n_ipout,
         "ip-bytes-out=%lu", st->sz_ipout,
         A_END);
   a_info(a, "rejected-packets=%lu", st->n_reject, A_END);
@@ -1882,7 +1882,7 @@ static const acmd acmdtab[] = {
   { "tunnels", 0,                      0,      0,      acmd_tunnels },
   { "version", 0,                      0,      0,      acmd_version },
   { "warn",    "MESSAGE ...",          1,      0xffff, acmd_warn },
-  { "watch",   "[OPTIONS]",            0,      1,      acmd_watch },
+  { "watch",   "[OPTIONS]",            0,      1,      acmd_watch },
   { 0,         0,                      0,      0,      0 }
 };
 
@@ -1893,7 +1893,7 @@ static void acmd_help(admin *a, unsigned ac, char *av[])
   for (c = acmdtab; c->name; c++) {
     if (c->help)
       a_info(a, "%s", c->name, "*%s", c->help, A_END);
-    else 
+    else
       a_info(a, "%s", c->name, A_END);
   }
   a_ok(a);
@@ -2040,7 +2040,7 @@ static void a_line(char *p, size_t len, void *vp)
       if (c->argmin > ac || ac > c->argmax) {
        if (!c->help)
          a_fail(a, "bad-syntax", "%s", c->name, "", A_END);
-       else 
+       else
          a_fail(a, "bad-syntax", "%s", c->name, "%s", c->help, A_END);
       } else
        c->func(a, ac, av + 1);
index 5258cf9..8eef16a 100644 (file)
@@ -7,7 +7,7 @@
  * (c) 2005 Straylight/Edgeware
  */
 
-/*----- Licensing notice --------------------------------------------------* 
+/*----- Licensing notice --------------------------------------------------*
  *
  * This file is part of Trivial IP Encryption (TrIPE).
  *
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * TrIPE is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with TrIPE; if not, write to the Free Software Foundation,
  * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
index 8577d91..396ecae 100644 (file)
@@ -7,7 +7,7 @@
  * (c) 2001 Straylight/Edgeware
  */
 
-/*----- Licensing notice --------------------------------------------------* 
+/*----- Licensing notice --------------------------------------------------*
  *
  * This file is part of Trivial IP Encryption (TrIPE).
  *
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * TrIPE is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with TrIPE; if not, write to the Free Software Foundation,
  * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  * %$r_A = g^{\rho_A}$%                        Alice's challenge
  * %$c_A = H(\cookie{cookie}, r_A)$%   Alice's cookie
  * %$v_A = \rho_A \xor H(\cookie{expected-reply}, a, r_A, r_B, b^{\rho_A})$%
- *                                     Alice's challenge check value
+ *                                     Alice's challenge check value
  * %$r_B^\alpha = a^{\rho_B}$%         Alice's reply
  * %$K = r_B^{\rho_A} = r_B^{\rho_A} = g^{\rho_A\rho_B}$%
- *                                     Alice and Bob's shared secret key
+ *                                     Alice and Bob's shared secret key
  * %$w_A = H(\cookie{switch-request}, c_A, c_B)$%
- *                                     Alice's switch request value
+ *                                     Alice's switch request value
  * %$u_A = H(\cookie{switch-confirm}, c_A, c_B)$%
- *                                     Alice's switch confirm value
+ *                                     Alice's switch confirm value
  *
  * The messages are then:
  *
@@ -75,7 +75,7 @@
  *
  * %$\cookie{kx-switch-ok}, E_K(u_A))$%
  *     Switch received.  Committed; send data; move to @KXS_SWITCH@.
- */ 
+ */
 
 /*----- Tunable parameters ------------------------------------------------*/
 
@@ -598,7 +598,7 @@ static kxchal *respond(keyexch *kx, unsigned msg, buf *b)
       goto badcheck;
 
     /* --- Fill in a new challenge block --- */
-    
+
     kxc = kxc_new(kx);
     G_COPY(gg, kxc->c, c);
     G_COPY(gg, kxc->r, r);
@@ -678,7 +678,7 @@ bad:
   G_DESTROY(gg, cc);
   G_DESTROY(gg, r);
   mp_drop(cv);
-  return (0);  
+  return (0);
 }
 
 /* --- @dochallenge@ --- *
@@ -857,7 +857,7 @@ static void commit(keyexch *kx, kxchal *kxc)
   kx->r[0] = kxc;
   kx->nr = 1;
   kxc_stoptimer(kxc);
-  ksl_link(kx->ks, kxc->ks);  
+  ksl_link(kx->ks, kxc->ks);
 }
 
 /* --- @doreply@ --- *
@@ -886,7 +886,7 @@ static int doreply(keyexch *kx, buf *b)
   if (BLEFT(b)) {
     a_warn("KX", "?PEER", kx->p, "invalid", "reply", A_END);
     goto bad;
-  }    
+  }
   if (kx->s == KXS_CHAL) {
     commit(kx, kxc);
     kx->s = KXS_COMMIT;
@@ -1012,7 +1012,7 @@ static int doswitchok(keyexch *kx, buf *b)
   return (0);
 
 bad:
-  return (-1);  
+  return (-1);
 }
 
 /*----- Main code ---------------------------------------------------------*/
index edd31b2..422b01f 100644 (file)
@@ -7,7 +7,7 @@
  * (c) 2001 Straylight/Edgeware
  */
 
-/*----- Licensing notice --------------------------------------------------* 
+/*----- Licensing notice --------------------------------------------------*
  *
  * This file is part of Trivial IP Encryption (TrIPE).
  *
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * TrIPE is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with TrIPE; if not, write to the Free Software Foundation,
  * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -293,13 +293,13 @@ static int algs_samep(const algswitch *a, const algswitch *aa)
 /* --- @keymoan@ --- *
  *
  * Arguments:  @const char *file@ = name of the file
- *              @int line@ = line number in file
- *              @const char *msg@ = error message
- *              @void *p@ = argument pointer
+ *             @int line@ = line number in file
+ *             @const char *msg@ = error message
+ *             @void *p@ = argument pointer
  *
- * Returns:     ---
+ * Returns:    ---
  *
- * Use:         Reports an error message about loading a key file.
+ * Use:                Reports an error message about loading a key file.
  */
 
 static void keymoan(const char *file, int line, const char *msg, void *p)
@@ -384,7 +384,7 @@ tymatch:;
 
   /* --- Good, we're happy --- *
    *
-   * Dodginess!  We change the group over here, but don't free any old group
+   * Dodginess!         We change the group over here, but don't free any old group
    * elements.  This assumes that the new group is basically the same as the
    * old one, and will happily adopt the existing elements.  If it isn't,
    * then we lose badly.  Check this, then.
@@ -598,7 +598,7 @@ tymatch:;
 
   /* --- Ensure that the group is correct --- *
    *
-   * Dodginess!  We assume that if this works, our global group is willing to
+   * Dodginess!         We assume that if this works, our global group is willing to
    * adopt this public element.  Probably reasonable.
    */
 
index bb2397f..0a4952a 100644 (file)
@@ -7,7 +7,7 @@
  * (c) 2001 Straylight/Edgeware
  */
 
-/*----- Licensing notice --------------------------------------------------* 
+/*----- Licensing notice --------------------------------------------------*
  *
  * This file is part of Trivial IP Encryption (TrIPE).
  *
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * TrIPE is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with TrIPE; if not, write to the Free Software Foundation,
  * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -56,7 +56,7 @@
 /* --- Encrypted data format --- *
  *
  * Let %$p_i$% be the %$i$%-th plaintext message, with type %$t$%.  We first
- * compute 
+ * compute
  *
  *   %$c_i = \mathcal{E}\textrm{-CBC}_{K_{\text{E}}}(p_i)$%
  *
@@ -159,7 +159,7 @@ static int doencrypt(keyset *ks, unsigned ty, buf *b, buf *bb)
     rc = -1;
   }
   ks->sz_exp = nsz;
-  return (rc);  
+  return (rc);
 }
 
 /* --- @dodecrypt@ --- *
@@ -277,7 +277,7 @@ void ks_drop(keyset *ks)
  *
  * Arguments:  @const void *k@ = pointer to key material
  *             @size_t x, y, z@ = offsets into key material (see below)
- *             @peer *p@ = pointer to peer information 
+ *             @peer *p@ = pointer to peer information
  *
  * Returns:    A pointer to the new keyset.
  *
index 1e5d076..25354f1 100644 (file)
@@ -7,7 +7,7 @@
  * (c) 2001 Straylight/Edgeware
  */
 
-/*----- Licensing notice --------------------------------------------------* 
+/*----- Licensing notice --------------------------------------------------*
  *
  * This file is part of Trivial IP Encryption (TrIPE).
  *
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * TrIPE is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with TrIPE; if not, write to the Free Software Foundation,
  * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -90,7 +90,7 @@ static void p_ponged(peer *p, unsigned msg, buf *b)
   uint32 id;
   const octet *magic;
   ping *pg;
-  
+
   IF_TRACING(T_PEER, {
     trace(T_PEER, "peer: received %s reply from %s",
          p_pingtype(msg), p->spec.name);
@@ -239,7 +239,7 @@ found:
        case MISC_PING:
          buf_put(p_txstart(p, MSG_MISC | MISC_PONG), BCUR(&b), BLEFT(&b));
          p_txend(p);
-         break;        
+         break;
        case MISC_PONG:
          p_ponged(p, MISC_PONG, &b);
          break;
@@ -768,7 +768,7 @@ peer *p_find(const char *name)
     if (strcmp(name, p->spec.name) == 0)
       return (p);
   }
-  return (0);  
+  return (0);
 }
 
 /* --- @p_destroy@ --- *
index 92a5f77..06b409e 100644 (file)
@@ -7,7 +7,7 @@
  * (c) 2001 Straylight/Edgeware
  */
 
-/*----- Licensing notice --------------------------------------------------* 
+/*----- Licensing notice --------------------------------------------------*
  *
  * This file is part of Trivial IP Encryption (TrIPE).
  *
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * TrIPE is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with TrIPE; if not, write to the Free Software Foundation,
  * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
index f9cf0e8..670e141 100644 (file)
@@ -7,7 +7,7 @@
  * (c) 2001 Straylight/Edgeware
  */
 
-/*----- Licensing notice --------------------------------------------------* 
+/*----- Licensing notice --------------------------------------------------*
  *
  * This file is part of Trivial IP Encryption (TrIPE).
  *
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * TrIPE is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with TrIPE; if not, write to the Free Software Foundation,
  * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
index 5f00718..3db1cb9 100644 (file)
@@ -7,7 +7,7 @@
  * (c) 2001 Straylight/Edgeware
  */
 
-/*----- Licensing notice --------------------------------------------------* 
+/*----- Licensing notice --------------------------------------------------*
  *
  * This file is part of Trivial IP Encryption (TrIPE).
  *
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * TrIPE is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with TrIPE; if not, write to the Free Software Foundation,
  * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -194,9 +194,9 @@ typedef struct keyset {
   unsigned long sz_exp;                        /* Data limit for the keyset */
   T( unsigned seq; )                   /* Sequence number for tracing */
   unsigned f;                          /* Various useful flags */
-  gcipher *cin, *cout;                         /* Keyset ciphers for encryption */
+  gcipher *cin, *cout;                 /* Keyset ciphers for encryption */
   size_t tagsz;                                /* Length to truncate MAC tags */
-  gmac *min, *mout;                    /* Keyset MACs for integrity */
+  gmac *min, *mout;                    /* Keyset MACs for integrity */
   uint32 oseq;                         /* Outbound sequence number */
   seqwin iseq;                         /* Inbound sequence number */
 } keyset;
index cf6c6d0..3a45b1e 100644 (file)
@@ -7,7 +7,7 @@
  * (c) 2001 Straylight/Edgeware
  */
 
-/*----- Licensing notice --------------------------------------------------* 
+/*----- Licensing notice --------------------------------------------------*
  *
  * This file is part of Trivial IP Encryption (TrIPE).
  *
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * TrIPE is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with TrIPE; if not, write to the Free Software Foundation,
  * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -41,7 +41,7 @@ struct tunnel {
   sel_file f;                          /* Selector for tunnel device */
   struct peer *p;                      /* Pointer to my peer */
   unsigned n;                          /* Number of my tunnel device */
-};  
+};
 
 /* --- @t_read@ --- *
  *
index 4250354..53f1978 100644 (file)
@@ -7,7 +7,7 @@
  * (c) 2003 Straylight/Edgeware
  */
 
-/*----- Licensing notice --------------------------------------------------* 
+/*----- Licensing notice --------------------------------------------------*
  *
  * This file is part of Trivial IP Encryption (TrIPE).
  *
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * TrIPE is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with TrIPE; if not, write to the Free Software Foundation,
  * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -46,7 +46,7 @@ struct tunnel {
   const tunnel_ops *ops;               /* Pointer to operations */
   sel_file f;                          /* Selector for TUN/TAP device */
   struct peer *p;                      /* Pointer to my peer */
-};  
+};
 
 /* --- @t_read@ --- *
  *
index 0df028e..785d008 100644 (file)
@@ -7,7 +7,7 @@
  * (c) 2005 Straylight/Edgeware
  */
 
-/*----- Licensing notice --------------------------------------------------* 
+/*----- Licensing notice --------------------------------------------------*
  *
  * This file is part of Trivial IP Encryption (TrIPE).
  *
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * TrIPE is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with TrIPE; if not, write to the Free Software Foundation,
  * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -55,7 +55,7 @@ struct tunnel {
 #   define ST_EOF 4u                   /*   File descriptor reported EOF */
   size_t n;                            /* Number of bytes used in buffer */
   octet buf[PKBUFSZ];                  /* Buffer for incoming data */
-};  
+};
 
 /*----- Static variables --------------------------------------------------*/
 
index bdf23fe..3274db1 100644 (file)
@@ -7,7 +7,7 @@
  * (c) 2001 Straylight/Edgeware
  */
 
-/*----- Licensing notice --------------------------------------------------* 
+/*----- Licensing notice --------------------------------------------------*
  *
  * This file is part of Trivial IP Encryption (TrIPE).
  *
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * TrIPE is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with TrIPE; if not, write to the Free Software Foundation,
  * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
index be9dd91..67a0be7 100644 (file)
 ## it under the terms of the GNU General Public License as published by
 ## the Free Software Foundation; either version 2 of the License, or
 ## (at your option) any later version.
-## 
+##
 ## TrIPE is distributed in the hope that it will be useful,
 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 ## GNU General Public License for more details.
-## 
+##
 ## You should have received a copy of the GNU General Public License
 ## along with TrIPE; if not, write to the Free Software Foundation,
 ## Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
index 04dec61..1bd4c45 100644 (file)
Binary files a/wireshark/cap and b/wireshark/cap differ
index 5ea7b97..798ccd9 100644 (file)
@@ -7,7 +7,7 @@
  * (c) 2003 Straylight/Edgeware
  */
 
-/*----- Licensing notice --------------------------------------------------* 
+/*----- Licensing notice --------------------------------------------------*
  *
  * This file is part of Trivial IP Encryption (TrIPE).
  *
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * TrIPE is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with TrIPE; if not, write to the Free Software Foundation,
  * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -85,7 +85,7 @@ static void prefcb(void) { }
 static gint gethash(proto_tree *tt, int hf, tvbuff_t *b, gint off)
 {
   proto_tree_add_item(tt, hf, b, off, hashsz, FALSE);
-  return (off + hashsz); 
+  return (off + hashsz);
 }
 
 static gint getmp(proto_tree *tt, const hfmp *hf, tvbuff_t *b, gint off)
@@ -119,7 +119,7 @@ static gint getge(proto_tree *tt, const hfge *hf, tvbuff_t *b, gint off)
     proto_tree_add_item(tt, hf->hfy_len, b, off + 2 + len, 2, FALSE);
     proto_tree_add_item(tt, hf->hfy_val, b, off + 4 + len, len2, FALSE);
     r = off + len + len2 + 4;
-  }    
+  }
   return (r);
 }
 
@@ -306,7 +306,7 @@ static void dissect_tripe(tvbuff_t *b, packet_info *p, proto_tree *t)
     proto_tree_add_item(ti, hf_tripe_ct_ct, b, off, -1, FALSE);
     goto done;
   done:;
-  }  
+  }
 }
 
 void proto_register_tripe(void)