Security
Tags: #◇Computer Science #◇CSNETWK #◇Security #◇Conceptual
◇Overview
Network security encompasses several key principles: Confidentiality: Only the sender and intended receiver should understand the message contents (achieved via encryption). Authentication: Sender and receiver must confirm each other's identity. Message Integrity: Ensuring the message was not altered in transit. Access and Availability: Services must be accessible to legitimate users.
Malicious actors can perform various attacks, including eavesdropping, message insertion, impersonation (spoofing), hijacking connections, and Denial of Service (DoS).
Cryptography Types
- Symmetric Key Cryptography: Both sender and receiver share the same secret key.
Examples: DES (Data Encryption Standard - 56-bit key), 3DES, and AES (Advanced Encryption Standard - 128, 192, or 256-bit keys).
Pros: Very fast (AES is ~100x faster than RSA).
Cons: Requires a secure way to establish the shared key beforehand. - Public Key Cryptography: The receiver has a public key (known to everyone) and a private key (known only to them).
To send a confidential message, the sender encrypts it using the receiver's public key. The receiver decrypts it using their private key.
Example: RSA (Rivest-Shamir-Adleman).
The RSA Algorithm
RSA relies on the mathematical difficulty of factoring large numbers.
- Choose two large prime numbers and .
- Compute and .
- Choose (where ) such that it has no common factors with ( and are relatively prime).
- Choose such that is exactly divisible by (i.e., ).
- Public Key:
- Private Key:
Because RSA exponentiation is computationally intensive, it is typically used only to securely exchange a symmetric session key. The faster symmetric key is then used for the actual data transmission.
Authentication and Message Integrity Authentication: Defeating playback attacks (where an intruder records and replays a packet) requires a nonce (a number used once in a lifetime). The sender must encrypt the nonce to prove they are live. Digital Signatures: Analogous to hand-written signatures. A sender signs a document by encrypting it with their private key. The receiver verifies it by decrypting with the sender's public key. Message Digests: A hash function (like MD5 or SHA-1) processes a message to produce a fixed-size fingerprint. It is computationally infeasible to find two messages with the same hash. A practical digital signature is formed by signing (encrypting) the message digest rather than the entire message. Certification Authorities (CA): To prevent a "man-in-the-middle" from distributing fake public keys, CAs bind public keys to specific entities. The CA issues a certificate containing the entity's public key, digitally signed by the CA's own private key.
◇Important Formulas
RSA Encryption:
Where is the plaintext message represented as an integer, and is the ciphertext.
RSA Decryption:
Modular Arithmetic Properties:
◇Worked Examples
Example 1: RSA Key Generation and Encryption
- Choose primes and .
- Compute and .
- Choose (since 5 and 24 are relatively prime).
- Find such that . Let's test values: . So, . (Wait, the notes used because ). Let's use .
- Public key is , Private key is .
Encryption: If message :
Decryption:
◇References & Navigation
- Previous Topic: ◇End to End Throughput and Bottleneck Links
- Related Notes: ◇Cybersecurity Awareness, ◇Security
ACTIVE RECALL VERIFICATION
Select an answer to verify conceptual comprehension and reveal the technical rationale.
What are the core security properties of the CIA Triad plus Authentication and Non-Repudiation in network security?
How do Symmetric-Key Cryptography (e.g., AES) and Public-Key (Asymmetric) Cryptography (e.g., RSA, Diffie-Hellman) differ, and how are they combined in protocols like TLS?
To create a Digital Signature on a document that provides both sender authentication and message integrity, which key does Alice use to sign the cryptographic hash , and which key does Bob use to verify it?
Why is sending an unkeyed cryptographic hash alongside a plaintext message insufficient to protect message integrity against an active Man-in-the-Middle attacker?
At which layers of the Internet protocol stack do TLS (Transport Layer Security), IPsec, and WPA2/WPA3 (802.11i) respectively operate?