Module 3: Fundamentals of Cryptography

Steganography vs. Cryptography Principles

  • Steganography Principles:

    • Steganography focuses on hiding the existence of data rather than altering its readability.
    • Embedded data is hidden within image, audio, or video files by dividing the payload data and storing it in unused portions of the file structure.
    • A common implementation scheme involves hiding data within file header fields that describe the file or between sections of metadata (data that describes the content or structure of the actual primary data).
  • Cryptography Principles:

    • Cryptography is the practice of transforming ("scrambling") information so that its meaning cannot be understood by unauthorized parties.
    • Classic methods of scrambling text include:
    • Transposition: Rearranging the physical positions of each letter within the original message.
    • Substitution: Replacing each original letter with another corresponding letter.

Core Terminology and Cryptographic Security Protections

  • Essential Cryptographic Terminology:
    • Encryption: The process of converting original plaintext into an unreadable scrambled message.
    • Decryption: The reverse process of converting a scrambled message back into its original readable form.
    • Plaintext: Unencrypted data that serves as the input to an encryption algorithm or the resulting output produced by decryption.
    • Ciphertext: The scrambled, unreadable output produced by the process of encryption.
    • Cleartext: Unencrypted data that is not intended or scheduled to be encrypted.
    • Cryptographic Algorithm (Cipher): Mathematical procedures and formulas used to encrypt and decrypt data.
    • Key: A specific mathematical value entered into a cryptographic algorithm to produce ciphertext or decrypt ciphertext back into plaintext.
    • Secrecy Requirement: The fundamental principle of cryptography demands that one or more elements must be kept secret at all costs; specifically, the key for the algorithm must always remain confidential.

Cryptographic process

  • Security Protections Provided by Cryptography:
    • Confidentiality: Ensures that only authorized parties who possess the decryption key can view the sensitive data.
    • Integrity: Guarantees that the information remains correct and has not been altered or tampered with in transit or storage.
    • Authentication: Verifies the true identity of the sender through cryptographic mechanisms.
    • Nonrepudiation: Provides mathematical proof that a specific user performed an action, preventing them from denying participation.
    • Obfuscation: The act of making something obscure, unclear, or difficult to understand.
    • Security through Obscurity: A security design philosophy proposing that virtually any system can be rendered secure as long as outsiders remain entirely unaware of its existence or operational mechanics.

Categories and Variations of Cryptographic Algorithms

  • Three Main Categories of Cryptographic Algorithms:

    • Hash algorithms
    • Symmetric cryptographic algorithms
    • Asymmetric cryptographic algorithms
  • Algorithmic Variations and Constructs:

    • One-Time Pad (OTP): A hand-calculated cryptographic method that combines plaintext with a random key. The pad consists of a long sequence of random letters. Decryption requires the recipient to possess an exact copy of the pad.
    • Stream Cipher: An algorithm that processes input data continuously, replacing one character at a time.
    • Block Cipher: An algorithm that manipulates and encrypts an entire fixed-size block of plaintext simultaneously.
    • Sponge Function: A functional structure that accepts an input string of arbitrary length and returns an output string of any requested variable length.

Hash Algorithms

  • Characteristics of Cryptographic Hashing:

    • Generates a unique "digital fingerprint" representing a given set of data (a process known as hashing).
    • The calculated fingerprint is termed a digest (or message digest/hash).
    • Used primarily for comparative evaluation and data validation.
    • Strictly one-way: A cryptographic digest cannot be mathematically reversed to reveal the original input data.
    • Criteria for a Secure Hash Algorithm:
    • Produces a fixed-size output regardless of input size.
    • Generates a unique digest for unique inputs.
    • Maintains pre-image resistance (originality).
    • Prevents mathematical reversal to determine the original plaintext.
  • Standard Secure Hash Algorithms:

    • Secure Hash Algorithm (SHA): Includes standard families such as SHA-1 and SHA-256 used for data validation.
    • RIPEMD (RipeMD): RACE Integrity Primitives Evaluation Message Digest family.
    • Whirlpool: High-security cryptographic hash function outputting a fixed digest size.
  • Data Integrity Verification:

    • Hashes serve as digital checksums to verify that downloaded software binaries or transmitted files have not been modified or corrupted.

Verify downloads with digests

Symmetric Cryptographic Algorithms

  • Principles of Symmetric Encryption:
    • Employs the exact same secret key for both encrypting plaintext and decrypting ciphertext.
    • Also known as private key cryptography because the key must remain strictly private between sender and receiver.
    • Delivers high computational speed and strong protection, provided key distribution remains secure.

Symmetric cryptographic process

  • Prominent Symmetric Ciphers:
    • Advanced Encryption Standard (AES): The primary symmetric block cipher standard used worldwide.
    • Blowfish: A symmetric block cipher utilizing variable-length keys.
    • Twofish: A faster, highly secure symmetric block cipher derived as a successor to Blowfish.

Asymmetric Cryptographic Algorithms and Key Exchange

  • Principles of Asymmetric Encryption:
    • Overcomes the main vulnerability of symmetric encryption: the difficulty of securely distributing and managing shared keys across numerous users.
    • Employs two mathematically related keys: a public key and a private key (also known as public key cryptography).
    • Public Key: Made publicly available to all network participants for encryption or signature verification.
    • Private Key: Kept strictly confidential by the owner for decryption or signature generation.
    • Keys function bi-directionally; data encrypted with one key in the pair can only be decrypted by the matching key.

Asymmetric cryptographic process

  • Asymmetric Algorithms and Mathematical Foundations:
    • RSA (Rivest-Shamir-Adleman): Published in 19771977. Relies on multiplying two large prime numbers; its security is derived from the computational difficulty of prime factorization.
    • Elliptic Curve Cryptography (ECC): Uses algebraic curves where users share an elliptic curve equation and a point on the curve. Requires significantly lower computing power and shorter key sizes than prime-number asymmetric algorithms while maintaining equal cryptographic strength. Powers modern operating systems and web browsers.

Elliptic curve cryptography graph

  • Digital Signature Algorithm (DSA): Creates a digital signature to authenticate the sender, enforce nonrepudiation, and confirm payload integrity.

    • In-Band Key Exchange Protocols:
  • Mechanisms used to negotiate symmetric session keys over an unencrypted in-band communication channel:

    • Diffie-Hellman (DH): Classical key exchange algorithm.
    • Diffie-Hellman Ephemeral (DHE): Uses temporary, single-session keys to provide forward secrecy.
    • Elliptic Curve Diffie-Hellman (ECDH): Integrates elliptic curve math into Diffie-Hellman for rapid key exchange.
    • Perfect Forward Secrecy (PFS): Cryptographic property ensuring that compromise of long-term keys does not compromise past session keys.

Software-Based Encryption Implementations

  • File and File System Cryptography:

    • File-Level Encryption: Scrambles individual files individually using dedicated software.
    • File System Encryption: Integrated into operating system file systems to protect entire directories seamlessly.
    • Third-Party Tools: Software includes GNU Privacy Guard (GnuPG), AxCrypt, Folder Lock, and VeraCrypt.
    • Encrypting File System (EFS): Microsoft Windows feature integrated into the NTFS file system that automatically and transparently encrypts and decrypts user data files.
  • Disk Encryption:

    • Full-Disk Encryption (FDE): Encrypts every sector on a storage drive, including user data, application binaries, operating system files, and the Windows Registry (e.g., BitLocker drive encryption in Microsoft Windows).
    • Volume-Level Encryption: Encrypts a specific logical storage volume (a partition accessible to users with its own file system).
  • Database Encryption:

    • Plug-in Method: Attaches an external encryption module or add-on onto the Database Management System (DBMS).
    • Transparent Data Encryption (TDE): Performs encryption and decryption directly inside the database engine. Requires no code alterations, external modules, or query modifications, streamlining administrative overhead.

Hardware-Based Cryptography

  • Embedded Hardware Cryptography:

    • Integrating cryptographic functions directly into physical hardware provides enhanced protection against software-based tampering.
    • Encrypted USB Flash Drives: Automatically encrypt all incoming data. Managed enterprise USB drives allow administrators to remotely revoke access, lock user credentials, or issue self-destruct commands to permanently destroy stored content.
    • Self-Encrypting Drives (SEDs): Hard disk drives or solid-state drives containing integrated encryption processors. The drive authenticates with the host system upon initial boot. Failed authentication causes the drive to block access or erase internal encryption keys, rendering data permanently unrecoverable.
  • Hardware Security Modules and Cryptoprocessors:

    • Hardware Security Module (HSM): A removable or standalone cryptographic hardware device equipped with internal key generators and secure key storage facilities. Performs high-speed hardware-accelerated symmetric and asymmetric key processing.
    • Trusted Execution Environment (TEE): An isolated, secure cryptoprocessor area internal to a system CPU that guarantees confidentiality and integrity of executing code and sensitive data.
    • Trusted Platform Module (TPM): An international hardware standard for cryptoprocessors embedded on computer motherboards. Features a true random number generator, asymmetric key pair generation, hardware key storage, and cryptographic authentication. Mobile operating systems implement equivalent isolated hardware protection termed a Secure Enclave on Apple and Android devices.

Blockchain Technology and Distributed Ledgers

  • Blockchain Fundamentals:
    • A shared, immutable distributed ledger that simplifies transaction recording and asset tracking across a enterprise business network.
    • Enables a decentralized network of computing nodes to reach consensus at set intervals regarding the legitimate state of the global ledger.

Multiple organizations with ledgers

Multiple organizations using single ledger

  • Blockchain Architectures:
    • Public Blockchain (Open Public Ledger): A fully public, permissionless network where any entity can join, transact, and participate in block validation.
    • Private Blockchain: A closed, permissioned network restricted to authorized members within a single organization or private network.
    • Federated Blockchain (Consortium Blockchain): Managed by a group of pre-selected organizations, combining features of public and private block architectures.

Limitations and Constraints of Cryptography

  • Resource vs. Security Trade-offs:
    • Deploying robust cryptography to low-power embedded devices (such as IoT sensors) or systems with stringent real-time performance requirements introduces operational challenges.
    • Cryptographic mathematical operations require processing time and electrical energy.
    • System architects must balance overall security requirements against hardware constraints, battery consumption, and latency limits.

Cryptographic Attacks and Post-Quantum Security

  • Cryptographic Attack Strategies:

    • Known Ciphertext Attacks & Statistical Tools: Threat actors analyze captured ciphertexts using statistical tools to detect mathematical patterns, aiming to reconstruct original plaintexts or extract secret keys.
    • Downgrade Attacks: Intercepting session negotiation to force a client and server to abandon modern high-security cipher suites and fall back to legacy, vulnerable protocol implementations.
    • Collision Attacks: An attack targeting hash algorithms to locate two distinct input payloads that generate identical output digests. An instance where two different inputs yield the same hash output is termed a collision.
    • Birthday Attack: An attack leveraging the mathematical birthday paradox. The paradox demonstrates that obtaining a 50%50\% probability of a shared birthday among a group requires only 253253 comparisons against a single person (or 2323 people for any pair match). In cryptography, this significantly reduces the mathematical difficulty required to produce hash collisions.
  • Impact of Quantum Computing:

    • Quantum Computing Architecture: Operates using subatomic-level quantum mechanics principles using qubits. Unlike traditional binary bits constrained to 00 or 11, a qubit can represent both 00 and 11 simultaneously through superposition, allowing a single qubit to process two simultaneous calculation threads.
    • Threat to Modern Cryptography: A quantum computer utilizing hundreds of entangled atomic qubits running Shor's algorithm can solve prime factorization problems rapidly. This capability breaks prime-factorization-dependent asymmetric ciphers like RSA.
    • Post-Quantum Cryptography: Development of next-generation cryptographic algorithms engineered to withstand computational attacks launched by both classical computers and high-performance quantum systems.

Questions & Discussion

  • Knowledge Check Activity 3-1:

    • Question: Layla has encrypted a document so that it can only be viewed by those who have been provided the key. What protection has she given to this document?
    • A. Confidentiality
    • B. Integrity
    • C. Authentication
    • D. Obfuscation
    • Answer: A. Confidentiality
    • Explanation: Confidentiality ensures that only authorized parties can view the information. Encrypted information that can only be viewed by those who have been provided the key is an example of confidentiality.
  • Knowledge Check Activity 3-2:

    • Question: Which algorithm uses the same key to both encrypt and decrypt data?
    • A. Asymmetric cryptographic algorithm
    • B. Hashing algorithm
    • C. Pairwise keypair algorithm
    • D. Symmetric cryptographic algorithm
    • Answer: D. Symmetric cryptographic algorithm
    • Explanation: Symmetric cryptographic algorithms use the same key to encrypt and decrypt the data.
  • Knowledge Check Activity 3-3:

    • Question: Which type of encryption would protect all data on a hard drive, including the installed OS?
    • A. FDE
    • B. SSED
    • C. TXPM
    • D. HRHS
    • Answer: A. FDE
    • Explanation: To protect the entire hard drive using cryptography is known as full-disk encryption (FDE) and protects all data on a hard drive, including the installed OS.