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

Computer Security Assignment

assignment

Uploaded by

necafo6170
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Computer Security Assignment

assignment

Uploaded by

necafo6170
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

 list and explain various security attacks

Here are some common types of security attacks and a brief explanation of each:

1. Malware: Malicious software designed to harm or exploit any programmable device, service, or
network. Examples include viruses, worms, trojans, ransomware, and spyware1.

2. Phishing: A technique where attackers send fraudulent messages, often via email, to trick individuals into
revealing sensitive information such as passwords or credit card numbers1.

3. Denial-of-Service (DoS) and Distributed Denial-of-Service (DDoS) Attacks: These attacks aim to overwhelm a
system, making it unavailable to users. DoS attacks use a single source, while DDoS attacks use multiple
compromised systems to flood the target2.

4. Man-in-the-Middle (MITM) Attacks: An attacker intercepts and possibly alters the communication between two
parties without their knowledge. This can be used to steal data or inject malicious content2.

5. SQL Injection: An attack where malicious SQL code is inserted into a query to manipulate the database, allowing
attackers to view, modify, or delete data3.

6. Cross-Site Scripting (XSS): An attack where malicious scripts are injected into trusted websites. These scripts can
then execute in the user’s browser, potentially stealing information or performing actions on behalf of the user 3.

7. Brute-Force Attacks: An attacker attempts to gain access to a system by systematically trying all possible
passwords or keys until the correct one is found3.

8. Drive-by Downloads: Malware is automatically downloaded to a user’s device without their knowledge when
they visit a compromised website3.

9. Social Engineering: Manipulating individuals into divulging confidential information or performing actions that
compromise security. This can include tactics like pretexting, baiting, and tailgating1.

10. Insider Threats: Security risks that originate from within the organization, often involving employees or
contractors who have access to sensitive information1.

These are just a few examples, but there are many other types of security attacks out there. It’s important to stay
informed and implement robust security measures to protect against these threats.
 explain the des alogorithgm in detail
=

The Data Encryption Standard (DES) is a symmetric-key block cipher that was developed in the early 1970s by IBM and
later adopted by the National Institute of Standards and Technology (NIST). Here’s a breakdown of how DES works:

Key Features

 Symmetric Key: DES uses the same key for both encryption and decryption.

 Block Cipher: It processes data in fixed-size blocks, specifically 64-bit blocks.

 Key Length: The effective key length is 56 bits, although the initial key is 64 bits (8 bits are used for parity
checks).

Encryption Process

1. Initial Permutation (IP): The 64-bit plaintext block undergoes an initial permutation, which rearranges the bits
according to a predefined table.

2. Rounds: The permuted block is divided into two halves, Left Plain Text (LPT) and Right Plain Text (RPT). These
halves go through 16 rounds of processing. Each round involves:

o Expansion: The RPT is expanded from 32 bits to 48 bits.

o Key Mixing: The expanded RPT is XORed with a subkey derived from the main key.

o Substitution: The result is passed through substitution boxes (S-boxes) to reduce it back to 32 bits.

o Permutation: The output is permuted again.

o Combination: The result is combined with the LPT using XOR.

3. Final Permutation (FP): After 16 rounds, the halves are recombined and a final permutation is applied to
produce the 64-bit ciphertext.

Decryption Process

The decryption process is essentially the reverse of encryption, using the same key and steps but in reverse order.

Security

While DES was widely used, its 56-bit key length makes it vulnerable to brute-force attacks with modern computing
power. It has largely been replaced by more secure algorithms like AES (Advanced Encryption Standard).
 distinguish between a substitution cipher and transposition cipher

Substitution Cipher Technique Transposition Cipher Technique

In substitution Cipher Technique, plain text In transposition Cipher Technique, plain text
characters are replaced with other characters, characters are rearranged with respect to the
numbers and symbols. position.

Substitution Cipher’s forms are: Mono Transposition Cipher’s forms are: Key-less
alphabetic substitution cipher and poly transposition cipher and keyed transposition
alphabetic substitution cipher. cipher.

In substitution Cipher Technique, character’s While in transposition Cipher Technique, The


identity is changed while its position remains position of the character is changed but
unchanged. character’s identity is not changed.

While in transposition Cipher Technique, The


In substitution Cipher Technique, The letter
Keys which are nearer to correct key can
with low frequency can detect plain text.
disclose plain text.

The example of substitution Cipher is Caesar The example of transposition Cipher is Rail
Cipher, monoalphabetic cipher, and Fence Cipher, columnar transposition cipher,
polyalphabetic cipher. and route cipher.

Involves replacing plaintext letters or groups of


Involves rearranging the order of the
letters with ciphertext letters or groups of
plaintext letters or groups of letters according
letters according to a specific algorithm or
to a specific algorithm or key.
key.

The frequency distribution of the plaintext


The frequency distribution of the plaintext
letters remains the same, but the order is
letters is typically obscured, but patterns can
scrambled, making it difficult to detect
still be detected with statistical analysis.
patterns with statistical analysis.

Vulnerable to frequency analysis attacks,


Less vulnerable to frequency analysis
where the most commonly used letters or letter
attacks, but still susceptible to attacks such
combinations in the language can be identified
as brute force and known plaintext attacks.
and used to deduce the key.

Relatively easy to understand and implement, Can be more difficult to implement and
making it suitable for simple applications. understand, but can be more secure than
substitution ciphers for certain applications.
 what is the need of public key cryptography with respect to private key cryptograohy? Explain rsa
algorithm

=Need for Public Key Cryptography

Public key cryptography (asymmetric cryptography) and private key cryptography (symmetric cryptography) serve
different purposes and have distinct advantages:

1. Key Distribution:

o Private Key Cryptography: Requires both parties to share the same secret key, which can be challenging
to distribute securely.

o Public Key Cryptography: Uses a pair of keys (public and private). The public key can be shared openly,
while the private key remains confidential, simplifying secure key distribution.

2. Security:

o Private Key Cryptography: If the shared key is compromised, the entire communication is at risk.

o Public Key Cryptography: Even if the public key is known, the private key remains secure, ensuring the
confidentiality of the communication.

3. Scalability:

o Private Key Cryptography: Requires a unique key for each pair of communicating parties, leading to a
large number of keys.

o Public Key Cryptography: Each user has a single pair of keys, reducing the number of keys needed.

RSA Algorithm

The RSA algorithm is a widely used public key cryptosystem that enables secure data transmission. Here’s a simplified
explanation:

1. Key Generation:

o Select two large prime numbers, ( p ) and ( q ).

o Compute ( n = p \times q ). ( n ) is used as the modulus for both the public and private keys.

o Calculate the totient function, ( \phi(n) = (p-1) \times (q-1) ).

o Choose an integer ( e ) such that ( 1 < e < \phi(n) ) and ( e ) is coprime with ( \phi(n) ). ( e ) becomes the
public exponent.

o Determine ( d ) as the modular multiplicative inverse of ( e ) modulo ( \phi(n) ). ( d ) is the private


exponent.

2. Public and Private Keys:

o Public Key: ( (e, n) )

o Private Key: ( (d, n) )


3. Encryption:

o Convert the plaintext message ( M ) into an integer ( m ) such that ( 0 \leq m < n ).

o Compute the ciphertext ( c ) using the public key: ( c = m^e \mod n ).

4. Decryption:

o Compute the plaintext message ( m ) using the private key: ( m = c^d \mod n ).

o Convert the integer ( m ) back to the original plaintext message ( M ).

Example

Let’s illustrate with a simple example:

1. Key Generation:

o Choose ( p = 61 ) and ( q = 53 ).

o Compute ( n = 61 \times 53 = 3233 ).

o Calculate ( \phi(n) = (61-1) \times (53-1) = 3120 ).

o Choose ( e = 17 ) (a common choice).

o Compute ( d ) such that ( d \times 17 \equiv 1 \mod 3120 ). Here, ( d = 2753 ).

2. Public Key: ( (17, 3233) )

3. Private Key: ( (2753, 3233) )

4. Encryption:

o Convert plaintext “HELLO” to integer ( m ) (e.g., using ASCII values).

o Encrypt ( m ) to get ciphertext ( c ).

5. Decryption:

o Decrypt ( c ) to retrieve ( m ).

o Convert ( m ) back to “HELLO”.


 Explain public key cryptography with respect to private key cryptography
= Public Key Cryptography vs. Private Key Cryptography

Public key cryptography (asymmetric cryptography) and private key cryptography (symmetric cryptography) are two
fundamental approaches to securing data. Here’s a detailed comparison:

Private Key Cryptography (Symmetric Cryptography)

 Key Usage: Uses a single key for both encryption and decryption.

 Key Distribution: The same key must be shared between the sender and receiver, which can be challenging to
distribute securely.

 Speed: Generally faster than public key cryptography.

 Security: If the key is compromised, the entire communication is at risk.

 Examples: AES (Advanced Encryption Standard), DES (Data Encryption Standard).

Public Key Cryptography (Asymmetric Cryptography)

 Key Usage: Uses a pair of keys – a public key for encryption and a private key for decryption.

 Key Distribution: The public key can be shared openly, while the private key remains confidential, simplifying
secure key distribution.

 Speed: Generally slower than private key cryptography due to more complex algorithms.

 Security: Even if the public key is known, the private key remains secure, ensuring the confidentiality of the
communication.

 Examples: RSA (Rivest-Shamir-Adleman), ECC (Elliptic Curve Cryptography).

Key Differences

1. Operation:

o Private Key Cryptography: Both encryption and decryption use the same key.

o Public Key Cryptography: Encryption uses the public key, and decryption uses the private key.

2. Key Distribution:

o Private Key Cryptography: Requires secure sharing of the same key between parties.

o Public Key Cryptography: Only the public key needs to be shared, reducing the risk of key compromise.

3. Security:

o Private Key Cryptography: If the key is intercepted, the entire communication is compromised.

o Public Key Cryptography: The private key remains secure even if the public key is known.

You might also like