CIS-1355 · Security Engineering · Module 3

Fundamentals of Cryptography

Choose the right cryptographic operation for confidentiality, integrity, and authentication.

Understand what each technique protects

Steganography conceals the presence of a message, for example by embedding it in an image. Encryption conceals the contents of a message. Classical ciphers use transposition to rearrange symbols or substitution to replace them. These methods illustrate basic ideas. Modern systems use standardized, publicly reviewed algorithms and protect the keys that must remain secret.

Encryption takes plaintext and a key and produces ciphertext. Decryption recovers the plaintext with the appropriate key. Confidentiality comes from encryption. Authenticated encryption can also detect tampering. A message authentication code (MAC) checks integrity and authenticates data to parties that share a secret. A digital signature can authenticate the signer, detect changes, and provide evidence for nonrepudiation when the signing key and identity are properly managed.

Cryptography can protect data at rest and in transit. Applications commonly need access to plaintext while data is in use. Specialized approaches can narrow that exposure, for example by isolating computation in a trusted execution environment or using homomorphic encryption for supported operations on ciphertext. Obfuscation makes information harder to interpret and offers a separate kind of protection.

Distinguish ciphers, hashes, and key pairs

Stream and block ciphers
A stream cipher combines plaintext with a generated keystream, typically at the bit or byte level. A block cipher transforms fixed-size blocks. AES uses 128-bit blocks and supports 128-, 192-, and 256-bit keys. A mode of operation governs how a block cipher handles a longer message.
Sponge construction
Absorbs padded input into an internal state and then squeezes out results. SHA-3 uses a sponge construction. SHA-3 hash functions have fixed digest sizes, while SHAKE functions can return a requested output length.
Cryptographic hash
Produces a digest for comparison. SHA-256 is a common example. Hashes are designed to make it infeasible to recover a matching input or find collisions. Distinct inputs can share a digest because the output space is finite. A hash can verify a file against a trusted reference digest.
Symmetric cryptography
Uses a shared secret key. AES is a standard example. Blowfish and Twofish are other designs students may encounter. Symmetric encryption is commonly used for bulk data.
Asymmetric cryptography
Uses a public key and a related private key. For encryption, a sender can use the recipient’s public key and the recipient decrypts with their private key. For signatures, the signer uses their own private key and others verify with the signer’s public key.

Public-key schemes have different jobs. RSA has encryption and signature schemes. Elliptic-curve schemes include ECDH for key agreement and ECDSA for signatures. DSA is a legacy signature algorithm that NIST’s current Digital Signature Standard permits only for verifying existing signatures. RIPEMD and Whirlpool are additional hash designs that may appear in references or older systems.

NIST · AES · NIST · SHA-3 and SHAKE · NIST · Digital Signature Standard

Apply cryptography in software and hardware

File encryption protects selected files. Full-disk or volume encryption protects stored data when the encrypted storage is locked. Transparent Data Encryption (TDE) in database engines such as SQL Server protects database data files at rest. An authorized query can still return readable data through the running database, so match the encryption layer to the exposure you are trying to address.

A blockchain is a shared ledger whose participants follow a consensus mechanism to agree on updates. Cryptographic links make changes to recorded history detectable, and resistance to rewriting depends on the network and its rules. A ledger can record a transaction. Verifying the accuracy of what was entered requires evidence about its source.

Microsoft · Transparent Data Encryption · NIST · Blockchain

Account for implementation limits and attacks

Choose algorithms and parameters that fit the threat, the required protection lifetime, and the device’s limits on memory, power, latency, and bandwidth. Key strength depends on the algorithm, key length, and how unpredictably the key is generated. Use established libraries and follow their rules for nonce use, key separation, and rotation. NIST’s Ascon standard provides lightweight authenticated encryption and hashing options for constrained devices.

Ciphertext-only attack
The attacker has ciphertext samples and tries to infer plaintext or keys. Classical ciphertext can reveal statistical patterns. A known-plaintext attack additionally gives the attacker corresponding plaintext for some samples.
Downgrade attack
The attacker tries to induce use of a weaker protocol version or option. Disable obsolete options where feasible and use protocols that protect negotiation.
Collision attack
The attacker seeks two distinct inputs with the same digest. Use a collision-resistant hash for workflows such as digital signatures.

Strong algorithms can still be undermined by hard-coded keys, repeated nonces where uniqueness is required, or disabled certificate checks. A quantum bit can occupy a superposition, and quantum algorithms use interference to solve certain problems. A sufficiently capable quantum computer running Shor’s algorithm could break widely used RSA and elliptic-curve schemes. NIST has standardized post-quantum alternatives for key establishment and digital signatures.

NIST · Ascon-based lightweight cryptography · RFC 8446 · TLS 1.3 · NIST · Post-quantum cryptography standards

Practice case

Send a sensitive export to an auditor. A finance analyst needs to transfer a large payroll export. Only the designated auditor should be able to read it. The auditor must be able to detect changes and verify that the export came from the analyst. Someone proposes attaching the file and its SHA-256 digest to the same email.

Which requirements does the proposed digest address if it arrives alongside the file? How would you combine encryption and signing? Whose keys are involved?

Review a possible answer

A digest can detect accidental corruption, but someone who changes both the file and digest can make them match. Use an approved tool that signs the export with the analyst’s private signing key and encrypts the signed package with a fresh symmetric key. The tool can use the auditor’s verified public key to protect or establish that symmetric key.

The auditor uses their private key to recover or establish the symmetric key, decrypts the package, and verifies the signature with the analyst’s verified public key. Validate both public keys through a trusted mechanism before relying on the exchange.

Read and watch