Chapter 7 Flashcards
Asymmetric (Public) key cryptosystems
RSA
Diffie-Hellman
ElGamal
Eliptic Curve (ECC)
5 Requirements for hash functions
- Variable length of input
- Fixed length of output (hash)
- Hash function relatively easy to compute
- Must be one-way function
- Collision resistant
Common Hash Algorithms
SHA-1 - insecure and deprecated; 128-bit hash
SHA-2:
- SHA-256 (256 bit hash)
- SHA-224 (224 bit hash)
- SHA-512 (512 bit hash)
- SHA-384 (384 bit hash)
SHA-3: same level of security but slower than SHA-2
MD5 - 128 bit hash
RIPEMD:
- RIPEMD-160 - only secure variant; 160 bit hash
HAVAL: similar to MD5 but variable hash lengths (128, 160, 192, 224, 256 bits)
Digital signatures
2 goals: non-repudiation and authenticity
HMAC hybrid - use shared key encryption instead of public key; no non-repudiation
Digital Signature Standard (DSS)
Mandated FIPS for gov’t use
SHA-3 for hash (message digest)
For encryption:
1. RSA
2. Eliptic curve DSA (ECDSA)
3. Edward curve DSA (EdDSA)
Dig Certificates - X.509
- Endorsed copies of an individual’s public key
- Ver of X.509
- Serial ID
- Signature algorithm
- Issuer name
- Validity period
- Subject’s name
- Subject’s public key
Certificate Authorities (CA)
- Registration Authorities (RA) to help with verification of applicants
- Root CA often offline (disonnected and powered off)
- Intermediate CA issue certs on behalf of root CA
Certificate life-cycle
- Enrollment
- CSR submission
- Domain validation (DV) - simple check for domain ownership
- Extended validation (EV) - verify legitimate business
- CA issues certificate - Cert Verification
- verify trust
- subject name matches
- check validity via Cert Revocation List (CRL) or via OCSP - Revocation
- when compromised
- issued in error
- contents have changed
- security association changed (e.g. subject no longer employed by org)
Certificate pinning - cert (public key) associated with site for extended time
Certificate stapling - OCSP server staples OSCP response with cert and sends to website server; reduce repeated requests to OCSP; good for 24 hours usually
Certificate formats
Common:
- DER - binary (.der, .crt, .cer)
- PEM - ascii (.pem, .crt)
Windows:
- PFX - binary (.pfx, .p12)
- P7B - ascii
HSM (hardware security module)
- manage keys
- hardware acceleration of encryption
- use keys without need to know actual key
- tamper resistant
Email security
PGP - includes digital signature with email
S/MIME - use RSA and X.509 certs
TLS operation
(TLS 1.2 or 1.3)
- Client decrypts server cert for public key
- Client creates ephemeral key, encrypts with server public key, sends to server
- Server encrypts its ephemeral key with private key, sends to client
Enumerates the following:
1. Key exchange algorithm (not TLS 1.3)
2. Authentication method (public key algorithm)
3. Bulk encryption method (symmetric key algorithm)
4. Hash algorithm for MD’s
Tor (The Onion Router)
[Dark Web]
Network traffic routed through different relay nodes, each with layer of encryption, a.k.a. Perfect Forward Secrecy
Network Encryption
Link encryption - lower layers of OSI (all including routing data encrypted)
End-to-end encryption - higher layers of OSI (routing data not encrypted)
SSH2
Better than SSH, includes DH key exchange, multiple sessions in single SSH connection
IPSEC
AH (Authentication Header) - authentication
ESP (Encapsulated Security Payload) - payload encryption with limited authen
Transport mode - end-to-end encryption; only data payload is encrypted
Tunnel mode - entire packet (data + header) encrypted, i.e. link encryption
Uses SA (security associations) channels; simplex
Blockchain
Distributed across many different systems
Protected from being tampered with
Cryptographic attacks
- Analytic attack - focus on algorithm
- Implementation attack - focus on implementation of algorithm
- Statistical attack - exploit number related vulnerabilities in OS or hardware
- Brute force attack
- Fault injection attack
- Side Channel attack
- Timing attack - based on how long encryption takes
- Ciphertext only and frequency analysis - have access to ciphertext only
- Known plaintext attack - have access to both plaintext and ciphertext to determine key
- Chosen plaintext - access to ciphertext of chosen plaintext
- Chosen ciphertext - ability to decipher some ciphertext and use that to discover key
- Meet-in-the-middle attack - targets 2DES
- Man-in-the-middle (or on-path) attack
- Birthday attack - collision or reverse hash attack; take adv of hash collisions
- Replay attack