Cryptography Flashcards
(56 cards)
What is the Caesar Cipher?
- Simple substitution cipher
- ROT3 (rotate 3 spaces to the right)
What is the main problem with substitution ciphers?
Subject to pattern (frequency) analysis
What is Scytale?
Ancient Greek cipher. Tape wrapped around a horizontal rod, and message written across the tape.
Diameter of the rod has to be pre-agreed or you can’t read the message.
What is Vignere?
Polyalphabetic cypher (grid with alphabet horizontally and vertically, and different alphabet variations across each row). Find the character from the cyphertext horizontally, then find the character from the key word vertically.
Keyword agreed out-of-bounds
What is Enigma / Purple
6-rotor machine. Config of rotors agreed out-of-bounds.
What is Vernam cipher?
- One time pad
- Mathematically unbreakable
- Pad must be as long as the message
- Pad must be securely distributed and only used once
- A one-time-password (OTP) is a vernam cipher
What properties are we trying to achieve through cryptography?
PAIN.
Privacy
Authenticity
Integrity
Non-repudiation
What things are involved in converting plaintext to cyphertext?
Plaintext
+ initialization vector
+ algorithm (cipher)
+ key
= Ciphertext
What are initialization vectors?
Random starting value.
Adds randomness by changing the starting value.
Like salt in password hashes
What are algorithms?
- Collection of maths functions.
- Should use string and complex maths for substitution- Should be open (Kerckhoff’s principle)
- Each function is an s-box
- Key length is a trade-off between performance & value of asset (amount of security required)
What are the pros of symmetric cryptography?
- Fast data transfer
- Good strong privacy
What are the cons of symmetric cryptography?
- Out-of-band key distribution
- Doesn’t scale well
- Doesn’t provide non-repudiation
What are the other names for a symmetric key?
- Secret
- Shared key
- Private key (do not confuse with asymmetric private key)
- Session key
What are the 2 types of symmetric ciphers?
- Stream
- Block
What is the formula for determining how many unique symmetric keys are needed to communicate securely?
(n * (n-1)) / 2
What properties does symmetric encryption provide and not provide?
Provides: privacy
Does not provide: integrity, authenticity or non-repudiation
What do we know about stream ciphers?
- Encrypt 1 bit (up to 1 byte) at a time
- Use transposition, substitution, XOR
- Very fast & efficient
- Not as secure as block ciphers
- RC-4 is a stream cipher
How to XOR?
- Alike bits = 0
- Different bits = 1
- (Only 1 1)
What are the common symmetric algorithms (11)?
- DES
- 3DES
- AES
- RC-4
- RC-5
- Blowfish
- Twofish
- IDEA
- CAST
- MARS
- Skipjack
Asymmetric cryptography: Process for proving authenticity?
- Encrypt message with recipient’s public key (for privacy)
- Encrypt something else (e.g. timestamp) with sender’s private key for authenticity. If it can be decrypted using the sender’s public key, it must have come from them.
What are the properties of hashing?
- Also known as checksums, message digests
- Provides integrity
- Fixed-length output
- If the input changes, the hash will change
- One-way function
- 2 different plaintexts producing the same hash is a collision
What is a birthday attack?
Attempt to cause collisions. Idea is that it is easier to find 2 hashes that match than to produce a specific hash.
What are the popular hashing algorithms (6)?
- MD-5 128-bit
- SHA-1 160-bit
- SHA-2 256, 384, 512-bit
- HAVAL
- Tiger
- RipeMD
How to achieve non-repudiation with hashing?
Encrypt hash with sender’s private key