CC3.12Erdal KOSE
Privacy & Digital SecurityEncryption
CryptographyConventional ( Symmetric or Single Key) Encryption:Public-Key Encryption (Asymmetric Encryption)Sample Public-Key Systems:The relationship between the two keysPGPEncoding Method:Decoding Method:Advantages:PGP MethodDigital Signature
Objectives
Cryptography
Cryptography:The study of methods to encrypt data to insure the privacy of transmitted messagesCryptanalysis:The study of methods to decode encrypted data.Clear Text or Plaintext:the information before encryptionCipher Text:the encrypted form of dataOne-way cipher:an encryptedtechniquethat cannot be easily reversed
Cont..
Information is encrypted so it can be safely transmitted or stored. Transmitting or storing unencrypted information is not secure.The clear-text will be recovered by reversing the encryption process. Recovering clear text from encrypted text (cipher) is called decrypting the cipher text.
Conventional = Symmetric= Single Key Encryption:
Conventional (Symmetric orSingle Key) Encryption:A simple algorithm is used to transform the dataThe sender and receiver agree on a key Ksr. The sender uses the key to encrypt the clear-text, and the receiver uses it to decrypt the cipher text
SenderEncrypts T with Ksr
ReceiverDecrypts C withKrs
Clear-Text T
Ksr
Cipher textEsr(T)=C
Ksr
Dsr(C)=Clear-Text T
Point where information is transmitted or stored: could be snooped here
An Example
XOR An Encryption Operation:Exclusive OR, known as XOR is a way to apply a key to cleartext, XOR can be decribed as x or y but not both. if the bits are same the result is “0”otherwise the result is “1”.If 0101 is the cleartext and if 1001 is the key then0 1 0 1 Cleartext1 0 0 1 Key________1 1 0 0 cipher text.To produces 1100 (cleartext) for the cipher text. Apply the key to the cipher text again with XOR produces the original cleartext.1 1 0 0 Cipher text1 0 0 1 Key________0 1 0 1 cleartextHow secure is this method?How do you transfer the key to the receiver?
More example
Substitution Cipher:Each data element is substituted with a differentdata element (or symbol).Example: Caesar’s Method:Replace every letter in the alphabet with the letter 3away from it:A –> DB –> EC –> F...X –> AY –> BZ –> COther substitution ciphers assign random substitutions,so that they are a bit harder to crack.How does the receiver decode the message?Answer: The sender needs to send the key to thereceiver.
Sample Public-Key Systems(Asymmetric Encryption)
Uses 2 keys - apublic key and a private key.The receiver publishes its public key which is used bythe sender to encrypt the message.The receiver uses the second (and different) privatekey to decrypt the message.
Cont..
What is the relationship between the two keys?It should be computationally infeasible to obtain theprivate key from a knowledge of the public keyand the transmitted message.These methods are based on the fact that it iscomputationally easy to multiply two large numbers, but it is quite difficult to factor a large number if it has veryfew factors, especially, if the factors are large primenumbers. (e.g., Try to factor 3233.)
Cont..
Advantage of Public-Key Systems:Only the public key is distributed.Sample Public-Key Systems:RSA - Rivest, Shamir, and AdelmanDSA - Digital Signature AlgorithmPGP - Pretty Good Privacy - uses both conventionaland public-key cryptography.
PGP
Encoding Method:1.Compress the message2. Create asession key that is used only during thissession. The key is created randomly frommouse movements and key strokes.3. The session key is used to conventionally encryptthe message.4. The receiver’s public key is used to encrypt thesession key.5. The encrypted message and the encrypted sessionkey are transmitted to the receiver.
Cont..
Decoding Method:1. The receiver uses its private key to decrypt thesession key.2. The session key is used to decrypt the message.3. The data is decompressed.4. The session key is discarded.
Advantages:
- Only a small amount of information (the sessionkey) is publically encrypted.- The session key is used only once.- Conventional encryption can be ~10,000 fasterthan public-key encryption.
PGP Method
PGP uses the RSA public-key method:M = the messageC = the encrypted messagee = the public exponent (public-key)d = the private exponent (private key)n = a very large integer
Cont..
Encryption Method:C = M*e mod nDecryption Method:M = C*d mod nwheren = p * qp and q are large prime numbersd = e-1 mod ((p-1) * (q-1))! If n is a large number (128 bits or 256 bits), it iscomputationally infeasible to find p and q.- must find all factors of n.- must determine which are prime.- must try all pairs of primes to find p and q.
Digital Signature
Used to verify that the “sender” actually sent themessage.The receiver publishes its public key which is used bythe sender to encrypt the message.The sender then uses its private key to encode theencrypted message. (This is a second level ofencryption.)The receiver first uses the sender’s public key todecrypt the message.The receiver then uses the receiver’s private key tofully decrypt the message.
0
Embed
Upload