1/49
week 3
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
cryptography important point
“cryptography fails at the system + human layer, not just algorithm level”
crypto quote
“cryptographic security is determined by the weakest component in the system — not just the strength of the algorithm alone”
what is cryptography
the art of secret writing
cryptography
plaintext —-encryption—→ ciphertext —-decryption—→ plaintext
plaintext
the original message (msg/data which are in their normal, readable form)
encryption
encoding the contents of the message in such a way that hides its contents from outsiders
ciphertext
the encoded/encrypted message
decryption
the process of retrieving the plaintext back from the ciphertext
key
sequence of characters or bits used by an algorithm to encrypt or decrypt a message (key = secret value)
is it okay for the algorithm to be public?
yes, algorithm without the key doesn’t help unmangle the msg
should the crypto algorithms used for military secrets be public?
no
ceaser cipher
given a key, move each letter [key] places to the right to encrypt and [key] places to the left to decrypt
break ceaser cipher (long method)
try all possible keys
public key AKA
asymmetric cryptography
private key AKA
symmetric cryptography
public key: how many keys?
one public key and one private key
private key: how many keys?
one secret key
asymmetric crypto public key role
use reciever’s key to encrypt
asymmetric crypto private key role
use receivers keys to decrypt
which is slower to compute?
asymmetric crypto
symmetric cryptography private key role
use same key to encrypt and decrypt (both sender and receiver know what the key is)
key distribution problem
challenge of securely sharing secret keys between parties in symmetric cryptography without an eavesdropper intercepting them
stream cipher (symmetric crypto)
encrypt bit-by-bit for smooth, fast encryption good for data in-transit
how does stream cipher work?
cipher generates a keystream (random letters) and adds it to the plaintext
block cipher (symmetric crypto)
plaintext is sliced into 128 bit chunks and encrypts those chunks one at a time
hybrid cryptography
public key used to establish temporary shared key. symmetric (so secret key) used for remainder
are hash functions random
no, they are always the same when given the same input
are hash inputs fixed size?
yes, they are always one fixed length (depending on which hashing algorithm you use)
hash input term
message
hash output term
message digests
hashes are one-way functions
meaning you cannot decrypt like encryption algorithms
hashes return _ if the message is even number of digits/letters
0
hashes return _ if the message is odd number of digits/letters
1
avalanche effect
even the smallest change causes a huge change in the output (ex. T vs t)
cryptographic hash
designed for data integrity and security, resisting reversal and collision attacks. so more security reasons
hashing security goal
integrity
encryption security goal
confidentiality
digital signature
guarantees that the contents of a message have not been altered in transit
which security goal is digital signature
non-repudiation
what kind of encryption do digital signatures use
asymmetric cryptography
how: recipient uses their private key to view, sign, etc so obvi they can’t deny
collision attack
occurs when an attacker finds two different messages that hash to the same value
how to conduct collision attack
very difficult and requires generating a separate algorithm
what does hashing algorithm MD stand for
message digest
how does MD work
use a secure method to compress the file and generate a computed output of a specified number of bits
MD2
takes a data of any length and produces a hash output of 128 bits
MD4
was subject to collision attack but was fast. not is use anymore and if is shouldn’t be
MD5
creates a 128-bit hash of a message of any length and segments the message into 512-bit blocks (similar to MD4 but slightly slower and more secure)
what does hashing algorithm SHA stand for
secure hash algorithm
SHA-3
latest and most secure
block method
splitting your input into chunks and repeatedly mixing each chunk into a running value with heavy scrambling math until one fixed-size final hash comes out