Domain 6: Cryptography
“the art and science of concealing meaning”
Cryptography
comes from the Greek word meaning “secret
writing”

scrambling some kind of useful information

called plaintext

into a garbled form

called ciphertext

goal is to allow two or more parties to
communicate the information while preventing
other parties from being privy to it
Cryptosystem
set of plaintexts

set of keys

set of ciphertexts

enciphering functions

plaintext * key

deciphering functions

ciphertext * key
Two types of Classical
Ciphers
Transposition

Substitution
Transposition
Rearranges the characters in the plaintext to
form the ciphertext

the letters are not changed
Transposition example
rail fence cipher

composed by writing the plaintext in two rows,
proceeding down, then across
H

E

L

L

O
W

O

R

L

D
then read the ciphertext across, then down
HWEOLRLLOD
Characteristics of a
Transposition Cipher
the same characters used in the plaintext are also
used in the ciphertext

the letters are simply in a different spot (appear
jumbled)
Substitution Cipher
Vxevwlwxwlrq Flskhu
Substitution Cipher
Changes characters in the plaintext to produce
the ciphertext 

Examples

Caesar cipher 

Vigenere Cipher

One-time pad
Caesar cipher
Not very complex

didn’t need to be during the time since few
people knew how to read

therefore it was very effective
KHOOR ZRUOG
-3 letters
HELLO WORLD
Caesar cipher
Too easy to crack!
Substitution and transposition ciphers do not
disguise the linguistic patterns of letters and
word frequency
Solution
Use both substitution and transposition ciphers
together

First encrypt with one then encrypt the
cipher text with the other

Modern computer cryptography has made the
most of this
Vigenere Cipher
Complex substitution cipher

Doesn’t use a one-to-one relationship between each
letter and its substitute

There is a one-to-many relationship between each letter
and its substitute

Based on the table found on the next slide
Vigenere
Vigenere Cipher table
Each row of the table corresponds to a Caesar
cipher

First row is a shift of 0

Second is a shift of 1

Last is a shift of 25
Vigenere Cipher Process
The Vigenere cipher uses the previous table together
with a keyword to encipher a message

Length of the key is called the period of the cipher

Each letter in the keyword is used to determine how
much to shift the corresponding letter in the message
1.Write down the plaintext message
S TUDY STUD YST UDYST UDYS
I WILL PASS THE CISSP EXAM
2.Write keyword above the plaintext, repeated as many
times as necessary
3.In the table, find the intersection of each row (keyword
letter) and column (plaintext letter) to determine the
ciphertext letter
Vigenere
1.Write down the plaintext message
S TUDY STUD YST UDYST UDYS
I WILL PASS THE CISSP EXAM
2.Write keyword above the plaintext, repeated as many
times as necessary
3.In the table, find the intersection of each row (keyword
letter) and column (plaintext letter) to determine the
ciphertext letter
A PCOJ HTMV RZX WLQKI YAYE
Decrypting
Write the keyword repeatedly above the message
A PCOJ HTMV RZX WLQKI YAYE
S TUDY STUD YST UDYST UDYS
Use the keyword letter to pick a column of the table, and
then trace down the column to the row containing the
ciphertext letter
The index of that row is the plaintext letter
Vigenere
Result
S TUDY STUD YST UDYST UDYS

A PCOJ HTMV RZX WLQKI YAYE

I WILL PASS THE CISSP EXAM
Weakness???
Pruvian cavalry officer named Kasiski noticed a weakness

repetitions occur when characters of the key appear
over the same characters in the ciphertext

!
!
Key: VIG VIG VIG VIG VIG

Plaintext: THE BOY HAS THE BAG 

Ciphertext: OPK WWE CIY OPK WIM
Weakness???
The ciphertext repetitions are 9 characters
apart

The key must be a multiple of 9
Key: VIG VIG VIG VIG VIG

Plaintext: THE BOY HAS THE BAG 

Ciphertext: OPK WWE CIY OPK WIM
Weakness???
Examine the text for multiple repetitions

Tabulate their length and the number of characters
between successive repetitions

From the repetitions, establish the probable key
length

Tabulate the characters for each key letter
separately and solve each as a Caesar cipher
Asymmetric Cryptography
Alice and Bob
Want to send a secret message through the
public mail 

Two scenarios…
First approach
Bob gives Alice a copy of his padlock key

Alice puts the secret message in a box

she locks the box using the key padlock

she then sends the box to Bob through regular
mail

when Bob receives the box, he uses his copy of
Alice's key to open the box
Second approach
Alice asks Bob to send his open padlock to her
through regular mail, keeping his key to himself

When Alice receives it she uses it to lock a box
containing her message, and sends the locked
box to Bob

Bob can then unlock the box with his key and
read the message from Alice.
Asymmetric Cryptography
Also referred to as public key cryptography

Concept introduced by Whitfield Diffie and Martin
Hellman in 1976
Basic Idea
Each user has a public key and a private key

Sender and receiver do not need to share a
secret key

All communication involves the public key 

one key "locks" a lock; while the other is
required to unlock it
How can this work?
The two keys are linked to each other
mathematically

The algorithm involves fairly sophisticated
mathematics

numbers theory

finite fields

abelian groups

elliptic curves
Sending a message
The sender would use the receiver’s public key to
encrypt the message

The receiver would then use his private key to decrypt
the message
Advantages
Don’t need to worry about key distribution

Key scalability

each person has one matched key pair

don’t need one distinct key for each
communicating pair of users
Disadvantage
Very slow to process

algorithms are computationally intensive
because of the mathematics involved

can be up to 1000 times slower (in terms of
bytes per second) than symmetric key
algorithms
Solution:
Hybrid Systems
Use symmetric and asymmetric key algorithms
where each is strong
Hybrid Example
Use symmetric key cryptography to encrypt a
long message

Use asymmetric key cryptography to exchange
the symmetric key used in the encryption
process
Asymmetric Key Cryptography Algorithm
First invented by researchers in the British military
but unclassified recently

James Ellis was the cryptographer that is credited with
its creation, but was unable to implement the idea

Clifford Cocks created what is known as the RSA
encryption algorithm out of Ellis’ idea

Considered the most important advance in
cryptography in the past 2000 years
One-Way Function
“forward versus reverse”
Function in which there is an enormous
difference in the time required to perform the
function itself compared to how quickly you can
perform its inverse
Forward
821 x 739 = ?
Reverse
? x ? = 606,719
RSA encryption algorithm
developed by Ron Rivest, Adi Shamir, Leonard
Adleman

based on the fact that you can easily and fairly
quickly multiply two large prime numbers together
but it takes a very long time to factor that number
into its two prime factors

if the product is large enough (500 digits) then there is
a factor of millions or billions difference in time required
Private and Public keys
are mathematically related to each other through one-way
functions

in theory it is possible to derive one from the other
Private and Public keys
to create the key pair you perform the trapdoor in the
fast direction (multiplying the two large prime numbers
together)
Private and Public keys
to crack the private key you must perform the one-way
function in the slow direction

factoring the product into its two prime factors 

the larger the key, the greater the difference between
the efforts necessary to compute the function in the
forward and inverse directions
Another use of
Asymmetric Key
Cryptography
Verify the identity of the sender of a
message
Verify the identity of the
sender
sender of the message would encrypt the message using
his own private key

receiver uses the sender’s public key to decrypt the
message
Another use of
Asymmetric Key
Cryptography
Verify the identity of the sender of a message 

AND

provide confidentiality
Yet
Verify the identity of the sender
and provide confidentiality
involves two encrypting steps

1. encrypt first using the sender’s private key

2. encrypt again using the receiver’s public key

two decrypting steps

1. decrypt with his own private key

2. decrypt again using the sender’s public key
Verify identity of the
sender
Public Key
Private
Key
Private
Key
Public Key
Plaintext
Sender Receiver
Ciphertext
Ciphertext
Ciphertext
Ciphertext
Plaintext
Decrypt
Encrypt
Digital Signatures and
Certificate Authorities
Digital Signatures
Used to authenticate computer-based business
information

Used to 

detect unauthorized modifications to data

authenticate the identity of the creator
Provides Non-repudiation
recipient can use a digital signature to prove to
a third party that the signature was in fact
generated by the signatory
Uses public key
cryptography
private key 

used in creating the digital signature

public key

used in verifying the digital signature
Digital signature
verification
process of checking the digital signature by
reference to the original message and a given
public key
Certificate Authorities
a trusted third party that associates an
identified signer with a specific public key
Certificate Authority

Cryptography Intro - NCL

  • 1.
    Domain 6: Cryptography “theart and science of concealing meaning”
  • 2.
    Cryptography comes from theGreek word meaning “secret writing” scrambling some kind of useful information called plaintext into a garbled form called ciphertext goal is to allow two or more parties to communicate the information while preventing other parties from being privy to it
  • 3.
    Cryptosystem set of plaintexts setof keys set of ciphertexts enciphering functions plaintext * key deciphering functions ciphertext * key
  • 4.
    Two types ofClassical Ciphers Transposition Substitution
  • 5.
    Transposition Rearranges the charactersin the plaintext to form the ciphertext the letters are not changed
  • 6.
    Transposition example rail fencecipher composed by writing the plaintext in two rows, proceeding down, then across H E L L O W O R L D then read the ciphertext across, then down HWEOLRLLOD
  • 7.
    Characteristics of a TranspositionCipher the same characters used in the plaintext are also used in the ciphertext the letters are simply in a different spot (appear jumbled)
  • 8.
  • 9.
    Substitution Cipher Changes charactersin the plaintext to produce the ciphertext Examples Caesar cipher Vigenere Cipher One-time pad
  • 10.
    Caesar cipher Not verycomplex didn’t need to be during the time since few people knew how to read therefore it was very effective
  • 11.
    KHOOR ZRUOG -3 letters HELLOWORLD Caesar cipher
  • 12.
    Too easy tocrack! Substitution and transposition ciphers do not disguise the linguistic patterns of letters and word frequency
  • 13.
    Solution Use both substitutionand transposition ciphers together First encrypt with one then encrypt the cipher text with the other Modern computer cryptography has made the most of this
  • 14.
    Vigenere Cipher Complex substitutioncipher Doesn’t use a one-to-one relationship between each letter and its substitute There is a one-to-many relationship between each letter and its substitute Based on the table found on the next slide
  • 15.
  • 16.
    Vigenere Cipher table Eachrow of the table corresponds to a Caesar cipher First row is a shift of 0 Second is a shift of 1 Last is a shift of 25
  • 17.
    Vigenere Cipher Process TheVigenere cipher uses the previous table together with a keyword to encipher a message Length of the key is called the period of the cipher Each letter in the keyword is used to determine how much to shift the corresponding letter in the message
  • 18.
    1.Write down theplaintext message S TUDY STUD YST UDYST UDYS I WILL PASS THE CISSP EXAM 2.Write keyword above the plaintext, repeated as many times as necessary 3.In the table, find the intersection of each row (keyword letter) and column (plaintext letter) to determine the ciphertext letter
  • 19.
  • 20.
    1.Write down theplaintext message S TUDY STUD YST UDYST UDYS I WILL PASS THE CISSP EXAM 2.Write keyword above the plaintext, repeated as many times as necessary 3.In the table, find the intersection of each row (keyword letter) and column (plaintext letter) to determine the ciphertext letter A PCOJ HTMV RZX WLQKI YAYE
  • 21.
    Decrypting Write the keywordrepeatedly above the message A PCOJ HTMV RZX WLQKI YAYE S TUDY STUD YST UDYST UDYS Use the keyword letter to pick a column of the table, and then trace down the column to the row containing the ciphertext letter The index of that row is the plaintext letter
  • 22.
  • 23.
    Result S TUDY STUDYST UDYST UDYS A PCOJ HTMV RZX WLQKI YAYE I WILL PASS THE CISSP EXAM
  • 24.
    Weakness??? Pruvian cavalry officernamed Kasiski noticed a weakness repetitions occur when characters of the key appear over the same characters in the ciphertext ! ! Key: VIG VIG VIG VIG VIG Plaintext: THE BOY HAS THE BAG Ciphertext: OPK WWE CIY OPK WIM
  • 25.
    Weakness??? The ciphertext repetitionsare 9 characters apart The key must be a multiple of 9 Key: VIG VIG VIG VIG VIG Plaintext: THE BOY HAS THE BAG Ciphertext: OPK WWE CIY OPK WIM
  • 26.
    Weakness??? Examine the textfor multiple repetitions Tabulate their length and the number of characters between successive repetitions From the repetitions, establish the probable key length Tabulate the characters for each key letter separately and solve each as a Caesar cipher
  • 27.
  • 28.
    Alice and Bob Wantto send a secret message through the public mail Two scenarios…
  • 29.
    First approach Bob givesAlice a copy of his padlock key Alice puts the secret message in a box she locks the box using the key padlock she then sends the box to Bob through regular mail when Bob receives the box, he uses his copy of Alice's key to open the box
  • 30.
    Second approach Alice asksBob to send his open padlock to her through regular mail, keeping his key to himself When Alice receives it she uses it to lock a box containing her message, and sends the locked box to Bob Bob can then unlock the box with his key and read the message from Alice.
  • 31.
    Asymmetric Cryptography Also referredto as public key cryptography Concept introduced by Whitfield Diffie and Martin Hellman in 1976
  • 32.
    Basic Idea Each userhas a public key and a private key Sender and receiver do not need to share a secret key All communication involves the public key one key "locks" a lock; while the other is required to unlock it
  • 33.
    How can thiswork? The two keys are linked to each other mathematically The algorithm involves fairly sophisticated mathematics numbers theory finite fields abelian groups elliptic curves
  • 34.
    Sending a message Thesender would use the receiver’s public key to encrypt the message The receiver would then use his private key to decrypt the message
  • 35.
    Advantages Don’t need toworry about key distribution Key scalability each person has one matched key pair don’t need one distinct key for each communicating pair of users
  • 36.
    Disadvantage Very slow toprocess algorithms are computationally intensive because of the mathematics involved can be up to 1000 times slower (in terms of bytes per second) than symmetric key algorithms
  • 37.
    Solution: Hybrid Systems Use symmetricand asymmetric key algorithms where each is strong
  • 38.
    Hybrid Example Use symmetrickey cryptography to encrypt a long message Use asymmetric key cryptography to exchange the symmetric key used in the encryption process
  • 39.
    Asymmetric Key CryptographyAlgorithm First invented by researchers in the British military but unclassified recently James Ellis was the cryptographer that is credited with its creation, but was unable to implement the idea Clifford Cocks created what is known as the RSA encryption algorithm out of Ellis’ idea Considered the most important advance in cryptography in the past 2000 years
  • 40.
    One-Way Function “forward versusreverse” Function in which there is an enormous difference in the time required to perform the function itself compared to how quickly you can perform its inverse
  • 41.
  • 42.
    Reverse ? x ?= 606,719
  • 43.
    RSA encryption algorithm developedby Ron Rivest, Adi Shamir, Leonard Adleman based on the fact that you can easily and fairly quickly multiply two large prime numbers together but it takes a very long time to factor that number into its two prime factors if the product is large enough (500 digits) then there is a factor of millions or billions difference in time required
  • 44.
    Private and Publickeys are mathematically related to each other through one-way functions in theory it is possible to derive one from the other
  • 45.
    Private and Publickeys to create the key pair you perform the trapdoor in the fast direction (multiplying the two large prime numbers together)
  • 46.
    Private and Publickeys to crack the private key you must perform the one-way function in the slow direction factoring the product into its two prime factors the larger the key, the greater the difference between the efforts necessary to compute the function in the forward and inverse directions
  • 47.
    Another use of AsymmetricKey Cryptography Verify the identity of the sender of a message
  • 48.
    Verify the identityof the sender sender of the message would encrypt the message using his own private key receiver uses the sender’s public key to decrypt the message
  • 49.
    Another use of AsymmetricKey Cryptography Verify the identity of the sender of a message AND provide confidentiality Yet
  • 50.
    Verify the identityof the sender and provide confidentiality involves two encrypting steps 1. encrypt first using the sender’s private key 2. encrypt again using the receiver’s public key two decrypting steps 1. decrypt with his own private key 2. decrypt again using the sender’s public key
  • 51.
  • 52.
    Public Key Private Key Private Key Public Key Plaintext SenderReceiver Ciphertext Ciphertext Ciphertext Ciphertext Plaintext Decrypt Encrypt
  • 53.
  • 54.
    Digital Signatures Used toauthenticate computer-based business information Used to detect unauthorized modifications to data authenticate the identity of the creator
  • 55.
    Provides Non-repudiation recipient canuse a digital signature to prove to a third party that the signature was in fact generated by the signatory
  • 56.
    Uses public key cryptography privatekey used in creating the digital signature public key used in verifying the digital signature
  • 57.
    Digital signature verification process ofchecking the digital signature by reference to the original message and a given public key
  • 58.
    Certificate Authorities a trustedthird party that associates an identified signer with a specific public key
  • 59.