2.8 Cryptographic Concepts Flashcards
Define cipher
Algorithm for encrypting/decrypting text, publicly known
Define key
Information added to the cipher to encrypt/decrypt data, private since having this allows the encryption/decryption of data
5 Steps of Digital Signature (using e-mail as an example)
- Sender generates a hash of the entire plain text of the message
- Sender encrypts the hash using his/her private key
- Recipient receives message in plain text + encrypted hash
- Recipient decrypts the hash using Sender’s public key
- Recipient hashes the message and compares it to the hash decrypted from sender
How does key length relate to security of encrypted data?
A longer key length produces more secure encryption
Define key stretching + 2 libraries/algorithms
- Making a small encryption key larger by hashing it multiple times
- Bcrypt, PBKDF2
Define hashing (3)
- Output value generated from algorithm based on input data
- Irreversible
- Should produce unique values if provided the same input multiple times
What is a hashing collision and what algorithm commonly produces them?
- When the same output value occurs for different input
- MD5
Define salt
A random value added to input data before hashing
2 security benefits of salt
- Prevents hash collisions
- Makes brute force attacks, such as Rainbow Tables less effective
Define symmetric encryption
A single key is used to encrypt/decrypt data
2 challenges with symmetric encryption
- Securely sharing the key
- Scalability - hard to share key with many parties
Define asymmetric encryption (2)
- AKA public-key cryptography
- Uses multiple keys, public and private
2 Encryption/Decryption paths with asymmetric encryption
- Data encrypted with private key can be decrypted by anyone with the public key
- Data encrypted with public key can only be decrypted whoever has the private key
What is difference between private and public keys?
Public key can be shared with anyone, private key must be kept confidential
What is the main disadvantage of asymmetric encryption?
Requires more CPU work to generate
Define benefit of Diffie-Hellman key exchange and 2 aspects of how it works
- Allows 2 parties to communicate via symmetric encryption without sharing the key
- 2 parties use asymmetric encryption to independently generate a single symmetric key
- Each party combines their private key with other party’s public key which generates the same key for both parties
Define Elliptic-Curve Cryptography ECC (3 -what, benefit, and who uses it)
- Alternate asymmetric encryption algorithm with same security as non-ECC
- Produces smaller keys and a reduction in size of encrypted data
- Useful for mobile devices and IoT devices that have less resources
Define Perfect Forward Secrecy (PFS) (4)
- Creates and exchanges a private key that is only valid for a single session
- Often uses ECC-based algorithm
- Requires that server and client web-browser is capable of it
- Prevents future decryption of communication
Benefit of quantum computing
Able to process more information using smaller data chunks, i.e. a qubit is both 1 and zero so 4 qubits can represent 16 unique values
Benefit of quantum computing to communications
If a qubit communication is monitored, it changes the qubits, allowing detection of this upon receipt, i.e. could detect if an encryption key was intercepted
Define steganography
- Hiding information within an image, audio or video file
- The file functions as expected, but the information can be extracted with the proper tools
Define stream-based cipher
- Data is encrypted one byte at a time sequentially
- Mainly used for symmetric encryption
- IV often added to provide some randomization
Define block cipher
Data is divided into blocks, usually 64 or 128-bit, and encrypted
Define authenticated encryption
Encryption that simultaneously assures the confidentiality and authenticity of data
Define unauthenticated encryption
Only ensures confidentiality, does not ensure authenticity
What do counter modes of encryption provide?
Adds an incremented counter value when encrypting the data to create randomization
Describe blockchain and public ledgers
Transactions that are tracked via a distributed ledger. Multiple different devices verify a transaction against their copies of a ledger before it is approved to be added to the blockchain. Once approved, it is added to the blockchain with a hash to protect against alteration.