0% found this document useful (0 votes)
10 views

12

Cryptography is a method of secure communication that involves encryption and decryption, ensuring data integrity, non-repudiation, and confidentiality. It plays a crucial role in securing digital transactions and complying with privacy regulations. Historical examples of cryptography include the Caesar cipher, the Zimmermann Telegram, and the introduction of public key cryptography in the 1970s.

Uploaded by

coxakef689
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

12

Cryptography is a method of secure communication that involves encryption and decryption, ensuring data integrity, non-repudiation, and confidentiality. It plays a crucial role in securing digital transactions and complying with privacy regulations. Historical examples of cryptography include the Caesar cipher, the Zimmermann Telegram, and the introduction of public key cryptography in the 1970s.

Uploaded by

coxakef689
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 59

What is Cryptography?

1. Secure Communication: Cryptography enables secure communication in the presence of


third parties known as adversaries. It ensures that no one can read the communication
unless they are the intended recipient.

2. Encryption and Decryption: It involves the conversion of plaintext into ciphertext through
encryption and then back to plaintext through decryption using cryptographic keys.

3. Integrity Checks: Cryptography helps ensure data integrity through hash functions and digital
signatures, making sure data has not been altered or tampered with during transmission.

4. Non-repudiation: Through cryptographic techniques, it provides non-repudiation, ensuring


that a sender cannot deny sending a message that they sent, which is especially useful in
legal scenarios.

5. Types and Algorithms: There are many types of cryptography, including symmetric-key
cryptography and asymmetric-key cryptography, employing various algorithms like AES, RSA,
and ECC for different security needs.

Importance in Securing Data

1. Confidentiality: Cryptography is essential for maintaining the confidentiality of digital data,


protecting sensitive information from unauthorized access and breaches.

2. Authentication: It verifies the authenticity of a message, a transaction, or software, proving


that the entities involved are who they claim to be.

3. Secure Transactions: In digital transactions, such as online banking or e-commerce,


cryptography secures the financial details and personal information of the users involved.

4. Regulatory Compliance: Cryptography helps organizations comply with privacy laws and
regulations like GDPR, HIPAA, which mandate the protection of personal and sensitive data.

5. Data Integrity: It ensures that data sent over networks is not altered or destroyed by
unauthorized parties, maintaining its accuracy and consistency throughout its lifecycle.

Historical Examples of Cryptography

1. Caesar Cipher: One of the earliest known uses of cryptography is the Caesar cipher, used by
Julius Caesar to send messages with shifted letters to conceal their content.

2. Scytale: Used by the Spartans, a scytale was a tool used to perform a transposition cipher,
where a strip of parchment was wound around a staff, and the message was written across
it.

3. Zimmermann Telegram: During World War I, the Zimmermann Telegram was a secret
diplomatic communication sent by the German Foreign Office that proposed a military
alliance between Germany and Mexico, which was intercepted and deciphered by the
British, influencing the American decision to enter the war.
4. Navajo Code Talkers: In World War II, the Navajo language was used to create a code that
was never broken by the Japanese, demonstrating a unique use of natural language as a tool
for encryption.

5. Public Key Cryptography: Introduced in the 1970s, public key cryptography revolutionized
secure communication by allowing parties to share a public key for encryption and a private
key for decryption, facilitating secure communications without the need to share a secret
key.

Model of Network Security


Overview of Network Security Models
1. Confidentiality, Integrity, and Availability (CIA) Model: This
foundational model emphasizes three key objectives of network
security: ensuring that data is accessible only to authorized users
(Confidentiality), data is accurate and complete (Integrity), and data
and resources are available when needed (Availability).
2. Parkerian Hexad: Extending the traditional CIA triad, the Parkerian
Hexad includes additional attributes of authenticity (ensuring the
validity of data and transactions), utility (ensuring data usability), and
possession (control over data).
3. Layered Security Model: Often referred to as "defense in depth," this
model layers multiple security measures to protect data, ensuring that
if one layer is compromised, others still provide necessary protection.
4. The OSI Security Architecture: Developed as part of the OSI network
model, it focuses on security attacks, mechanisms, and services layered
according to the OSI model to provide a comprehensive security
approach.
5. ISO/IEC 27001 Standard: This international standard describes a
management model designed to bring information security under
explicit management control through a Security Information
Management System (ISMS).
Explaining the Layered Approach
1. Preventive Layer: This first layer includes measures such as firewalls,
antivirus software, and access controls to prevent unauthorized access
and attacks.
2. Detective Layer: Features tools like intrusion detection systems (IDS)
and network monitoring solutions that identify and report breaches or
potential threats.
3. Corrective Layer: Involves procedures and technologies that kick in
once a security breach is detected, aimed at minimizing the impact of
the attack, such as patch management and incident response teams.
4. Deterrent Layer: Comprises strategies intended to discourage potential
attackers through legal consequences and sanctions or by making
attacks too costly or difficult.
5. Recovery Layer: Focuses on restoring systems and data to normal
operation after a security breach and learning from the incident to
bolster defenses, including backup systems and disaster recovery plans.

Layer 1: Physical
• Function: This layer is responsible for the physical transmission of data
over communication media. It includes the hardware components like
cables, switches, and the electrical signals or light pulses that travel
through them.
• Example: Ethernet cables, fiber optics.
• Security Functions: Includes preventing unauthorized access to network media and
safeguarding the physical infrastructure from attacks and environmental hazards.
• Examples:
• Cable shielding
• Locking devices for ports
• Surveillance cameras and access control systems to secure data centers

Layer 2: Data Link


• Function: Responsible for node-to-node data transfer between two
directly connected nodes. It handles framing, physical addressing, and
error detection.
• Example: Ethernet, PPP.
• Security Functions: Focuses on preventing errors and securing data frames as they travel
from one point to another.
• Examples:

• MAC (Media Access Control) security: Uses MAC filtering and port security.
• Frame authentication and encryption using protocols like IEEE 802.1AE (MACsec).

Layer 3: Network
• Function: Manages the delivery of packets across different networks
and handles routing through intermediary routers. It involves logical
addressing, which ensures that packets reach the correct destination
network.
• Example: IP (Internet Protocol), ICMP.
• Security Functions: Manages device addressing, tracks the path of the data packets, and
implements routing control to prevent unauthorized network access and attacks.
• Examples:

• IPsec for secure Internet Protocol communication through authentication and


encryption.
• Network firewalls and intrusion detection systems (IDS) to monitor and control
incoming and outgoing network traffic.

Layer 4: Transport
• Function: Ensures complete data transfer. This layer manages end-to-
end communication, provides error checking, and ensures that data
arrives in sequence and without loss, duplication, or errors.
• Example: TCP (Transmission Control Protocol), UDP (User Datagram
Protocol).
• Security Functions: Provides communication session management, including the security
of data segments between hosts.
• Examples:

• SSL/TLS for secure connections that encrypt data before it's transmitted over the
internet.
• Transport Layer Security protocols to detect message tampering, message
interception, and forgery.

• Security Functions: Controls the dialogs (sessions) between computers, managing session
setup, maintenance, and termination to prevent unauthorized access during a session.
• Examples:

• VPN (Virtual Private Network) tunnels that secure end-to-end connections.


• Session tokens and cookies which secure user sessions on the web.

Layer 5: Session
• Function: Manages sessions between applications. This layer
establishes, manages, and terminates the connections between the
local and remote application.
• Example: API calls that manage sessions like NFS, SQL, and RPC.
Layer 6: Presentation
• Function: Transforms data to provide a standard interface for the
application layer. Encryption, compression, and translation of data
between different formats are tasks handled here.
• Example: SSL/TLS, MIME.
• Security Functions: Translates, encrypts, and compresses data formats, focusing on the
syntax and semantics of the data transmitted.
• Examples:

• Data encryption standards like AES and DES used for encrypting data before
transmission.
• Secure data translation services that ensure data is appropriately formatted and
secured for communication between different systems.

Layer 7: Application
• Function: Closest to the end user. This layer interacts with software
applications that implement a communicating component. It provides
network services to the applications.
• Example: HTTP, FTP, SMTP.
• Security Functions: Ensures that applications have adequate security measures in place,
including authorization, authentication, and message integrity.
• Examples:

• Application-level firewalls that inspect the data being transmitted to and from an
application.
• Email encryption services, secure file transfer protocols like SFTP and HTTPS, and
various authentication mechanisms like OAuth and SAML.

Active Attacks
Active attacks involve the alteration of data or systems. In these attacks, the
attacker intervenes or alters the communication by inserting, deleting, or
modifying the data. The primary objective is to disrupt the normal
functionality of network services or to gain unauthorized access to perform
malicious actions.
Examples of Active Attacks:
1. Denial-of-Service (DoS) Attacks: An attacker floods the server with an
overwhelming amount of traffic, which renders the service unavailable
to legitimate users. A famous example is the 2016 attack on Dyn, a
major DNS host, which temporarily brought down sites like Twitter,
Netflix, and Reddit.
2. Man-in-the-Middle (MitM) Attacks: These occur when an attacker
intercepts a communication between two systems and alters the
information. A real-world example includes attacks on insecure WiFi
networks, where attackers intercept data being transmitted between
the user’s device and the network.
3. Session Hijacking: Here, the attacker takes control of a user session
after successfully obtaining, for instance, session tokens or cookies. An
example of this would be attackers hijacking a user’s active session to
gain unauthorized access to a banking site.
4. SQL Injection: It involves inserting malicious SQL queries via input data
from the client to the application, aiming to manipulate the backend
database. Real-world examples include attacks on web applications to
steal data like user credentials and financial information.
5. DNS Spoofing: This involves altering DNS records to redirect traffic from
legitimate servers to fake ones, often to steal confidential information.
The attack on Brazilian bank customers in 2016, where DNS cache
poisoning redirected users to malicious websites, is a notable example.
Passive Attacks
Passive attacks involve monitoring or eavesdropping on communications. The
attacker does not modify the content of the communication; instead, they
clandestinely gather information from the system without the user's
knowledge, which is often undetectable.
Examples of Passive Attacks:
1. Traffic Analysis: By intercepting data being transmitted over a network,
attackers can analyze patterns, frequencies, and data sizes to extract
sensitive information. An example would be espionage activities where
attackers gather metadata to track communication patterns.
2. Eavesdropping: This occurs when attackers listen to private
conversations or digital communications. An example includes
"sniffing" attacks on unsecured networks, such as public WiFi, where
attackers capture unencrypted data being transmitted.
3. Wiretapping: Involves connecting to a communication line and listening
to the voice or data passing through it. Historical examples include law
enforcement agencies using legal wiretaps; however, unauthorized
wiretaps have also been used for corporate espionage.
4. Packet Sniffing: Attackers use packet sniffers to capture data packets as
they travel over the network. Real-world examples include the use of
tools like Wireshark by attackers to capture passwords and other
sensitive data on unencrypted networks.
5. Shoulder Surfing: This simple yet effective passive attack involves
looking over someone’s shoulder to get information like passwords and
PINs. It’s often seen in public places like ATMs and during public
transport travel.
Overview of Authentication Mechanisms
1. Knowledge-Based Authentication (KBA): This is the most common form
of authentication that requires the user to provide something they
know, typically a password or PIN. Advanced forms of KBA might
include security questions.
2. Token-Based Authentication: This involves something the user has,
such as a smart card, a key fob, or a software token generated by an
app like Google Authenticator. These tokens produce a one-time code
used to authenticate the user.
3. Biometric Authentication: This method requires something the user is,
based on unique biological traits. Examples include fingerprint
scanning, facial recognition, iris scanning, and voice recognition. These
methods are often used in high-security environments.
4. Multi-Factor Authentication (MFA): Combines two or more
independent credentials: what the user knows (password), what the
user has (security token), and what the user is (biometric verification).
MFA is an effective way to increase the security of user logins.
5. Certificate-Based Authentication: Uses digital certificates to
authenticate an entity. These certificates are typically issued by a
trusted Certificate Authority (CA) and use public key infrastructure (PKI)
to verify the holder's identity.
6. Behavioral Biometrics: This emerging method involves patterns derived
from the user's behavior such as typing rhythm, mouse movements,
and walking patterns. It is typically used continuously during a session
to ensure the authenticated user is still the one in control.
Example of a Typical Authentication Process Flow
Let's take the example of a typical web-based authentication process using a
username and password, enhanced by multi-factor authentication:
1. User Registration: The user creates an account by choosing a username
and password, which are then stored in the database, often hashed for
security.
2. Login Request: The user navigates to the login page and enters their
username and password.
3. Credential Verification:
o The server retrieves the stored password hash corresponding to
the username.
o It hashes the entered password using the same hashing
algorithm and compares it with the stored hash.
o If the hashes match, the password is verified.
4. Multi-Factor Authentication:
o Once the initial password is verified, the server prompts for a
second factor; suppose it's a code from an authenticator app.
o The user opens the app and inputs the code displayed.
o The server verifies the code against what it expects; if it matches,
the second factor is verified.
5. Session Initiation:
o Upon successful verification of all factors, the server initiates a
session for the user.
o It may issue a token or session ID, which is stored in the user's
browser cookies and used for maintaining session state across
multiple requests.
6. Continuous Authentication (if applicable):
o The system might continue to verify the user's identity by
checking behavioral biometrics or re-prompting for the second
factor after a certain period or when suspicious activity is
detected.
Explaining Access Control
Access control is a fundamental security concept that restricts and regulates
who or what can view or use resources in a computing environment. Here’s
an overview of the mechanisms involved:
1. Identification: The initial stage where users claim an identity (e.g.,
username) before accessing a system.
2. Authentication: The system verifies the user’s identity (as discussed
previously) before granting access.
3. Authorization: Determines the resources a user can access and what
actions they can perform with those resources based on predefined
policies.
4. Accountability: Tracks user activities through logging and monitoring,
ensuring that users are held accountable for their actions while
accessing the system resources.
5. Audit: Regular checks and validations to ensure that access control
policies and procedures are followed correctly.
Example of Role-Based Access Control System (RBAC)
RBAC is an approach where access decisions are based on the roles that
individual users have within the organization. Here’s how a typical RBAC
system might work:
1. Role Definition: Roles are defined based on job competencies,
responsibilities, and job needs. For example, roles such as Admin,
Editor, and Viewer could be defined within a company’s content
management system.
2. Assign Roles: Users are assigned roles based on their responsibilities.
For instance, a content manager might be assigned the role of 'Editor',
while an IT support staff might be given 'Admin' role.
3. Permissions Assignment: Permissions to access specific resources are
assigned to roles, not individual users. For example, the 'Editor' role
might have permissions to create, edit, and delete content, whereas
the 'Viewer' role can only view content.
4. Access Decision: When a user attempts to perform an action, the
system checks the permissions of the user's assigned role before
allowing access. If the role has the necessary permissions, the action is
permitted.
5. Enforcement: The system enforces these policies consistently and
uniformly, ensuring that each user can only perform actions that their
assigned roles allow.
Real-World Example:
In a hospital, the RBAC system might assign different access rights to different
roles:
• Doctors: Access to all medical records and the ability to prescribe
medications.
• Nurses: Access to medical records but cannot prescribe medications.
• Administrative Staff: Access only to administrative files and not to
detailed medical records.
Example of RBAC Implementation in an Educational Institution
Here’s a step-by-step example illustrating how RBAC could be implemented:
1. Role Definitions and Assignments:
o System Admin: Manages system-level operations, user accounts,
role assignments, and security policies.
o Registrar: Manages student admissions, enrollment status, and
transcript processing.
o Faculty Member: Manages course content, assignments, grades,
and student performance evaluations.
o Student: Accesses personal academic information, course
materials, and institutional announcements.
2. Permission Assignment:
o System Admins are granted permissions to modify all system and
network settings.
o Registrars are given permissions to edit and update student
records and process requests for transcripts but cannot alter
academic content.
o Faculty Members can upload course materials, record grades,
and view the academic records of their students.
o Students can view personal academic records, course materials,
and submit assignments but cannot see other students' private
data.
3. Access Control Enforcement:
o The RBAC system automatically checks the role of a user
whenever they attempt to access a resource.
o Access decisions are made based on the permissions assigned to
their role.
4. Periodic Review and Adjustment:
o Periodically, the institution reviews role definitions and access
permissions to ensure they align with current educational
standards and privacy regulations.
o Adjustments are made to accommodate changes in policy, new
educational technology integrations, or shifts in staff and student
needs.
5. Security and Compliance:
o The institution ensures that RBAC settings comply with
educational privacy laws such as FERPA (Family Educational
Rights and Privacy Act) in the U.S., which governs access to
educational information and records.
Benefits in Education
• Enhanced Security: Limits access to sensitive information, reducing the
risk of data breaches.
• Operational Efficiency: Streamlines user management by categorizing
access within predefined roles.
• Regulatory Compliance: Eases compliance with laws and regulations by
controlling who can view or manipulate sensitive data.
• Scalability: Facilitates easier management as institutions grow and
roles change over time.
RBAC, by controlling access according to an individual's role within an
educational institution, not only protects sensitive data but also enhances the
operational dynamics by ensuring that all users have access to the resources
they need to fulfill their academic or administrative roles effectively.
Role-Based Access Control (RBAC) can be highly effective in managing the
complex security requirements of a transportation system, where access to
sensitive data and system control must be meticulously controlled to ensure
safety, efficiency, and compliance. In a transportation setting, RBAC helps to
segregate duties and responsibilities across various roles such as dispatchers,
maintenance staff, vehicle operators, and administrators. Here's how RBAC
might be structured and implemented in a transportation system:
Key Roles in a Transportation System
1. Transportation Administrators: High-level access for managing the
entire system, policy settings, and compliance.
2. Operation Managers: Manage day-to-day operations, scheduling, and
emergency responses.
3. Maintenance Staff: Access to maintenance schedules, vehicle health
data, and repair modules.
4. Drivers and Pilots: Access to their specific route information,
operational tasks, and communication tools.
5. Ticketing Agents: Access to fare and ticketing systems, but no access to
operational controls.
6. IT Staff: Access to manage and secure the network and software
systems, without access to operational transportation data unless
necessary.
Example of RBAC Implementation in a Transportation System
Let's consider a city-wide public transportation network that includes buses,
subways, and trams:
1. Role Definitions and Assignments:
o System Administrators: Overall system controls, including user
and role management, and high-level operational changes.
o Dispatch Officers: Manage route assignments, monitor vehicle
locations, and handle communications with drivers.
o Maintenance Engineers: Scheduled and unscheduled
maintenance access, diagnostics, and repair records.
o Drivers: Access to daily route data, operational status, and
emergency alert systems.
o Customer Service Representatives: Manage customer inquiries,
ticketing issues, and access to fare adjustment controls.
2. Permission Assignment:
o System Administrators can modify all system settings, including
route planning and fare structures.
o Dispatch Officers have permissions to view and manage routes,
schedules, and direct communications with drivers.
o Maintenance Engineers can access detailed vehicle diagnostics,
maintenance databases, and update maintenance logs.
o Drivers receive daily operational data relevant only to their
routes and vehicles.
o Customer Service Representatives handle ticketing software and
respond to customer queries without access to vehicle controls.
3. Access Control Enforcement:
o The RBAC system ensures that when users log into the system,
they can only access information and functions that are
necessary for their roles.
o This is enforced through login credentials tied to specific roles
that define what each user can see and do within the system.
4. Audit and Compliance:
o Regular audits are conducted to ensure that access rights are
correctly assigned and that no unauthorized access occurs.
o Compliance with regulatory standards like safety and data
privacy regulations is continuously monitored and enforced.
5. Security and Efficiency:
o By limiting access based on roles, the system enhances security
by reducing the potential for accidental or malicious system
changes.
o Efficiency is improved by ensuring that all personnel have quick
access to the tools and information they need to perform their
roles without unnecessary barriers.
Benefits in Transportation
• Enhanced Security: Reduces the risk of unauthorized access to critical
operational systems.
• Operational Integrity: Ensures that operational data is only modified by
authorized personnel, maintaining the reliability of transportation
schedules and safety.
• Regulatory Compliance: Facilitates adherence to transportation safety
and data security regulations.
• Scalability: Allows for easy addition of new roles and modification of
existing roles as the transportation network evolves or expands.
Implementing RBAC in a transportation system not only secures sensitive
operational data but also streamlines processes, making the management of
complex transportation networks more effective and compliant with
regulatory standards.
Data confidentiality refers to measures implemented to ensure that sensitive
information is accessible only to those authorized to view it. Protecting the
confidentiality of data is crucial for maintaining privacy, securing business
information, ensuring customer trust, and complying with regulatory
requirements. Here are several methods widely used to ensure data
confidentiality:
1. Encryption
• Description: Encryption transforms readable data into a scrambled,
unintelligible format using a secure algorithm and a key. Only those
with the correct key can decrypt and access the original information.
• Application: It is used for both data at rest (e.g., databases, stored files)
and data in transit (e.g., data being transmitted over networks).
2. Access Control
• Description: Access control systems restrict access to data by ensuring
only authorized users can access specific resources. This is often
managed through authentication mechanisms and authorization
policies.
• Application: Employed in software systems, databases, and operating
systems to manage who can view or use the data.
3. Data Masking
• Description: Data masking involves obscuring specific data within a
database to ensure that sensitive information is replaced with fictional
but realistic data. This allows developers and analysts to work with
data without accessing sensitive information.
• Application: Commonly used in development and testing environments
where real data is needed for testing but sensitive information must be
protected.
4. Secure Socket Layer (SSL)/Transport Layer Security (TLS)
• Description: SSL and TLS are protocols that provide secure
communication over a computer network. They use encryption to
protect the data being transmitted, thereby ensuring its confidentiality.
• Application: Widely used on the Internet for securing data transferred
between web browsers and servers, including credit card transactions,
logins, and other personal information.
5. Data Minimization
• Description: Data minimization involves limiting the processing of
personal data to what is strictly necessary for specific purposes. By
reducing the amount of data collected and retained, the risk of
exposure is minimized.
• Application: Enforced by privacy regulations like GDPR, where only
necessary data is collected, and retention periods are limited.
6. Digital Rights Management (DRM)
• Description: DRM is a set of access control technologies that restrict
the usage of proprietary hardware and copyrighted works. It helps
protect the confidentiality of content by controlling how it is used,
copied, and distributed.
• Application: Used by software providers, music and film industries, and
digital media companies to control how their digital content is accessed
and shared.
7. Steganography
• Description: Steganography involves hiding messages within other non-
secret text or data, making the transmission of a message unnoticed.
The objective is to hide the existence of the message.
• Application: Can be used in various digital formats, including images,
videos, and audio files, where data is hidden within these files.
8. End-to-End Encryption (E2EE)
• Description: E2EE encrypts data on the sender's system and only the
recipient is able to decrypt it. No intermediaries, not even the service
providers, can decrypt and read the content.
• Application: Commonly used in messaging apps like WhatsApp and
email services to ensure that only communicating users can read the
messages.
Implementing these methods helps ensure that sensitive data remains
confidential, safeguarding it against unauthorized access, disclosure, and
theft. This is crucial for maintaining the integrity of personal data, corporate
information, and national security information.

Data integrity is a crucial aspect of information security that ensures


information is accurate, reliable, and unaltered during storage, transmission,
or processing. Maintaining the integrity of data is fundamental for the
operational effectiveness of organizations, ensuring the trustworthiness of
their information systems and databases, and for regulatory compliance.
Here are several key points that highlight the importance of data integrity:
Importance of Data Integrity
1. Trust and Reliability: Data integrity ensures that the information is
reliable and can be trusted for making decisions. In sectors like
healthcare, finance, and legal affairs, decisions are heavily reliant on
the accuracy of the data.
2. Regulatory Compliance: Many industries are governed by regulations
that require the maintenance of data integrity. Non-compliance can
result in legal consequences, including fines and loss of reputation.
Examples include GDPR, HIPAA, and Sarbanes-Oxley Act.
3. Security: Integrity is a core component of data security. Compromised
data can lead to security vulnerabilities, making systems susceptible to
attacks such as data breaches or insider threats.
4. Operational Performance: High data integrity is crucial for operational
accuracy and performance. Errors in data can lead to operational
inefficiencies, misallocated resources, and erroneous outcomes.
5. Audit and Traceability: Maintaining data integrity allows for effective
auditing and traceability. This is crucial for detecting fraud,
understanding data lineage, and performing accurate forensic analyses
during security incidents.
Digital Signature Workflow as an Example
A digital signature is an electronic form of a signature that can be used to
verify the authenticity of the signer, as well as to ensure the integrity of the
document signed. Here’s how the digital signature workflow operates:
1. Document Creation: A user creates a document that needs to be
signed.
2. Hashing: The document is hashed, producing a fixed-size string of
bytes. The hash is unique to the document; even a minor change in the
document would result in a completely different hash.
3. Signing the Hash: The sender uses their private key to encrypt the hash.
The encrypted hash, along with other information, such as the hashing
algorithm, is the digital signature.
4. Appending the Signature: The digital signature is then appended to the
document. The document and its signature are sent to the receiver.
5. Verification by the Recipient: Upon receiving the document and the
signature, the recipient uses the sender’s public key to decrypt the
hash. Simultaneously, the recipient generates a new hash of the
received document.
6. Integrity Check: If the decrypted hash matches the newly generated
hash of the document, it confirms that the document has not been
altered in transit. This verifies the integrity of the document.
7. Authentication: If the public key is known to belong to a particular
sender and it successfully decrypts the digital signature, it also
authenticates the document’s source, confirming that it was indeed the
sender who signed it.
The digital signature not only ensures the integrity of the document but also
provides non-repudiation, as it prevents the sender from denying the
authorship of a digitally signed message. This workflow is widely used in
contract signing, financial transactions, software distribution, and in
scenarios where it is critical to validate the authenticity and integrity of the
message or documents.
Cryptography and
Network Security
Module 2: Private Key Cryptography and Number
Theory
Symmetric Encryption
Algorithms
Understanding the Basics of Symmetric
Cryptography
Introduction
• Symmetric encryption uses the same key for both
encryption and decryption, ensuring fast and
efficient data security.
How It Works
1. Key Generation
2. Encryption using a secret key
3. Transmission of ciphertext
4. Decryption using the same secret key
Popular Symmetric Encryption
Algorithms
1. DES (Data Encryption Standard)
2. 3DES (Triple DES)
3. AES (Advanced Encryption Standard)
4. Blowfish
5. Twofish
6. RC4 (Rivest Cipher 4)
DES (Data Encryption Standard)
• Developed in the 1970s
• Uses a 56-bit key
• Operates on 64-bit blocks
• Considered obsolete due to security weaknesses
Introduction
• Data Encryption Standard (DES) is a symmetric-
key encryption algorithm developed by IBM in
the 1970s and later adopted as a standard by
NIST. It was widely used for securing data but is
now considered obsolete.
Key Features of DES
• • Key Size: 56-bit key (plus 8 parity bits)
• • Block Size: 64-bit blocks
• • Uses a Feistel Network with 16 rounds
• • Employs permutation and substitution
techniques
• • Considered insecure due to brute-force attack
vulnerability
How DES Works
• 1. Key Generation: A 56-bit key is used to
generate 16 subkeys.
• 2. Initial Permutation (IP): Rearranges the bits of
the plaintext.
• 3. 16 Rounds of Feistel Function:
• - Expansion (E-Box)
• - XOR with Subkey
• - Substitution (S-Box)
• - Permutation (P-Box)
• 4. Final Permutation (FP): Produces the
ciphertext.
DES Encryption Example
• • Plaintext: 'HELLO123'
• • Binary Representation: 01001000 01000101 ...
• • Key: 133457799BBCDFF1 (Hex)
• • Encryption Steps:
• - Initial Permutation (IP)
• - 16 Rounds of Feistel Transformations
• - Final Permutation (FP)
• • Output Ciphertext (Hex): 85E813540F0AB405
DES Decryption
• • DES decryption follows the reverse process of
encryption.
• • The ciphertext undergoes:
• - Initial Permutation (IP)
• - 16 rounds of Feistel function in reverse order
• - Final Permutation (FP)
• • Recovers the original plaintext.
Why DES is No Longer Secure?
• • Brute-Force Attacks: 56-bit key can be broken
in hours.
• • Vulnerable to cryptanalysis techniques
(Differential & Linear Cryptanalysis).
• • Replaced by stronger encryption algorithms
like AES and Triple DES.
Conclusion
• • DES was a foundational encryption standard
but is now obsolete.
• • Modern security systems use AES and other
stronger algorithms.
• • Secure key management and encryption
techniques are essential for data protection.
Triple DES (3DES)
• Applies DES three times
• Uses a 168-bit key (3x 56-bit keys)
• More secure than DES but slower
• Being phased out due to security concerns
AES (Advanced Encryption
Standard)
• Replaced DES
• Uses 128-bit, 192-bit, or 256-bit keys
• Operates on 128-bit blocks
• Fast, secure, and widely used (SSL, VPNs, Disk
Encryption)
Blowfish
• Alternative to DES
• Key sizes: 32 to 448 bits
• Operates on 64-bit blocks
• Efficient, commonly used in password hashing
(bcrypt)
Twofish
• Successor to Blowfish
• Uses 128-bit, 192-bit, or 256-bit keys
• Operates on 128-bit blocks
• More secure than Blowfish, used in file
encryption
RC4 (Rivest Cipher 4)
• Stream cipher instead of block cipher
• Used in WEP and early SSL/TLS
• Found to have vulnerabilities, now deprecated
Advantages of Symmetric
Encryption
• Fast and efficient
• Strong encryption per bit
• Ideal for large data encryption (VPNs, Disk
Encryption)
Disadvantages of Symmetric
Encryption
• Key distribution is a challenge
• Requires a secure method to share the secret key
• Not scalable for multi-party communication
Use Cases of Symmetric
Encryption
• Disk encryption (BitLocker, VeraCrypt)
• Securing network traffic (SSL/TLS, VPNs)
• Database encryption (AES)
• Wireless security (WPA2 using AES)
Conclusion
• Symmetric encryption remains essential in
cybersecurity. AES is the most widely used
standard due to its balance of speed and security.
Secure key management is critical to its
effectiveness.
23
Introduction to Modular
Arithmetic
• Modular arithmetic deals with numbers
wrapping around a given modulus.
• Used in cryptography, error detection, and
computer science.
• Example: Clock arithmetic (12-hour system).
Definition and Notation
• Given integers a, b, and modulus m:
• a ≡ b (mod m) if (a - b) is divisible by m.
• Example: 17 ≡ 5 (mod 6), since 17 - 5 = 12 is
divisible by 6.
• Important for cryptographic operations like
encryption and hashing.
Properties of Modular
Arithmetic
• Addition: (a + b) mod m = [(a mod m) + (b mod
m)] mod m
• Subtraction: (a - b) mod m = [(a mod m) - (b mod
m)] mod m
• Multiplication: (a × b) mod m = [(a mod m) × (b
mod m)] mod m
• Exponentiation: (a^b) mod m = [(a mod m)^b]
mod m
Modular Inverse
• The modular inverse of a modulo m is an integer
x such that:
• a * x ≡ 1 (mod m)
• Exists if and only if gcd(a, m) = 1.
• Computed using the Extended Euclidean
Algorithm.
• Example: 3⁻¹ mod 7 = 5 since 3 × 5 = 15 ≡ 1 (mod 7).
Modular Exponentiation
• Used in cryptography (RSA, Diffie-Hellman,
ElGamal).
• Direct computation is inefficient for large
numbers.
• Uses Exponentiation by Squaring method:
• a^b mod m = ((a^2 mod m)^(b/2)) mod m.
• Example: Compute 3¹³ mod 7 using squaring.
Applications in Cryptography
• RSA Encryption:
- Public Key: (e, N), where N = p × q.
- Encryption: C = M^e mod N.
- Decryption: M = C^d mod N.
• Diffie-Hellman Key Exchange:
- Secure key sharing using modular
exponentiation.

• Elliptic Curve Cryptography (ECC):


- Works over finite fields using modular
arithmetic.

30
Conclusion
• Modular arithmetic is fundamental in
cryptography.
• Used in encryption, key exchange, and digital
signatures.
• Efficient computation techniques like modular
exponentiation are crucial.
• Understanding number theory helps in secure
algorithm design.
Discrete Logarithm Problem
(DLP)
• A fundamental problem in number theory and
cryptography.
• Basis for cryptographic protocols like Diffie-
Hellman, ElGamal, and DSA.
• Defined in cyclic groups where finding exponents
is difficult.
Mathematical Definition

• Given a prime p, a generator g, and an element h:


• g^x ≡ h (mod p)
• The problem: Find x.
• Works in multiplicative groups and elliptic curve
groups.
Why is DLP Important?

• Used in secure cryptographic protocols.


• Hardness ensures confidentiality in key
exchange.
• Forms the security foundation for many public-
key systems.
Applications of DLP

• 1. Diffie-Hellman Key Exchange - Secure key


agreement.
• 2. ElGamal Encryption - Public key encryption
system.
• 3. Digital Signature Algorithm (DSA) - Secure
digital signatures.
• 4. Elliptic Curve Cryptography (ECC) - Efficient
cryptosystem based on DLP over elliptic curves.
Methods to Solve DLP

• Brute Force: Check all possible values of x


(Exponential Time Complexity).
• Baby-Step Giant-Step Algorithm: Reduces
complexity to O(√p).
• Pollard’s Rho Algorithm: Probabilistic approach,
O(√p).
• Index Calculus Method: Efficient for specific
cases.
• Number Field Sieve (NFS-DL): Best method for
very large primes.
Elliptic Curve Discrete
Logarithm Problem (ECDLP)
• Instead of modular arithmetic, uses elliptic
curves.
• Much harder than classical DLP for the same key
size.
• Enables smaller key sizes with the same security.
• Used in ECC-based cryptographic schemes.
Security & Quantum Computing
Threats
• DLP-based systems are secure today but
vulnerable to quantum attacks.
• Shor’s Algorithm can solve DLP in polynomial
time on a quantum computer.
• Post-Quantum Cryptography is being developed
as a countermeasure.
Summary

• DLP is a key problem in cryptography.


• Ensures security in modern encryption schemes.
• Efficient solutions exist for small cases, but large-
scale DLP remains hard.
• Quantum computing poses a significant future
risk.
References

• 1. Menezes, A., van Oorschot, P., & Vanstone, S.


(1996). Handbook of Applied Cryptography.
• 2. Stallings, W. (2016). Cryptography and
Network Security.
• 3. Boneh, D., & Shoup, V. (2020). A Graduate
Course in Applied Cryptography.

You might also like