Introduction to Data Security and Encryption

The safety afforded to an automated records system in an effort to attain the relevant objectives of retaining the integrity, availability and confidentiality of statistics gadget assets (consists of hardware, software, firmware, data/information, and telecommunications)

Introduction to Data Security and Encryption

Data Security and Encryption

These three ideas shape what is regularly known as the cia triad (figure 1.1). the 3 standards embody the fundamental security targets for both data and for information and computing offerings. flips pub 199 provides a useful characterization of those three goals in phrases of necessities and the definition of a lack of safety in every category:

  • Confidentiality (covers both records confidentiality and privacy): keeping legal regulations on information access and disclosure, including way for protecting personal privateers and proprietary records. a loss of confidentiality is the unauthorized disclosure of data.
  • Integrity (covers each facts and device integrity): guarding against flawed information modification or destruction, and consists of making sure information non-repudiation and authenticity. a lack of integrity is the unauthorized change or destruction of facts.
  • Availability: ensuring timely and reliable get right of entry to and use of information. a loss of availability is the disruption of get entry to or use of facts or an data gadget.

Although the use of the cia triad to define safety targets is properly mounted, some in the security field experience that extra principles are had to present a entire photo.  of the maximum usually stated are:

  • Authenticity: the assets of being actual and being able to be validated and trusted; self-belief inside the validity of a transmission, a message, or message originator.
  • Duty: the security goal that generates the requirement for actions of an entity to be traced uniquely to that entity.


We are able to define 3 levels of effect on organizations or people have to there be a breach of safety (i.e., a loss of confidentiality, integrity, or availability). Those degrees are described in fips pub 199:

  • Low: the loss may be expected to have a restrained damaging effect on organizational operations, organizational assets, or individuals. a restricted destructive impact way that, for example, the loss of confidentiality, integrity, or availability would possibly (i) purpose a degradation in assignment functionality to an volume and length that the employer is able to perform its number one functions, however the effectiveness of the functions is exceptionally decreased; (ii) bring about minor damage to organizational assets; (iii) result in minor economic loss; or (iv) bring about minor harm to people.
  • Mild: the loss could be expected to have a serious detrimental effect on organizational operations, organizational belongings, or people. a extreme destructive impact way that, as an example, the loss might (i) reason a widespread degradation in undertaking capability to an extent and duration that the corporation is capable of perform its primary functions, but the effectiveness of the capabilities is extensively reduced; (ii) bring about tremendous damage to organizational property; (iii) result in enormous financial loss; or (iv) result in giant damage to people that does not contain loss of existence or critical, lifestyles-threatening injuries.
  • High: the loss might be expected to have a severe or catastrophic unfavorable impact on organizational operations, organizational property, or people. a intense or catastrophic unfavorable impact approach that, as an instance, the loss would possibly (i) purpose a severe degradation in or lack of project functionality to an quantity and period that the company is not able to carry out one or extra of its number one features; (ii) bring about main harm to organizational belongings; (iii) bring about foremost financial loss; or (iv) bring about excessive or catastrophic harm to people related to loss of life or severe existence threatening accidents.

Computer security is each captivating and complicated. a number of the reasons observe:

  1. Pc security isn’t always as easy as it’d first seem to the newbie. the necessities seem to be truthful, however the mechanisms used to fulfill those requirements can be quite complex and diffused.
  2. In developing a specific security mechanism or set of rules, one have to continually keep in mind ability attacks (frequently surprising) on those protection functions.
  3. For this reason approaches used to offer precise services are often counter intuitive.
  4. Having designed various protection mechanisms, it’s far important to determine where to apply them.
  5. Security mechanisms generally contain greater than a selected algorithm or protocol, however additionally require members to have secret data, main to issues of introduction, distribution, and safety of that mystery records.
  6. Computer safety is basically a warfare of wits among a wrongdoer who tries to locate holes and the designer or administrator who attempts to shut them.
  7. There is a natural tendency on the part of customers and device managers to perceive little advantage from safety funding till a security failure occurs.
  8. Protection requires ordinary tracking, hard in modern brief-term surroundings.
  9. Protection remains too regularly an afterthought – integrated after the layout is whole.
  10. Many customers / safety directors view sturdy safety as an obstacle to efficient and user-pleasant operation of a data device or use of facts.

Introduction to Encryption


  • plaintext – original message
  • ciphertext – coded message
  • cipher – algorithm for transforming plaintext to ciphertext
  • key – info used in cipher known only to sender/receiver
  • encipher (encrypt) – converting plaintext to ciphertext
  • decipher (decrypt) – recovering ciphertext from plaintext
  • cryptography – study of encryption principles/methods
  • cryptanalysis (codebreaking) – study of principles/ methods of deciphering ciphertext without knowing key
  • cryptology – field of both cryptography and cryptanalysis


Ingredients of the symmetric cipher model

  • plaintext – original message
  • encryption algorithm – performs substitutions/transformations on plaintext
  • secret key – control exact substitutions/transformations used in encryption algorithm
  • ciphertext – scrambled message
  • decryption algorithm – inverse of encryption algorithm


Symmetric Cipher Model

data security and encryption

data security and encryption

  • two requirements for secure use of symmetric encryption:
    • a strong encryption algorithm
    • a secret key known only to sender / receiver
  • mathematically have:

            Y = E(K, X)

            X = D(K, Y)

  • assume encryption algorithm is known
  • implies a secure channel to distribute key



  • objective to recover key not just message
  • general approaches:
    • cryptanalytic attack
    • brute-force attack
  • if either succeed all key use compromised


Cryptanalytic Attacks


  • ciphertext only
    • only know algorithm & ciphertext, is statistical, know or can identify plaintext
  • known plaintext
    • know/suspect plaintext & ciphertext
  • chosen plaintext
    • select plaintext and obtain ciphertext
  • chosen ciphertext
    • select ciphertext and obtain plaintext
  • chosen text
    • select plaintext or ciphertext to en/decrypt

Classical Encryption Techniques

Brute Force Search

  • Brute-force attack involves trying every possible key until an intelligible translation of the ciphertext into plaintext is obtained
  • On average, half of all possible keys must be tried to achieve success
  • Different time is required to conduct a brute-force attack, for various common key sizes
  • Data Encryption Standard(DES) is 56
  • Advanced Encryption Standard (AES) is 128
  • Triple-DES is 168
Classical Encryption Techniques

Classical Encryption Techniques

Classical Substitution Ciphers

  • where letters of plaintext are replaced by other letters or by numbers or symbols
  • or if plaintext is viewed as a sequence of bits, then substitution involves replacing plaintext bit patterns with ciphertext bit patterns

Caesar Cipher

  • First attested use in military affairs of one was by Julius Caesar
  • Still call any cipher using a simple letter shift a caesar cipher, not just those with shift 3.
  • earliest known substitution cipher
  • replaces each letter by 3rd letter on
  • example:

meet me after the toga party


Cryptanalysis of Caesar Cipher

  • With a caesar cipher, there are only 26 possible keys
  • of which only 25 are of any use, since mapping A to A etc doesn’t really obscure the message
  • Note this basic rule of cryptanalysis “check to ensure the cipher operator hasn’t goofed and sent a plaintext message by mistake”!
  • Can try each of the keys (shifts) in turn, until can recognize the original message.
  • Do need to be able to recognize when have an original message (ie is it English or whatever)
  • Usually easy for humans, hard for computers
  • Though if using say compressed data could be much harder.

Classical Encryption Techniques


Monoalphabetic Cipher

  • With only 25 possible keys, the Caesar cipher is far from secure
  • A dramatic increase in the key space can be achieved
  • By allowing an arbitrary substitution, where the translation alphabet can be any permutation of the 26 alphabetic characters
  • A permutation of a finite set of elements S
  • An ordered sequence of all the elements of S, with each element appearing exactly once.
  • In general, there are n! permutations of a set of n
  • rather than just shifting the alphabet
  • could shuffle (jumble) the letters arbitrarily
  • each plaintext letter maps to a different random ciphertext letter
  • hence key is 26 letters long

Plain:  abcdefghijklmnopqrstuvwxyz


Plaintext:  ifwewishtoreplaceletters



Language Redundancy and Cryptanalysis

  • human languages are redundant
  • eg “th lrd s m shphrd shll nt wnt”
  • letters are not equally commonly used
  • in English E is by far the most common letter
    • followed by T,R,N,I,O,A,S
  • other letters like Z,J,K,Q,X are fairly rare
  • have tables of single, double & triple letter frequencies for various languages

Playfair Cipher

  • not even the large number of keys in a monoalphabetic cipher provides security
  • one approach to improving security was to encrypt multiple letters
  • the Playfair Cipher is an example
  • invented by Charles Wheatstone in 1854, but named after his friend Baron Playfair
  • a 5X5 matrix of letters based on a keyword
  • fill in letters of keyword (sans duplicates)
  • fill rest of matrix with other letters
  • using the keyword MONARCHY
classical encryption technique

classical encryption technique

Classical Encryption Techniques



  • Implementing polyalphabetic ciphers by hand can be very tedious
  • Various aids were devised to assist the process.
  • The “Saint-Cyr Slide” was popularized and named by Jean Kerckhoffs
  • Who published a famous early text “La Cryptographie Militaire” (Miltary Cryptography) in 1883
  • He named the slide after the French National Military Academy where the methods were taught
  • He also noted that any slide can be expanded into a tableau, or bent round into a cipher disk
  • The Vigenère Tableau is a complete set of forward shifted alphabet mappings
  • simple aids can assist with en/decryption
  • a Saint-Cyr Slide is a simple manual aid
    • a slide with repeated alphabet
    • line up plaintext ‘A’ with key letter, eg ‘C’
    • then read off any mapping for key letter
  • can bend round into a cipher disk
  • or expand into a Vigenère Tableau

Kasiski Method

  • For some centuries the Vigenère cipher was le chiffre indéchiffrable (the unbreakable cipher)
  • As a result of a challenge, it was broken by Charles Babbage (the inventor of the computer) in 1854
  • but kept secret (possibly because of the Crimean War – not the first time governments have kept advances to themselves!)
  • The method was independently reinvented by a Prussian, Friedrich Kasiski, who published the attack now named after him in 1863.
  • However lack of major advances meant that various polyalphabetic substitution ciphers were used into the 20C
  • One very famous incident was the breaking of the Zimmermann telegram in WW1 which resulted in the USA entering the war
  • If two identical sequences of plaintext letters occur at a distance that is an integer multiple of the keyword length
  • They will generate identical ciphertext sequences
  • In general the approach is to find
    • a number of duplicated sequences,
    • collect all their distances apart,
    • look for common factors,
    • remembering that some will be random flukes and need to be discarded
  • Now have a series of monoalphabetic ciphers, each with original language letter frequency characteristics
  • Can attack these in turn to break the cipher
  • method developed by Babbage / Kasiski
  • repetitions in ciphertext give clues to period
  • so find same plaintext an exact period apart
  • which results in the same ciphertext
  • of course, could also be random fluke
  • eg repeated “VTW” in previous example
  • suggests size of 3 or 9
  • then attack each monoalphabetic cipher individually using same techniques as before

Vernam Cipher

  • The ultimate defense against such a cryptanalysis is to choose a keyword
  • that is as long as the plaintext and has no statistical relationship to it
  • Such a system was introduced by an AT&T engineer named Gilbert Vernam in 1918
  • His system works on binary data (bits0 rather than letters)
  • The essence of this technique is the means of construction of the key
  • Vernam proposed the use of a running loop of tape that eventually repeated the key
  • so that in fact the system worked with a very long but repeating keyword
  • Although such a scheme, with a long key, presents formidable cryptanalytic difficulties
  • it can be broken with sufficient ciphertext, the use of known or probable plaintext sequences, or both

One-Time Pad

  • One-Time Pad is an evolution of the Vernam cipher
  • An Army Signal Corp officer, Joseph Mauborgne, proposed an improvement using a random key
  • that was truly as long as the message, with no repetitions
  • which thus totally obscures the original message
  • It produces random output that bears no statistical relationship to the plaintext
  • Because the ciphertext contains no information whatsoever about the plaintext
  • there is simply no way to break the code
  • since any plaintext can be mapped to any ciphertext given some key

Transposition Ciphers

All the techniques examined so far involve the substitution of a ciphertext symbol for a plaintext symbol. A very different kind of mapping is achieved by performing some sort of permutation on the plaintext letters. This technique is referred to as a transposition cipher, and form the second basic building block of ciphers. The core idea is to rearrange the order of basic units (letters/bytes/bits) without altering their actual values.

Rail Fence cipher

The simplest such cipher is the rail fence technique, in which the plaintext is written down as a sequence of diagonals and then read off as a sequence of rows.

The example message is: “meet me after the toga party” with a rail fence of depth 2.

This sort of thing would be trivial to cryptanalyze.

Row Transposition Ciphers

A more complex transposition cipher is to write the message in a rectangle, row by row, and read the message off shuffling the order of the columns in each row. The order of the columns then becomes the key to the algorithm. In the example shown, the key is 4312567, that is use column 4 first, then column3, then 1 etc (as shown in the Column Out row).

A pure transposition cipher is easily recognized because it has the same letter frequencies as the original plaintext. For the type of columnar transposition just shown, cryptanalysis is fairly straightforward and involves laying out the ciphertext in a matrix and playing around with column positions. Digram and trigram frequency tables can be useful.

Product Ciphers

Have seen that ciphers based on just substitutions or transpositions are not secure, and can be attacked because they do not sufficient obscure the underlying language structure

So consider using several ciphers in succession to make harder.

A substitution followed by a transposition is known as a Product Cipher, and makes a new much more secure cipher, and forms the bridge to modern ciphers.

Rotor Machines

The next major advance in ciphers required use of mechanical cipher machines which enabled to use of complex varying substitutions.

A rotor machine consists of a set of independently rotating cylinders through which electrical pulses can flow. Each cylinder has 26 input pins and 26 output pins, with internal wiring that connects each input pin to a unique output pin. If we associate each input and output pin with a letter of the alphabet, then a single cylinder defines a monoalphabetic substitution. After each input key is depressed, the cylinder rotates one position, so that the internal connections are shifted accordingly. The power of the rotor machine is in the use of multiple cylinders, in which the output pins of one cylinder are connected to the input pins of the next, and with the cylinders rotating like an “odometer”, leading to a very large number of substitution alphabets being used, eg with 3 cylinders have 263=17576 alphabets used.

They were extensively used in world war 2, and the history of their use and analysis is one of the great stories from WW2.