Unit 5: Cryptography and PKI

Core Cryptographic Terminology and Definitions

Plaintext refers to original, unencrypted data in its readable form prior to cryptographic processing. For example, the readable text of an email message before being processed by a cipher represents plaintext, often denoted as PTPT.

Ciphertext represents the unreadable output generated by executing a cryptographic algorithm on plaintext using a specific key. Encrypted payload data captured from Transport Layer Security (TLS) traffic appears entirely as ciphertext, often denoted as CTCT.

A cipher is a deterministic mathematical algorithm utilized to execute encryption or decryption transformations on data. The Advanced Encryption Standard (AES) is a prominent example of a symmetric block cipher.

A key is a discrete numeric or binary input value that governs the operation of a cryptographic cipher. A secure cryptographic key must possess sufficient bit length and high randomness to prevent predictive brute-force discovery.

A hash is a one-way, deterministic mathematical transformation that converts an arbitrary-length input string into a fixed-length output string. Hashes are fundamentally designed for verifying data integrity and assisting with password authentication, rather than data concealment.

A hash digest, also termed a message digest, is the fixed-length binary or hexadecimal output produced by a cryptographic hash function. Executing a hash algorithm over identical input data always yields the exact same digest, whereas altering even a single bit of input alters the resulting output digest entirely. In Bitcoin, a block header is processed twice through SHA-256 to generate a fixed 256 bit256\,\text{bit} block hash, even though the header itself aggregates multiple distinct fields.

A salt is a unique, randomly generated bit string appended to a password before hashing. The resulting salt value is stored alongside the password hash in the database. When two users select identical passwords, unique salt values ensure their stored password hashes remain entirely distinct.

A pepper is a secret cryptographic value added to password data prior to hashing that is stored separately from the primary database, such as within an application server configuration or a hardware security module. In the event of a database breach, an attacker lacking the isolated server-side pepper cannot perform offline wordlist attacks against the stolen password hashes.

Symmetric encryption is a cryptographic paradigm where the exact same shared secret key is utilized for both encryption and decryption operations. Symmetric ciphers, such as AES, process bulk network traffic and storage data with high computational efficiency.

Asymmetric encryption, or public-key cryptography, uses a mathematically linked pair of keys consisting of a public key and a private key. Asymmetric ciphers, such as Rivest-Shamir-Adleman (RSA), perform encryption, decryption, digital signing, or signature verification depending on which key from the pair is applied.

Advanced Encryption Standard (AES) is a symmetric block cipher algorithm operating on fixed blocks of data using key lengths of 128 bits128\,\text{bits}, 192 bits192\,\text{bits}, or 256 bits256\,\text{bits}. Virtual Private Networks (VPNs) rely on AES to encrypt high-throughput bulk data communications.

RSA is an asymmetric cryptographic system whose mathematical security relies on the computational difficulty of factoring the product of two large prime numbers. In RSA systems, a public key verifies a digital signature that was created using the matching private key.

Elliptic Curve Cryptography (ECC) is an asymmetric cryptographic framework based on the algebraic structure of elliptic curves over finite fields. ECC provides cryptographic security equivalent to traditional systems like RSA while requiring significantly smaller key lengths, thereby lowering computational and bandwidth overhead on mobile devices.

Diffie-Hellman (DH) is an asymmetric key-agreement protocol enabling two distant communicating parties to establish a shared secret key over an unencrypted, monitored network channel without explicitly transmitting the secret key itself.

A digital signature is an asymmetric cryptographic operation created by hashing a message and encrypting the resulting hash with the sender's private key. Digital signatures provide verifiable evidence of message integrity, sender authenticity, and nonrepudiation, allowing anyone with the sender's public key to verify the origin and integrity of the software update or document.

Nonrepudiation provides cryptographic evidence that a specific signing key generated a given message or payload. Valid digital signatures prevent the holder of the associated private key from denying their origination or approval of the signed bytes.

Cryptographic Hashing and Digest Properties

Cryptographic hashing functions and encryption ciphers address fundamental security objectives through distinct mechanisms. Encryption is a reversible operation controlled by a key to maintain data confidentiality. Hashing is an explicitly irreversible, one-way operation designed to support data integrity checks and secure password verification. Password hashes are never decrypted; instead, authentication system logic hashes an incoming plaintext attempt and compares the output directly against the stored hash digest.

A hash digest represents the deterministic output of a hash function rather than an encrypted version of the original message. For a given cryptographic hash algorithm, any input length maps to a fixed-length output, such as 256 bits256\,\text{bits} when utilizing SHA-256. Secure hash algorithms exhibit an avalanche effect where a minor change in the input text produces a radical, unpredictable transformation in the resulting digest.

Collision resistance is a primary requirement for cryptographic hash functions. A collision occurs when two distinct input values M1M_1 and M2M_2 produce an identical output digest H(M1)=H(M2)H(M_1) = H(M_2). Because input domains are infinite while output digest bit-lengths are fixed (creating 2n2^n possible digest states for an n bitn\,\text{bit} hash), collisions mathematically must exist according to the Pigeonhole Principle. However, strong cryptographic hash functions ensure that discovering any arbitrary collision is computationally infeasible.

SHA-1 visual example showing inputs and hex outputs

In historical hash algorithms such as SHA-1, outputs consist of 40 hexadecimal digits40\,\text{hexadecimal digits}, representing an output size of 160 bits160\,\text{bits}. Evaluating the input string "Fox" through SHA-1 yields the digest DFCD3454 BBEA788A 751A696C 24D97009 CA992D17. Modifying the input to "The red fox runs across the ice" yields 52ED879E 70F71D92 6EB69570 08E03CE4 CA6945D3. Replacing a single word to produce "The red fox walks across the ice" completely alters the output to 46042841 935C7FB0 9158585A B94AE214 26EB3CEA. While this visual behavior illustrates hash determinism and sensitivity to input modifications, SHA-1 is now collision-vulnerable and deprecated; current systems require collision-resistant standards such as SHA-256.

Real-world applications utilize cryptographic hash chaining for data structure integrity. Bitcoin calculates a block hash by double-hashing an 80 byte80\,\text{byte} block header using SHA-256 (SHA-256(SHA-256(Header))\text{SHA-256}(\text{SHA-256}(\text{Header}))) to yield a 256 bit256\,\text{bit} block hash. The block header integrates parameters including the previous block's hash digest, timestamp, target difficulty, nonce, and a Merkle root derived from all included transactions. Modifying an earlier transaction inside a block changes its transaction hash, which alters the Merkle root, thereby invalidating the block header hash and severing the link to all subsequent blocks. Network proof-of-work validation rules make rewriting established blocks computationally prohibitively expensive.

Cryptographic hash function names specify their digest bit lengths rather than their internal block processing parameters or secret key lengths. MD5 produces a 128 bit128\,\text{bit} digest; SHA-1 produces a 160 bit160\,\text{bit} digest; SHA-256 produces a 256 bit256\,\text{bit} digest; and SHA-512 produces a 512 bit512\,\text{bit} digest.

Password Protection: Salts, Peppers, and Slow Hashing Functions

Storing unsalted password hashes, such as simple SHA-256(password)\text{SHA-256}(\text{password}) outputs, exposes authentication systems to precomputed attack vectors. When passwords are stored without salts, identical user passwords produce identical stored hash digests, enabling attackers to detect duplicate credentials across accounts. Furthermore, attackers utilize precomputed lookup structures, such as rainbow tables, to rapidly match stolen hashes against millions of pre-hashed common dictionary words.

A salt mitigates precomputed attacks by appending unique, randomly generated bit strings to each individual user's password prior to hashing. Because every user record contains a unique salt stored alongside the resulting hash, two users with identical passwords receive distinct stored values. Salts do not increase the time required to compute an individual hash guess, but they force attackers to re-compute custom hash tables for every single target user record rather than executing bulk lookups across entire compromised databases.

A pepper acts as an additional defense layer consisting of a secret value appended to the password string before hashing. Unlike salts, the pepper is stored in a separate, isolated location away from the primary user credential database, such as within a dedicated security service or hardware configuration. If an attacker exfiltrates the user database, the absence of the pepper prevents immediate offline dictionary and brute-force attacks.

Standard cryptographic hash functions such as SHA-256 or SHA-512 are designed to compute rapidly in hardware, making them unsuitable for direct password storage because modern Application-Specific Integrated Circuits (ASICs) and GPUs can evaluate billions of fast hashes per second. Secure password storage demands purpose-built, slow password-hashing algorithms that incorporate adjustable work factors or cost metrics. Algorithms such as Argon2id, scrypt, bcrypt, and Password-Based Key Derivation Function 2 (PBKDF2) force high CPU, memory, or parallel execution requirements onto each evaluation attempt, dramatically raising the computational cost of brute-force password recovery.

Symmetric and Asymmetric Cryptography Systems

Symmetric and asymmetric cryptographic systems serve complementary functions in secure architectures. Symmetric ciphers utilize a single shared secret key for both encryption and decryption operations. Symmetric systems offer high processing speeds and low computational overhead, making them ideal for encrypting bulk datasets, disk volumes, and active session payloads. However, symmetric cryptography requires a secure mechanism to distribute the shared key between parties without interception.

Asymmetric cryptography resolves key distribution by issuing mathematically paired keys: a public key that can be freely distributed and a private key that must remain strictly confidential. Data encrypted using a public key can only be decrypted using the corresponding private key. Conversely, data encrypted or signed using a private key can be verified by anyone possessing the matching public key. Asymmetric operations incur substantially higher computational performance costs than symmetric ciphers.

Block ciphers process plaintext input in fixed-size blocks utilizing various operational modes. Electronic Codebook (ECB) mode encrypts each block of plaintext independently using the key. Under ECB mode, identical plaintext blocks always yield identical ciphertext blocks, causing structural patterns in structured data or bitmap images to remain clearly visible in the encrypted output. Cipher Block Chaining (CBC) mode resolves pattern leaks by XORing each plaintext block with the preceding ciphertext block prior to encryption, utilizing a unique Initialization Vector (IV) for the initial block. Counter (CTR) mode converts a block cipher into a stream cipher by encrypting sequential counter values combined with a unique nonce, enabling fully parallelized encryption and decryption. Galois/Counter Mode (GCM) provides Authenticated Encryption with Associated Data (AEAD), combining CTR mode encryption with Galois field multiplication to produce an authentication tag that verifies both payload confidentiality and integrity.

Asymmetric algorithm security relies on hard mathematical problems. RSA relies on the computational difficulty of factoring large composite numbers. In a simplified, toy RSA mathematical setup, prime numbers p=7p = 7 and q=13q = 13 are selected.

The composite modulus NN is calculated as:

N=p×q=7×13=91N = p \times q = 7 \times 13 = 91

Euler's totient function ϕ(N)\phi(N) is calculated as:

ϕ(N)=(p−1)×(q−1)=(7−1)×(13−1)=6×12=72\phi(N) = (p - 1) \times (q - 1) = (7 - 1) \times (13 - 1) = 6 \times 12 = 72

A public exponent e=5e = 5 is chosen such that gcd⁡(e,ϕ(N))=gcd⁡(5,72)=1\gcd(e, \phi(N)) = \gcd(5, 72) = 1. The private exponent dd is computed to satisfy the multiplicative inverse relationship e×d≡1(modϕ(N))e \times d \equiv 1 \pmod{\phi(N)}. Solving 5×d≡1(mod72)5 \times d \equiv 1 \pmod{72} yields d=29d = 29, because:

5×29=145=(2×72)+15 \times 29 = 145 = (2 \times 72) + 1

The resulting public key pair is (N,e)=(91,5)(N, e) = (91, 5), and the matching private key pair is (N,d)=(91,29)(N, d) = (91, 29). Encrypting an example numeric value M=72M = 72 yields ciphertext CC via:

C=Me(modN)=725(mod91)=11C = M^e \pmod{N} = 72^5 \pmod{91} = 11

Decrypting ciphertext C=11C = 11 with the private key recovers original plaintext message MM via:

M=Cd(modN)=1129(mod91)=72M = C^d \pmod{N} = 11^{29} \pmod{91} = 72

This basic calculation illustrates RSA inverse mathematical operations. Real-world RSA deployments require key lengths of at least 2048 bits2048\,\text{bits} or 4096 bits4096\,\text{bits} combined with optimal asymmetric encryption padding (OAEP) schemes.

Key Agreement Protocols and Historical Ciphers

Diffie-Hellman key agreement enables two parties to negotiate a shared secret over an insecure channel without transmitting the secret key across the network. Diffie-Hellman is strictly a key-agreement protocol rather than an encryption cipher. In a finite-field Diffie-Hellman setup, parties publicly agree on a prime modulus p=23p = 23 and a generator base g=5g = 5.

Alice selects a private integer a=4a = 4 and calculates public value AA:

A=ga(modp)=54(mod23)=625(mod23)=4A = g^a \pmod{p} = 5^4 \pmod{23} = 625 \pmod{23} = 4

Bob selects a private integer b=3b = 3 and calculates public value BB:

B=gb(modp)=53(mod23)=125(mod23)=10B = g^b \pmod{p} = 5^3 \pmod{23} = 125 \pmod{23} = 10

Alice transmits A=4A = 4 to Bob, and Bob transmits B=10B = 10 to Alice across the network. Alice computes the shared secret key KK using Bob's public value:

K=Ba(modp)=104(mod23)=10000(mod23)=18K = B^a \pmod{p} = 10^4 \pmod{23} = 10000 \pmod{23} = 18

Bob computes the shared secret key KK using Alice's public value:

K=Ab(modp)=43(mod23)=64(mod23)=18K = A^b \pmod{p} = 4^3 \pmod{23} = 64 \pmod{23} = 18

Both parties independently derive the matching secret value 1818 without exposing it to eavesdroppers. However, unauthenticated Diffie-Hellman exchanges are vulnerable to active Man-in-the-Middle (MitM) attacks, where an attacker intercepts exchanges and establishes separate secret keys with each participant.

Historical ciphers illustrate foundational cryptographic concepts but lack modern security properties. A Caesar cipher shifts plaintext characters by a single fixed numeric offset across the alphabet. Monoalphabetic substitution ciphers map each plaintext letter to an arbitrary, unique target character across a permuted alphabet; while offering more key combinations than a simple Caesar shift, substitution ciphers remain vulnerable to frequency analysis. The Pigpen cipher is a geometric substitution cipher replacing letters with spatial grid symbols. The Enigma machine used electromechanical rotors to produce continuously changing polyalphabetic substitutions. A true One-Time Pad (OTP) offers mathematically proven secrecy, provided its key material consists of completely random, unpredictable bits that are used exactly once, kept strictly secret, and equal or exceed the plaintext message length.

Hybrid Encryption and Multi-Layer Workflow Execution

Modern cryptographic protocols utilize hybrid encryption, combining asymmetric key establishment with symmetric bulk data encryption. Asymmetric operations establish trust or exchange keys, while symmetric ciphers encrypt large network transfers efficiently, such as a 5 GB5\,\text{GB} file payload.

To achieve both sender authenticity and recipient confidentiality, a multi-layer sign-then-encrypt workflow is executed. In this sequence, the sender (Alice) signs the message first using her private key to prove identity and ensure integrity, and then encrypts the result using the recipient's (Bob) public key to ensure confidentiality.

Whiteboard schematic detailing sign-then-encrypt workflow between Alice and Bob

The complete procedural execution flow operates as follows:

  1. Alice prepares plaintext PTPT.

  2. Alice signs plaintext PTPT using Alice's private signing key, generating intermediate signed representation CT1CT1. This step provides sender authentication and message integrity.

  3. Alice encrypts intermediate payload CT1CT1 using Bob's public encryption key, generating final ciphertext CT2CT2. This step provides confidentiality enforced for Bob.

  4. Alice transmits ciphertext CT2CT2 across the network.

  5. Bob receives ciphertext CT2CT2 and decrypts it using Bob's private decryption key, recovering intermediate payload CT1CT1. This step removes the confidentiality layer.

  6. Bob verifies the signature on CT1CT1 using Alice's public verification key, recovering verified original plaintext PTPT. This step confirms that Alice signed the payload and that it was not modified in transit.

An eavesdropper (Eve) intercepting transmission CT2CT2 can view the public keys of Alice and Bob but cannot decrypt CT2CT2 without Bob's private decryption key, nor can Eve forge Alice's signature without Alice's private signing key. While Eve could encrypt a message using Bob's public key, the absence of Alice's signature prevents Eve from impersonating Alice.

Before initiating encryption, Alice validates Bob's digital certificate to obtain his certified public encryption key. Upon receiving the payload, Bob validates Alice's certificate chain, verifying her identity, key validity dates, allowed key usage flags, and current revocation status before accepting her verified signature.

Public Key Infrastructure and X.509 Certificates

Public Key Infrastructure (PKI) encompasses the hardware, software, personnel, policies, and procedural frameworks required to create, manage, distribute, use, store, and revoke digital certificates and manage public-key cryptography.

An X.509 digital certificate is an authenticated electronic record that cryptographically binds an identity name or host identifier to a specific public key. An X.509 certificate contains only the subject's public key; the matching private key remains held by the subject.

A Certificate Authority (CA) is a trusted entity under PKI policies responsible for validating certificate applications, issuing signed certificates, and maintaining revocation records. A Registration Authority (RA) may act as a delegate to verify applicant identities and authorization credentials prior to forwarding approved requests to the CA.

To request a certificate, an applicant generates a key pair, keeps the private key secure, and constructs a Certificate Signing Request (CSR). The CSR contains the applicant's public key and requested identity attributes, digitally signed using the applicant's matching private key. The CA checks the CSR signature to verify that the applicant controls the matching private key before issuing a signed certificate.

An X.509 certificate contains standardized fields:

  1. Subject and Subject Alternative Name (SAN): Specifies the validated entity identity or domain hostnames permitted to use the certificate.

  2. Subject Public Key Info: Identifies the subject's public key value and the underlying algorithm (e.g., RSA or ECC).

  3. Issuer and Serial Number: Identifies the issuing CA and assigns a unique tracking serial number within that CA's domain.

  4. Validity Interval: Defines operational bounds using explicit notBefore and notAfter UTC timestamp fields.

  5. Extensions and Usage Constraints: Specifies Key Usage and Extended Key Usage (EKU) flags limiting certificate applications (e.g., Server Authentication or Digital Signature). Basic Constraints fields indicate whether the certificate owner is authorized as a CA and can specify maximum certificate path depth.

  6. CA Digital Signature: The digital signature generated using the issuing CA's private key, covering all certificate fields. Clients verify this signature using the issuing CA's public key.

For standard Domain-Validated (DV) HTTPS certificates, the CA verifies only that the applicant controls the specified DNS domain name. DV certificate issuance does not verify the legal entity's identity, validate organizational legitimacy, or guarantee that web server content is free of malware.

Certificate Validation Chains and Status Verification

A Certificate Authority architecture operates as a hierarchical chain of trust. End-entity leaf certificates (issued to web servers, services, or individuals) are signed by Intermediate CAs. Intermediate CAs are certified by higher Intermediate CAs or directly by a Root CA. The Root CA certificate sits at the top of the hierarchy and is self-signed.

A Root CA's self-signature does not establish initial trust. Devices and applications maintain local trust stores containing accepted trust anchors. A browser trusts a Root CA only because the Root CA certificate was pre-installed or explicitly imported into the client system's local trust store.

To validate an presented leaf certificate during a TLS handshake, a client executes an eight-part verification sequence:

  1. Chain Construction: Build a continuous certificate path from the leaf certificate through intermediate certificates to an accepted trust anchor in the local trust store.

  2. Signature Verification: Check every signature along the chain using the public key of the respective issuing parent CA.

  3. Constraint Checking: Verify Basic Constraints fields to ensure intermediate certificates possess CA authority, and enforce defined maximum path length limits.

  4. Identity Matching: Compare the requested domain or service identity directly against the leaf certificate's Subject Alternative Name (SAN) extensions.

  5. Time Boundaries: Confirm that the current system clock falls strictly between each certificate's notBefore and notAfter validity bounds.

  6. Usage Verification: Confirm that Key Usage and Extended Key Usage flags permit the intended operational mode (e.g., TLS Web Server Authentication).

  7. Revocation Checking: Verify that no certificate in the chain has been revoked prior to its scheduled expiration date.

  8. Proof of Private Key Ownership: Complete a cryptographic key exchange or challenge (such as a TLS handshake) proving that the server controls the private key associated with the leaf public key.

Certificate revocation invalidates a certificate before its stated expiration timestamp, such as when a private key is compromised or an entity changes organizational roles. CAs publish revocation status using two primary mechanisms:

  1. Certificate Revocation List (CRL): A CA-signed list containing the serial numbers of revoked, unexpired certificates along with revocation timestamps and reason codes. Clients download, authenticate, and check the current CRL during path validation.

  2. Online Certificate Status Protocol (OCSP): A real-time network protocol where clients query an OCSP responder for the status of a specific certificate. The OCSP responder returns a signed response indicating a status of good, revoked, or unknown. OCSP responses must be authenticated and verified for time freshness. An unknown or unreachable OCSP server response cannot be interpreted as proof of good certificate status.

Cryptographic Distinction Matrix and Core Comparisons

Selecting appropriate security controls requires understanding fundamental differences between cryptographic concepts.

Cryptographic concept pairs and fast distinctions

Cryptographic distinctions, functional comparisons, and operational contexts include:

  1. Hashing vs. Encryption: Hashing is a one-way, irreversible transformation designed for integrity verification and password validation. Encryption is a two-way, reversible transformation controlled by a key, designed to preserve data confidentiality.

  2. Symmetric vs. Asymmetric Encryption: Symmetric encryption relies on a shared secret key, providing fast processing suitable for bulk payload data. Asymmetric encryption uses public/private key pairs to resolve key distribution and identity trust, but incurs higher computational costs.

  3. Salt vs. Pepper: A salt is a stored, unique random bit string appended to individual password hashes to neutralize precomputed rainbow tables. A pepper is a secret cryptographic value appended to passwords prior to hashing and stored in a separate location away from the main database.

  4. Encryption vs. Digital Signature: Encryption utilizes a recipient's public key (or a shared session key) to guarantee recipient confidentiality. A digital signature utilizes a sender's private key to guarantee sender authenticity, data integrity, and nonrepudiation.

  5. Authentication vs. Nonrepudiation: Authentication verifies a claimed origin or identity at the time of communication. Nonrepudiation provides durable, third-party verifiable cryptographic evidence that prevents a signing key holder from denying message creation.

  6. Collision-Resistant vs. Collision-Free: Collision resistance means finding two distinct inputs yielding an identical hash is computationally infeasible. Collision-free indicates absolute zero mathematical collisions, which is impossible for fixed-length digest algorithms mapping infinite input domains.

  7. CA Signature vs. Message Signature: A CA signature uses the Certificate Authority's private key to sign an X.509 certificate, binding an identity to a public key. A message signature uses an individual's private key to sign a specific message payload.

  8. Expired vs. Revoked Certificate: An expired certificate's current timestamp falls outside its notBefore and notAfter validity window. A revoked certificate has been explicitly invalidated by the CA prior to its expiration timestamp due to key compromise or administrative action.

Applied Scenario Analyses and Four-Part Decision Framework

Evaluating security architectures requires structured decision-making. A four-part decision framework includes:

  1. Control Selection: Identify the exact cryptographic concept or control mechanism.

  2. Context Justification: Explain why the control addresses the specific asset, threat, vulnerability, or operational requirement.

  3. Operational Impact: State how the control improves, prevents, detects, or recovers system integrity relative to Confidentiality, Integrity, or Availability (CIA).

  4. Alternative Analysis: Identify a rejected alternative control and explain why it is less suitable for the given context.

In a scenario where an application stores user passwords as plain SHA-256(password)\text{SHA-256}(\text{password}) hashes without salts, the application is vulnerable to rainbow table lookups and credential exposure across duplicate user passwords. Applying the four-part decision framework:

  1. Control Selection: Implement unique per-user salts combined with a slow, memory-hard password-hashing function such as Argon2id.

  2. Context Justification: Unique salts force attackers to generate unique hash tables per user, while slow memory-hard work factors reduce GPU brute-force cracking speeds.

  3. Operational Impact: Protects user password confidentiality and system integrity against offline database exfiltration attacks.

  4. Alternative Analysis: Reject fast symmetric encryption (e.g., AES) for password storage, because storing encryption keys on application servers creates a single point of failure where key compromise exposes all plaintext passwords.

In a scenario requiring secure bulk transfer of a 5 GB5\,\text{GB} dataset across a public network, asymmetric encryption alone is too computationally slow. Applying the four-part decision framework:

  1. Control Selection: Implement hybrid encryption utilizing an asymmetric protocol (such as Diffie-Hellman or RSA) for session key agreement, followed by AES-GCM for bulk symmetric payload encryption.

  2. Context Justification: Asymmetric key agreement establishes secure channel parameters without prior shared secrets, while AES-GCM processes multi-gigabyte files rapidly with built-in authenticated integrity tags.

  3. Operational Impact: Protects confidentiality and data integrity during high-volume network transit while maintaining throughput performance.

  4. Alternative Analysis: Reject pure RSA asymmetric encryption for the full payload, because RSA block size constraints and processing overhead make encrypting multi-gigabyte datasets computationally impractical.

In a scenario where structured bitmap graphics encrypted with block ciphers reveal clear visual outlines of original images, Electronic Codebook (ECB) mode was incorrectly selected. Applying the four-part decision framework:

  1. Control Selection: Replace ECB mode with Cipher Block Chaining (CBC) or Galois/Counter Mode (GCM).

  2. Context Justification: ECB encrypts identical plaintext blocks into identical ciphertext blocks, preserving visual structural patterns. CBC uses an Initialization Vector (IV) and block chaining to randomize ciphertext output across identical plaintext blocks.

  3. Operational Impact: Eliminates pattern leakage, restoring confidentiality for structured binary data.

  4. Alternative Analysis: Reject expanding key length (e.g., increasing AES-128 to AES-256) under ECB mode, because increasing key length does not fix pattern repetition flaws inherent to ECB mode logic.

In a scenario where a web browser evaluates a host certificate during an HTTPS connection, the browser constructs and validates the entire certificate chain. Applying the four-part decision framework:

  1. Control Selection: Perform full X.509 path validation, verifying Subject Alternative Name (SAN) hostname matching, validity dates, intermediate signatures, root trust store presence, and OCSP revocation status.

  2. Context Justification: Validating every chain link ensures that the target domain key belongs to the expected host and has not been revoked or fraudulently issued by an untrusted entity.

  3. Operational Impact: Prevents Man-in-the-Middle (MitM) interception and rogue server impersonation, securing transport confidentiality and integrity.

  4. Alternative Analysis: Reject trusting a self-signed leaf certificate presented directly by an unknown external server, because self-signed leaf certificates lack independent verification by an accepted root trust anchor.

In an RSA mathematical evaluation with assigned prime parameters p=7p = 7 and q=13q = 13, calculating composite modulus NN and totient ϕ(N)\phi(N) proceeds as:

N=p×q=7×13=91N = p \times q = 7 \times 13 = 91

ϕ(N)=(p−1)×(q−1)=(7−1)×(13−1)=6×12=72\phi(N) = (p - 1) \times (q - 1) = (7 - 1) \times (13 - 1) = 6 \times 12 = 72

Selecting public exponent e=5e = 5, the matching private exponent d=29d = 29 is confirmed via 5×29=145=(2×72)+15 \times 29 = 145 = (2 \times 72) + 1, satisfying e×d≡1(modϕ(N))e \times d \equiv 1 \pmod{\phi(N)}. Plaintext inputs map to ciphertexts and decrypt back to their initial state, demonstrating public-key arithmetic operations.