Cryptography                                                                                        
•        Cryptography - Methods and means used to protect information by
                    changing it into an unreadable format.
•        Cryptography is the general term that encompasses the hiding of data – typically done through
encryption or encoding.
-        Encoding simply rewrites data in another format
-        Encryption uses a predetermined key to rewrite messages.
•        Encryption and encoding can be used together (and often are).
•        When most people talk about encryption, they usually mean using a cipher.
-        Even though ‘cipher’ and ‘encrypt’ are two different terms they are often used synonymously.  
-        For the rest of this class, we will refer to ciphering as encryption.

Encoding                                                                                                
•        Encoding entails taking data in its original format and rewriting it in another format.  Another way to
think of it is using some sort if code to rewrite the data.
-        ASCII is a popular example of using encoding – each character has a respective numeric representation.
-        For example, the ampersand ( & ) character has a numeric value of 38.
-        Hieroglyphics is another example of encoded data.
-        Yet another example is Morse Code:
  _ _ _                __ __ __                _ _ _
     S                        O                        S    
•        Encoding is typically not as secure as encryption.
-        To decode data, you only need a few hints to solve the entire format of how the data is encoded.
-        For example, you see cryptogram puzzles (which often use encryption and encoding together)  in
newspapers of an encoded message – all you have to do is figure out a handful of characters and the rest of
the message falls into place:
                  XTNB LTZ T SCAASQ STXV
                  Mary had _ ______ ____

•        Some encoding is more difficult to break than others.
-        The bottom line is that every time a particular piece of data occurs in a message, it is replaced with the
same encoded representation.
-        This is where encryption comes in.
Encryption                                                                                
•        Encryption involves the use of a key and cipher to encrypt and decrypt a message.  
-        A cipher is a method and or algorithm for encrypting data.
-        Both an algorithm and key must be used for encryption.
-        Using this type of encryption protects the data because even if someone discovers or “cracks” the
algorithm – without the key the data is worthless.
•        The following example of encryption example of needing a key:
-        Let’s say we want to send messages back and forth through a newspaper.  Before doing so, we agree to
use the same edition of Douglas Adams' “Hitchhiker's Guide To The Galaxy”.  This will be our key.
-        Then every week we send messages that consist of code filled with repetitive numbers, such as
‘043002014’.
-        Each number actually stands for page, paragraph and word (043 = page 43, 002 = 2nd paragraph, 014 =
14th word in the paragraph).
-        This example is using both encoding and encryption.  However, even if someone decoded the message (i.
e. they discovered that the code was page+paragraph+word) – the message would be useless to them without
the key (i.e the correct book)!
•        The next step is to break down encryption into two types of encryption: symmetric and asymmetric.
-        Symmetric encryption
-        Asymmetric encryption
Symmetric Encryption                                                                        
•        Symmetric encryption uses the same key to encrypt and decrypt data.
•        Symmetric encryption has two types of ciphers:
-        Block ciphers
-        Stream ciphers
•        Block ciphers break the data into chunks and then encrypt each chunk.
-        Block ciphers typically divide data into 64 to 128 bit chunks.
-        One very popular block cipher is Blowfish.
-        Block ciphers are better suited for, well…blocks of data! (i.e. an entire file, a record from a database,
etc.)
•        Stream ciphers encrypt each bit (or byte) at a time.
-        Stream ciphers are best used for (as the name implies) streams of data.
-        Socket/network connections are ideal candidates for using a stream cipher.
-        RC4 is common type of stream cipher.

•        Block ciphers and stream ciphers are sometimes used together.
•        Regardless of which type of cipher you use, the likelihood of your data being compromised depends
mostly on the size of key used.
-        Given enough time, any key can be broken.  However, the larger the key -- the harder it is to crack.
-        Think of real life – if a doorknob had a key hole 8 inches deep (thus needing a larger key), then it would
be that much more difficult to copy the key or even pick the lock.
-        Obviously then, using 128-bit encryption then is more secure than using 64-bit encryption.
•        Each bit of a key doubles the strength of the encryption.
-        Another way to think of it is taking the number of bits of encryption to the power of 2.
-        For example, 64-bit encryption has 264 possible keys, whereas 128-bit encryption has 2128 possible
keys.
-        Thus, each bit doubles the security.
-        Also, you can think of it this way: 64-bit encryption is 224 times more powerful than 40-bit
encryption (64 – 40 = 24;   thus: 224).

•        Symmetric encryption is faster than asymmetric encryption.  However, the largest downfall of
symmetric encryption is the fact that the same key is used for both encryption and decryption.
-        All someone needs to do is crack the single key.
-        If your key is compromised, someone can:
o        Pose as the sender by encrypting their own data and sending it.
o        Pose as the receiver by decrypting the data received.
•        A major challenge is finding a way to distribute keys safely
-        In order to communicate with someone, you need to distribute your key(s).
-        However, every time you share your key(s), your key(s) become that much less secret.
Cryptography, Encryption
Table of Contents
Copyright (c) 2008.  Intertech, Inc. All Rights Reserved.  This information is to be used exclusively as an
online learning aid.  Any attempts to copy, reproduce, or use for training is strictly prohibited.
Courseware
Training Resources
Tutorials