Computer Security
Computer Security
1. Confidentiality:
a. Data Confidentiality: Keeps private information from unauthorized access.
b. Privacy: Allows individuals to control who collects, stores, and shares their
personal data.
2. Integrity: Ensures information is accurate and unaltered.
3. Availability: Ensures information and systems are accessible to authorized users when
needed.
Computer security covers all components of a system, including hardware, software, and data.
Computer Security
relies on the CIA Triad—Confidentiality, Integrity, and Availability—as its core principles.
These objectives protect both data and information services:
These principles are foundational, as highlighted in standards like NIST’s FIPS 199 for
categorizing federal information security.
The OSI Security Architecture
1. Security Attack: Any action that threatens the security of an organization's information.
2. Security Mechanism: Processes or devices that detect, prevent, or recover from attacks.
3. Security Service: Services that protect data systems and information transfers, using
security mechanisms to counteract attacks.
This architecture simplifies defining and meeting security needs, especially in complex
networked environments.
In passive attacks, the aim is to prevent unauthorized parties from accessing sensitive content.
Active Attacks
involve altering data or creating fake data streams, with four main types:
These attacks actively interfere with data integrity and system operations.
Security Services: offer protection for system resources and data transfers:
1. X.800: Defines a security service as one provided by a protocol layer in open systems to
secure the system and its data transfers.
2. RFC 2828: Describes a security service as a processing or communication function that
protects system resources in a specific way,,,, Both definitions emphasize safeguarding
communication and data integrity.
These services provide comprehensive protection across communication and data integrity.
Security Mechanisms (X.800) are tools designed to detect, prevent, or recover from
security attacks. Since no single mechanism can meet all security needs, cryptographic
techniques are commonly used across various mechanisms.
1. Specific Mechanisms:
o Encipherment
o Digital Signatures
o Access Controls
o Data Integrity
o Authentication Exchange
o Traffic Padding
o Routing Control
o Notarization
2. Pervasive Mechanisms:
o Trusted Functionality
o Security Labels
o Event Detection
o Security Audit Trails
o Security Recovery
Symmetric Encryption is a type of cryptosystem where the same key is used for both
encryption and decryption. It is also referred to as conventional encryption.
1. Process:
o Encryption: Converts plaintext into ciphertext using a secret key and an
encryption algorithm.
o Decryption: Uses the same key and a decryption algorithm to convert the
ciphertext back into plaintext.
This method ensures that only those with the correct key can access the original data.
1. Plaintext: The original, readable message or data that is input into the encryption
algorithm.
2. Encryption Algorithm: This algorithm applies various substitutions and transformations
to the plaintext.
3. Secret Key: A unique value used by the encryption algorithm, independent of both the
plaintext and the algorithm itself. The output will vary depending on the specific key
used.
4. Ciphertext: The output of the encryption process, which is a scrambled version of the
plaintext. It appears random and unintelligible. Different keys will produce different
ciphertexts for the same plaintext.
5. Decryption Algorithm: Essentially the reverse of the encryption algorithm. It uses the
ciphertext and the secret key to recover the original plaintext.
1. Transformation Operations:
o Substitution: Each element in the plaintext (such as a bit or letter) is replaced
with another element.
o Transposition: The arrangement of elements in the plaintext is changed.
o Product Systems: Combine multiple stages of substitutions and transpositions
for added security.
2. Number of Keys Used:
o Symmetric Encryption: Both sender and receiver use the same key (also called
single-key or secret-key encryption).
o Asymmetric Encryption: The sender and receiver use different keys (also known
as two-key or public-key encryption).
3. Processing Method:
o Block Cipher: Processes input in fixed-size blocks, producing an output block for
each input block.
o Stream Cipher: Processes input continuously, producing output one element at a
time.
1. Cryptanalysis:
o Involves exploiting the characteristics of the encryption algorithm and may
utilize knowledge of plaintext patterns or sample plaintext-ciphertext pairs.
o The goal is to deduce the specific plaintext or the key being used based on these
characteristics.
2. Brute-Force Attack:
o The attacker systematically tries every possible key on a given piece of ciphertext
until they find a key that produces an intelligible plaintext.
o On average, half of all possible keys will need to be tested to successfully decrypt
the message.
These methods highlight the challenges of securing cryptographic systems against unauthorized
access.
Cipher Strength includes:
Classical Substitution Ciphers involve replacing letters of plaintext with other letters,
numbers, or symbols. If viewed as bits, substitution replaces plaintext bit patterns with ciphertext
bit patterns.
Example:
1. Encryption:
o The plaintext is processed in pairs of two letters.
o If a pair contains repeated letters, a filler (like 'X') is inserted between them.
2. Substitution Rules:
o Same Row: If both letters are in the same row, each is replaced by the letter to
its right (wrap around to the start if necessary).
o Same Column: If both letters are in the same column, each is replaced by the
letter below it (wrap to the top if at the bottom).
o Different Row and Column: Each letter is replaced by the letter in its row and
the column of the other letter in the pair.
These rules create a unique substitution method for each pair of letters in the plaintext.
Playfair Example
1. Message = Move forward
2. Plaintext = mo ve fo rw ar dx
3. Here x is just a filler, message is padded and segmented
4. mo -> ON; ve -> UF; fo -> PH, etc.
5. Ciphertext = ON UF PH NZ RM BZ
Vigenère Cipher
These features make the OTP one of the most secure encryption methods when used correctly.
Example #7: The Vernam Cipher (One-Time Pad)
These concepts are fundamental to understanding the design and analysis of cryptographic
systems.
Computationally Infeasible”
With ideal cryptographic primitives (indistinguishable from random functions), the only
effective method of cryptanalysis is exhaustive search (brute force attack). Here’s a breakdown
of the feasibility limits:
Hypothetical Setup:
o VLSI chips operating at 10 GHz, costing $10 each, can test 100 keys per cycle.
o With $10 million, we could assemble a machine capable of testing approximately
101810^{18}1018 (or 2602^{60}260) keys per second.
Key Strength Analysis:
o 80-bit Key: This machine could break it in about 7 days on average.
o 128-bit Key: It would take over 103810^{38}1038 years to break, far exceeding
the age of the universe.
Current Efforts:
o The fastest key search published achieved about 2232^{23}223 keys per second
using thousands of PCs on the Internet.
These numbers illustrate the immense computational resources required to break strong
encryption keys, reinforcing the notion of “computational infeasibility.”
To generate keys and nonces for cryptographic protocols, a source of unpredictable random bits
is essential. However, computer predictability makes secure seed generation difficult.
Attack Example:
In 1995, Ian Goldberg and David Wagner exploited a flaw in Netscape 1.1's SSL encryption,
which relied on weak random-bit generation based on the time of day and process IDs, allowing
brute-force attacks.
Sources of Randomness:
1. Hardware Generators: Use physical phenomena like thermal noise or Geiger counters.
2. User Behavior Timing: Measure actions like keystrokes and mouse movements for randomness.
Peripheral Hardware Timing: Response times from devices like disk drives.
Noise from Analog/Digital Converters: Data from sound cards or cameras.
Network Packet Timing: Analyzing network packet data.
High-Resolution Timing: Capturing precise events.
These sources alone don’t yield high-quality random bits, but they can be combined in a hash
function to create unbiased bits.
Stream Ciphers
• A typical stream cipher encrypts plaintext one byte at a time, although a stream cipher may
be designed to operate on one bit at a time or on units larger than a byte at a time.
• Figure 7.7 is a representative diagram of stream cipher structure. In this structure, a key is
input to a pseudorandom bit generator that produces a stream of 8-bit numbers that are
apparently random.
• The output of the generator, called a keystream, is combined one byte at a time with the
plaintext stream using the bitwise exclusive-OR (XOR) operation.
Stream Ciphers
ciphertext : 10100000
plaintext : 11001100
2.properly designed, can be as secure as a block cipher with same size key
RC4 : Initialize S