Computer Security Assignment
Computer Security Assignment
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.
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 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.
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
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.
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.
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
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 Compute ( n = p \times q ). ( n ) is used as the modulus for both the public and private keys.
o Choose an integer ( e ) such that ( 1 < e < \phi(n) ) and ( e ) is coprime with ( \phi(n) ). ( e ) becomes the
public exponent.
o Convert the plaintext message ( M ) into an integer ( m ) such that ( 0 \leq m < n ).
4. Decryption:
o Compute the plaintext message ( m ) using the private key: ( m = c^d \mod n ).
Example
1. Key Generation:
o Choose ( p = 61 ) and ( q = 53 ).
4. Encryption:
5. Decryption:
o Decrypt ( c ) to retrieve ( m ).
Public key cryptography (asymmetric cryptography) and private key cryptography (symmetric cryptography) are two
fundamental approaches to securing data. Here’s a detailed comparison:
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.
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.
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.