ENskip User's Guide

Version 0.67 for Linux and Solaris

About ENskip

ENskip is a security module for the TCP/IP stack. It provides encryption and authentication of packets on the IP layer between two or more machines. ENskip is compatible to other SKIP implementations, e.g. Sun SKIP for Solaris. However, unlike other SKIP implementations available on the Internet, ENskip contains strong encryption algorithms.

This document is not intended to describe the SKIP protocol, please refer to the SKIP drafts and the Sun SKIP home page, http://www.skip.org.

ENskip is alpha software. If you are not absolutely sure what this is all about, you might perhaps want to reconsider using this package.

No bug-fixes, installation help or any other support is granted. If you have any suggestions, comments or contributions to make ENskip work better, mail to skip@tik.ee.ethz.ch. For exchange of ideas and information regarding the implementation of SKIP in software you can subscribe to a mailing list by sending a mail to majordomo@skip.org. "subscribe skip-info [your real name]" should be in the body of your message.

Platforms

This release was tested on Linux and Solaris only. ENskip 0.20pa was originally also developed for Silicon Graphics Indy (IRIX 5.3), Amiga 4000 (NetBSD 1.0) and NextStep. Thus, a port of the new features should not be too difficult.

License

Except where stated otherwise, the following license applies:

GNU GENERAL PUBLIC LICENSE

Version 2, June 1991

Copyright (C) 1989, 1991 Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA

Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.

Preamble

The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too.

When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things.

To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it.

For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.

We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software.

Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations.

Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all.

The precise terms and conditions for copying, distribution and modification follow.

GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you".

Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does.

1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program.

You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.

2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:

a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change.

b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License.

c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.)

These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.

Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program.

In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.

3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following:

a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,

b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,

c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.)

The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.

If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code.

4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.

5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it.

6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License.

7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program.

If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances.

It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.

This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.

8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.

9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.

Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation.

10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.

NO WARRANTY

11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

END OF TERMS AND CONDITIONS

Appendix: How to Apply These Terms to Your New Programs

If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.

To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found.

<one line to give the program's name and a brief idea of what it does.>
Copyright (C) 19yy <name of author>

This program is free software; you can redistribute it and/or modify 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.

This program 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 this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

Also add information on how to contact you by electronic and paper mail.

If the program is interactive, make it output a short notice like this when it starts in an interactive mode:

Gnomovision version 69, Copyright (C) 19yy name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details.

The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program.

You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names:

Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker.

<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice

This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License.

Credits

Credits for encryption and authentication implementation used by ENskip

Installing ENskip

First, ensure your system clock is set correctly and the system knows its time zone (this is important because ENskip depends on GMT time for certain calculations). Keep this in mind if you want to communicate with a Windows client - often PCs are not properly configured.

ENskip discards remote packets if the clocks differ by more than one hour.

Linux

Linux

This version of ENskip for Linux depends on a kernel patch. Please carefully read this entire document to check whether you have everything that's needed. Of course, you need root permissions to install the software.

  1. Get and install Linux 2.0.26, 2.0.27, 2.0.28, 2.0.29 or 2.0.30 and a current set of tools and C libraries.

  2. Install GNU g++ and the GNU g++ library (used by Sun's X.509 certificate library).

  3. Change to your favorite src directory and unpack the ENskip source package ("ENskip path").

  4. Change to /usr/src and patch -p0 < "ENskip path"/linux/ENskip-linux.diff (or ENskip-linux-2.0.29.diff if you are using kernels 2.0.26 to 2.0.29)

  5. Change to /usr/src/linux/ and make clean

  6. make menuconfig

    The following options are required:

      Code maturity level options:
      + Prompt for development drivers

      Loadable module support
      + Enable loadable module support

      Networking options:
      + IP: forwarding/gatewaying
      + Network firewalls
      + IP: firewalling
      + Kernel/User network link driver
      + IP: always defragment
      + Optimize as router not host (important)
      - Masquerading (important - the code currently does not work with masquerading)

  7. Save the kernel configuration and
    make dep; make zImage; make modules; make modules_install
    (ignore the three warnings in ip_fw.c)

    cp arch/i386/boot/zImage /vmlinuz
    lilo

  8. reboot

  9. Change to "ENskip path". Then,
    make
    There should not be any compiler warnings.

  10. make install
    creates /dev/enskip
    copies linux/enskip.o to /lib/modules/misc
    copies skipd, cert_gen, skip_attach, skip_detach, skip_dump and skip_stat to /usr/local/sbin
    creates /etc/cert/, secret/, public/ and cache/

Solaris

Solaris

!Warning: Please don't try to install an ENskip version that was compiled on another release of your operating system, it may crash your kernel and your hard disk!

Before beginning to install the software, please carefully read this entire document to check whether you have everything that's needed. Of course, you need root permissions to install the software.

  1. Install GNU g++ and the GNU g++ library (used by Sun's X.509 certificate library).

  2. Change to your favorite src directory and unpack the ENskip source package ("ENskip path").

  3. Change to "ENskip path". Then,
    make
    There should not be any compiler warnings.

  4. make install

  5. Don't reboot yet, first configure ENskip (see below).

Configuring ENskip

Creating certificates

Please read the SKIP drafts (draft/*.txt) for more information about name spaces and name space identifiers (NSIDs).

It is assumed that you will work with NSID 08 certificates, i.e. unsigned Diffie-Hellman (UDH) certificates.

To generate UDH certificates which interoperate with other SKIP implementations, use the cert_gen utility. Certificates are stored in the CERT directory, normally /etc/cert (defined in config.h).

cert_gen

cert_gen is designed to automate the certification generation.

After starting cert_gen, you will first have to enter the modulus size (i.e. the length of the certificate). Because of export restrictions which prevent interoperation with certain export crippled SKIP implementations if the modulus length is too large, I recommend generating two certificates, one with a 512-bit length modulus and one with 2048. Use the 512-bit certificate for interoperability with export crippled software only!

Under Solaris, you will also be asked for a secret value (the Linux implementation uses the Linux random number generator).

The certificates are automatically saved in your CERT directory. Please note the certificate names, you will need them when configuring the daemon.

Example session:

# cert_gen
Please enter the modulus size (512, 1024 or 2048): 2048
Generating random value...
If the program suspends here, please switch tasks and generate some keyboard input.
Random generation succeeded.
Public CERT saved as /etc/cert/public/08-67193A592E4026EC8F1AE7882E7CA258-1
Secret CERT saved as /etc/cert/secret/08-67193A592E4026EC8F1AE7882E7CA258-1
#

Now write down "08-67193A592E4026EC8F1AE7882E7CA258", this is the value you will need for skipd.conf (leave out the serial number appendix "-1").

cert_make

If you want to use your own parameters, create a file in the same format as the secret file made by cert_gen and feed it to cert/cert_make. cert_make will return the corresponding public file.

Changing the startup script

Linux

Linux

On system startup, you must
insmod /lib/modules/misc/enskip.o
and start
/usr/local/sbin/skipd -d [-v]

ENskip automatically attaches to all INET interfaces except loopback. To add or remove interfaces from ENskip, use skip_attach IPaddr or skip_detach IPaddr, e.g.
skip_attach 127.0.0.1 to attach to the loopback interface.

Solaris

Solaris

make install installs ENskip in the standard startup procedure of the system. This can cause small holes in the coverage of packet transmission during the system startup. Modify the startup process manually to get rid of this problem.

To get rid of ENskip under Solaris, use make uninstall.

!Note: You cannot attach to the loopback interface under Solaris.

Linux

Solaris

All systems

I advise you to add a cron job which restarts the daemon every five minutes (no harm if it is already running). Since the module has a cache of its own (the primary cache), it is likely that you will not notice a dead daemon for some time. In addition, you should kill and reload both module and daemon at least daily (because of possible memory leaks in the module and missing garbage collection in the daemon).

!Warning: Both module and daemon must be located on a local drive, not on an NFS server - after insertion of the module and before startup of the daemon, no network communication is possible. If the daemon is located on an NFS drive, you won't be able to load it.

Configuring the daemon

The daemon configuration file is /etc/skipd.conf. The default configuration does not enforce authentication, nor encryption. Be careful not to exclude access to your NFS server

The daemon re-reads its configuration file whenever you send a SIGHUP (killall -HUP skipd).

Configuration examples

For working examples (including those used for SWAN testing), please see samples/skipd.conf.

Solaris

Communicating with ENskip or Sun SKIP for Solaris

Suppose you want to exchange authenticated, unencrypted IP packets with a remote host running ENskip (both Linux and Solaris versions) or Sun SKIP for Solaris.

First get the UDH key ID of both hosts (see above). You don't need to copy any files, the name (which is the key ID) is enough. For our host, we will use the certificate created in the sample session above. Acquire the certificate name of the remote host (e.g. by telephone conversation, authenticated e-Mail, etc.).

Example: The key ID of our host is 08-67193A592E4026EC8F1AE7882E7CA258, the key ID of the remote host is 08-94B11E5374827381AF8611CC62FCEE64.

The IP address of our host is 193.99.253.34, the IP address of the remote host is 193.99.253.62.

In skipd.conf, add two sections after the "default" section.

Outgoing traffic:

08-67193A592E4026EC8F1AE7882E7CA258, 08-94B11E5374827381AF8611CC62FCEE64:
   src ip = 193.99.253.34
   dst ip = 193.99.253.62
   input filter before = IP
   input deskip policy = AUTH
   Kij algorithm = 3DES-3
   MAC algorithm = MD5
   Crypt algorithm = NONE
   output filter after = IP
   output enskip mode = ALL
   flags = NONE

and incoming traffic:

08-94B11E5374827381AF8611CC62FCEE64, 08-67193A592E4026EC8F1AE7882E7CA258:
   src ip = 193.99.253.62
   dst ip = 193.99.253.34
   input filter before = IP
   input deskip policy = AUTH
   Kij algorithm = 3DES-3
   MAC algorithm = MD5
   Crypt algorithm = NONE
   output filter after = IP
   output enskip mode = ALL
   flags = NONE

The "src ip" and "dst ip" sections link IP addresses to the key IDs. You can also add more than one IP address if your host has more than one interface or if you share secret keys.

!Note: ENskip supports asymmetric use of encryption algorithms, but Sun SKIP for Solaris does not, so I advise you not to use this feature. Also, the above example specifies unneeded switches in the "inbound traffic" section. ENskip will always accept any algorithm. However, it easier to copy configuration files from host to host and to change entries if both inbound and outbound sections are identical.

Windows

Communicating with Sun SKIP for Windows 95

For Sun SKIP for Windows 95, configure ENskip as if you were talking to Sun SKIP for Solaris. In addition, set
flags = TUNNEL
As mentioned above, you should check the time and time zone on the Windows PC.

Certificate Discovery Protocol (CDP)

Certain SKIP implementations don't support the certificate discovery protocol (CDP), which uses transparent UDP to acquire the public keys of remote hosts and stores them in the CERT/cache directory.

Using CDP has the advantage that you can configure a system to ask all remote hosts for keys first, communicate securely if the keys are available and fall back to unencrypted communication only if the remote host does not support the SKIP protocol. To achieve this, set "flags = NONE" in the "default" section of your skipd.conf and soft link the UDH certificate files to their corresponding IPv4 names. In the example given above, ln -s
CERT/public/08-67193A592E4026EC8F1AE7882E7CA258-1 to
CERT/public/01-193.99.253.34
and
CERT/secret/08-67193A592E4026EC8F1AE7882E7CA258-1 to
CERT/secret/01-193.99.253.34

In addition, CDP has the advantage that you will not have to worry about the format of certificate files and how to make ENskip recognize them. If the remote host does not support CDP, you can store the public keys on a key server. The ENskip daemon can act as a key server if the public keys are in the CERT/public or CERT/cache directories (use cert_server if you want to run a key server without the ENskip module and daemon). Add remote servers to the "lookuphosts=" directive in skipd.conf.

VPNet

Manual keying, Communicating with VPNet products

Certain SKIP implementations do not support the calculation of UDH values. For these implementations (e.g. VPNet), ENskip supports "manual secrets" (i.e. symmetric keys instead of asymmetric UDH).

These implementations might support the notion of key IDs (NSID/MKID) and even include them in the SKIP packets, but nevertheless be unable to calculate DH values. In the following example, we will use NSID 1, i.e. plain IPv4 addresses.

First get the IP address of the remote host and secretly exchange a secret value with the remote system administrator (although ENskip supports the hashing of strings for key generation, the remote implementation might not, so we will use a hex value in this example, 0x123456789ABCDEF0123456789ABCDEF0). The maximum length of a hex value is 256 bit.

Check whether the remote implementation requires NSID 1/MKID pairs to be present in the SKIP packets (you will have to use the "src mkid=YES" and "dst mkid=YES" directives), or whether it is capable of deriving them from the packet IP addresses (default for ENskip, corresponding to "src mkid=AUTO", "dst mkid=AUTO").

Example: They key ID of our host is 01-193.99.253.34 (01- plus IP address), the key ID of the remote host is 01-193.99.253.62. NSID/MKID must be present in the packets. We don't authenticate packets, but encrypt only.

In skipd.conf, add two sections after the "default" section.

Outgoing traffic:

01-193.99.253.34, 01-193.99.253.62:
   src mkid=YES
   dst mkid=YES
   input filter before = IP
   input deskip policy = CRYPT
   Kij algorithm = 3DES-3
   MAC algorithm = NONE
   Crypt algorithm = RC4-128
   output filter after = IP
   output enskip mode = ALL
   manual secret = 0x123456789ABCDEF0123456789ABCDEF0
   flags = NONE

and incoming traffic:

01-193.99.253.62, 01-193.99.253.34:
   input filter before = IP
   input deskip policy = CRYPT
   Kij algorithm = 3DES-3
   MAC algorithm = NONE
   Crypt algorithm = RC4-128
   output filter after = IP
   output enskip mode = ALL
   manual secret = 0x123456789ABCDEF0123456789ABCDEF0
   flags = NONE

Configuration file syntax

This section is an attempt to explain the configuration language (to really understand the parser, I advise you to study lib/parser.c).

The configuration file should begin with a default entry.

# I am a comment
default:
   option1 = value_a
   option2 = value_b

To set options for specific hosts, specify their IP addresses using NSID 1 (name space ID one, i.e. IP addresses) or NSID 8 (UDH certificates):

01-127.0.0.1, 01-127.0.0.1:
   option1 = value_c
   option3 = value_d

would apply to packets from localhost to localhost. To cover both directions of a connection, you would have to specify forward and reverse direction:

01-193.99.253.34, 01-193.99.253.62:
   option... = value...

01-193.99.253.62, 01-193.99.253.34:
   option... = value...

You can temporarily disable a block of options. Change the "01-x, 01-x:" to "ignore:". You can also specify IDs in other name spaces. However, these IDs must be given in hex format.

The following configuration file options currently make sense (please don't change other options, you might get weird results)

Note: { } means more than one value can be specified at a time.

*

output enskip mode = { NONE | TCP | UDP | ICMP | OTHER | ALL }

ENskip will only authenticate/encrypt the specified IP packet types. It is still possible that ENskip will send a plain packet if no key is found (if filters permit, see below).

To disable ENskip for a destination address, use
output enskip mode = NONE

*

Kij algorithm = DES | 3DES-3 | 3DES-2 | IDEA | RC2-40 | RC2-128 | SAFER-SK128

Sets the packet key encryption algorithm (only block ciphers are permitted).

To calculate the Kij field in the SKIP packet header, both a block cipher and a hash algorithm are needed. In this implementation, the hash algorithm is always MD5 (don't confuse this with the MAC hash, see below).

Without this entry, ENskip cannot authenticate or encrypt. For this reason, "NONE" is not permitted.

Most of the algorithms are implemented for interoperability with other SKIP implementations only, in particular RC2-40. RC2-40 is not faster than RC2-128, only a lot less secure.

For secure communication, I recommend IDEA or 3DES-3.

*

Crypt algorithm = NONE | DES | RC2-40 | RC2-128 | RC4-40 | RC4-128 | 3DES-2 | 3DES-3 | IDEA | SAFER-SK128 | SIMPLE

Uses the specified algorithm to encrypt the packet (or NONE if you want authentication only). Again, some algorithms are not recommended, namely SIMPLE, RC2-40 and RC4-40. SIMPLE is a simple XOR and RC2-40 and RC4-40 are the export restricted versions of their strong 128-bit brethren.

For secure communication, I suggest 3DES-3, IDEA or RC4-128. Since RC4-128 is about three to five times faster than the other algorithms, use RC4-128 for best performance.

*

MAC algorithm = NONE | MD5

Uses the specified algorithm to authenticate packets (or NONE if you do not want authentication).

*

input deskip mode = NONE | DESKIP

Set to DESKIP if you want ENskip to process any packets at all (the setting NONE completely disables ENskip and does not make much sense)

*

input deskip policy = { NONE | CRYPT | AUTH }

If an incoming packet is not processed with all the given modes, it will be discarded.
NONE: accept all packets
CRYPT: packet must be encrypted
AUTH: packet must be authenticated

*

input filter before = NONE | IP | SKIP
output filter before = NONE | IP | SKIP

Filters applied to received/sent packets before processing. These filters can be used to prevent packets within packets within... (the Linux implementation can cope with this).
SKIP: all SKIP packets will be discarded.
IP: all clear text IP packets will be discarded.

*

input filter after = NONE | IP | SKIP
output filter after = NONE | IP | SKIP

Filters applied to successfully processed packets.

To prevent ENskip from sending clear text (unsigned and/or unencrypted) to a given host, e.g. because it could not resolve a key, use
output filter after = IP

To discard SKIP packets within SKIP, use
input filter after = SKIP

*

manual secret = "any unguessable secret" | hex number

A manually configured shared secret (i.e. a symmetric key).

If you specify a string, the string is hashed to obtain a key. If you specify a hex number, the hex number is used (256 bit at maximum).

It is better to use the cert mode instead (see above), which uses a public key scheme.

Examples:
string: manual secret = "There are mountains in Switzerland (and money vaults)"
hex: manual secret = 0x123456

*

flags = { NONE | NO_KEY | VALID_KEY | TUNNEL }

NO_KEY: The entry does not contain a shared secret. Don't bother looking for one, send plaintext (if filters permit). This is normally used in the "default" section.

NONE: No flags apply. Should be used in normal configuration entries.

VALID_KEY: The entry does contain a valid secret. VALID_KEY should not be specified by the user, it is set automatically by ENskip.

TUNNEL: Encapsulate whole IP packets instead of payload data only (network layer mode instead of transport layer mode). As the packets become larger, the performance decreases. Tunnel mode is however useful for virtual private networks and SKIP implementations like Sun SKIP for Windows 95.

*

src ip = { IPaddress }
dst ip = { IPaddress }

Maps the given source/destination IP addresses to the specified entry. These entries are vital if you use NSIDs other than NSID 1 (= IPv4 addresses).

*

ttl = integer

Minimum time-to-live in seconds for entries in the primary cache (the cache in the loadable module). The time-to-live of the cache entry grows up to maxttl if the key is used (see below).

*

maxttl = integer

Purge entries from the primary cache if older than maxttl seconds. If both ttl and maxttl are set to zero, the entry will remain in the primary cache forever.

*

keyttl = integer

Absolute time-to-live of a key in seconds.

!Warning: If you use manual keys, the key will be discarded after keyttl seconds and ENskip will no longer be able to send authenticated and encrypted data. If you don't specify filters, ENskip will then communicate in plain text mode...

*

key change time = integer
key change bytes = integer

The lifetime of a transient packet key (Kp) in seconds, and the maximal number of encrypted data bytes. Kp will change after key change time seconds or key change bytes worth of data, whichever comes first.

*

lookuphosts = { IPaddress }

Servers for public keys. Ask them in addition to the packet destination/source.

*

src mkid = AUTO | YES | NO
dst mkid = AUTO | YES | NO

AUTO: Per default, ENskip does not include NSID/MKID in packets where NSID and MKID can be derived from the packet IP source and destination (NSID 1 = IPv4 addresses, MKIDs = packet source and destination).

YES: Include NSID/MKID even if redundant.

NO: Don't include NSID/MKID (don't use this if the remote host runs ENskip).

How to test ENskip

Install it on more than one machine and connect... Sun SKIP implementations are OK for testing, too (see samples/skipd.conf).

tcpdump

In the tcpdump/ directory, you will find a patch for tcpdump. The tcpdump package is available from ftp://ftp.ee.lbl.gov/

Use tcpdump -k to display the contents of SKIP IP packets.

!Note: Under Linux, you will see incoming traffic both encrypted and unencrypted.

Troubleshooting

To detect wrong configurations run the skip_stat tool to query error counters and statistics. skip_dump dumps the primary cache.

Latest versions

The latest ENskip version can be obtained from ftp://ftp.tik.ee.ethz.ch/pub/packages/skip/

Trademarks

Sun, Sun Microsystems, Solaris, SunOP, and the Sun logo are trademarks or registered trademarks of Sun Microsystems, Inc. SunScreen is a trademark of the Internet Commerce Group, a division of Sun Microsystems, Inc. All SPARC trademarks, are trademarks or registered trademarks of SPARC International, Inc. MS-Windows, Windows-NT, Windows 95 are registered trademarks of Microsoft Corp. Postscript is a registered trademark of Adobe Systems Inc. All other product names mentioned herein are the trademarks of their respective owners.

Bugs

As stated in the ENskip 0.50pa "BUGS" file:

"Remember: This is the fourth release of ENskip (pre-alpha 0.50), and still somewhat shaky."

This is also true for this release, albeit to a lesser degree.

This release has been tested under Linux and Solaris ONLY.

The following features are still missing from this release:

The following bugs might have survived my latest tests:

Changes from previous versions

23 May 1997 Version 0.67a

13 Mar 1997 Version 0.66a

19 Feb 1997 Version 0.65a

06 Feb 1997 Version 0.64a

29 Jan 1997 Version 0.63a

15 Jan 1997 Version 0.62a

27 Dec 1996 Version 0.61a

04 Dec 1996 Version 0.60a


Robert Muchsel muchsel@acm.org 25.05.97