Module-3
Define and explain key lengths and lifetimes.
Key Length:
The key length (key size) in bits is a fundamental security parameter in a cryptosystem,
defining the number of possible key values an attacker must try in a brute-force attack.
Key Lifetime:
The key lifetime is the duration or operational period for which a cryptographic key is
considered valid and trusted for use in securing information. Keys must be periodically
refreshed to limit exposure and manage risk.
Note:
Longer key lengths increase security but affect performance.
Symmetric key sizes: 128–256 bits, Asymmetric: 2048+ bits.
Shorter lifetimes reduce the risk of key compromise.
Session keys have short lifetimes; master keys last longer but are tightly controlled.
How are they determined in cryptographic systems?
Factors Determining Key Length and Lifetime
Algorithm security — ECC needs shorter keys than RSA.
Data sensitivity — Sensitive data requires stronger, short-lived keys.
Performance limits — longer keys increase computational load.
Anticipated threats — Consider future computing power.
Regulations — Follow standards like NIST.
Explain the methods for key generation, establishment, and storage.
1. Key Generation Methods
Key Generation is the process of creating cryptographic keys securely.
Methods:
Random Number Generators (RNGs):
Use high-quality randomness for key creation.
Example: Hardware RNGs, Cryptographically Secure PRNGs.
Key Derivation Functions (KDFs):
Derive keys from passwords or master keys using secure algorithms like PBKDF2.
Pre-distributed Keys:
Keys generated by a trusted authority and distributed securely to communicating parties.
2. Key Establishment Methods
Key Establishment is the process of securely distributing or agreeing upon keys.
Methods:
Key Transport:
One party generates the key and securely sends it to the other (e.g. using RSA
encryption).
Key Agreement:
Both parties contribute information to generate a shared key (e.g. Diffie-Hellman Key
Exchange).
Hybrid Schemes:
Use asymmetric cryptography for exchanging symmetric session keys (e.g. in TLS).
3. Key Storage Methods
Key Storage involves keeping keys safe from unauthorized access.
Methods:
Software Storage:
Storing keys in encrypted files or OS keystores (less secure for highly sensitive data).
Hardware Security Modules (HSMs):
Dedicated physical devices for secure key storage and cryptographic operations.
Smart Cards / Tokens:
Personal secure devices holding private keys and credentials.
Key Escrow:
Trusted third-party securely holds copies of encryption keys for recovery purposes.
Key management fundamentals:
Key Management refers to the overall set of processes and procedures involved in generating,
distributing, storing, using, and destroying cryptographic keys securely throughout their
lifecycle.
Fundamentals of Key Management
1. Key Generation:
Securely creating cryptographic keys using RNGs or KDFs.
2. Key Establishment:
Securely distributing or agreeing upon keys (via key transport or key agreement protocols
like Diffie -Hellman).
3. Key Storage:
Storing keys securely in software keystores, HSMs, or smart cards.
4. Key Usage:
Applying keys for encryption, decryption, signing, or verifying.
5. Key Rotation / Lifetime Management:
Defining how long keys remain valid before being updated or revoked.
6. Key Revocation:
Securely invalidating keys once compromised or expired.
7. Key Destruction:
Safely erasing keys after their operational period ends.
Certificate Revocation and Its Significance
Certificate Revocation is the process of invalidating a previously issued digital certificate
before its scheduled expiry date. It ensures that certificates no longer considered trustworthy are
marked as unusable.
Why Certificates Are Revoked:
A certificate may be revoked due to:
Private key compromise
Certificate authority (CA) compromise
Change in certificate details (e.g., ownership or permissions)
Certificate misuse
CA policy violations
Methods of Certificate Revocation:
1. Certificate Revocation List (CRL):
A periodically updated list maintained by the Certificate Authority containing serial
numbers of revoked certificates.
2. Online Certificate Status Protocol (OCSP):
A real-time, online mechanism where a client queries the CA to check the revocation
status of a specific certificate.
Significance of Certificate Revocation:
Maintains system security by ensuring compromised or invalid certificates cannot be
used for secure communication.
Protects against unauthorized access, impersonation, and man-in-the-middle attacks.
Ensures trustworthiness of digital identity systems in e-commerce, banking, secure email,
and VPNs.
Helps organizations remain compliant with security policies and data protection
regulations.
Governing aspects and policies of key management:
Key Management refers to the administration of cryptographic keys within a cryptosystem,
covering their generation, distribution, storage, usage, replacement, and destruction while
ensuring security throughout the key lifecycle.
Governing Aspects of Key Management:
1. Key Generation:
o Securely generating cryptographic keys using reliable algorithms and random
number generators.
o Ensuring key strength according to the application’s security requirements.
2. Key Distribution:
o Securely transmitting keys to authorized parties.
o Involves protocols like Internet Key Exchange (IKE), public key infrastructure
(PKI), and trusted couriers for symmetric keys.
3. Key Storage:
o Storing keys securely to prevent unauthorized access.
o Use of hardware security modules (HSMs), encrypted databases, or key vaults.
4. Key Usage:
o Defining policies on how and where keys are used.
o Avoiding key reuse and enforcing key separation for different security domains.
5. Key Replacement and Destruction:
o Regularly replacing old or compromised keys.
o Secure deletion or destruction of expired, retired, or revoked keys to prevent
recovery.
Key Management Policies:
Key Length Policy:
Defining appropriate key lengths based on algorithm type and security needs.
Key Lifetime Policy:
Setting the maximum period a key can be valid before requiring replacement.
Access Control Policy:
Defining who can access, manage, and use different keys within the organization.
Backup and Recovery Policy:
Ensuring secure backup and reliable recovery methods for keys in case of loss or
corruption.
Audit and Monitoring Policy:
Regularly auditing key usage, access logs, and management processes to detect
anomalies.
Importance of Key Usage and Secure Storage in Cryptosystems
1. Importance of Proper Key Usage
Ensures Cryptographic Strength:
Keys must be used only for their intended cryptographic purpose (e.g., encryption,
signing, or authentication). Misuse can weaken security.
Prevents Key Reuse Vulnerabilities:
Using the same key repeatedly, especially in symmetric encryption, can expose patterns
exploitable by attackers.
Limits Exposure Window:
Keys should have clearly defined usage periods or session lifetimes to reduce risks if
compromised.
Separates Roles and Functions:
Different keys are used for different tasks (e.g., separate keys for encryption and message
authentication) to contain potential damage.
Complies with Security Policies:
Adhering to organizational and regulatory policies on key usage strengthens overall
system trustworthiness.
Importance of Secure Key Storage
Protects Against Unauthorized Access:
Keys stored insecurely (e.g., plaintext files or unprotected memory) can be stolen or
copied, compromising all encrypted data.
Preserves Confidentiality and Integrity:
Secure storage ensures that keys are not tampered with, altered, or leaked.
Hardware Security Modules (HSMs):
Specialized secure devices provide tamper-resistant storage and processing of keys,
enhancing security.
Mitigates Insider Threats:
Strict access control and secure storage limit key access only to authorized personnel or
processes.
Supports Key Backup and Recovery:
Secure storage enables reliable key backups without exposing keys to risk.
Consequences of Poor Key Usage and Storage
Data Breach:
Exposure of keys leads directly to loss of data confidentiality.
Impersonation and Fraud:
Compromised keys enable attackers to impersonate legitimate users or systems.
Loss of Trust:
Systems with poor key management lose credibility and may fail audits or compliance
checks.
Alternative Approaches to Public Key Management
There are four major approaches for managing public keys:
1. Public Key Certificate-Based Systems (PKI)
Concept:
Uses a trusted third party called a Certification Authority (CA) to issue digital
certificates that bind a public key to the identity of the key owner.
How it works:
o The user generates a key pair.
o Submits the public key to a CA.
o CA verifies identity and issues a certificate.
o Other parties verify the certificate using the CA’s public key.
Advantages:
o Scalable and widely adopted (e.g., TLS, HTTPS).
o Certificates can be revoked or expired.
Limitations:
o Dependency on trusted CAs.
o Complex management in large organizations.
2. Public Key Directory-Based Systems
Concept:
A public directory maintained by a trusted authority stores users' public keys, which
can be queried as needed.
How it works:
o Users register their public keys with the directory.
o The directory verifies identity before registration.
o Users can retrieve keys for others from the directory.
Advantages:
o Centralized and organized storage.
o Simple lookup mechanism.
Limitations:
o The directory must be secure and always available.
o Susceptible to compromise if the directory is attacked.
3. Web of Trust (WoT)
Concept:
A decentralized, peer-to-peer system where users certify each other’s public keys
through mutual trust relationships.
How it works:
o Users digitally sign each other’s public keys.
o Trust decisions are made based on known trust paths.
o No central authority is required.
Advantages:
Fully decentralized.
No dependence on a single authority.
Limitations:
Difficult to manage trust relationships at scale.
Complicated trust metrics.
Example:
Used in Pretty Good Privacy (PGP) email encryption.
4. Identity-Based Public Key Management
Concept:
Public keys are derived from a unique identifier (e.g., email address or username).
A Trusted Authority (TA) generates the corresponding private keys.
How it works:
o Public key = function of user’s identity.
o TA provides the private key securely to the user.
Advantages:
o No need for certificates.
o Simplified key distribution.
Limitations:
o Key escrow problem (TA can generate any user’s private key).
o Requires strong trust in the TA.