A great URL is at http:///www.cs.hut.fi/ssh/crypto/intro.html
 

Common Terms

Attacks

Common Crypt Algorithms

Digest

 Like a hash function
    Result should be much shorted than the message
    Should not be possible for me to change the message in some useful way and still have it hash to the same value.
    Should be cheap and easy to compute
    Digest functions are not secret functions -- anyone can compute a message to the same digest .
    Most famous digest algorithm is MD5.
 

Where should crypt fit in the network system?

    Can fit inside each application
        Requires each app to roll its own crypt
        Sometimes nice to have multiple crypt systems to avoid total failure
    Can fit just above TCP (SSL)
        Must be optional for reasons of speed. (encrypted NFS is too slow for binaries, works for user files)
        Gives crypt to all apps that trigger the option
        Gives total protection (or total vulnurability)
 
 

Private Key Crypt

    Works great
    Hard to break
    Quick and easy computationally
    Anyone who knows your key can pretend to be you
    Key distributions almost impossible for large nets
        cannot trust every host between us and them on the inet
        cannot even trust phone lines for high value transactions (ATM and all)
        cannot trust large groups at all.
    Possible to verify shared secret without putting secret on the net via challenge response
    Should not be possible to guess secret key -- netscape bug
    There are several algorithms, each with strengths and weaknesses.
        At least as easy as brute force to break.
        Sometimes much easier.  RSA for instance needs 1024 bit keys!!!! and is vulnerable to chosen plaintext attack.

Public Key Crypt

    Way of encrypting and decrypting messages.
    Uses a PUBLIC KEY and a PRIVATE KEY
    Anything encrypted with one can only be decrypted with the other.
    As hard to break as modular factoring of large primes.
        Best way to do this is to use 10,000 computers from the Inet
        Possibly the CIA has special hardware (but how would I know either way).
    Public Key crypt is SLOW, normally not used for high speed communications.
    Patent issue.
        Is this an algorithm or a math theorm.
        In real life, everyone licenses the same algorithm from RSA
    Keys
        Public keys is product of two large primes
        Private key is the large primes
        Keys should be 100 digit numbers or so.
        At least as easy to break as factoring large numbers.
 

To Sign Something

    Useful for contract or just credit card transaction or cancelbots
    SLOW WAY
        Encrypt using your private key (that's it)
    OR BETTER WAY
        Compute a "digest", which is a hash function of the thing to be signed.
        Encrypt using your private key this digest
        Cannot be done without knowledge of your private key
        Cannot be revoked
 

To distribute keys

    Make very public your public key
    Normally done by a Certificate Authority
        Trusted host with a very very well known public key
        C.A. gives you a CERTIFICATE,
            which is a signed message containing Cert holders name, public key, and a time limit.
        Heirarchiess of C.A. are possible.
        Only top level need be well known.
        Anyone can prove the public key of someone by offering that certificate.
        Certificates are NOT PRIVATE
        Certificates are hard to revoke
        Sometimes don't want cert, but want anonymous secrets (IRC)
        Pick a new key, don't claim to be anybody, and throw key away at end
        Man in the middle attach can fool you easily
 

To send messages

    COMPUTATIONALLY EXPENSIVE WAY:
        Send encyrpted version using your private key
        Receiver decrypts using public key
    CHEAP WAY
        Send a secret random password encrypted with the private key
        send message encrypted with a known algorithm (MD5??) and the secret passwrd
        Receiver reverses to get original
    If you don't trust the net ...
        send an encrypted digest of the message with each message
        Like a CRC, but cannot be computed by a malicous net snoop
    Timestamp stuff
        Thatway, the malicious net owner cannot replay valid messages
        Keeps old ATM messages from handing out new money
    Proxies Web proxies that do not support SSL will not pass SSL
    Web proxies cannot cache SSL traffic
    Dumb attacks
        Netscape sometimes caches SSL data right onto the disk
        Root can look through your memory
        Anyone who finds you absent yet logged in can become YOU
 

Legal things

    Questionable legality
    U.S. export laws used to require 40 bit keys, but were widely broken.
    Other places have other laws (Russia and Saudi Arabia prohibits all encryption, for instance)