Domain 5 - Cryptography Flashcards
What is the most obvious use for Cryptography?
Confidenitaly
Hashes and Cryptographic Hashes provide what?
Integrity
Why isn’t everything encrypted at all times?
Availability.
Availability is adversely impacted by cryptography through the introduction of extra risk from loss, distribution, or mismanagement of cryptographic keys.
Key Distribution Definition
Method of getting a key from where it was generated to where it needs to be used.
Key Clustering
When different encryption keys generate the same ciphertext from the same plaintext message.
Synchoronous
Refers to when each encryption or decryption request is performed immediately.
Asynchoronous
When ENC/DEC requests are processed in a queues.
Key benefit of asynchronous cryptography
Utilization of hardware devices and multiprocessor systems for cryptographic acceleration.
Hash Function
One-way mathematical operation that reduces a message or data file into smaller fixed length output, or hash value.
Digital Signatures
Provide authentication of a sender, and integrity of a sender’s message.
How do Digital Signatures work?
Sender
- > Message goes into Hash Function
- > Hash Value is encrypted using Sender’s Private Key
Receiver
- > Verifies the digital signature by decryption the hash value using the sender’s public key.
- > Performs same Hash Function
Compares the Hash Functions
Asymmetric
Term used in cryptography in which two different but mathematically related keys are used where one key is used to encrypt and another is used to decrypt.
Term is used in reference to PKI
Digital Certificate
Electronic Document that contains the name of an organization or individual, the business address, the digital signature of the CA issuing the certificate, the Certificate’s holder Public Key, a serial number, and an expiration date.
Used to ID the certificate holder when conducting electronic transactions.
CA
Certificate Authority
Entity trusted by one or more users as an authority in a network that issues, revokes, and manages digital certificates.
RA
Registration Authority
Performs certificate registration services on behalf of a CA.
The RA, a single-purpose server, is responsible for the accuracy of the information contained in a certificate request.
RA is also expected to perform user validation before issuing a CR.
Plaintext/Cleartext
Message in its natural format.
Ciphertext/Cryptogram
Altered form of a plaintext message, so that it’s unreadable for anyone except the intended recipients.
Cryptosystem
Entire Cryptographic Operation.
Includes: algorithm, key, and key management functions
Encryption
aka enciphering
Process of converting the message from its plaintext to ciphertext.
Decryption
Reverse of encryption. Convert ciphertext to plaintext.
Cryptovariable
AKA Key
Input that controls the operation of the cryptographic algorithm.
Determines the behavior of the algorithm and permits the reliable encryption and decryption of the message.
Both Secret and Public Keys
Nonrepudiation
Security service by which evidence is maintained so that the sender and the recipient of data cannot deny having participated in the communication.
Algorithm
Mathematical function that is used in the encryption and decryption process.
Cryptanalysis
Study of techniques for attempting to defeat cryptographic techniques and, more generally, IS Services
Cryptology
Science that deals with hidden, disguised, or encrypted communications.
Collision
Occurs when a hash function generates the same output for different inputs.
Key Space
Represents the total number of possible values of keys in a cryptographic algorithm or other security measure. such as a password.
Work Factor
Time and effort required to break a protective measure.
IV
Initialization Vector
Non-secret binary vector used as the initializing input algorithm for the encryption of a plaintext block sequence to increase security by introducing additional cryptographic variance and to synchronize cryptographic equipment.
Encoding
Action of changing a message into another format through the use of a code.
Often done by taking a plaintext message and converting it into a format that can be transmitted via radio or some other medium, and is used for message integrity.
Decoding
Reverse process of encoding - converting the encoded message back into its plaintext format.
Transposition
AKA Permutation
Process of reordering the plaintext to hide the message.
Substitution
Process of exchanging one letter or byte for another.
SP-Network
Process described by Claude Shannon and used in most block ciphers to increase strength.
Most block ciphers do a series of repeated substitutions and permutations to add confusion and diffusion to the encryption process.
Confusion
Provided my mixing (changing) the key values used during the repeated rounds of encryption. When the key is modified for each round, it provides added complexity that the attacker would encounter.
Diffusion
Mixing up the location of the plaintext throughout the ciphertext.
Using transposition, the location of the 1st character of the plaintext may change several times during the encryption process.
Avalanche Effect
Important Consideration
All Cryptography used to design algorithms where a minor change in either the key or the plaintext will have a significant change in the resulting ciphertext.
Feature of strong-hashing algorithms.
Two Primary Methods of Encrypting Data
Stream & Block
Stream is bit-by-bit encryption, most common with streaming applications. WEP uses this.
Block - encrypts in blocks. Used in newer cryptography implements such as AES
XOR
Exclusive OR
Very fast mathematical operation used in stream ciphers.
Stream Based Cipher
Stream is bit-by-bit encryption, most common with streaming applications. WEP uses this
Relies primary on substitution
More commonly implemented in hardware.
Block Ciphers
Operates on blocks or chunks of text.
As plaintext is fed through cryptosystem, it’s divided into blocks of a preset size..usually 64b, 128b, 192b, etc
Uses combination of substitution and transposition
More computationally intensive and usually more expensive to implement compared to Stream Based.
More commonly implemented in software.
Name the basic Block Cipher Modes
ECB - Electronic Code Book CBC - Cipher Block Chaining CFB - Cipher Feedback OFB - Output Feedback CTR - Counter
ECB
Electronic Code Book (Block Cipher)
Most Basic
How?
Each block is ciphered independently,
Use?
Any file with non-repeating blocks (less than 64b), such as DES
CBC
Cipher Block Chaining (Block Cipher)
How?
Result of a block of encrypting data is fed back into the process to encrypt the next block of data.
Use?
Data at rest
CFB
Cipher Feedback (Stream Cipher)
How?
Cipher is used as a keystream generator rather than for confidentiality. Each keystream comes from previous block.
Use?
N/A - Retired due to the delay imposed by encrypting each block of keystream before proceeding.
OFB
Output Feedback (Stream Cipher)
How?
Keystream is generated independently of the message.
Use?
N/A - Retired due to Avalanche problems. Was used in Pay-Per-Views apps.
CTR
Counter (Stream Cipher)
How?
Uses the formula Encrypt (Base+N) as a keystream generator where Base is a starting 64 bit number and N is a simple, incrementing function.
Use?
Where High Speed or Random Access Encryption is needed. Examples include WPA2 and the Content Scrambling System.
IV
Initialization Vector
Arbitrary number that can be used along with a secret key for data encryption. This number, also called a nonce, is employed only one time in any session.
24-bit key used along with a WEP key of 40-bit, making the sum to be 64-bit
USED ONLY ONCE
Nonce
Arbitrary number used as the IV.
Two main categories of encryption algorithms?
- Symmetric - AKA Secret Key Encryption uses only 1 key
- Asymmetric - AKA Public Key Encryption - uses two keys (public and private). Public is used for encryption and private is used for decryption.
DES
Data Encryption Standard
First Encryption Standard recommended by NIST.
64-bit key size
64-bit block size
NOT Secure
3DES
Triple Data Encryption Standard
192-bit key size
64-bit block size
Slower than other Block Cipher Methods.
RC2
Variable Key Size (8-128b)
64-bit Block Cipher
Not Secure because of related-key attack
Blowfish
Variable Key Sizes (32 - 448b) Default is 128
64-bit block cipher
Unpatented and Free
AES
Advanced Encryption Standard (Block Cipher)
Variable Key Length (128, 192, 256 bits) Default is 256
Encrypts 128-bit data blocks in 10, 12, 14 rounds depending on key size.
Fast, Flexible
RC6
Block Cipher derived from RC5
128 -bit Block Size
Key Sizes of 128, 192, 256 bits
MD
Message Digest, or just Digest
Hash Value
Small representation of a larger message. Used to ensure authentication, integrity of information, not confidentiality.
Main properties of a Hash Function
- Easy to Compute for any message
- Infeasible to generate a hashed message
- infeasible to modify message without modifying hash
- Infeasible to find 2 different message with same hash.
MD 2, 4, & 5
Message Digest Hash Functions used to create message digests for digital signatures.
MD2 - 128-bit message using 128-bit block, through 18 rounds of operation. Still used in certain PKI enviroments.
MD4 - 128-bit message using 512-bit block, through 3 rounds of operations. Popular for File sharing and synchronization applications.
MD5 - 512-bit block generating 128-bit MD as well, over 4 rounds of operation.
SHA
Secure Hash Algorithm, V 0, 1, and 2
Collection of hash functions created by US gov’t.
SHA-0 is retired
SHA-1 uses a block size of 512b to create a message of 160b through 80 rounds of operation. Susceptible to Bday Attacks.
SHA-2 MD are either 224, 256, 384, 512b in length.
SHA-224 and SHA-256 uses block lengths of 512bits
SHA-384 and SHA-512 uses block lengths of 1024bits
HAVAL
Highly Flexible and configurable Hash Function
Hashes can be 128, 160, 192, 224, and 256 bits and use a fixed block size of 128 with 3, 4, or 5 rounds of operation. l
RIPEMD-160
Hash Function
Produces 160-bit MD using 512-bit block size.
Not patented
Created in Europe
Two ways to attack Hash Algorithms
Brute-Force
Cyptanalysis
Cryptanalysis
Art and Science of defeating cryptographic systems and gaining access to encrypted message even when the keys are unknown.
Responsible for creating Rainbow Tables.
Rainbow Tables
Pre-computed tables or lists used in cracking password hashes.
And Open Source version is called Cain and Abel.
What fights against Rainbow Tables?
Salting
Salted Hashes
Fights against Rainbow Tables
Made of random bits and is an input to the one-way hash function with the target plaintext as the only other input.
Salt is stored in the resulting hash.
Primary Function of Salt
To defend against dictionary attacks and against pre-computed rainbow tables.
Out of Band
Means using a different channel to transmit the keys. Used in Symmetric Cryptography.
Advantages and Disadvantages of Symmetric Cryptography?
Advantages include: Speed, Secure, Cheap
Disadvantages: Key Management Issue, Limitation that algorithm doesn’t provide benefits past confidentiality.
CCMP
COUNTER MODE WITH CIPHER BLOCK CHAINING MESSAGE AUTHENTICATION CODE
Encryption Protocol based on AES using CTR with CBC-MAC.
Uses 128-b key and 128-b block size
MIC
Message Integrity Code
Provides data origin authentication and data integrity for the packet payload data.
IDEA
International Data Encryption Algorithm
CAST
Feistel-Type Block Cipher
SAFER
Secure and Fast Encryption Routine
Patent-Free
Variation of SAFER is used as a block cipher in Bluetooth
Blowfish
Symmetrical algorithm.
Very Fast
Key Sizes from 23- 448
S-boxes are stored for later use.
TwoFish
Upgrade of Blowfish
RC5
Fast and Secure
RC4
Stream-Based Cipher
Most widely used stream cipher.
How many symmetric keys do you need?
n(n-1) / 2
How many asymmetric keys do you need?
2n
RSA and 3 primary attacks against it?
Used for secure data transmission. Slow. Uses Prime Numbers
Commonly used to encrypt shared keys for symmetric key cryptography.
- Brute Force - Trying all possible private keys
- Mathematical Attacks - factoring the product of two prime numbers
- Timing Attack - measuring the running time of decryption
Diffie-Hellmann
Key Exchange Algorithm
Does NOT provide confidentiality.
Enables two users to exchange or negotiate a secret symmetric key that will be used for encryption.
El Gamal
Cryptographic algorithm based on Diffie-Hellmann, but includes confidential and digital signatures services.