Cryptography Flashcards
What is cryptanalysis?
The art of cracking encryption.
A key is added to what when trying to encrypt some plaintext?
Encryption works by adding a key to a cypher.
What is key stretching or key strengthening?
Making a weak key stronger by performing multiple processes.
Like hashing a password, and then hashing the hash of a password, etc.
What are two common key stretching libraries?
bcrypt
PBKDF2
What is homomorphic encryption? (HE)
With homomorphic encryption you are able to perform calculations of data while it is still encrypted, and perform the work directly on the encrypted data, and save the results in an encrypted form, while having never decrypted the data.
It can still only be decrypted with a private key.
This is useful for data in the cloud and keeping the data always in an encrypted form.
This is also useful for people to be able to perform actions on data and get research information from the data without ever having access to the original data source.
What is ECC in cryptography?
Elliptic curve cryptography.
A way of creating keys with curves instead of giant numbers.
A great cryptography solution for devices with smaller storage or less computing power. (Phones/IoT)
Whats is PFS in cryptography? or perfect forward secrecy
Perfect forward secrecy changes the encryption process to where you are not using the same private key every single time, commonly used on web servers.
Uses an algorithm called ‘elliptic curve diffie-hellman ephemeral’
Keys are created just to transfer for a single session and then once that session is over those keys are no longer used. This means that every session will have a different set of keys.
Not all servers are going to have the bandwidth or strong enough computing power to use PFS.
What is the primary difference between quantum computers and regular computers?
The smallest form of information in classic computing would be a “bit” (1,0)
While in quantum computing it is a “qubit” which is able to effectively be both 1 and 0 at the same time.
What is the different between stream and block ciphers?
Stream ciphers will encrypt one bit or byte at a time, whereas block ciphers will encrypt fixed-length blocks like 64bits or 128bit blocks one at a time.
Stream ciphers and block ciphers will typically will usually be used with symmetric encryption and are relatively fast and can be used without much overhead or using too many resources.
What is the ECB encryption mode?
Encryption codebook.
The simplest encryption mode. (usually too simple for most usecases)
All blocks are encrypted with the same key, identical plaintext blocks will create identical ciphertext blocks.
What is the CBC encryption mode?
Cipher block chaining.
This is a popular mode of encryption, and is easy to implement.
Adds a bit of additional randomization to the final result, each block is encrypted differently because the ciphertext from a previous block will be used as the initialization vector(IV) for the following block.
What is a CTR encryption mode?
A counter (CTR) encryption mode will use a counter while encrypting blocks of plaintext, each block will be encrypted differently. The difference between them is caused by an encrypted version of the current counter value being added to the key used for that encryption.
What is the GCM encryption mode?
Galois counter mode combines counter(CTR) mode with galois authentication.
You can combine both encryption and authentication.
This is used in SSH, TLS and more.
Commonly used in wireless connectivity, IPsec, wireless, etc