Cryptography and Mitigation (Ch. 10,11) Flashcards
PKI
_ public key infrastructure
Symmetric vs asymmetric encryption
_ same key to encrypt and decrypt vs different keys
_ asymmetric requires PKI for certificates
_ asymmetric is much more resource intensive (so mainly only used to exchange symmetric keys)
Stream cipher
_ encrypts one bit or one byte at a time
_ more efficient with unknown or variable length data
Block cipher
_ encrypts data in blocks
_ more efficient with known-length data
ECC
_ elliptic curve cryptography
_ minimal overhead
_ useful in mobile devices
steganography
_ hides data within other files
_ e.g. embed data within whitespace of an image
Digital signature for email
_ has of email encrypted with private key
Benefits of a digital signature
_ authentication
_ non-repudiation
_ integrity
MD5
_ message digest 5
_ hashing algorithm producing 128-bit hash
_ has vulnerabilities, so now used as a checksum
_ susceptible to has collisions, making it unsuitable as a cryptographic hash (e.g. for hashing passwords)
SHA
_ secure hashing algorithm
_ can be used to verify integrity
SHA-2
_ created by NSA
_ SHA-256 creates 256-bit hashes
_ SHA-512 creates 512-bit hashes
_ SHA-224 truncates SHA-256
_ SHA-384 truncates SHA-512
SHA-3
_ created in a non-Nsa public competition
_ alternative to SHA-2 (making same sizes available)
HMAC
_ hash-based message authentication code
_ fixed-length string requiring a shared secret to create and validate
_ encrypts MD5 hash
_ provides both integrity and authenticity
_ used in IPsec and TLS
_ (if hash is transmitted with message, attacker could revise hash for a revised message, but not with HMAC)
sha256sum
_ calculates SHA-256 of a file
Password spraying attack
_ a kind of brute force attack
_ loops over many accounts for each attempted password
_ increases time between attempts on any given account, helping to avoid password lockout
Pass the hash attack
_ attacker first somehow acquires a hash for a password
_ attacker then uses that hash in authentication
Birthday attack
_ named for the mathematical “birthday paradox”
_ in any group of 23 people, there is a 50% chance 2 of them were born on the same day of their birth year
_ attack guesses the hash (which has collisions)
Rainbow table attack
_ attempts to discover a password from a hash
_ rainbow table is a DB of hashes for passwords (e.g. hashes for every possible 9-digit password)
_ hashes are time-consuming to produce, but rainbow tables can be so huge that they save time
Key stretching
_ applies cryptographic stretching to a salted password to make the effort of guessing hashes much more time consuming
_ Bcrypt, PBKDF2, and Argon2 also key stretch
Bcrypt
_ salts password prior to encrypting
_ repeats process up to 60 times to make computationally expensive
_ 60-character string
pepper
_ a second random salt number
PBKDF2
_ 64+ bit salt with HMAC
_ can (but need not) repeat process many times to make computationally expensive
AES
_ advanced encryption standard
_ symmetric key algorithm
_ encrypts into 128-bit blocks
_ key sizes 128, 192, or 256 bits
_ fast, efficient, strong
3DES
_ “triple DES” (Data Encryption Standard)
_ improves on DES
_ encrypts in 3 passes with 3 different keys
_ more resource intensive than AES
_ used when hardware doesn’t support AES
Key exchange
_ asymmetric keys are used to secretly exchange a symmetric key
_ the symmetric key is then used for encryption and decryption because it’s much more efficient
Digital certificate
_ means by which public keys are shared
_ includes a public key
_ describes owner of the certificate
_ serial number
_ certificate authority issuer
_ validity dates
_ valid usage (encryption, authentication, etc.)
_ CN
_ sent to clients in response to an HTTPS request
CA
_ certificate authority
_ issues and manages digital certificates
_ provides trust in certificates
Ephemeral key
_ lasts only the duration of a session
RSA key lengths
_ 1024, 2048, 4096 bits
_ 1024 no longer considered secure
tokenization
_ obfuscation technique that replaces sensitive data with non-sensitive placeholders (i.e. tokens)
_ tokens have to be looked up within a database to retrieve what they represent
_ reduces exposure when one of the datasets is compromised
masking
_ showing asterisks instead of a typed value
Encryption with private key
_ for making digital signatures
_ not used to encrypt web traffic; that’s done with an ephemeral symmetric key
DSA
_ digital signature algorithm
_ encrypted hash of a message, using sender’s private key
_ authenticates the sender
_ sender can’t repudiate that they sent the message
_ ensures message integrity, as the hash was included
_ encrypting the message would do the same but take far more resources
S/MIME
_ secure/multipurpose internet mail extensions
_ used for digitally signing and encrypting/decrypting email
HTTPS TLS handshake
_ client requests an HTTPS session (but TLS is not restricted to HTTP)
_ server responds with certificate containing its public key
_ client creates a symmetric key
_ client encrypts symmetric key with server’s public key
_ client sends encrypted symmetric key to server
_ server decrypts symmetric key with server’s private key
_ data is thereafter encrypted with the symmetric key
Downgrade attack
_ forces system to downgrade its security
_ attacker then exploits the lesser security
_ e.g. if SSL is enabled and client says it doesn’t support TLS, server might allow SSL
_ e.g. if server supports a weak cipher suite, client might force it to downgrade to that
blockchain
_ distributed, decentralized public ledger
Blockchain block
Contains:
_ info about the transaction
_ info about the parties involved (digital signatures rather than names)
_ a hash that uniquely identifies the block