Cryptography
Cryptography
1
Learning Objectives
Upon completion of this lecture, student should be
able to:
• Explain the basic principles of cryptography
• Describe the operating principles of the most
popular cryptographic tools
• List and explain the major protocols used for
secure communications.
2
Introduction
Cryptology: the field of science that encompasses
cryptography and cryptanalysis.
Cryptanalysis: the process of obtaining the plaintext
message from a ciphertext message without knowing
the keys used to perform the encryption.
Cryptography: the process of making and using codes
to secure information.
Plaintext or cleartext: The original unencrypted
message that is encrypted and is the result of
successful decryption. 3
Crypto Terminology
Algorithm: The mathematical formula or method
used to convert an unencrypted message into an
encrypted message. This sometimes refers to the
programs that enable the cryptographic processes.
Bit stream cipher: An encryption method that
involves converting plaintext to ciphertext one bit at a
time
Block cipher: An encryption method that involves
dividing the plaintext into blocks or sets of bits and
then converting the plaintext to ciphertext one block
at a time. 4
Crypto Terminology
Cipher: The transformation of the individual components
(characters, bytes, or bits) of an unencrypted message
into encrypted components or vice versa.
NB: when used as a noun, the process of encryption or
the algorithm used in encryption.
7
Crypto Terminology
Steganography: The process of hiding messages; for
example, hiding a message within the digital encoding of
a picture or graphic so that it is almost impossible to
detect that the hidden message even exists.
8
Cipher Methods
There are two methods of encrypting plaintext: the
bit stream method or the block cipher method.
9
Cipher Methods
Bit stream methods commonly use algorithm
functions like the exclusive OR operation (XOR),
whereas block methods can use substitution,
transposition, XOR, or some combination of these
operations.
10
Cipher Methods
Exclusive OR (XOR)
A function within Boolean algebra used as an encryption
function in which two bits are compared.
11
Cipher Methods
Exclusive OR (XOR)
12
Cipher Methods
Example of Exclusive OR (XOR) Encryption
13
Cipher Methods
Substitution Cipher
Substitutes or exchanges one value for another.
Monoalphabetic substitution: only incorporates a
single alphabet in the encryption process.
Polyalphabetic substitution: incorporates two or more
alphabets in the encryption process.
Vigenère cipher: advanced type of substitution cipher
that uses a simple polyalphabetic code; made up of 26
distinct cipher alphabets.
14
Cipher Methods
Transposition Cipher
Also known as a permutation cipher; involves simply
rearranging the values within a block based on an
established pattern.
17
Cipher Methods
Book-Based Ciphers
Uses text from a predetermined book as a key to decrypt a
message.
Book cipher: ciphertext consists of a list of codes representing
page, line, and word numbers of plaintext word.
Running key cipher: uses a book for passing the key to cipher
similar to Vigenère cipher; sender provides encrypted
message with sequence of numbers from predetermined
book to be used as an indicator block.
Template cipher: involves use of hidden message in book,
letter, or other message; requires page with specific number
of holes cut into it. 18
Cipher Methods
Hash Functions
Mathematical algorithms that create a message
summary or digest to confirm message identity and
integrity.
Convert variable-length messages into a single fixed-
length value.
Message Authentication Code (MAC) may be attached
to a message.
Used in password verification systems to store
passwords and confirm the identity of the user. 19
Cryptographic Algorithms
These are often grouped into two broad categories:
symmetric and asymmetric.
20
Cryptographic Algorithms
These are often grouped into two broad categories:
symmetric and asymmetric.
21
Cryptographic Algorithms
Symmetric Encryption
A cryptographic method in which the same algorithm and
“secret” are used both to encipher and decipher the
message; also known as private-key encryption.
Can be programmed into fast computing algorithms and
executed quickly.
Both sender and receiver must possess the same secret
key.
If either copy of the key is compromised, an intermediate
can decrypt and read messages without sender/receiver
knowledge. 22
Cryptographic Algorithms
Symmetric Encryption
Data Encryption Standard (DES): one of the most popular
symmetric encryption cryptosystems.
• 64-bit block size; 56-bit key
23
Cryptographic Algorithms
Symmetric Encryption
Data Encryption Standard (DES): one of the most popular
symmetric encryption cryptosystems.
• 64-bit block size; 56-bit key
24
Cryptographic Algorithms
Example of Symmetric Encryption
25
Cryptographic Algorithms
Asymmetric Encryption
A cryptographic method that incorporates
mathematical operations involving two different keys
(commonly known as the public key and the private
key) to encipher or decipher a message.
26
Cryptographic Algorithms
Asymmetric Encryption
Uses two different but mathematically related keys.
27
Cryptographic Algorithms
Example of Asymmetric Encryption
28
Encryption Key Size
When deploying ciphers, the size of the cryptovariable
or key is very important.
30
Cryptographic Tools
Potential areas of use include:
• Ability to conceal the contents of sensitive
messages.
• Verify the contents of messages and the identities
of their senders.
31
Cryptographic Tools
Public-Key Infrastructure (PKI)
An Integrated system of software, encryption
methodologies, protocols, legal agreements, and
third-party services enabling users to communicate
securely.
PKI systems based on public-key cryptosystems
33
Cryptographic Tools
Digital Signatures
Created in response to rising the need to verify
information transferred via electronic systems.
NB: Asymmetric encryption processes are used to create
digital signatures.
Nonrepudiation: the process that verifies the message
was sent by the sender and thus cannot be refuted.
Digital Signature Standard (DSS) is the NIST standard for
digital signature algorithm usage by federal information
systems. DSS is based on a variant of the ElGamal
signature scheme. 34
Cryptographic Tools
Digital Signatures
Electronic document/container file containing key value
and identifying information about entity that controls key.
36
Hybrid Cryptography Systems
Steganography
The process of hiding messages; for example, hiding a
message within the digital encoding of a picture or graphic
so that it is almost impossible to detect that the hidden
message even exists.
• Also known as the art of secret writing
• Has been used for centuries
• Most popular modern version hides information within
files that contain digital pictures or other images.
Some applications hide messages in .bmp, .wav, .mp3,
and .au files, as well as in unused space on CDs and DVDs.
37
Protocols for Secure Communications
Most of the software currently used to protect the
confidentiality of information are not true
cryptosystems.