Cryptography Lecture
Cryptography Lecture
By
Solomon Mensah (PhD)
College of Education
School of Continuing and Distance Education
2014/2015 – 2016/2017
Agenda
• Cryptography vs Security
• Authentication vs Authorization
• Types of Cipher
• Key Distribution
• Message Integrity
Cryptography ≠ Security
• Cryptography may be a component of a secure system
• Adding cryptography may not make a system secure
• Cryptography or cryptology is the practice and study of
techniques for secure communication in the presence of
third parties called adversaries.
• Security is the state of being free from danger or threat.
Significance of Cryptography
• Confidentiality
– others cannot read contents of the message
• Integrity
– verify that message has not been modified
• Availability
– message should be available to receiver
• Nonrepudiation
– sender should not be able to falsely deny that a message was sent
• Authentication
– validates or confirms a user
– determine origin of message
• Authorization
– user permission to access a specific resource or function
Authentication vs Authorization
Confidentiality: Encryption
• Plaintext (cleartext) message P
• Encryption E(P)
• Produces Ciphertext, C = E(P)
• Decryption, P = D(C)
• Cipher = cryptographic algorithm
Types of Ciphers
• Symmetric/secret key algorithm
– –Shared key
C=EK(P) P = DK(C)
– –Key length → difficulty of attack
• Asymmetric/Public key algorithm
– –Key pair: private key (k) & a shared public key (K)
C = Ek(P) P = DK(C)
C = EK(P) P = Dk(C)
Key Distribution
• Secure key distribution is the biggest problem with
symmetric cryptography
Distributing Keys
• Manual: pre-shared keys
– –Initial configuration, out of band (send via USB key, recite, …)
• Trusted third party
– –Knows all keys
– –Alice creates a session key
– –Encrypts it with her key –sends to Trent
– –Trent decrypts it and sends it to Bob
– –Alternatively: Trent creates a session key – encrypts it for Alice & for Bob
• Public key cryptography
– –Alice encrypts a message with Bob’s public key
– –Only Bob can decrypt
• Diffie-Hellman
• Hybrid cryptosystems
Diffie-Hellman Key Exchange
• Key distribution algorithm
– –First algorithm to use public/private “keys”
– –Uses a one-way function
• Based on difficulty of computing discrete logarithms in a
finite field compared with ease of calculating
exponentiation
– –Eavesdroppers cannot compute this
Diffie-Hellman: Introduction
• Discovered by Whitfield Diffie and Martin Hellman
Charles:
• Generates a hash of the message, H(P)
• Decrypts Alice’s signature with Alice’s public key
- Validates the signature: DA(S) ≟ H(P)
• Decrypts Bob’s signature with Bob’s public key
- Validates the signature: DB(S) ≟ H(P)
Covert AND authenticated messaging
• If we want to keep the message secret
–combine encryption with a digital signature
• Use a session key:
–Pick a random key (K) to encrypt the message
with a symmetric algorithm
–encrypt K with the public key of each recipient
–for signing, encrypt the hash of the message
with sender’s private key
Covert AND authenticated messaging
Alice picks a random key (K) and encrypts the message P with it
using a symmetric cipher
Covert AND authenticated messaging
– SAKAI: https://sakai.ug.edu.gh/
Thank you