Cryptograhy Flashcards
Cryptography
Encrypting data
Cryptanalysis
Breaking encryption
Cryptography Algorithm
A set of rules performing the locking/encryption and unlocking/decryption of data/information
Cryptography Key
A value used with the algorithm to lock and unlock information
Key Space
The maximum number of keys possible
e.g. key space of particular character set (e.g. 0-9)
Entropy
Is high or low entropy desired for crypto key?
A measure of how random or unpredictable something is
e.g. using only lowercase letters a key would result in low entropy
using mix of upper, lower, numbers and special chars would result in high entropy
High entropy is desired, it would make it harder for an attacker to guess your keu
Cryptoperiod
Length of time a particular crypto key may be used
Work Factor
Estimated time or effort needed to break the encryption, usually measured by timing of brute force approach
The larger the key size, the greater the key space, the more secure your key becomes
Avalanche Effect?
What methods does it apply to? Why?
Minor changes to the either the key or plaintext will result in a large change to the ciphertext
Important for both encryption and hashing
Prevents reversing ciphertext
Kerckhoff’s Principle
The strength of your encryption should not rely on keeping your algorithm secret
It should rely instead on keeping the encryption keys a secret, as long as you can change them when needed
If keys compromised, just make a new one - cheap and easy
If algorithm is compromised - this is costly and complicated, all HW and SW that rely on encryption algorithm would need to be updated
Symmetric Encryption
Advantage/Disadvantage
AKA
One key is used with the algorithm to encrypt and decrypt data
Only benefits confidentiality
Advantages: very fast and cheep
Disadvantages: key management is difficult because you have to distribute the key to decrypt; usually done using asymmetric encryption or out of band
AKA - Secret key, Single Key, Shared Key, Session Key
List types of Ciphers
Steam
Block
Block Mode
Stream Mode
Stream Ciphers
Generates ciphertext bit by bit or byte by byte
Used for encrypted data in transit
Popular Algorithms:
RC4 - old and not used anymore
Salsa and ChaCha commonly used in TLS
Block Ciphers
Examples
Block ciphers can work in two modes: Stream or Block Mode
Block Mode - encrypts data at rest
Stream Mode - encrypts data in transit
Examples - AES, DES, 2DES, 3DES
Twofish, Blowfish
IDEA
RC2, RC5, RC6, RC7
Asymmetric Encryption
Using a key pair (Public key and Private key)
The public key can be used by anyone
The private key is held by the subject that created the key pair and is kept PRIVATE. It should not be given to anyone.
List Asymmetric Algorithm
RSA ElGamal ECC (Elliptic-Curve Cryptography) Diffie-Hellman Digital Sigital Algorithm
RSA (Rivest-Shamir-Adleman)?
Use?
Asymmetric Algorithm
Encrypts tiny quantities of data
ElGamal
Use
Asymmetric Algorithm
Exchanging a symmetric key
ECC (Elliptic-Curve Cryptography)
Use
Asymmetric Algorithm
Creating digital signatures
Diffie-Hellman
Use
Asymmetric Algorithm
A key agreement algorithm
DH is ued to negotiate symmetric keys between
Digital Signature Algorithm
Use
Asymmetric Encryption
Designed by NIST to create digital signatures
NOT capable of exchanging symmetric keys
Hashing
irreversible, one way function
We utilize hashes for integrity through the ability to detect any changes in a data set through the change in a hash
Salt
something that should be added to passwords/passphrases before being hashed
makes password resistant to rainbow table and other attacks on hashes
Which OS CANNOT salt passwords/passphrases
Microsoft Windows
SYSKEY in prior versions could encrypt hashes in the SAM file
Microsoft recommends mitigation: use Bitlocker to encrypt drive and protect SAM file from attackers
Describe how Hash Algorithms work?
Take input file/data
Split the file/data into blocks, take first block and XOR with next and continue until the end block
The result is a hash or digest
Common Hashing Algorithms?
MD2, 4, 5 - 128 bit
MD6 - 512 bit
SHA 1 - 160 bit
SHA2/3 - 224, 256, 384, 512
Public Key Infrastructure
CA’s generate certificates containing the public keys of the users (or servers).
Users then distribute these certs to the people they want to communicate with.
Certificate recipients validate a certificate using the CA’s public key, which is pre-installed in their device from the operating system vendor, browser vendor or organization.
Registration Authority (RA)
An authority in a network that verifies user request for a digital certificate and tells the CA to issue it.
The RA VERIFIES user credentials (verifies username/password conducts a background check, etc.)
Certificate Authority
Signs, issues and manages certificates.
The CA users the subject’s Certificate Signing Request (CSR) to sign the subject’s certificate.
The CA also maintains the Certificate Revocation List (CRL)
Certificate Revocation List
Contains serial numbers of the public certificates that have been revoked and should no longer be trusted
Certificate revocation reason codes
KeyCompromise CAcomprimise affiliationChanged Superseded CessationOfOperation CertificateHold