2.8 - Importance of Physical Security Controls Flashcards
Cryptography
- Derives from Greek: “Kryptos” means hidden, secret
- Provides Confidentiality (secret)
- Provides authentication and access control (I know it’s you. I REALLY know it’s you)
- Provides non-repudiation (You said it, you can’t deny it)
- Provides integrity (tamper-proof, can verify that email / file wasn’t changed since it was sent)
- traditionally, Power cryptography has traditionally required strength
- a powerful CPU and lots of time
Plaintext
- Unencrypted message you start with
- “in the clear”
Ciphertext
- An encrypted message
Cipher
- The algorithm used to encrypt and / or decrypt
Cryptanalysis
- The art of cracking encryption that already exists
- Finding vulnerable ciphers is an important part of security
- A mathematically flawed cipher is bad for everyone
Keys
- This is the part that is not known, adds the key to the cypher to encrypt
- this is the part that is unknown
- sometimes using multiple keys creates more protection
- larger keys are generally more secure
- Often ciphers are publicly available for anyone to read
Weak keys
- Always want to use a large encryption key, but sometimes you can’t. So make smaller, weaker keys stronger by performing multiple processes
- Ex: key stretching / strengthening
Key stretching / Strengthening
- When you hash a password and then has the hash of the password, etc..
- A way to make weak keys work
- makes it difficult for hacker to brute forces (they have to brute force each hash, even though key is small)
Key stretching libraries
- Already built for your application, no additional programming required
- Ex: bcrypt, PBKDF2
bcrypt
- An example of a key stretching library
- Generates hashes from passwords, an extension of the UNIX crypt library
- Uses Blowfish cipher to perform multiple rounds of hashing
PBKDF2
- Password-Based Key Derivation Function 2
- Another example of a key stretching library
- Part of RSA public key cryptography standards (PKCS #5, RFC 2898)
Lightweight cryptography
- Cryptography that doesn’t require a lot of power
- driven by IoTs, which have limited power (and NIST)
- Both watts and CPU
NIST
- National Institute of Standards and Technology
- Leading the effort on lightweight cryptography
- Provide powerful encryption, with the least amount of power
- Include integrity features
- keep costs low
HE
- Homomorphic Encryption
- Allows you to perform calculations while the data is encrypted (and save the data while encrypted) Never have to unencrypt it
- Perform the work directly on the encrypted data
- The decrypted data can only be viewed with the private key
- Advantages, esp. in the cloud, allows people to perform actions and get research data without ever having access to original data source
- Usually, encrypted data is difficult to work with (usually need to decrypt, then perform function, then re-encrypt)
Symmetric Encryption
- A single, shared key
- encrypt with the key
- decrypt with the same key
- if it gets out, you’ll need another key (and re-do encryption)
- aka “Secret key algorithm” (b/c it’s a shared secret based on the one key)
- doesn’t scale well (how do you share a key with others, when you don’t currently have a way to share the information.) Picture a person carrying a key in a briefcase, you can’t share it until you get to your destination
- can’t encrypt it to share it, so you to find other ways to share the key
- but it’s very fast to use and involves less overhead than asymmetric encryption (often combined with asymmetric encryption)
Secret Key algorithm
- aka symmetric encryption
- (b/c it’s a shared secret based on the one key)
Asymmetric encryption
- 2 (or more) mathematically related keys
- Public and Private key
- Private key (only you have access to it, keep it private)
- Public key )anyone can see this key, you can give it away)
- anyone who wants to encrypt information and send it to you needs this public key
- The only way to decrypt the key is to use the private key
- You can do it in reverse too, encrypt with private key and only ppl with public key can decrypt (ex: digital signature)
- You can’t derive the private key from the public key (although mathematically related)
- aka “Public key encryption”
- downside: uses very large numbers and is expensive to run
Public key encryption
- aka symmetric key encryption
- b/c there is a public key
The key pair process
- In asymmetric cryptography, build the keys at the same time
- larger random numbers are used as input, then run through key generation program
- two keys are output, one is chosen as private and one is chosen as public
- Bob has plain text message, gets Alice’s public key, which then converts the message into cipher text, allice receives cipher text message and applies her private text and then she can see the plain text original message
Ways to get a public key
- Can request it from the user
- Go to a public key server
- See if they have posted their key on a website
Symmetric key from Asymmetric keys
- Gets around the problem of not being able to share a symmetric key
- Use public / private key cryptography (asymmetric) to create a symmetric key
- Ex: Bob and Alice both have asymmetric encryption (combine your private key with someone else’s public key to create a symmetric key). So Bob and Alice end up with the same symmetric key for (symmetric cryptography)
ECC
- Elliptic Curve Cryptography
- Asymmetric encryption
- Use curves instead of numbers!
- uses smaller keys than non-ECC asymmetric encryption
- smaller storage and transmission requirements
- perfect for mobile devices and IoT
- traditional asymmetric encryption needs large integers composted of two or more prime factors
Hash
- Represents data as a short string of text
- Takes an input of any size (string, file) and creates a fixed size string, message digest, checksum
- aka message digest (a fingerprint)
- one-way trip, impossible to recover the original message from the digest (used to store passwords / confidentiality)
- Often used to provide integrity (verify a downloaded document is still the same as the original)
- ## Ex: compare a downloaded file, run it through the hashed algorithm and see if matches the original
Digital Signatures
- Hashing combines with encryption to create digital signatures
- Provides Authentication (tells us where data came from)
- Provides Non-Repudiation (tie it back to a specific person)
- Provides Integrity (same as original, no tampering)
- Hopefully won’t have a collision (meaning different messages should never have the same hash)
Collision
- When 2 different messages provide the same hash
- Not good
SHA256
- The SHA256 hash algorithm
- takes 256 bits (hashing algorithem) / 64 hexadecimal characters (number of characters it spits out)
MD5
- Hashing algorithm that has a collision problem
- Found in 1996, don’t use MD5
Salt
- Random data added to a password when hashing
- Ex: good if you’re storing passwords where users happen to be using the same passwords (they would have the same hash), to combat this, we add salt (allows us to add randomization, so you couldn’t identify same passwords from the same salt)
Rainbow tables
- Precomputed hash tables
- used by attackers to see if there are similar hashes
- adding salt helps prevents how useful a rainbow table is (although attacker could still brute force the process, it would be much slower since the same passwords wouldn’t jump out in the rainbow table)
Digital Signatures
- Prove the message was not changed
- Provides integrity
- Provides non-repudiation (not fake)
- Signed with private key ( so the message doesn’t need to be encrypted b/c nobody else can sign it)
- Verified with the public key (any change in the message will invalidate the signature)
Creating a digital signature
- Alice wants to send bob a message that bob knows came from Alice
- Alice sends a plain text message that goes through a hashing algorithm, Alice will encrypt the hashed message with her private key = a digital signature (attach it to original plain text) and send it to bob. Bob gets the plain text message with the digital signature
- Bob will then reverse the process to verify the legitimacy of the document: he’ll use Alice’s public key to decrypt her public key, he gets the hash of the plaintext, then he performs the same hashing algorithm to see if he ends up with the same hash of the plaintext
Cryptographic proces
- Interesting b/c it’s used to protect the data but the process used to protect the data is well known
- The algorithm is usually a known entity
- The only thing you don’t know is the key (that’s why you have to keep it private)