TauNet Protocol Version 0.1

001 CS 300 Section 1 Fall 2015
002 October 2015
003
004 TauNet Communications Protocol  v0.1
005
006 Abstract
007
008 This document describes a protocol layered atop TCP/IP for
009 the exchange of encrypted messages between TauNet nodes.
010
011 Status Of This Memo
012
013 This document is provided as part of the requirements for
014 TauNet, as specified in Portland State University CS 300
015 Section 1 Fall 2015. While it is formatted in vague
016 accordance with IETF RFC format, it is currently in no way
017 associated with the RFC process.
018
019 Copyright Notice
020
021 Copyright (c) 2015 PSU CS 300 Section 1 Fall 2015 Participants.
022
023 1. Introduction
024
025 TauNet is a project conceived as a class project for PSU CS
026 300 Section 1 Fall 2015. It is intended to allow a
027 pre-defined network of self-contained communication nodes
028 (Raspberry Pis in the initial implementation) to communicate
029 amongst themselves in a fashion secure against outside
030 observation. The TauNet protocol described in this document
031 shall be used for message interchange between communication
032 nodes.
033
034 2. Assumptions
035
036 Messages shall be sent and received using the TCP
037 protocol. A single encryption key shall have been
038 distributed securely to every TauNet node in advance of
039 use. Every TauNet user shall have been pre-assigned a
040 username consisting of 3-12 seven-bit ASCII characters, each
041 either an uppercase letter, a lowercase letter, a digit or a
042 dash symbol “-”. In addition, a table will have been
043 distributed to every TauNet node: this table shall contain a
044 username and corresponding IPv4 address for every TauNet
045 node on the network. All TauNet IP addresses will be
046 statically routable (i.e., not NAT) and will be capable of
047 TCP connection on port 6283.
048
049 3. Protocol
050
051 The TauNet protocol is a layered protocol. A plaintext
052 message shall be marked with header information: the header
053 and message body shall be encrypted using RC4 encryption,
054 and the resulting ciphertext sent to its destination via an
055 ephemeral TCP connection with.
056
057 3.1. Encryption
058
059 Messages shall be encrypted with RC4 encryption.
060
061 The general encryption approach is as described in the
062 CipherSaber document.  For each message, a 16-byte IV will
063 be appended to the TauNet key to create the message key. The
064 IV will be sent as plaintext as the first 16 bytes of the
065 message stream. The IV should vary from message to
066 message. Recommended ways to do this include hardware random
067 generation or the use of a node-internal RC4 stream keyed
068 with a non-shared key to generate IVs.
069
070 Once keyed, 200 iterations of the RC4 generator shall be
071 performed and outputs discarded before using the RC4
072 keystream. Beyond this, each successive keystream byte shall
073 be xor-ed with the next byte of the message plaintext to
074 create a ciphertext byte; this byte shall be transmitted via
075 TCP to the destination.
076
077 3.2 Message Format
078
079 Each TauNet message shall begin with a header section. The
080 end of the header section will be marked by a blank
081 line. Each header will consist of an identifying keyword, a
082 colon, a single space, and the header payload. There are
083 several standard headers, which shall all appear in the
084 order given:
085
086    version: 0.1
087    from: sender’s TauNet username
088    to: receiver's TauNet username
089
090 A sample message:
091
092    version: 0.1
093    from: anne
094    to: bill
095
096    hello neighbor
097
098 The message’s end will be marked by the termination of the
099 TCP stream carrying the message.
100
Last modified: Tuesday, 20 October 2015, 6:41 PM