Review Notes Chapters 1-4 Turbo Notes
Review Notes Chapters 1-4 Turbo Notes
Brief Overview
This note covers Cryptographic Concepts and was created from a 97‑page PDF on
cryptographic concepts ([Link]
47c6-adac-dbbf805a02ca/documents/[Link]).
The notes walk through the basics of encryption, hashing, key management, and the trust
infrastructure that keeps our digital communications secure.
Key Points
Plaintext ↔ ciphertext fundamentals
Symmetric encryption workflow and trade‑offs
Key lengths and brute‑force resilience
Digital signatures and PKI basics
Cryptographic Concepts 🔐
Plaintext (cleartext) – The original, unencrypted message.
Algorithm – The systematic method used to transform plaintext into ciphertext and
back again.
Hashing – A one‑way function that produces a fixed‑length digest from data of any
size.
Symmetric Encryption – Encryption where the same secret key is used for both
encryption and decryption.
Asymmetric Encryption – Encryption that uses a paired public key (for encryption)
and private key (for decryption).
Characters –
The flowchart shows the relationships and interactions between Alice, Bob, and Mallory in
a cryptographic exchange.
Symmetric Encryption 🔑
Symmetric Encryption – A cryptographic process where a single secret key encrypts
and decrypts data, providing confidentiality.
Alice encrypts “HelloWorld” → ciphertext “rWoeldlolH”. Bob decrypts the ciphertext with
the same secret key to retrieve the original file.
Strengths
Very fast; suitable for bulk data encryption.
Strong security when the key remains secret.
Weaknesses
Key exchange problem – Securely sharing the secret key is difficult; if Mallory
obtains the key, confidentiality is lost.
Does not provide authentication or integrity on its own.
Command‑line example (AES)
# Encrypt
aes -e -p ToughPassword [Link]
# Decrypt
aes -d -p ToughPassword [Link]
Asymmetric Encryption 🗝️
Asymmetric Encryption – Uses a mathematically linked public/private key pair; the
public key encrypts, the private key decrypts.
Workflow
1. Key‑pair generation – Bob creates a public and private key; keeps the private
key secret.
2. Public key distribution – Bob publishes the public key.
3. Encryption – Alice encrypts a message with Bob’s public key.
4. Transmission – Alice sends the ciphertext to Bob.
5. Decryption – Bob uses his private key to retrieve the plaintext.
The diagram below visualizes these steps:
Bob’s public key encrypts “HelloWorld” → ciphertext “rWoeldlolH”. Only Bob’s private key
can reverse it.
Strengths & Weaknesses
Aspect Strength Weakness
Security Public key can be shared Computationally intensive;
openly; private key never slower than symmetric
transmitted. encryption.
Key Exchange Enables secure exchange Not suitable for bulk data
of a symmetric session key encryption.
(hybrid encryption).
Hashing 🔒
Cryptographic Hashing – Generates a fixed‑length digest from data of any size; it is
computationally infeasible to reverse or find collisions.
Integrity Verification
1. Password verification – Server stores only the hash of a password. During
login, the entered password is hashed and compared.
2. File integrity – Sender publishes a hash of a file; receiver hashes the
downloaded file and compares.
The following infographic shows the five‑step integrity check process:
Alice publishes a file and its hash; Bob validates the hash after download, detecting any
tampering by Mallory.
Popular Hash Algorithms
Algorithm Digest Size Security Notes
SHA‑256 256 bits Currently considered
strong.
MD5 128 bits Faster but vulnerable to
collisions; used only for
compatibility.
A command‑line screenshot (checksum verifier) illustrates practical usage:
Digital Signatures ✍️
Digital Signature – A cryptographic construct that combines hashing and asymmetric
encryption to provide message authentication, integrity, and non‑repudiation.
Signing Process
1. Digest creation – Sender hashes the message (e.g., using SHA‑256).
2. Signature generation – Sender encrypts the digest with their private key.
3. Transmission – Message and signature travel together.
4. Verification – Receiver decrypts the signature with the sender’s public key to
obtain the original digest, hashes the received message, and compares the two
digests.
The workflow is depicted below:
Without a CA, a public key alone cannot prove the owner’s identity, leaving
e‑commerce and secure communications vulnerable to impersonation.
CAs sign certificates with their own private key; browsers and operating
systems trust the CA’s public key, enabling validation of a site’s certificate (e.g.,
“DigiCert TLS RSA SHA‑256 2020 CA1”).
The browser security notification screenshot demonstrates a valid certificate indicator:
The icon confirms a secure connection and that the certificate is issued by a trusted
authority.
The diagram visualizes how a client establishes a trusted TLS connection using certificates
issued by a CA.
Digital Certificates 📄
Digital Certificate – A digitally signed data structure that binds a subject’s public key
to identifying information about the subject and the issuing CA (the issuer).
Key components (as shown in the certificate viewer):
Subject Public Key – The public key belonging to the certificate holder.
Issuer – The CA that signed the certificate.
Validity period – “Not Before” and “Not After” timestamps.
Extensions – e.g., Subject Alternative Name (SAN), Key Usage, etc.
Certificates follow the X.509 standard (RFC 5280) and are often issued under the PKCS
family of standards.
The view shows the public key information and the trust chain up to the root CA.
Root of Trust 🔑
Root of Trust – The topmost, self‑signed certificate in a PKI hierarchy. Possession of
the root certificate enables verification of all certificates signed beneath it.
PKI models
Model Description Typical Use Pros Cons
Single CA One root CA Private Simple Single point of
issues networks deployment. failure; if
certificates compromised,
directly to end the entire PKI
entities. collapses.
Hierarchical A root CA signs Public/B2B Allows policy More complex
(third‑party) one or more communications segregation, infrastructure.
intermediate easier
CAs, which in revocation, and
turn issue leaf finer‑grained
certificates. trust paths.
The chain demonstrates how a server certificate is linked to an intermediate CA, which is
signed by a trusted root.
Self‑Signed Certificates 🛡️
Self‑Signed Certificate – A certificate signed with its own private key rather than by a
trusted external CA.
The legacy Common Name (CN) field is deprecated for host validation;
browsers now prioritize SAN.
Wildcard SAN (e.g., *.[Link]) covers all first‑level subdomains of a
domain.
Although SAN is preferred, retaining the FQDN in the CN remains a
best‑practice for backward compatibility.
Attribute Purpose Example
CN Historically identified the [Link]
host.
SAN (DNS) Lists all hostnames/IPs a [Link],
certificate covers. [Link]
SAN (IP) Allows direct IP address [Link]
validation.
Wildcard Matches any subdomain at *.[Link]
one level.
The view highlights the SAN field with several DNS names, illustrating how a single
certificate can secure multiple domains.
Certificate Revocation 🚫
Certificate Revocation – The process of invalidating a certificate before its scheduled
expiration, typically because the private key is compromised or the holder’s status
changes.
Revocation reasons
Reason Code Description
Unspecified No specific reason given.
Key Compromise Private key is known to be exposed.
CA Compromise The issuing CA’s private key is
compromised.
Superseded Certificate replaced by a newer one.
Cessation of Operation Entity no longer needs the certificate.
Certificate Hold Temporary suspension (can be
re‑enabled).
Mechanisms
Certificate Revocation List (CRL) – A signed list published by the CA
containing revoked certificates.
Online Certificate Status Protocol (OCSP) – Real‑time query service that
returns the status of a single certificate.
Key CRL fields:
Publish Period – When the CRL is generated.
Distribution Points – URLs where the CRL can be fetched.
Validity Period – How long the CRL is considered authoritative.
Signature – CA’s digital signature verifying authenticity.
Shows the “CRL Distribution Points” extension that tells clients where to download the
revocation list.
Provides a snapshot of the revocation list metadata used by clients during validation.
Key Management 🔐
Key Management – The set of operational practices governing the lifecycle of
cryptographic keys, from generation to retirement.
Lifecycle stages
1. Generation – Create symmetric or asymmetric keys with sufficient entropy.
2. Storage – Protect private/secret keys against unauthorized access and loss.
3. Revocation – Invalidate compromised keys; re‑encrypt data with fresh keys.
4. Expiration & Renewal – Enforce limited lifespans; renew certificates before
expiry.
Management models
Model Description Trade‑offs
Decentralized Keys are generated and Easy deployment; harder
stored locally on each to detect compromise.
endpoint.
Centralized (KMS) A dedicated Stronger control and
server/appliance stores auditing; higher
keys; clients use KMIP to infrastructure complexity.
request cryptographic
operations.
Key Escrow 🔐
Key Escrow – The practice of storing cryptographic keys with a trusted third party,
enabling recovery if the original key is lost.
Data states
Data at rest – Stored on disks, tapes, or other persistent media.
Data in transit – Transmitted over networks (e.g., HTTPS, VPN).
Data in use – Residing in volatile memory (RAM, CPU registers) during
processing.
Bulk encryption – Symmetric algorithms (AES, ChaCha20) encrypt large
volumes efficiently; asymmetric schemes are unsuitable for bulk due to high
computational overhead.
Key points
Encryption of free space prevents data remnants from being recovered after
file deletion.
TPM/HSM integration can store encryption keys, allowing the disk/volume to
be locked automatically at boot.
The diagram shows the progression from key generation to encryption of the disk/volume
and the role of a TPM in unlocking the key.
Level Scope Typical Notes
Implementation
Full‑Disk Entire device SED, BitLocker, Best for protecting
(including free FileVault against theft
space)
Partition Selected partitions Custom partition Allows mixed
only encryption tools encrypted/unencrypt
parts
Volume Single filesystem BitLocker, FileVault May or may not
volume cover metadata
File Individual EFS, Fine‑grained
files/folders application‑level control; requires OS
encryption support
Granularity comparison
Granularity What is encrypted Performance Management
impact complexity
Database‑Level All pages, logs, Higher (full‑disk Simple – single key
(TDE) backups encryption) per database
Record‑Level Selected Lower – only Higher – key
columns/cells protected fields management per
processed column or row
Key hierarchy –
1. Key Encryption Key (KEK) – Asymmetric key pair (RSA/ECC) protecting the
Data Encryption Key (DEK).
2. Data Encryption Key (DEK) – Symmetric key (AES‑256/512) used to encrypt
the actual data.
Workflow – The DEK encrypts database files; the KEK (stored in a certificate)
encrypts the DEK. Clients retrieve the DEK by decrypting it with the KEK, then use it to
read/write encrypted columns.
Illustrates the relationship between KEK, DEK, and encrypted data.
3.3.7 Blockchain ⛓️
Blockchain – A decentralized ledger where each block contains a set of transactions, a
timestamp, and the hash of the previous block, creating a cryptographically linked
chain.
3.3.8 Obfuscation 🕶️
Obfuscation – The practice of making data or code difficult to locate or understand;
often considered “security through obscurity” and used as a complementary measure.
Techniques
Technique Description Typical Use
Steganography Embeds hidden data within Covert communication
a carrier (e.g., image,
audio)
Data Masking Redacts or replaces Development/testing
characters (e.g., environments
“xxxx‑1234”) while
preserving format
Tokenization Substitutes sensitive values PCI‑DSS compliance,
with randomly generated de‑identification
tokens; original data stored
in a secure vault
De‑identification Removes or obscures Research datasets
personally identifiable
information to enable safe
data sharing
Covertext – The carrier file (e.g., an image) that holds the hidden message.
Tokenization is reversible (via the token vault), whereas masking is typically
irreversible.
Design goals
Confidentiality – Credentials must remain secret; leakage enables
impersonation.
Integrity – Authentication mechanisms must resist tampering and spoofing.
Availability – Authentication should be reliable and not hinder legitimate
access.
Factors (credential types)
Something You Know – Passwords, passphrases, PINs (device‑specific).
Something You Have – Smart cards, hardware tokens, mobile OTP apps.
Something You Are – Biometrics (fingerprint, facial recognition).
Somewhere You Are – Location/IP‑based checks (geofencing, network
segment).
Workflow
1. User selects a password‑manager application (built‑in OS manager or
third‑party like LastPass).
2. Master password secures the vault; vault may be cloud‑synced or locally stored.
3. When creating a new account, the manager generates a strong, random
password adhering to policy.
4. On subsequent logins, the manager auto‑fills credentials after verifying the
site’s TLS certificate.
Risks
Weak master password compromises the entire vault.
Vendor‑side breaches could expose stored vaults.
Phishing attacks may trick the manager into autofilling credentials on malicious
sites.
Factor categories
Something You Have – Smart card, hardware token, mobile authenticator app.
Something You Are – Fingerprint, facial scan, voice recognition.
Somewhere You Are – Geolocation, IP address, network segment.
Note: Combining two knowledge factors (e.g., PIN + date‑of‑birth) is not MFA; true
MFA must involve different factor families.
Enrollment Process
1. Capture – Sensor records the biometric sample.
2. Feature Extraction – Generates a mathematical template representing
distinctive features.
Operational Verification – New sample is captured and compared against the stored
template; access granted if similarity exceeds a tolerance threshold.
Performance Metrics
Metric Definition
False Rejection Rate (FRR) Legitimate users denied access (Type I
error).
False Acceptance Rate (FAR) Impostors granted access (Type II error).
Crossover Error Rate (CER) Point where FRR = FAR; lower CER =
higher reliability.
Throughput Time required for enrollment and
verification.
Failure to Enroll Rate (FER) Percentage of users who cannot be
enrolled.
Cost/Implementation Hardware expense, integration
complexity, privacy concerns.
Fingerprint – Most common; uses capacitive or optical sensors; inexpensive,
but susceptible to dirt/moisture.
Facial Recognition – Uses optical/IR cameras; incorporates multiple facial
landmarks; harder to spoof with photos.
Illustrates the Android UI prompting users to move their finger to capture a complete
fingerprint template.
Token types
Type Mechanism Advantages Drawbacks
Certificate‑Based Stores a private Strong Requires PKI
key; signs cryptographic infrastructure and
authentication assurance; management
challenges integrates with PKI
One‑Time Generates a No PKI needed; Must protect the
Password (OTP) temporary numeric simple integration secret seed; codes
code using a shared expire quickly
secret + timestamp
(TOTP) or counter
(HOTP)
Fast Identity (Details not — —
provided in
transcript)
OTP tokens often rely on HMAC‑based algorithms; each code is valid for a
short window, mitigating replay attacks.
Certificate‑based tokens provide non‑repudiation but incur higher
administrative overhead due to certificate lifecycle management.
Delivery methods
SMS / email – typically counter‑based tokens with an expiry period.
Authenticator app – installed on a computer or smartphone; the
shared secret is provisioned via a QR code.
Key points
Tokens sent by SMS or email do not count as an ownership factor;
they are best described as two‑step verification rather than true
MFA.
Such tokens are highly vulnerable to interception (e.g., SS7 attacks,
email compromise).
Authenticator apps reduce interception risk but run on a shared
device, so malware could compromise the app.
Users must unlock the app with the device credential (PIN/biometric)
before viewing the OTP.
Figure 1 – Using an authenticator app to sign in:
The user logs in with a password, then the site prompts for a push notification. The
smartphone displays “Approve” or “Deny” icons; approving sends the OTP to complete
authentication.
🛡️
4.2.1 Discretionary and Mandatory Access Control 🛡️
Access control model – A set of rules that dictate how authenticated subjects obtain
rights to objects.
Characteristics
Every object has an owner who can modify its ACL.
Implemented by default in most UNIX/Linux and Windows file
systems.
Flexibility → Weakness: central policy enforcement is difficult;
vulnerable to insider threats and compromised accounts.
Mandatory Access Control (MAC)
MAC – Policy‑driven model based on classification labels and clearance levels,
enforced by the system, not by owners.
Key concepts
Object label (e.g., Top Secret, Secret, Confidential).
Subject clearance – Users can read objects at their clearance level
or lower (read‑down) but may only write up (write‑up).
Compartmentalization – Labels can include compartments (e.g.,
HR), requiring matching clearance for access.
Strengths – Centralized, non‑discretionary rules reduce risk of accidental or
malicious ACL changes.
📏
4.2.3 Rule‑Based Access Control 📏
Rule‑based access control – Any model where access decisions are driven by
system‑enforced rules rather than user‑initiated ACL changes.
Implementation steps
1. Analyze workflows to identify required tasks.
2. Map tasks to roles/permissions with the smallest scope possible.
3. Assign those permissions to users or groups.
4. Monitor for authorization creep (gradual accumulation of rights).
Risks of mis‑implementation
Issue Effect
Over‑privileged accounts Increased attack surface; easier for
malware to exploit.
Over‑restriction Productivity loss; higher support
overhead.
Authorization creep Users retain rights long after they are
needed.
Mitigation – Periodic audits, automated review of group memberships, and
timely revocation of temporary privileges.
🗂️
4.2.5 User Account Provisioning 🗂️
Provisioning – The structured process of creating, configuring, and managing user
accounts and related assets.
Core identifiers
SID – Unique Security Identifier used in access token comparisons
against ACLs.
Credentials – Passwords, certificates, or token keys.
Profile data – Full name, contact info, department, stored settings, and
optional media.
Access rights – Assigned directly or inherited via security groups or roles;
enforced through ACLs on files, services, or network resources.
Policy enforcement in Windows AD –
Group Policy Objects (GPOs) define user rights (e.g., log‑on locally,
remote desktop).
GPOs can be linked to sites, domains, or Organizational Units
(OUs).
Figure 1 – Configuring GPOs: The screenshot shows the “User Rights Assignment” pane
with policies such as “Allow log on through Remote Desktop Services”.
Components
User SID – Unique identifier for the account.
Group SIDs – List of security groups the user belongs to (e.g.,
Domain Admins, Enterprise Admins).
Privileges (user rights) – Capabilities such as “Change system time”
(often disabled).
How it works
When a user accesses a file/folder, the OS compares the user SID in
the token to the SIDs listed in the object’s ACL.
Match → access granted (subject to the rights defined); no match →
implicit deny.
Practical demonstration
whoami /all displays the complete token, revealing SIDs and
privileges.
Modifying group membership (e.g., adding a user to the Marketing
group) updates the token after a logoff/logon cycle, influencing
subsequent access attempts.
Key takeaway – The access token is the central mechanism tying
authentication to authorization; changes to group membership or privileges
only take effect after the token is refreshed.
When a user logs in, the access token captures the group memberships that
exist at that moment.
Changes made to group membership after logon are not reflected in the
current token.
To incorporate a newly‑added group (e.g., Marketing) into the token, the user
must log off and log back in, causing the system to issue a fresh token that
includes the updated groups.
Example command:
whoami /all
The output shows the list of groups present in the token; after re‑login, the
Marketing group appears, granting the expected share permissions.
Location‑Based Policies
Logical network location identified by IP address, subnet, VLAN, or OU.
Can block logon to certain servers or OUs.
Geolocation (e.g., GeoIP) maps an IP to a map location; accuracy varies with
ISP granularity.
Device location services use GPS, cell‑tower triangulation, Wi‑Fi, or Bluetooth
to pinpoint a device’s position.
Time‑Based Policies
Policy Type Description
Time‑of‑day restriction Defines allowed login windows for an
account.
Duration‑based login Limits the maximum session length after
authentication.
Impossible‑travel / risky login Detects implausible geographic jumps
(e.g., NYC → LA within minutes) and
disables the account.
Temporary permissions Removes a user from a role or group after
a predefined period.
Standard accounts have limited rights; they can run programs and modify only
their own profile files.
PAM objectives: identify privileged accounts, enforce visibility, and protect
credentials.
Best Practices
Minimize the number of administrative accounts.
Never share privileged accounts; enforce accountability.
Use strong passwords and ideally MFA or password‑less methods.
Perform privileged work on a Secure Administrative Workstation (SAW) – a
hardened system with minimal software.
Permission Models
Model Description Typical Mechanism
Just‑In‑Time (JIT) / Zero Elevation granted only Windows UAC, Linux sudo
Standing Privileges when needed, for a limited
time.
Temporary Elevation User gains admin rights for UAC prompt, sudo timeout
a short session.
Password Vaulting / Privileged credentials are Enterprise password vaults
Brokering “checked out” from a (e.g., CyberArk)
secure vault, with a
justification logged and
possibly an M‑of‑N
approval workflow.
Ephemeral Credentials System creates a Cloud IAM temporary roles
short‑lived account or
token for the task, then
destroys it automatically.
PAM also applies to service accounts, which should be managed with the same
rigor as human administrators.
Windows Authentication
Scenario Component Typical Protocol
Local sign‑in LSASS validates credentials Interactive logon
against the Security
Accounts Manager (SAM)
database (registry).
Network sign‑in LSASS forwards credentials Kerberos (preferred) or
to an Active Directory NTLM (legacy)
(AD) domain controller.
Remote sign‑in Authentication occurs over Various VPN or TLS‑based
VPN, enterprise Wi‑Fi, or methods
web portal, establishing a
secure tunnel before
credential verification.
Linux Authentication
Local accounts: usernames in /etc/passwd; password hashes in /etc/shadow.
Network login: typically via SSH, which can use public‑key authentication
instead of passwords.
Pluggable Authentication Modules (PAM) provide a flexible framework for
integrating smart cards, LDAP, or other authentication providers.
Schema defines required and optional attributes for each object class.
Distinguished Name (DN) uniquely identifies an object; composed of
comma‑separated attribute‑value pairs from most specific to broadest.
Example DN:
Core Components
Authentication Service (AS) – Issues the Ticket‑Granting Ticket (TGT) after
verifying the user’s password hash.
Ticket‑Granting Service (TGS) – Exchanges the TGT for service tickets that
grant access to specific application servers.
Workflow Overview
1. TGT Request – User sends AS a request encrypted with a hash of their
password.
2. AS Response – Returns a TGT (encrypted with the KDC’s secret key) and a TGS
session key (encrypted with the user’s password hash).
3. Service Ticket Request – User presents the TGT and an authenticator
(timestamp encrypted with the TGS session key) to the TGS, requesting access
to a specific service.
4. TGS Response – Issues a service ticket (encrypted with the service’s secret
key) and a service session key (encrypted with the TGS session key).
5. Access – User sends the service ticket plus a new authenticator (encrypted
with the service session key) to the target server.
The tickets act as logical tokens confirming identity and authorizations without
revealing passwords.
The server validates the ticket, decrypts the authenticator, and verifies
freshness (timestamp) to prevent replay attacks.
Mutual authentication may be performed: the server returns the timestamp
encrypted with the service session key, proving its own identity to the client.
Once authenticated, the server enforces its access control list (ACL) using the
group SIDs present in the ticket.
Federation 🌐 (4.3.5)
Federation – Enables trust between separate identity domains, allowing users to
access resources in another organization using their native credentials.
Typical Flow
1. Service Provider (SP) redirects the user to an Identity Provider (IdP).
2. User authenticates with the IdP and receives a claim token (signed by the IdP).
3. User presents the token to the SP.
4. SP validates the token’s signature (trust relationship) and maps the user to local
authorizations.
Federation expands access beyond internal employees to partners, suppliers, or
customers, often using claims‑based identity.
📜
Security Assertion Markup Language (SAML) 📜 (4.3.6)
SAML – An XML‑based standard for exchanging authentication and authorization data
(assertions) between an IdP and an SP.
Primary Roles
Role Description
Resource Owner End user who authorizes access to their
data.
Client Application requesting access (registered
with the Authorization Server).
Authorization Server Authenticates the user and issues access
tokens.
Resource Server Hosts the protected APIs; validates access
tokens.
Grant types (flows) vary by context (e.g., authorization code, client credentials,
implicit).
Tokens are often JSON Web Tokens (JWT) – Base64‑encoded strings
containing claims, optionally signed for integrity.
Simplified Flow
1. Client redirects user to Authorization Server for consent.
2. User authenticates and grants permission.
3. Authorization Server issues an access token (and optionally a refresh token).
4. Client presents the access token to the Resource Server to access protected
resources.