Cryptography, Encryption, Hashes Cont. Flashcards
Symmetric Encryption Ingredients
Plaintext message
Encryption algorithm
Secret Key
Ciphertext (scrambled message)
Decryption algorithm
Requirements for secure use of symmetric encryption
Strong encruption algorithm
Sender and receive have obtained copies of secret key in secure fashion and keep key secure
Encryption/Decryption services
Integrity checking:
–no tampering
Authenticity:
–verified authorship
Authentication:
–not an imposter
Attacks on Encryption
Break a cipher:
Uncovering plaintext p from ciphertext c, or, alternatively, discovering the key
Brute-force attack
E.g., try all possible keys
Cryptanalysis
Analysis of the algorithm and data characteristics
Implementation attacks
E.g., side channel analysis
Social-engineering attacks
Block ciphers
Most common symmetric encryption algorithms
Processes plaintext input in fixed size blocks and produces a block of ciphertext of equal size for each plaintext block
Most common:
- -Data Encryption Standard (DES)
- -Triple DES
- -Advanced Encryption Standard (AES)
Asymmetric Encryption
Plaintext
Encryption algorithm
Public and private key
Ciphertext
Decryption key
Digital Encryption Standard
Adopted 1977, most widely used until recently
Plaintext block of 64 bits, key of 56 bits, produces ciphertext block of 64 bits
Algorithm hasn’t been exploited
Key length is too short, so can be guessed
Triple DES (3DES)
repeats DES three times
Advantages:
- -168 bit key length, so more secure, overcomes vulnerability of brute force attack
- -Underlying encryption is same as DES, so already subjected to scrutiny
Drawbacks:
- -sluggish due to three times as many calculations
- -64 bit block size, need larger for efficiency and security
Advanced Encryption Standard
128 bit block, key lengths of 128, 192, 256
Stream ciphers
Processes input elements continuously, producing output one element at a time
Output called keystream
Authentication using symmetric encryption
symmetric encryption alone not sufficient for authentication even though only sender/receive share the key because the message may be reordered
Message Authentication Method
(Note: these don’t encrypt messages so confidentiality isn’t guaranteed)
Message Authentication Code: generated with secret key
Secure Hash Functions aka one way hash
Hash Function Requirements
Compute message digest of data of any size
Fixed length output: 128-512 bits
Easy to compute H(m)
Given H(m), no easy way to find m --One-way function
Given m1, it is computationally infeasible to find m2≠m1 s.t. H(m2) = H(m1)
–Weak collision resistant
Computationally infeasible to find m1≠m2 s.t. H(m1) = H(m2)
–Strong collision resistant
Public key cryptography:
Asymmetric: two keys
- -Public for encryption, private for decryption
- -Private for signing and public for verification
Not necessarily more secure than symmetric encryption
Has not made symmetric encryption obsolete
—-due to overhead from public key encryption
Protocol to distribute public key still required and is no simpler than handshaking required for symmetric encryption key distribution
Security of encryption scheme depends on 2 factors
Length of the key
–not the number of keys
Computational work involved in breaking cipher
Public Key encryption ingredients
Plaintext: Readable message or datathat is fed into the algorithm
Encryption algorithm: Performs transformations on the plaintext
Public and private key: Pair of keys, one for encryption, one for decryption
Ciphertext: Scrambled message produced as output
Decryption key: Produces the original plaintext
Steps of public key encryption
Each user generates a pair of keys
Each user places one of the keys in a public register (public key) and keeps other key private
To send message, user encrypts with other user’s public key
When other user receives message, decrypts using private key
Asymmetric Encryption Algorithms
RSA
Diffie-Hellman Key Agreement
Digital Signature Standard
Elliptic Curve Cyrptography
Digital Signature
Encrypts hash code for authentication
Public key certificates
Solves problem of impersonators sending out public announcement of public key
Certificate consists of public key plus user ID of key owner, whole block signed by trusted third pary
Methods in which public key encryption is used to protect a message
Digital Signature
Public key certificates
Symmetric key exchange using public-key encryption
Digital Envelopes
- -Protects a message without needing to first arrange for sender and receiver to have the same secret key
- -Equates to the same thing as a sealed envelope containing an unsigned letter
Cryptanalysis
Analysis of the algorithm and data characteristics to discover the plaintext or key
Cryptographic systems classified along three independent dimensions
Type of operations used for transforming plaintext to ciphertext
The number of keys used
The way in which plaintext is processed
Feistel Cipher Structure
Structure for symmetric block encryption.
Half the data block is used to modify the other half and then halves are swapped.
Following parameters/design features:
- -Block size: larger means greater security
- -Key size: larger key size means greater security
- -Number of rounds: single round inadequate security
- -Subkey generation algorithm: greater complexity in algorithm leads to greater difficulty in cryptanalysis
- -Round function: greater complexity greater resistence to cryptanalysis