Is CH1
Is CH1
Introduction
Main points:
Introduction,
OSI security architecture
Secure design principles
A model for network security
Classic Crypto: Substitution
Transposition ciphers
Taxonomy of Cryptography and Cryptanalysis.
Security Services
A security service is a capability that supports one or more of the security
requirements (confidentiality, integrity, availability, authenticity, and
accountability). Security services implement security policies and are
implemented by security mechanisms. A service that enhances the
security of data processing systems and information transfers. X.800
divides the services into five categories
Data Confidentiality
Data Integrity
Authentication
Access Control
Non-repudiation
Authentication:
The authentication service is concerned with assuring that a
communication is authentic. In the case of a single message, such as a
warning or alarm signal, the function of the authentication service is to
assure the recipient that the message is from the source that it claims to
be from. In the case of an ongoing interaction, such as the connection of
a client to a server, two aspects are involved. First, at the time of
connection initiation, the service assures that the two entities are
authentic, that is, that each is the entity that it claims to be. Second, the
service must assure that the connection is not interfered with in such a
way that a third party can masquerade as one of the two legitimate
parties for the purposes of unauthorized transmission or reception. Two
specific authentication services are defined in X.800:
■ Peer entity authentication: Provides for the corroboration of the
identity of a peer entity in an association. Two entities are considered
peers if they implement the same protocol in different systems; for
example, two TCP modules in two communicating systems. Peer entity
authentication is provided for use at the establishment of, or at times
during the data transfer phase of, a connection. It attempts to provide
confidence that an entity is not performing either a masquerade or an
unauthorized replay of a previous connection.
■ Data origin authentication: Provides for the corroboration of the
source of a data unit. It does not provide protection against the
duplication or modification of data units. This type of service supports
applications like electronic mail, where there are no ongoing interactions
between the communicating entities.
Access Control
In the context of network security, access control is the ability to limit and
control the access to host systems and applications via communications
links. To achieve this, each entity trying to gain access must first be
identified, or authenticated, so that access rights can be tailored to the
individual.
Data Confidentiality
Confidentiality is the protection of transmitted data from passive attacks.
With respect to the content of a data transmission, several levels of
protection can be identified. The broadest service protects all user data
transmitted between two users over a period of time. For example, when
a TCP connection is set up between two systems, this broad protection
prevents the release of any user data transmitted over the TCP
connection. Narrower forms of this service can also be defined, including
the protection of a single message or even specific fields within a
message. These refinements are less useful than the broad approach and
may even be more complex and expensive to implement.
The other aspect of confidentiality is the protection of traffic flow from
analysis. This requires that an attacker not be able to observe the source
and destination, frequency, length, or other characteristics of the traffic
on a communications facility.
Data Integrity
As with confidentiality, integrity can apply to a stream of messages, a
single message, or selected fields within a message. Again, the most
useful and straightforward approach is total stream protection. A
connection-oriented integrity service, one that deals with a stream of
messages, assures that messages are received as sent with no
duplication, insertion, modification, reordering, or replays. The destruction
of data is also covered under this service. Thus, the connection-oriented
integrity service addresses both message stream modification and denial
of service. On the other hand, a connectionless integrity service, one that
deals with individual messages without regard to any larger context,
generally provides protection against message modification only. We can
make a distinction between service with and without recovery. Because
the integrity service relates to active attacks, we are concerned with
detection rather than prevention. If a violation of integrity is detected,
then the service may simply report this violation, and some other portion
of software or human intervention is required to recover from the
violation. Alternatively, there are mechanisms available to recover from
the loss of integrity of data, as we will review subsequently. The
incorporation of automated recovery mechanisms is, in general, the more
attractive alternative.
Nonrepudiation
Nonrepudiation prevents either sender or receiver from denying a
transmitted message. Thus, when a message is sent, the receiver can
prove that the alleged sender in fact sent the message. Similarly, when a
message is received, the sender can prove that the alleged receiver in
fact received the message.
Availability Service
Availability is the property of a system, or a system resource being
accessible and usable upon demand by an authorized system entity,
according to performance specifications for the system (i.e., a system is
available if it provides services according to the system design whenever
users request them). A variety of attacks can result in the loss of or
reduction in availability. Some of these attacks are amenable to
automated countermeasures, such as authentication and encryption,
whereas others require some sort of physical action to prevent or recover
from loss of availability of elements of a distributed system.
Security Mechanisms
A process that is designed to detect, prevent or recover from the security
attack
Types of security mechanisms are:
Encipherment (Cryptographic Algorithms)
Digital signature
Data Integrity mechanism
Authentication exchange
Traffic Padding
Routing control
Notarization
Access control mechanism
■ Cryptographic algorithms: We can distinguish between reversible
cryptographic mechanisms and irreversible cryptographic mechanisms. A
reversible cryptographic mechanism is simply an encryption algorithm
that allows data to be encrypted and subsequently decrypted. Irreversible
cryptographic mechanisms include hash algorithms and message
authentication codes, which are used in digital signature and message
authentication applications.
■ Data integrity: This category covers a variety of mechanisms used to
assure the integrity of a data unit or stream of data units.
■ Digital signature: Data appended to, or a cryptographic
transformation of, a data unit that allows a recipient of the data unit to
prove the source and integrity of the data unit and protect against
forgery.
■ Authentication exchange: A mechanism intended to ensure the
identity of an entity by means of information exchange.
■ Traffic padding: The insertion of bits into gaps in a data stream to
frustrate traffic analysis attempts.
■ Routing control: Enables selection of particular physically or logically
secure routes for certain data and allows routing changes, especially
when a breach of security is suspected.
■ Notarization: The use of a trusted third party to assure certain
properties of a data exchange.
■ Access control: A variety of mechanisms that enforce access rights to
resources.
Cryptography
Cryptography is a branch of mathematics that deals with the
transformation of data. Cryptographic algorithms are used in many ways
in information security and network security. Cryptography is an essential
component in the secure storage and transmission of data, and in the
secure interaction between parties.
Cryptographic algorithms can be divided into three categories :
■ Keyless: Do not use any keys during cryptographic
transformations.
■ Single-key: The result of a transformation is a function of the
input data and a single key, known as a secret key.
■ Two-key: At various stages of the calculation, two different but
related keys are used, referred to as a private key and a public key.
Cryptosystem
Shif-by-n-cipher
The Shift-by-n Cipher, also known as the Caesar Cipher, is one of the
simplest and oldest encryption techniques. Each letter in the plaintext is
shifted by a fixed number nnn down or up the alphabet.
The encryption can be represented using modular arithmetic by first
transforming the letters into numbers, according to the scheme, A = 0, B
= 1,…, Z = 25. Encryption of a letter by a shift n can be described
mathematically as.
E(x)=(x+n) mod 26 (Encryption Phase with shift n)
D(x)=(x-n) mod 26 (Decryption Phase with shift n)
Monoalphabetic Cipher
A Monoalphabetic Cipher replaces each letter of the plaintext with
another letter, where the substitution pattern is fixed throughout the
message. Unlike Caesar Cipher, the mapping is arbitrary but consistent.
Algorithm:
1. Create a substitution rule (mapping one letter to another).
2. For each letter in the plaintext, substitute it with the corresponding
letter from the substitution rule.
3. The resulting text is the ciphertext.
Cryptography:
Cryptography is broadly classified based on the techniques and the types
of keys used. It can be categorized into two main types: Symmetric
Key Cryptography and Asymmetric Key Cryptography. Additionally,
it can also be classified by the mode of encryption (block ciphers, stream
ciphers) and purpose (data encryption, digital signatures, authentication).
A. Types of Cryptography
1. Symmetric Key Cryptography (Private-Key Cryptography):
Definition: Symmetric cryptography uses the same key for both
encryption and decryption.
Properties:
o Fast and efficient.
o Requires secure key exchange to avoid compromise.
o Used for bulk data encryption (e.g., secure communications,
storage).
Examples: AES (Advanced Encryption Standard), DES (Data
Encryption Standard), 3DES, Blowfish, IDEA.
Example:
If Alice wants to send an encrypted message to Bob using a symmetric
algorithm, they both need the same secret key. Alice uses this key to
encrypt the message, and Bob uses the same key to decrypt it. If an
attacker intercepts the key, they can decrypt the message.
2. Asymmetric Key Cryptography (Public-Key Cryptography):
Definition: Uses two keys — a public key for encryption and a
private key for decryption. The public key is shared, while the
private key is kept secret.
Properties:
o Slower than symmetric key algorithms.
o Solves the key distribution problem since public keys can be
shared openly.
o Primarily used for key exchange, digital signatures, and
authentication.
Examples: RSA, Diffie-Hellman, Elliptic Curve Cryptography (ECC),
ElGamal.
Example:
If Alice wants to send an encrypted message to Bob using an asymmetric
algorithm, she will use Bob's public key to encrypt the message. Bob will
then use his private key to decrypt the message. Even if an attacker
intercepts the message, they won’t be able to decrypt it without Bob's
private key.
3. Hash Functions:
Definition: Hash functions take an input (message) and return a
fixed-size string, called a hash or digest. These functions are one-
way and collision-resistant, meaning it’s computationally hard to
find two inputs with the same hash value.
Purpose: Mainly used for data integrity, digital signatures, and
password storage.
Examples: MD5 (obsolete), SHA-1 (deprecated), SHA-2 (still secure),
SHA-3.
Example:
If Alice wants to ensure that a file she sends to Bob has not been altered
during transmission, she could generate a hash of the file and send it
along with the file. When Bob receives the file, he can compute the hash
and compare it with Alice’s hash to check for integrity.
B. Types of Encryption Based on Modes of Operation
1. Block Ciphers: Encrypts data in fixed-size blocks (e.g., 128 bits).
Popular for bulk data encryption.
o Example: AES, DES.
2. Stream Ciphers: Encrypts data as a stream of bits or bytes, usually
bit by bit.
o Example: RC4, A5/1 (used in GSM encryption).
C. Uses of Cryptography
1. Encryption: Secures communication by transforming plaintext into
ciphertext.
2. Authentication: Verifies the identity of a party (e.g., digital
signatures).
3. Integrity: Ensures the data has not been altered (e.g., hash
functions).
4. Non-repudiation: Ensures a party cannot deny having sent a
message (e.g., digital signatures).
Cryptanalysis:
Cryptanalysis is the study of analysing cryptographic systems to find
vulnerabilities, weaknesses, or flaws. It involves techniques to break
ciphers or recover information without access to the secret key.
A. Types of Cryptanalysis
1. Ciphertext-only Attack:
Definition: The attacker has access only to the ciphertext and must
deduce the plaintext or the key used in encryption.
Difficulty: Harder than other attack types because there’s minimal
information available.
Example:
If an attacker intercepts encrypted messages without knowing the key or
the plaintext, they can attempt to analyse patterns in the ciphertext to
guess the encryption scheme and eventually the key.
2. Known-plaintext Attack:
Definition: The attacker has access to both the plaintext and the
corresponding ciphertext. Using this information, they attempt to
deduce the encryption key.
Difficulty: Easier than a ciphertext-only attack because the attacker
can use the known plaintext-ciphertext pair to uncover the key.
Example:
If an attacker knows that part of the ciphertext corresponds to the
plaintext "HELLO", they can use this information to reverse-engineer the
encryption method or key.
3. Chosen-plaintext Attack:
Definition: The attacker can choose arbitrary plaintexts to be
encrypted and then has access to the corresponding ciphertexts.
The goal is to deduce the key or encryption method.
Difficulty: Even easier because the attacker can deliberately choose
specific plaintexts to maximize the effectiveness of their analysis.
Example:
An attacker can send specific plaintexts like "AAAAA" or "HELLO" to an
encryption oracle, get the corresponding ciphertext, and use this
information to find patterns in the encryption method.
4. Chosen-ciphertext Attack:
Definition: The attacker can choose arbitrary ciphertexts and obtain
their corresponding decrypted plaintexts. This allows them to
attempt to reverse the encryption process and discover the key.
Difficulty: One of the most dangerous types of attacks because the
attacker has the most control.
Example:
An attacker might send specific ciphertexts to a decryption oracle, receive
the plaintext, and analyse how the decryption works to infer the
encryption key or exploit vulnerabilities.
5. Brute-force Attack:
Definition: The attacker tries all possible keys until the correct one
is found.
Difficulty: The effectiveness depends on the key length. For
example, shorter keys (e.g., in DES with a 56-bit key) are vulnerable
to brute-force attacks because modern computers can try many
combinations quickly.
Example:
If an attacker knows the encryption algorithm being used and wants to
decrypt a message, they might try every possible key until they find one
that successfully decrypts the message.
6. Side-channel Attack:
Definition: This type of attack exploits physical information (e.g.,
power consumption, timing information, electromagnetic leaks) to
find the encryption key.
Difficulty: Often requires specialized knowledge and equipment.
Example:
By measuring how long it takes a device to perform encryption operations
or analyzing power usage during the encryption process, an attacker
might be able to deduce the key.
7. Man-in-the-Middle Attack:
Definition: The attacker intercepts and potentially alters
communication between two parties who believe they are
communicating directly with each other.
Example: Diffie-Hellman key exchange is vulnerable to this if the
exchange is not authenticated. An attacker could intercept the keys
being exchanged and substitute their own keys, allowing them to
decrypt messages and re-encrypt them to pass to the other party.