Title: Cipher Methods
Course: IN 2001 Principle of Information Assurance > Section: Module 8: Chapter Eight

Cipher Methods
1. A plaintext can be encrypted through one of two methods, the bit stream method or the block cipher method.
2. With the bit stream method, each bit in the plaintext is transformed into a cipher bit one bit at a time.
3. In the case of the block cipher method, the message is divided into blocks, for example, sets of 8-, 16-, 32-, or 64-bit blocks and then each block of plaintext bits is transformed into an encrypted block of cipher bits using an algorithm and a key.

Substitution Cipher
1. In encryption, the most commonly used algorithms include three functions: substitution, transposition and exclusive OR.
2. In a substitution cipher, you substitute one value for another.
3. The type of substitution based on a monoalphabetic substitution only uses one alphabet.
4. More advanced substitution ciphers use two or more alphabets and are referred to as polyalphabetic substitutions.
5. An advanced type of substitution cipher that uses a simple polyalphabetic code is the Vigenère cipher.
6. The cipher is implemented using the Vigenère Square, which is made up of 26 distinct cipher alphabets.

Transposition Cipher
1. The transposition cipher (or permutation cipher) simply rearranges the values within a block to create the ciphertext.
2. This can be done at the bit level or at the byte (character) level.
3. Transposition ciphers move these bits or bytes to another location in the block so that the bit or byte in position 1 moves to position 4, and the bit or byte in position 2 moves to position 8 and so on.

Exclusive OR
1. Bit stream methods most commonly use algorithm functions like the exclusive OR operation (XOR), whereas block methods can use substitution, transposition, XOR or some combination of these operations.
2. XOR is a function of Boolean algebra whereby two bits are compared and if the two bits are identical, the result is a binary 0.  If the two bits are NOT the same, the result is a binary 1.

Vernam Cipher
1. Also known as the one-time pad, the Vernam cipher was developed at AT&T and uses a set of characters only one time for each encryption process.
2. To perform the Vernam cipher encryption operation
  - The pad values are added to numeric values that represent the plaintext that needs to be encrypted
  - So, each character of the plaintext is turned into a number and a pad value for that position is added to it
  - The resulting sum for that character is then converted back to a ciphertext letter for transmission
  - When the two are added, if the values exceed 26, then 26 is subtracted from the total. (This is referred to as Modulo 26.)
  - The corresponding results are then converted back to text

Book or Running Key Cipher
1. Another method, made popular by spy movies, involves the use of text in a book as the key to decrypt a message.
2. The cyphertext consists of a list of codes representing the page number, line number and word number of the plaintext word.
3. The receiver must know which book to use.

Hash Functions
1. Hash algorithms are publicly known functions that create a hash value, also known as a message digest, by converting variable-length messages into a single fixed-length value.
2. The message digest is a fingerprint of the author’s message that is to be compared with the receiver’s locally calculated hash of the same message.
3. Hashing functions do not require the use of keys.
4. A message authentication code (MAC), which is essentially a one-way hash value that is encrypted with a symmetric key, may be attached to a message to allow only specific recipients to access the message digest.
5. The recipients must possess the key to access the message digest and to confirm message integrity.
6. The Secure Hash Standard (SHS) is a standard issued by the NIST.
7. Standard document FIPS 180-1 specifies SHA-1 (Secure Hash Algorithm 1) as a secure algorithm for computing a condensed representation of a message or data file.
8. SHA-1 produces a 160-bit message digest, which can then be used as an input to a digital signature algorithm.
9. SHA-1 is based on principles modeled after MD4 (which is part of the MDx family of hash algorithms created by Ronald Rivest).
10. New hash algorithms (SHA-256, SHA-384, and SHA-512) have been proposed by NIST as standards for 128, 192, and 256 bits, respectively.