home | articles | links | fun | about
Up to: CS432 Information Security

Cryptography, SSH protocol (10/15/02)

Short term vs. long term public keys

Example:

Standard trick:

Secret splitting of private keys

        RSA private key = (d,N) and 
        RSA(d,N) of x = x^d mod N       

        Pick random d1 < N
        d2 = (d - d1) mod N
        x^d1 * x^d2 mod N = x^d mod N

Learning one doesn't compromise the other, must get both

Both tricks (key split, long/short term keys) used in practice

Putting it together: SSH

Designed by friends, and is simple. SSL designed by committee, and is complex.

Purpose: allow secure login sessions, tunneled connection across untrusted network

Skip TCP/IP in this discussion (not interesting from security standpoint, just gets data reliably)

SSH transport protocol: client-to-server connection

Assume server is "well-known", client is quasi-anonymous Steps (high-level, will then discuss in more detail)

  1. client makes TCP connection to server port 22
  2. exchange version info ("SSH-2-OpenSSh_2.5.1")
  3. negotiate algorithms (crypto, compression options)
  4. run key exchange protocol

Algorithm negotiation: Each side sends lists of algs it knows, in preference order

Can send "none" in any area, but not typical.

Also, each side sends 16 random bytes (so each msg is different... use described later)

There is a fixed alg. for combining prefs to choose algorithm.

Key exchange protocol

Standard Diffie-Hellman

If no attacks, then A and B have same K

Key exchange protocol:

[now: client has authenticated server. NOTE: server does NOT authenticate client]

Compute encryption keys: MAC keys, IVs, by hashing

Exchange msgs saying "start using keys now." After this, begin sending encrypted msgs.

Have an encrypted conversation.

Redo key exchange periodically.

SSH User Auth protocol

[Already have secure host-to-host connection, want user-to-host]

Client snds request containing

Same trick: sign fresh H, has random number in it (the 16 random bytes). Use to make sure msgs not replayed.

Host-based method (for hosts that trust each other)

SSH connection protocol

[Have secure user-to-host connection]

Want: multiple user-to-host conn

Make multiple logical connections

Like port numbers in TCP/IP... there aren't separate channels for the ports

Like having a bunch of P.O. boxes at the post office. All mail goes through same channel, rcvrs only pick up msgs that are for them.