Cryptography & PKI Flashcards
Symmetric algorithms
Requires both the sender and receiver to have the same key. This results in faster computations, which makes them well-suited to bulk encryption.
Modes of operation
Modes of operation are used to deal with multiple blocks of identical input data, so that the cipher text doesn’t have repeated blocks of encrypted data.
Asymmetric algorithms
In asymmetric algorithms, the sender and receiver each have a private key, which they keep to themselves, and a public key, which they can share.
Hashing
- Hashing is a special mathematical function that performs one-way encryption.
- This is a good way of storing computer passwords, and also ensuring message integrity.
- Common hashing algorithms include MD2, MD4, MD5, SHA-1, SHA-256, SHA-384 and SHA-512, some of which have been found to suffer from collisions.
Salt
Salting is the addition of a high-entropy piece of data (random characters) to an input to make it more difficult for the attacker to determine the original data.
Initialization Vectors (IV)
Initialization vectors, or IV, are used to help achieve randomness with deterministic inputs.
Nonce
Nonce is similar to salts and IVs, but is only used once. This is helpful in stream ciphers to break stateful properties.
Elliptic Curve
Special mathematical properties that allow a sender and receiver to openly pick a spot on the curve, and then individually derive keys from that point.
Weak/deprecated algorithms
As time goes by, computational power increases, which means that algorithms are not as secure. Additionally, flaws are found in different algorithms.
Digital signatures
- This is a cryptographic implementation meant to demonstrate authenticity and identity for a given a message.
- This uses public key cryptography. A person will hash a message, and then encrypt it with their private key.
- The receiver can then decrypt it with the sender’s public key. If they hash the original message, and it matches the decrypted message, they know that the message hasn’t been altered, and they also know that the sender sent it.
Diffusion
One character change in the plaintext should correspond to multiple changes in the cipher text.
Confusion
The principle that affects randomness of an output. Each ciphertext character should depend on several parts of the key.
Collision
When two different inputs have the same output on a cryptographic function.
Steganography
The science of hiding data inside other data. This has the advantage of not attracting attention.
Obfuscation
This is masking an item so that it’s unreadable, yet still functions.
Stream vs. block
- Encryption can happen as block operations, which are performed on blocks of data. This means you can do both transposition and substitution operations.
- Alternatively, you can also do stream ciphers on stream data, which is common with streaming audio and video. This has to happen in smaller chunks, so it can do substitution only.
Key strength
The strength of a cryptographic operation is dependent on the key strength.
Session keys
A session key is a symmetric key for encrypting messages during a communication session. It’s generated from random seeds, and provides perfect forward secrecy.
Ephemeral key
Ephemeral keys are keys that are only used once after generation.
Secret algorithm
While most algorithms are known, leaving the key as the crucial part, you can also have secret algorithms.
Data-at-Rest Encryption
Protection of data-at-rest is also known as data encryption. This includes things like whole disk encryption.
Data-In-Transit Encryption
Transport encryption is used to protect data-in-transit. This includes things like Transport Layer Security on the transport level.
Data-in-use Encryption
Data-in-use means data that’s stored in a non-persistent state (RAM, CPU caches, CPU registers, etc.) New techniques like Intel’s Software Guard Extensions can encrypt this data.
Random/pseudo-random number generation
There are specialized pseudo-random number generators that try to minimize the predictability of not-actually-random numbers that are generated by computers.