Cryptography Flashcards
Security Attacks-
Weaknesses(vulnerability) in system. Need patches, fixed
Vulnerability is a threat that can be hacked(stolen, changed, compromised) and needs to be controlled.
Compromises security of data of organization:
Vulnerability- weaknesses in computer system, no updated system.→
Threat- loss or harm to computer→
Control- preventative measure
Classification of attack-
Passive Attacks(Wireshark) capturing data, copy- some countries illegal-mostly if its thrown in air and u capture, not your fault
Active Attacks- illegal
Security threat types?
Interruption- attack on availability- DOS , DDOS attack- interruption of web services
-deliberately unavailable
Interception-attack on confidentiality-decipher with brute force- cipher text to plain text
e.g illegal eavesdropping, wireless packet sniffing.
Modification-an attack on integrity - modify
tampering a resource
Fabrication-an attack on authenticity- e.g imposter sent email- counterfeiting
fake message, record to a file
Passive Attack
protocol analyzer
Nature: eavesdrop, monitoring
Goal: capture data
Two-types of Passive Attack
If readable- Non-encrypted data.Message content
If non-readable(encrypted):
Traffic Analysis- can’t read information, can observe pattern
source IP, destination IP, type of content, frequency and length of communication.
Four Type of active Attacks-
Masquerade- one entity pretending to be another entity.
- extra priveleges
- authentication sequences are captured and replayed
Replay- passive capture of data and subsequent transmission
Modification of Message- altered message
Denial of Services- services disturb.
prevents normal use of communication facilities
Three types of cryptography algorithms?
- Symmetric encryption
- Public key cryptography(asymmetric)
- Hash functions for security
-Symmetric Encryption model
Sender(plaintext)→ encrypt algorithm with a shared secret key e.g DES → transmitted ciphertext → decryption algorithm with secret key→ plaintext output
-called symmetric encryption as it is the same secret key.
E.g alphabetic substitution.
- scramble the data.
- Assymetric has two different beings.
Maintain integrity- encryption
Symmetric Encryption uses which mechanism
Uses substitution & permutation.
- substitution boxes- S-boxes, look up table for the part of the message block.
- can also be expanded e.g 6 bits to 8 bits with S-boxes
Permutation
- reorder the bits itself
- P-box
- e.g- 1st bit→7th bit 2nd bit→12 bit
Advanced Encryption Standard(AES)
Symmetric e.g your email into an array.
keep transforming it in n transformation rounds depending on no of bits.
first→initial permutation
next→keep substitution.
byte substitution
next rows are shifted.
next columns are mixed XoR operation
add roundkey
last substitution n-1 transformation
AES 128 strongest encryption standard 32 bytes longest key length.
SECURITY PROPERTIES OF SYMMETRIC ENCRYPTION
- AES wordks on message blocks. 128 bits, 4*4 bytes. and converts into encrypted
- different types of blockchaining
- most common is cipher blockchaining
- start with an intialization vector and combine each encrypted block with the next encrypted block.final block will be the encrypted block.
- CBC-cipher block chaining
- MAC- message authentication
check integrity of message by CBC-MAC
Symmetric Cryptography and disadvantages-
how can assymetric cryp help?
single key/secrete/private/one key.
shard b/w sender and receiver.
unintentionally or intentionally, compromise the key.
efficient- 128 bits, 192, 256 bits, much faster than assymetric
Disadvanvantages-
How to distribute the key?
- key distribution- secure channel such a VPN or key distribution system e.g kurbrose.
- scalability- n(n-1)/2 number of keys required.
- non repudiation- someone else can say they didnt send the message
Public Key Cryptography(helps in defficiencies of symmetric cryptography)
- “Non-secret encryption”
- two keys public key and private key
- public key can be given to anyone, public domain. publish public keys of the parties
- private key- secure.
- pass message through RSA assymetric encyption
- public key is input→cipher message to bryan.
- bryan can decrypt with his private key.
- or if u want everyone to see you encrypt with private key and can use public key published to decrypt. to ensure it if not tampered.
- key size is 2048 bit minimum max 4096 bit and more
- secret session key. takes a bit time
- Asymmetric since parties are not equals.
- clever application of number theory
-complements rather than replace symmetric key cryptography helps to exchange
- symmetric key.
- protocols RSA and Diffie-Hellman Key Exchange.
- large random numbers, “hard” mathematical problem. large prime numbers.
- private key cant be derived from public without solving
Asymmetric Encryption
bob wants to send Alice a message
Plain text→ Bob uses alice’s public key to encrypt the plaintext→ciphertext is decrypted with alice’s private key. →plaintext
public key- encrypt
private key- to decrypt
Key Establishment with Public Key Cryptography
- Alice and Bob both replace their public keys and keep their respective private keys.
- key derivation using both keys for each person
- Shared secret (symmetric key)
Diffie-Haulman
Digital signatures/authenticity
Alice has public key and private key
Bob get’s Alice’s public key
Alice sends plaintext by signing message with private key.
Digital signature get from finding the hash function and encrypting hash function with alice’s private key.
message- hash function- hash code- encrypted with RSA encryption with private key- to get signature
If message is authentic, signature will match the message. data integrity is maintained
bob- gets message and signature- decrypts with public key- receives the hash code.
now bob takes message and pass it into hash function to get hash code
if both hash code matches, the message is authentic.
OTHER uses of public key crypto
electronic cash
non-repudiation protocols(email)
electronic voting
multi-party key agreement