2: Symmetric Key Cryptography

studied byStudied by 26 people
5.0(1)
Get a hint
Hint
<p>Cryptography</p>

Cryptography

1 / 32

flashcard set

Earn XP

Description and Tags

33 Terms

1
<p>Cryptography</p>

Cryptography

The process of transferring messages between participants without anyone else being able to read or modify them.

New cards
2
<p>Issue with unsecured channels</p>

Issue with unsecured channels

It can be infiltrated by a malicious actor to either listen to messages or even change them altogether.

New cards
3
<p>Code</p>

Code

A way to represent data, e.g. morse code, ASCII, hex and base64.

New cards
4
<p>Caeser Cipher</p>

Caeser Cipher

A cipher that replaces reach letter with one three to the right, e.g. A becomes D.

New cards
5
<p>Kerckhoff’s Principle</p>

Kerckhoff’s Principle

A cipher should be secure even if the attacker knows everything other than the key.

New cards
6
<p>Frequency Analysis</p>

Frequency Analysis

Counts the number of times a symbol and pair of symbols appear in an attempt to crack a cipher.

New cards
7
<p>Symmetric Cryptography</p>

Symmetric Cryptography

Cryptography where the sender and receiver have the same keys.

New cards
8

Arithmetic Modulo N

Where you can count up to n - 1 and then loop back to 0.

New cards
9
<p>XOR</p>

XOR

Binary addition modulo 2.

New cards
10
<p>XOR properties</p>

XOR properties

Associative and commutative, for all bitstrings M, M XOR 0 = M and M XOR M = 0.

New cards
11
<p>One-Time Pad</p>

One-Time Pad

A key that XOR/Adding to the ciphertext produces the plaintext.

New cards
12

One-Time Pad Properties

The key needs to be as long as the message and only used once.

New cards
13
<p>Advanced Encryption Standard (AES)</p>

Advanced Encryption Standard (AES)

A state-of-the-art block cipher that works on blocks of 128 bits.

New cards
14
<p>AES Properties</p>

AES Properties

Generates 10 round keys from a single 128-bit key, uses one permutation (shifting rows) and uses three substitutions (substitute bytes, mix columns and add round key).

New cards
15
<p>Substitute Bytes</p>

Substitute Bytes

Substitutes bytes using finite field arithmetic.

New cards
16
<p>Shift Rows</p>

Shift Rows

Shifting rows moves the 2nd row by one byte to the left, 3rd row two bytes to the left and the 4th row three bytes to the left.

New cards
17
<p>Add Round Key</p>

Add Round Key

Applies XOR to the block and the 128-bit round key, generated from the main key.

New cards
18
<p>Data Encryption Standard</p>

Data Encryption Standard

A previous standard of symmetric encryption. It was designed by IBM in the early 70’s before the NSA fixed the key length to 56 bytes and added S-boxes.

New cards
19
<p>S-Boxes</p>

S-Boxes

A type of substitution in DES that makes it resistant to differential cryptanalysis - without them, DES would’ve been broken in the 90’s.

New cards
20
<p>Triple DES</p>

Triple DES

DES that takes three keys - encrypts a message with the first one, decrypts it with the second key, and encrypts it with the third key. All keys being equal is just DES.

New cards
21
<p>Padding</p>

Padding

Extra bytes added to the end of a message if a message is not the right size for block ciphers to work with. The bytes must not be random, and must not just be 0’s.

New cards
22
<p>PKCS 5/7 Padding</p>

PKCS 5/7 Padding

Used to indicate the padding in a message, i.e. if there is one byte of space to fill, write 01, two bytes, write 0202, three bytes, 030303… if the message goes to the end of the block, add a new block of 16161616…

New cards
23

PKCS 7 Padding

Covers 16 bytes of space.

New cards
24

PKCS 5 Padding

Covers 8 bytes of space.

New cards
25
<p>Electronic Codebook Mode (ECB)</p>

Electronic Codebook Mode (ECB)

Each block is individually encrypted. They are encrypted in the same order as plaintext blocks. Thus, repeated blocks are revealed by the ciphertext.

New cards
26
<p>Cipher Block Chaining Mode (CBC)</p>

Cipher Block Chaining Mode (CBC)

Each block is XOR’d with the previous block - start with a random initialisation vector (IV).

New cards
27

CBC Encryption

  1. Split up the plaintext into blocks.

  2. XOR the first block with the IV.

  3. Encrypt using the key.

  4. Take that ciphertext block and XOR it into the next plaintext block.

  5. Encrypt that block using the key.

  6. Repeat from step 4 until all of the plaintext blocks are encrypted.

<ol><li><p>Split up the plaintext into blocks.</p></li><li><p>XOR the first block with the IV.</p></li><li><p>Encrypt using the key.</p></li><li><p>Take that ciphertext block and XOR it into the next plaintext block.</p></li><li><p>Encrypt that block using the key.</p></li><li><p>Repeat from step 4 until all of the plaintext blocks are encrypted.</p></li></ol>
New cards
28

CBC Decryption

  1. Split up the ciphertext into blocks.

  2. Decrypt the first block with the key.

  3. XOR result with the IV.

  4. Take next block and decrypt it with the key.

  5. XOR result with previous result.

  6. Repeat until all blocks are decrypted.

New cards
29
<p>Probabilistic Encryption</p>

Probabilistic Encryption

Uses random events to make every encryption different, e.g. a random event.

New cards
30

Non-Random IVs

Non-Random IVs can easily allow encryption to be cracked - e.g. the Zerologon vulnerability in Windows servers. With that information, authentication could be bypassed and domain controller passwords reset.

New cards
31

Counter Mode (CTR)

Where each block in plaintext is encrypted with the key then XOR’d with the IV added to the value of the counter (e.g. 0 for the first block, 1 for the second block, etc.).

<p>Where each block in plaintext is encrypted with the key then XOR’d with the IV added to the value of the counter (e.g. 0 for the first block, 1 for the second block, etc.).</p>
New cards
32

CTR Decryption

  1. Split the ciphertext into blocks

  2. Take the nonce

  3. Encrypt it with the key

  4. XOR it with the first ciphertext block

  5. Add 1 to the counter

  6. Encrypt the nonce and counter added together

  7. XOR the next ciphertext block

  8. Repeat from step 5 until all blocks are decrypted

<ol><li><p>Split the ciphertext into blocks</p></li><li><p>Take the nonce</p></li><li><p>Encrypt it with the key</p></li><li><p>XOR it with the first ciphertext block</p></li><li><p>Add 1 to the counter</p></li><li><p>Encrypt the nonce and counter added together</p></li><li><p>XOR the next ciphertext block</p></li><li><p>Repeat from step 5 until all blocks are decrypted</p></li></ol>
New cards
33

CTR Plaintext Attack

If you know the plaintext, you can change the encrypted message. This is done by XOR’ing the plaintext message with the message you want, then XOR’ing the encrypted message with that.

<p>If you know the plaintext, you can change the encrypted message. This is done by XOR’ing the plaintext message with the message you want, then XOR’ing the encrypted message with that.</p>
New cards

Explore top notes

note Note
studied byStudied by 677 people
Updated ... ago
4.7 Stars(16)
note Note
studied byStudied by 6 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 99 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 109 people
Updated ... ago
5.0 Stars(3)
note Note
studied byStudied by 21 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 28 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 9 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 38610 people
Updated ... ago
4.8 Stars(311)

Explore top flashcards

flashcards Flashcard24 terms
studied byStudied by 8 people
Updated ... ago
5.0 Stars(2)
flashcards Flashcard44 terms
studied byStudied by 6 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard21 terms
studied byStudied by 80 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard20 terms
studied byStudied by 11 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard28 terms
studied byStudied by 9 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard72 terms
studied byStudied by 11 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard67 terms
studied byStudied by 3 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard104 terms
studied byStudied by 66 people
Updated ... ago
5.0 Stars(2)