Sec+ Chapter 07: Cryptography and the Public Key Infrastructure Flashcards
(106 cards)
Cryptography
The practice of encoding information in a manner that it cannot be decoded without access to the required decryption key. Consists of two main operations:
1) Encryption: Transforms plain text information into ciphertext using an encryption key
2) Decryption: Transforms ciphertext back into plain text with a decryption key
4 goals of cryptography
1) Confidentiality: Used to protect information from prying eyes
2) Integrity: Used to ensure data isn’t maliciously or unintentionally altered
3) Authentication: Validate the identity of individuals
4) Nonrepudiation: Ensures that individuals can prove to a third party that a message came from its purported sender
Cipher
The algorithms used to perform encryption and decryption operations
Ciphering is the process of using a cipher to scramble a message
Substitution cipher
A type of coding or ciphering system that changes one character or symbol into another
Transposition cipher
Transposing or scrambling letters in a certain manner. Typically broken into blocks of equal size and each block is then scrambled
Steganography
The art of using cryptography techniques to embed secret messages within another file
Steganographers often embed their secret messages in images, video files, or audio files because the files are so large the message would be easily missed by inspectors.
Often used for illicit activities
Cryptography Goal: Confidentiality
The most widely cited goal of cryptosystems
Refers to the preservation of secrecy for stored information or for comms between individuals and groups
Ensures data remains private in three different situations:
1) At rest
2) In transit (on the wire)
3) In use
Symmetric encryption
AKA: secret key algorithm or shared secret
Uses a single key to encrypt the data, and when you want to decrypt the data you use the same key
This shared, secret key is available to all users of the cryptosystem
It doesn’t scale well and is challenging to distribute
Asymmetric encryption
AKA: Public key cryptography
Unlike symmetric, asymmetric uses multiple keys: a public and private key
Private key is what only you have access to and nobody knows what that is
Public key is mathematically related to the private key, and it’s what you give everyone so they can encrypt info and send it to you
Once someone encrypts data with your public key, the only way to decrypt it is with your private key
You can also do this the opposite way, and encrypt info with your private key and the people who decrypt it are the ones with your public key (digital signatures)
Data at rest
Stored data that resides in a permanent location awaiting access
EX: hard drives, backup tapes, cloud storage, USB drivers
To protect it, we must encrypt the data with whole disk, database, or file/folder encryption
Assign permissions to data in this drive
Data in transit
On the wire (aka, in the cables), is data being transmitted across a network between two systems
EX: Data going between switch interfaces, router connections, and devices on the network
It’s difficult to protect as it travels, but not impossible
Allow or prevent access with firewall or IPS, or we encrypt the data as it goes through the network with TLS or IPsec
Data in use
Stored in the active memory of a computer system, where it can be accessed by a process running on that system
EX: Data in system RAM, CPU registers, or system caches
Almost always presented in a decrypted view, which makes it a very attractive option for attackers
Cryptography Goal: Integrity
Ensures data isn’t altered without authorization. If integrity mechanisms are in place, the recipient of a message can be certain that the message received is identical the one that was sent.
Integrity checks ensure stored data wasn’t altered between time it was created and accessed.
Integrity controls protect against all forms of alternation, including:
1) Intentional by third-party attempting to insert false info
2) Intentional deletion of portions of the data
3) Unintentional alteration by faults in the transmission process
Cryptography Goal: Authentication
Verifies the claimed identity of the system users
Cryptography Goal: Nonrepudiation
Provides assurance to the recipient that the message was originated by the sender, and not someone pretending to be the sender
Prevents the sender from claiming they never sent the message in the first place
Only offered by public key, or asymmetric
Key space
The range of values that are valid for use as a key for a specific algorithm
Defined by its key length
Key length
The number of binary bits in the key that defines the key space
Kerchoff Principle
A cryptographic system should be secure, even if everything about the system, except the key, is public knowledge
AKA: Your enemy knows this system
Cipher suite
Sets of ciphers and key lengths supported by a system
Block cipher
Ciphers that operate on blocks of a message and apply the encryption algorithm to the entire message block at the same time
Usually you see this with 64 or 128 bit blocks
If it doesn’t fit, padding is added to fill in the short blocks
Like stream cipher, this is commonly used with symmetric encryption
Uses different modes of operation to avoid patterns in the encryption
Stream cipher
Ciphers that operate on one character or bit of a message / data steam at a time
Often used with symmetric encryption
High speed, low hardware complexity
Challenge is that you don’t know what’s coming down the stream, which means randomization of data could be difficult if multiple bytes are identical in the stream
IV is added to the cipher to add randomization to the process
Symmetric key cryptography weaknesses
1) Key distribution is a major problem: Parties must have a secure method of exchanging the secret key before establishing comms with a symmetric key protocol
2) Doesn’t implement nonrepudiation: There’s no way to prove where a given message originated since anyone can encrypt and decrypt with the shared secret key
3) Algo isn’t scalable: Extremely difficult for large groups to comm with this. Secure private comms between individuals in the group can only be achieved if each possible combo of users shared a private key
4) Keys must be regenerated often: Each time a participant leaves a group, all keys known must be discarded
Strengths of symmetric key cryptography
Speed: It’s 1k to 10k faster than asymmetric algos
Strengths of asymmetric key cryptography
1) The addition of new users requires the generation of only one public-private key pair, which is used to comm with all users. Extremely scalable
2) Users can be removed easily. Key revocation mechanism allows a key to be canceled, removing a user from the system
3) Key regeneration is only required when a private key is compromised. If a user leaves, the admin simply needs to invalidate their keys
4) Provides integrity, authentication, and nonrepudiation. If a user doesn’t share their private key with others, a message signed by them can be shown to be accurate and from a specific source. Can’t be repudiated later
5) Simple key distribution. Users who participate simply make their public key available to anyone they want to comm with
6) No preexisting comm link needed. Two individuals can begin comms securely from the start of their session. No prior relationship needed