Cryptography

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/28

encourage image

There's no tags or description

Looks like no tags are added yet.

29 Terms

1
New cards

What are the Simple Ciphers?

Caesar, Vignere, Substitution

2
New cards

How Can Attacker Break Ciphers?

Brute Force, Frequency Analysis, Kasiki Test, and Index of Coincidence

3
New cards

Cryptography

Science of secret communication

4
New cards

Cipher

An algorithm used for encryption

5
New cards

Plaintext

Original Message (M)

6
New cards

Ciphertext

Encrypted Message (C)

7
New cards

Correctness

Dec(k, Enc(k,m)) = m

Decrypting will get the original message back

8
New cards

Kerckhoffs’ Principle

An attacker can know everything except the key. This means don’t rely on hiding your algorithm; only the key should be secret.

9
New cards

Caeser Cipher

Letters become numbers

Formula:

(Enc(k, m) = (m + k)(mod 26) → Encryption

(Dec(k, c) = (c - k)(mod 26) → Decryption

10
New cards

Caeser Cipher Drawback

Since the key space is 26, there are 26 possible keys and an attacker can try all of them until something looks like English (Brute Force Attack).

11
New cards

Frequency Analysis

Some letters appear more often then others, attackers will compare ciphertext frequencies with English frequencies.

12
New cards

Vignere Cipher

Better than Caeser, that uses a KEYWORD to shift letters, continually rotating through multiple Caesar ciphers.

13
New cards

Why Vignere is Better

Same plaintext can encrypt differently, makes frequency analysis harder.

14
New cards

How to Break Vignere

1) Find key length

2) Split ciphertext

3) Do frequency analysis on each piece

15
New cards

Kasiki Test

Used to find the key length of password by identifying repeated sequences of letters in the ciphertext like Vignere

16
New cards

How Kasiki Test Works

1) Find the repeated 3-letter pattern

2) Measure distances

3) Compute GCD

17
New cards

Index of Coincidence

The probability 2 randomly chosen letters are the same, used to determine if the guessed key length is correct.

18
New cards

Index of Coincidence Scores

English: IC = 0.065 (high score); indicates text encrypted with a single alphabet, simple substitution cipher.

Random Text: IC = 0.038 (low score); meaning the text mimics a completely random distribution of the 26-letter English alphabet (1 / 26 ≈ 0.0385), indicates a polyalphabetic cipher (like Vigenère).

19
New cards

Weakness of Index of Coincidence

Language dependent, fails on texts under 50-100 characters.

20
New cards

General Substitution Cipher

Instead of shifting letters by a fixed number, completely shuffle the alphabet. In this the total key space/arrangments is 26! (very big)

21
New cards

General Substitution Cipher Pros

Huge key space

Secure against Brute Force

22
New cards

General Substitution Cipher Cons

Preserves language patterns so frequency analysis still works

23
New cards

One-Time Pad (OTP)

Uses XOR (exclusive OR) which compares 2 bits and outputs 1 if different and 0 if they are the same.

24
New cards

OTP Encryption/Decryption

Encryption: c = m ⊕ k

Decryption: m = k ⊕ c

25
New cards

OTP Pros

Perfectly Secure

Easy XOR operations

Learns nothing from ciphertext

26
New cards

OTP Cons

It is a little impractical as:

Requires a truly random key as long as the message

Has a strict one-time usage

Must be random

Msut be shared beforehand

27
New cards

Conditions for Perfect Security

1) Truly Random Key

2) Key Length = Message Length

3) Key used exactly once

28
New cards

Why can't you reuse an OTP key?

Reusing an OTP key allows attackers to XOR multiple ciphertexts together, canceling out the key and potentially revealing information about the original messages.

29
New cards

Perfect Secrecy

P[M = m | C =c] = P[M = m]

Seeing the ciphertext gives ZERO information about the plaintext