Docsity

Conventional Encryption: Principles, Algorithms, and Cipher Block Modes - Prof. John Hamil, Study notes of Cryptography and System Security

Toggle sidebar
bg1
1
Comp 6370 – Lecture 2 – Conventional Encryption
1
Conventional Encryption
Message Confidentiality
Slides modified from Henric Johnson
Blekinge Institute of Technology, Sweden
Comp 6370 – Lecture 2 – Conventional Encryption
2
This course is important
•Computer and Network Se curity is the antithesis
of information warfare.
“War is a mat ter of vital importance to the State;
the province of life or death; the road to survival
or ruin. It is mandatory th at it be thoroughly
studied.”
Sun-Tzu
Comp 6370 – Lecture 2 – Conventional Encryption
3
Administrative Comments
•Honor
•Unless otherwise specifie d, all work is an
individual effort.
•Documentation of Written Work
•Late Penalties
•Project Suggestions
•Other questions
–Cumulative Exams?
–Sharing Notes?
•Pacing the course
Comp 6370 – Lecture 2 – Conventional Encryption
4
Permissions
•Permissions
•Work is not turned in until the permissions are
correct.
•You can ensure your permissions are correct by
executing the following command:
chmod 777 /class/comp6370/<directory>/<filename>
rwx = 4+2+1
Verify permissions by executing:
ls -al /class/comp6370/hw2 /taylorb_hw2.txt.pgp
Comp 6370 – Lecture 2 – Conventional Encryption
5
Factoring Primes
•Homework 3
•Key Generation/Public Ke y Systems
•Factoring means finding a number’s prime
factors
–Product of 2 primes – 5 * 7 = 35
–35 factors into 5 * 7.
–10 = 2 * 5
–60 = 2 * 5 * 2 * 3
•Keep this in mind for our discussion of public key
systems next week.
Comp 6370 – Lecture 2 – Conventional Encryption
6
Outline
Outline
•Conventional Encryption Principles
•Conventional Encryption A lgorithms
•Cipher Block Modes of Op eration
•Location of Encryption Devices
•Key Distribution
pf3
pf4
pf5

Partial preview of the text

Download Conventional Encryption: Principles, Algorithms, and Cipher Block Modes - Prof. John Hamil and more Study notes Cryptography and System Security in PDF only on Docsity!

Comp 6370 – Lecture 2 – Conventional Encryption (^) 1

Conventional Encryption

Message Confidentiality

Slides modified from Henric Johnson Blekinge Institute of Technology, Sweden Comp 6370 – Lecture 2 – Conventional Encryption (^) 2

This course is important

• Computer and Network Security is the antithesis

of information warfare.

“War is a matter of vital importance to the State;

the province of life or death; the road to survival

or ruin. It is mandatory that it be thoroughly

studied.”

Sun-Tzu

Comp 6370 – Lecture 2 – Conventional Encryption (^) 3

Administrative Comments

• Honor

• Unless otherwise specified, all work is an

individual effort.

• Documentation of Written Work

• Late Penalties

• Project Suggestions

• Other questions

  • Cumulative Exams?
  • Sharing Notes?

• Pacing the course

Comp 6370 – Lecture 2 – Conventional Encryption (^) 4

Permissions

• Permissions

• Work is not turned in until the permissions are

correct.

• You can ensure your permissions are correct by

executing the following command:

chmod 777 /class/comp6370//

rwx = 4+2+

Verify permissions by executing:

ls -al /class/comp6370/hw2/taylorb_hw2.txt.pgp

Comp 6370 – Lecture 2 – Conventional Encryption (^) 5

Factoring Primes

• Homework 3

• Key Generation/Public Key Systems

• Factoring means finding a number’s prime

factors

  • Product of 2 primes – 5 * 7 = 35
  • 35 factors into 5 * 7.
  • 10 = 2 * 5
  • 60 = 2 * 5 * 2 * 3

• Keep this in mind for our discussion of public key

systems next week.

Comp 6370 – Lecture 2 – Conventional Encryption (^) 6

Outline Outline

• Conventional Encryption Principles

• Conventional Encryption Algorithms

• Cipher Block Modes of Operation

• Location of Encryption Devices

• Key Distribution

Comp 6370 – Lecture 2 – Conventional Encryption (^) 7

Snake-Oil Cryptography (Matt Curtin)

  • Check out: http://www.interhack.net/people/cmcurtin/snake-oil-faq.html “Trust Us, We Know What We're Doing” Techno-babble Secret Algorithms Revolutionary Breakthroughs Experienced Security Experts, Rave Reviews, and Other Useless Certificates Unbreakability One-Time-Pads Algorithm or product X is insecure Recoverable Keys Exportable from the USA “Military Grade” Comp 6370 – Lecture 2 – Conventional Encryption (^) 8

One-Time Pads and “Venona”

  • One-time pad: a randomly-generated, non-repeating key (length of

the key at least equal to length of the message) is used only once.

  • Perfect secrecy is achieved only with a perfect RNG.
  • Quantum events, such as those measured by a geiger counter are believed to be the only source of truly random information.
  • VENONA was the codename used for the U.S. Signals Intelligence

effort to collect and decrypt the text of Soviet KGB and GRU

messages from the 1940's.

  • The Soviet traffic that was ultimately read under the VENONA project spanned the years 1942-46, efforts to exploit it continued for decades.
    • This was due to the agonizingly slow and difficult process in which sometimes only one or two words at a time were wrenched grudgingly from the code
  • Soviet codebooks during the years in which the main analytic breakthroughs were made (through 1952).
    • It was not until 1953 that a photocopy of a partially burned codebook (recovered by U.S. Military Intelligence in 1945) was discovered to be related to the VENONA cryptographic systems after another cryptanalytic breakthrough.
  • These messages provided extraordinary insight into Soviet attempts to infiltrate the highest levels of the United States Government. http://www.nsa.gov/docs/venona Comp 6370 – Lecture 2 – Conventional Encryption (^) 9

Conventional Encryption Principles

  • An encryption scheme has five ingredients:
    • Plaintext
    • Encryption algorithm
    • Secret Key
    • Ciphertext
    • Decryption algorithm
  • Security depends on the secrecy of the key, not the secrecy of the algorithm Comp 6370 – Lecture 2 – Conventional Encryption (^) 10

Conventional Encryption Principles

Simplified Model of Conventional Encryption -- Stallings Comp 6370 – Lecture 2 – Conventional Encryption (^) 11

Cryptography

  • Classified along three independent dimensions:
    • The type of operations used for transforming plaintext

to ciphertext

  • The number of keys used
    • symmetric (single key)
    • asymmetric (two-keys, or public-key encryption)
  • The way in which the plaintext is processed Comp 6370 – Lecture 2 – Conventional Encryption (^) 12

Average time required for exhaustive

key search

32 232 = 4.3 x 10^9 2.15 milliseconds

168 2168 = 3.7 x 10^50 5.9 x 1030 years

128 2128 = 3.4 x 10^38 5.4 x 10^18 years

56 256 = 7.2 x 10^16 10 hours

Time required at 10^6

Decryption/ μ s

Number of Alternative

Keys

Key Size

(bits)

Comp 6370 – Lecture 2 – Conventional Encryption (^) 19

DES

  • The overall processing at each iteration:
    • Li = Ri-
    • Ri = Li-1 F(Ri-1, Ki)
  • Concerns about:
    • The algorithm and the key length (56-bits)
      • No PUBLISHED weaknesses found in the algorithm
      • 1998 – DES cracker machine built
        • cost = $250,
        • attack length = 3 days

Comp 6370 – Lecture 2 – Conventional Encryption (^) 20

Time to break a code (10^6 decryptions/ μ s)

Comp 6370 – Lecture 2 – Conventional Encryption (^) 21

Triple DEA

  • Use three keys and three

executions of the DES

algorithm (encrypt-decrypt-

encrypt)

  • decrypt stage only for legacy DES decryption - C = ciphertext - P = Plaintext - EK[X] = encryption of X using key K - DK[Y] = decryption of Y using key K
  • Effective key length of 168

bits

  • RFC 3217 C = EK3[DK2[EK1[P]]] Comp 6370 – Lecture 2 – Conventional Encryption (^) 22

Other Symmetric Block Ciphers

  • International Data Encryption Algorithm (IDEA)
    • 128-bit key
    • For the round function uses XOR, addition of 16-bit integers and binary multiplication of 16-bit integers. • These functions are combined in such a way as to produce a complex transformation that is very difficult to analyze and hence very difficult to cryptanalyze.
    • Subkey generation algorithm relies soley on circular shifts in a complex way in order to generate six subkeys for each of the eight rounds of IDEA.
  • Blowfish
    • Easy to implement
      • • High execution speedRun in less than 5K of memory
    • Uses dynamic S-boxes
    • Subkeys Blowfish algorithm to the key and S-boxes produced by repeated application of the
    • A total of 521 executions of the Blowfish algorithm are required to produce subkeys and S-boxes.
      • not suitable for applications where secret key frequently changes Comp 6370 – Lecture 2 – Conventional Encryption (^) 23

Other Symmetric Block Ciphers (RC-5)

  • RC5 (defined in RFC 2040)
    • Suitable for hardware and software
      • uses only computational primitives
    • Fast, simple
      • works on full data words
    • Adaptable to processors of different word lengths
      • of bits in a word is a parameter of RC5– different lengths result

        in different implementations
    • Variable number of rounds
      • also a parameter, allow for trade-offs between speed and security
    • Variable-length key
    • Low memory requirement
      • smart cards and other restricted memory media
    • High security (with appropriate parameters)
    • Data-dependent rotations
      • Circular bit shifts whose amount is data dependent. This to strengthen the algorithm appears Comp 6370 – Lecture 2 – Conventional Encryption (^) 24

CAST-

  • Cast-128 (defined in RFC 2144)
    • Key size from 40 to 128 bits (8 bit increments)
    • The round function differs from round to round
    • Uses fixed S-boxes
      • longer than those in DES
      • nonlinear and believed further resistant to cryptanalysis
    • S-boxes used to generate sub-keys

Comp 6370 – Lecture 2 – Conventional Encryption (^) 25

Conventional Encryption Algorithms

Add. Sub. PGP

XOR, rotation,

fixed S-boxes

40 to 128 16

bits

CAST-

Add. Sub.

XOR, rotation

Blowfish 40 - 448 16

XOR, variable

S boxes, add

IDEA 126 16

Financial Key

PGP S/MIME

XOR, fixed S-

boxes

112 or 48

168 Bits

Triple

DES

XOR, fixed S- SET Kerberos

boxes

DES 56 Bits 16

Mathematical Applications

Operations

Number of

Rounds

Algorithm Key Size

Comp 6370 – Lecture 2 – Conventional Encryption (^) 26

Cipher Block Modes of Operation

  • Cipher Block Chaining Mode (CBC)
    • The input to the encryption algorithm is the XOR of the

current plaintext block and the preceding ciphertext

block.

  • Repeating pattern of 64-bits are not exposed

Equations below verifies the following illustration --

Comp 6370^ Cipher Block Chaining Mode -- Stallings – Lecture 2 – Conventional Encryption (^) 27 IV = initialization vector Comp 6370 – Lecture 2 – Conventional Encryption (^) 28

Location of Encryption Device

  • Link encryption:
    • A lot of encryption devices
    • High level of security
    • Decrypt each packet at every switch
  • End-to-end encryption
    • The source encrypt and the receiver decrypts
    • Payload encrypted
    • Header in the clear
  • High Security: Both link and end-to-end encryption are needed Encryption Across a Packet-Switching Network-- Stallings^ Comp 6370^ –^ Lecture 2^ –^ Conventional Encryption^^29^ Comp 6370^ –^ Lecture 2^ –^ Conventional Encryption^^30

Key Distribution

  1. A key could be selected by A and physically delivered to B.
  2. A third party could select the key and physically deliver it to A and B.
  3. If A and B have previously used a key, one party could transmit the new key to the other, encrypted using the old key.
  4. If A and B each have an encrypted connection to a third party C, C could deliver a key on the encrypted links to A and B.