Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Octocat-spinner-32 contrib Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 openbsd-compat Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 regress Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 scard Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 .gitignore List of files to ignore
Octocat-spinner-32 CREDITS Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 ChangeLog Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 INSTALL Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 LICENCE Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 Makefile.in Obfuscated handshake implementation
Octocat-spinner-32 OVERVIEW Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 PROTOCOL Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 PROTOCOL.agent Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 README Some documentation improvements
Octocat-spinner-32 README.dns Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 README.obfuscation Some documentation improvements
Octocat-spinner-32 README.platform Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 README.privsep Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 README.smartcard Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 README.tun Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 TODO Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 WARNING.RNG Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 aclocal.m4 Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 acss.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 acss.h Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 addrmatch.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 atomicio.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 atomicio.h Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 audit-bsm.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 audit.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 audit.h Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 auth-bsdauth.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 auth-chall.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 auth-krb5.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 auth-options.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 auth-options.h Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 auth-pam.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 auth-pam.h Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 auth-passwd.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 auth-rh-rsa.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 auth-rhosts.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 auth-rsa.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 auth-shadow.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 auth-sia.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 auth-sia.h Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 auth-skey.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 auth.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 auth.h Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 auth1.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 auth2-chall.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 auth2-gss.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 auth2-hostbased.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 auth2-jpake.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 auth2-kbdint.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 auth2-none.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 auth2-passwd.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 auth2-pubkey.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 auth2.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 authfd.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 authfd.h Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 authfile.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 authfile.h Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 bufaux.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 bufbn.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 buffer.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 buffer.h Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 buildpkg.sh.in Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 canohost.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 canohost.h Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 channels.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 channels.h Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 cipher-3des1.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 cipher-acss.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 cipher-aes.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 cipher-bf1.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 cipher-ctr.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 cipher.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 cipher.h Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 cleanup.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 clientloop.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 clientloop.h Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 compat.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 compat.h Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 compress.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 compress.h Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 config.guess Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 config.h.in Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 config.sub Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 configure Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 configure.ac Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 crc32.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 crc32.h Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 deattack.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 deattack.h Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 defines.h Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 dh.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 dh.h Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 dispatch.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 dispatch.h Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 dns.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 dns.h Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 entropy.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 entropy.h Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 fatal.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 fixpaths Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 fixprogs Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 groupaccess.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 groupaccess.h Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 gss-genr.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 gss-serv-krb5.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 gss-serv.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 hostfile.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 hostfile.h Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 includes.h Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 install-sh Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 jpake.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 jpake.h Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 kex.c Obfuscated handshake implementation
Octocat-spinner-32 kex.h Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 kexdh.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 kexdhc.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 kexdhs.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 kexgex.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 kexgexc.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 kexgexs.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 key.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 key.h Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 log.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 log.h Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 loginrec.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 loginrec.h Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 logintest.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 mac.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 mac.h Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 match.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 match.h Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 md-sha256.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 md5crypt.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 md5crypt.h Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 mdoc2man.awk Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 misc.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 misc.h Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 mkinstalldirs Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 moduli Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 moduli.0 Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 moduli.5 Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 moduli.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 monitor.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 monitor.h Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 monitor_fdpass.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 monitor_fdpass.h Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 monitor_mm.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 monitor_mm.h Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 monitor_wrap.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 monitor_wrap.h Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 msg.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 msg.h Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 mux.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 myproposal.h Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 nchan.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 nchan.ms Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 nchan2.ms Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 obfuscate.c Obfuscated handshake implementation
Octocat-spinner-32 obfuscate.h Obfuscated handshake implementation
Octocat-spinner-32 openssh.xml.in Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 opensshd.init.in Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 packet.c Obfuscated handshake implementation
Octocat-spinner-32 packet.h Obfuscated handshake implementation
Octocat-spinner-32 pathnames.h Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 platform.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 platform.h Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 progressmeter.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 progressmeter.h Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 readconf.c Obfuscated handshake implementation
Octocat-spinner-32 readconf.h Obfuscated handshake implementation
Octocat-spinner-32 readpass.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 rijndael.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 rijndael.h Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 rsa.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 rsa.h Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 scard-opensc.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 scard.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 scard.h Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 schnorr.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 scp.0 Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 scp.1 Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 scp.c Command line options to enable handshake obfuscation
Octocat-spinner-32 servconf.c Obfuscated handshake implementation
Octocat-spinner-32 servconf.h Obfuscated handshake implementation
Octocat-spinner-32 serverloop.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 serverloop.h Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 session.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 session.h Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 sftp-client.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 sftp-client.h Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 sftp-common.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 sftp-common.h Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 sftp-glob.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 sftp-server-main.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 sftp-server.0 Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 sftp-server.8 Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 sftp-server.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 sftp.0 Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 sftp.1 Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 sftp.c Command line options to enable handshake obfuscation
Octocat-spinner-32 sftp.h Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 ssh-add.0 Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 ssh-add.1 Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 ssh-add.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 ssh-agent.0 Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 ssh-agent.1 Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 ssh-agent.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 ssh-dss.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 ssh-gss.h Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 ssh-keygen.0 Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 ssh-keygen.1 Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 ssh-keygen.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 ssh-keyscan.0 Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 ssh-keyscan.1 Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 ssh-keyscan.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 ssh-keysign.0 Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 ssh-keysign.8 Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 ssh-keysign.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 ssh-rand-helper.0 Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 ssh-rand-helper.8 Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 ssh-rand-helper.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 ssh-rsa.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 ssh.0 Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 ssh.1 Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 ssh.c Obfuscated handshake implementation
Octocat-spinner-32 ssh.h Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 ssh1.h Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 ssh2.h Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 ssh_config Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 ssh_config.0 Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 ssh_config.5 Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 ssh_prng_cmds.in Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 sshconnect.c Obfuscated handshake was not correctly enabled when connecting throug…
Octocat-spinner-32 sshconnect.h Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 sshconnect1.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 sshconnect2.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 sshd.0 Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 sshd.8 Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 sshd.c Don't call strlen() on the encrypted banner.
Octocat-spinner-32 sshd_config Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 sshd_config.0 Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 sshd_config.5 Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 sshlogin.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 sshlogin.h Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 sshpty.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 sshpty.h Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 sshtty.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 survey.sh.in Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 ttymodes.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 ttymodes.h Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 uidswap.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 uidswap.h Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 umac.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 umac.h Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 uuencode.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 uuencode.h Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 version.h Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 xmalloc.c Pristine OpenSSH 5.2 portable sources
Octocat-spinner-32 xmalloc.h Pristine OpenSSH 5.2 portable sources
README
Handshake Obfuscation
---------------------

Handshake obfuscation strengthens the initial SSH handshake against systems
that identify or classify various network protocols by examining data in 
transit for static signatures.  Such automatic classification of traffic is 
often used to provide different levels of network service for each protocol
and sometimes used to implement policies which prohibit certain uses of a
network.

When an SSH connection is initiated, the client and server exchange several
packets to configure the cryptographic parameters for the session.  Since
the encryption algorithms and keys have not yet been determined, this exchange
of messages is not encrypted and is vulnerable to analysis which can conclusively
identify the connection as SSH protocol traffic no matter what port the server
is listening on.  For most users this is of no concern, because merely being
able to identify a connection as an SSH session does not introduce any security
vulnerabilities in the protocol itself.

Some users may have special security needs where they would prefer not to 
disclose that they are using the SSH protocol to somebody who may be monitoring
the network.  Handshake obfuscation prevents automatic identification of SSH
protocol traffic by encrypting the entire handshake with a stream cipher, and 
is designed to make it difficult to implement an automated analysis tool even
understanding how the obfuscation protocol works. 

The obfuscation encryption key is generated in a way which is deliberately 
slow to make it difficult to implement on the type of high performance network
hardware which is usually used for classifying protocol traffic.  Additionally
an option is provided for the client and server to share a 'keyword' which is
a simple kind of password that is used only for securing the handshake.  No
connection can be initiated to a server which has keyword obfuscation enabled 
without knowing the keyword, and the obfuscation keyword is used to derive the
keys that encrypt the handshake in order prevent decrypting the handshake 
traffic without knowing the keyword.



Configuration
-------------

Server:

The server configuration for obufscated handshakes adds two new keywords which may
be used in a sshd_config file to enable obfuscation.

    ObfuscatedPort
           This option is similar to the Port option and specifies one or more ports
           on which to listen for obfuscated handshake connections.  Both this option
           and the Port option may be used in the same configuration file to create a
           configuration with both regular and obfuscated listening ports.

    ObfuscateKeyword
           Enables the keyword protected obfuscated handshake which prevents initiating
           a handshake to the server without knowing the keyword.

Client:

The OpenSSH client can be configured to use the obfuscated handshake protocol by passing
command line options as well as through configuration file options.

    -z             Initiate an obfuscated handshake to the remote server.
    -Z keyword     Initiate a keyword protected obfuscated handshake to the remote server.

Two new client configuration file options hve been added.

    ObfuscateHandshake
           Requests that the client use the obfuscated handshake protocol.  The default is 'no'

    ObfuscateKeyword
           Enables keyword protected obfuscated handshake.  The server and client must be
           configured with the same keyword in order to initiate a connection.

Protocol Description
--------------------

The first step in the obfuscation protocol is that the client connects to a port
running the protocol and sends a seed message which is used to derive the keys
for obfuscating the handshake.

#define OBFUSCATE_MAGIC_VALUE        0x0BF5CA7E
#define OBFUSCATE_SEED_LENGTH        16
#define OBFUSCATE_MAX_PADDING        8192


[     16 byte random seed           ][  magic  ][ plength ][ .. plength bytes of random padding ... ]
|___________________________________||______________________________________________________________|
                |                                                   |
            Plaintext                                Encrypted with key derived from seed 

To create the seed message the client first generates 16 pseudo random bytes from which
the handshake obfuscation keys will be derived.  The client also runs the key derivation algorithm
(described below) to initialize the obfuscation cipher.

The 'magic' field and the 'plength' field are 32 bit unsigned values transfered in network byte order (MSB first).

The magic field must contain the constant OBFUSCATE_MAGIC_VALUE and the 'plength' field must
contain a randomly selected value between 0 and OBFUSCATE_MAX_PADDING.  Then 'plength' bytes of
pseudo randomly generated data is appended after the length field.

The purpose of the padding is to prevent a trivial traffic analysis attack which allows the protocol
to be identified my merely observing the size of the first message.

Upon receiving the seed message from the client, the server must extract the seed bytes
and perform the key derivation algorithm (described below) before decrypting the rest of the
message.  Then the server must verify that the magic value is correct and also that the padding length
is below OBFUSCATE_MAX_PADDING.

If these checks fail the server will continue reading and discarding all data until
the client closes the connection without sending anything in response.

Key Derivation
--------------

The key derivation produces a pair of keys (one for each direction) by performing an iterated 
hash function over the random seed value concatenated with a constant value.

A different constant value is used for each direction to guarantee that the two stream ciphers
instances are initialized with unique keys.

#define OBFUSCATE_HASH_ITERATIONS     6000
#define OBFUSCATE_KEY_LENGTH          16

    h = SHA1(seed || constant)

    for(i = 0; i < OBFUSCATE_HASH_ITERATIONS; i++)
        h = SHA1(h);

    key = [first OBFUSCATE_KEY_LENGTH bytes of h]

For traffic from the client to the server the constant is the string "client_to_server"

For traffic from the server to the client the constant is the string "server_to_clint"

Passworded Key Derivation
-------------------------

A configuration option is provided which allows specification of a password which must be specified by a client in order
to initiate a handshake with the server.  This feature should not be considered as strong authentication as it is only
for preventing casual portscanning and fingerprinting of your ssh server.

    h = SHA1(seed || password || constant)


Something went wrong with that request. Please try again.