Cryptography Flashcards

1
Q

What is a hash? What is the goal of hashing?

A

A number derived from performing a calculation on data (i.e. file). Creates a fixed-size string of bits/hexadecimal characters that cannot be reversed.
Hashing verifies data integrity.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is encryption? What are the 2 different types of encryption?

A

Scrambling/ciphering data to make it unreadable if an attacker intercepts it. Will typically include an algorithm and a key.
Symmetric: same key encrypts+decrypts data.
Asymmetric: Uses a public+private key pair. What one key encrypts, the matching key decrypts.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Message Digest 5 (MD5)

A

Produces a 128-bit hash of data (32 hex characters). Been in use since 1992, no longer considered secure today.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Secure Hash Algorithm (SHA)

A

A hashing algorithm that is grouped into 4 families:
SHA-0: not used
SHA-1: creates a 160-bit hash
SHA-2: includes 4 versions: SHA-256, SHA-512, SHA-224, and SHA-512
SHA-3: alternative to SHA-2

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Hash-Based Message Authentication Code (HMAC)

A

Combines a hashing algorithm with a shared secret (i.e. HMAC-MD5). Provides both integrity and authenticity

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

RACE Integrity Primitives Evaluation Message Digest (RIPEMD)

A

Another hashing algorithm used for integrity, but not as common as others.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Bcrypt

A

A key-stretching technique used mainly in Linux and UNIX distributions, protects passwords stored in the shadow password file. Salts the password (adding extra bits) before encrypting with Blowfish.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Password Based Key Derivation Function 2 (PBKDF2)

A

A key stretching technique that uses 64-bit salts and a pseudo-random function (i.e. HMAC) for password protection. Used by algorithms such as WPA2, Cisco OS, etc.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Initialization Vector (IV)

A

Provides a starting value for a cryptographic algorithm, either a fixed-sized random or pseudo-random number

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

XOR

A

A logical operation that compares 2 inputs. If the inputs are the same, it outputs a 1 (true). If not, it outputs a 0 (false).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is the difference between a block cipher and a stream cipher?

A

Block Cipher encrypts data into specific-sized blocks, while a stream cipher encrypts as a stream of bits/bytes rather than fixed-size blocks.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Cipher Block Chaining (CBC)

A

Cipher mode that uses an IV for randomization when encrypting the 1st block, then combines each subsequent block with the previous one via XOR operation. Can sometimes suffer from pipeline delays.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Counter (CTM) Mode

A

Cipher mode that converts a block cipher into a stream cipher. Combines an IV with a counter and uses the result to encrypt each plaintext block. IV remains the same, but CTM combines it with the counter value, resulting in a different encryption key each time.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Galois Counter Mode (GCM)

A

Cipher mode that combines the counter mode of operation with Galois mode of authentication. Provides data authenticity (integrity) and confidentiality.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Substitution Cipher

A

Replaces plaintext with ciphertext using a fixed system (example: ROT13)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Advanced Encryption Standard (AES)

A

Symmetric block cipher that encrypts data in 128-bit blocks. Can use key sizes of 128 bits (AES-128), 192 bits (AES-192) or 256 bits (AES-256). Algorithm of choice for many applications due to its speed, strength, and efficiency.

17
Q

DES/3DES

A

DES is a symmetric block cipher that encrypts data in 64-bit blocks, but uses a key size of only 56 bits, can be cracked via brute force attack.
3DES is similar, but encrypts data in 3 separate passes. More resource-intensive than AES, but is still a suitable alternative if necessary.

18
Q

RC4 (Rivest Cipher 4)

A

Symmetric stream cipher that was the encryption mechanism of choice for SSL/TLS. Speculated that RC4 can be cracked, so it is recommended to be disabled and use AES instead.

19
Q

Blowfish

A

Symmetric block cipher that encrypts data in 64-bit blocks and supports key sizes between 32 and 448 bits. Can be faster than AES in some instances.

20
Q

Twofish

A

Symmetric block cipher. Similar to Blowfish, but encrypts data in 128-bit blocks and supports key sizes of 128, 192, or 256 bits.

21
Q

Certificate (in context of cryptography)

A

A digital document that will typically include the public key and information on the certificate’s owner. Issued and managed by a Certificate Authority (CA). Also used for authentication and digital certificates.

22
Q

What elements are generally included within a certificate?

A

Serial number, issuer, validity dates, subject, public key, usage.

23
Q

RSA

A

Asymmetric encryption method that uses the mathematical properties of prime numbers to generate secure public and private keys. Current recommended key size is 2,048 bits until 2030.

24
Q

What is the difference between a static key and ephemeral key?

A

Static key is semipermanent and remains the same over a long period of time. Ephemeral key has a very short lifespan, is re-created for each session.

25
Q

Perfect Forward Secrecy

A

Indicates that a cryptographic system will generate random public keys for each session and will not use a deterministic algorithm to do so.
Given the same input, a different public key will be generated.

26
Q

Elliptic Curve Cryptography (ECC)

A

Requires less processing power than other cryptographic methods, and is therefore considered with smaller wireless devices and other lower-power devices.

27
Q

Diffie-Hellman (DH)

A

A key exchange algorithm used to privately share a symmetric key between 2 parties. Supports static and ephemeral keys (static is based on RSA)
Diffie-hellman ephemeral (DHE) uses ephemeral keys
Elliptic curve Diffie-Hellman (ECDH) also uses ephemeral keys, but via ECC

28
Q

Steganography

A

The practice of hiding data within a file.

Can hide messages within the “white space” of a jpeg or gif file, or hide data by manipulating bits in a file.

29
Q

What are the 3 security benefits of a digital signature?

A

Integrity, authentication, and non-repudiation.

30
Q

Secure/Multipurpose Internet Mail Extensions (S/MIME)

A

Popular standard used to digitally sign+encrypt email. Uses RSA for asymmetric encryption and AES for symmetric encryption.

31
Q

Pretty Good Privacy (PGP)

A

A method for securing email communication that can encrypt, decrypt, and digitally sign email.

32
Q

What is a cipher suite?

A

A combination of cryptographic algorithms that provides several layers of security for SSL/TLS. Provides Encryption, authentication, and integrity. Over 200 names cipher suites, identified as a string of hex characters.