Introduction To Cryptography and Security Mechanisms: DR Keith Martin Mccrea 349 01784 443099 Keith - Martin@Rhul - Ac.Uk
Introduction To Cryptography and Security Mechanisms: DR Keith Martin Mccrea 349 01784 443099 Keith - Martin@Rhul - Ac.Uk
Before we start
Quiz 1
If two parties engage in a process that results in mutual entity authentication then at the end of the process the two parties can be reasonably confident that: A All subsequent messages that they exchange come from one another
B
C
The next messages that they exchange come from one another
The messages that they have just exchanged came from one another
Some messages that they recently exchanged were created by one another at some time in the past
Quiz 2
If an attacker intercepts a response that is issued during a successful challenge/response exchange and then tries to replay it a later date when a fresh challenge is issued, which of the following is the most likely reason for why the attacker will not succeed in being authenticated?
A
B C D
Quiz 3
Which of the following is not a problem with logical time-stamps (sequence numbers)?
B
C D
Learning Outcomes
Explain the concept of a digital signature Recognise that not all digital signatures rely on public key cryptography Appreciate the role that hash functions play in creating digital signatures Demonstrate how digital signatures can be created and verified using RSA Differentiate between digital signatures with appendix and digital signatures with message recovery Distinguish between the properties of digital and handwritten signatures Identify some of the main ways in which digital signature schemes can be attacked
Introduction to Cryptography and Security Mechanisms 2005
Sections
1. 2. 3. 4. Digital signature overview Hash functions Digital signature algorithms Security issues
Informal definition
Informally, a digital signature is a technique for establishing the origin of a particular message in order to settle later disputes about what message (if any) was sent. The purpose of a digital signature is thus for an entity to bind its identity to a message. We use the term signer for an entity who creates a digital signature, and the term verifier for an entity who receives a signed message and attempts to check whether the digital signature is correct or not. Digital signatures have many attractive properties and it is very important to understand exactly what assurances they provide and what their limitations are. While data confidentiality has been the driver behind historical cryptography, digital signatures could be the major application of cryptography in the years to come.
Introduction to Cryptography and Security Mechanisms 2005
10
Electronic signatures
The European Community Directive on electronic signatures refers to the concept of an electronic signature as:
data in electronic form attached to, or logically connected with, other electronic data and which serves as a method of authentication
What different things can you think of that might satisfy this rather vague notion of an electronic signature?
11
an electronic signature that is: 1. uniquely linked to the signatory 2. capable of identifying the signatory 3. created using means under the sole control of the signatory 4. linked to data to which it relates in such a way that subsequent changes in the data is detectable
Introduction to Cryptography and Security Mechanisms 2005
12
Security requirements
We will define a digital signature on a message to be some data that provides:
Non-repudiation
A digital signature can be stored by anyone who receives the signed message as evidence that the message was sent and of who sent it. This evidence could later be presented to a third party who could use the evidence to resolve any dispute that relates to the contents and/or origin of the message.
Introduction to Cryptography and Security Mechanisms 2005
13
14
15
KS
Arbitrator
KV
1 4
Signer
KS
KV
Verifier
16
17
18
A naive approach
1. Given the apparent symmetry of the requirements for public key encryption and digital signatures, propose a nave approach to designing a digital signature scheme.
2. State two reasons why the above approach is nave.
19
2. Hash functions
Hash functions
A hash function is a mathematical function that generally has the following three properties:
21
Hash functions
2. Is one-way
The hash function should be easy to compute, but given the hash of some data it should be very hard to recover the original data from the hash.
22
Hash functions?
Consider the following two mathematical functions and explain whether they satisfy each of the properties of a hash function or not:
23
There are several hash functions in common use that are believed to be secure enough for general use.
24
If a virus replaced the system file it could also replace the MD5 values in your list with new ones and you would not be aware this had happened
Introduction to Cryptography and Security Mechanisms 2005
25
26
27
HMAC
MAC = h( K || h( K || message ) )
28
Some caveats
We will focus this section on describing digital signatures based on RSA. Please note:
Although we only describe in detail how to implement digital signatures using RSA, there are many other examples of (true) digital signatures that are not based on RSA The RSA public key cipher system has some special properties that allow it to be used for both encryption and digital signatures not all public key cipher systems can be used to generate digital signatures, and neither can all digital signature algorithms be used as public key cipher systems We will see two different methods of implementing true digital signatures using RSA these two techniques can also be used for some other digital signature algorithms The process described here is simplified please consult relevant standards before making an actual implementation
Introduction to Cryptography and Security Mechanisms 2005
30
31
message
1
hash function
3
message signature
hash signature
2
signature key
Signature algorithm
32
There are two reasons why a message is hashed before it is signed using RSA.
33
Verification algorithm
verification key
hash function
=?
3
Decision
Introduction to Cryptography and Security Mechanisms 2005
34
RSA is special
You cannot obtain a digital signature scheme by swapping the roles of the private and public keys of any public key cipher system You cannot obtain a public key cipher system by swapping the roles of the signature and verification keys of any digital signature scheme Optional Task! Express the operations involved in RSA signatures mathematically to check that the process of verifying an RSA signature with appendix does indeed work. Now identify the special property of RSA that allows it to be used as both an encryption and a signature algorithm.
Introduction to Cryptography and Security Mechanisms 2005
35
Key separation
In real applications you should avoid using the same RSA key pair for both encryption and for digital signatures. The reason is that good key management follows a principle known as key separation, where any cryptographic key has a specific role and is not used for different purposes.
Thus, properly implemented versions of RSA that are to be used for both encryption and digital signatures should issue each user with two key pairs:
a public / private key pair for encryption
These different key pairs should be carefully managed to ensure that they are only used for the designated purpose.
Introduction to Cryptography and Security Mechanisms 2005
36
Verifier
message
signature key
Verification algorithm
verification key
37
38
4. Security issues
1. On what basis does a digital signature offer data origin authentication? 2. On what basis does a digital signature offer non-repudiation? 3. How do the security properties of a MAC and a digital signature differ?
40
Digital signatures
Uniqueness
Accuracy of creation Consistency over messages Storage Physical aspects Difficulty of forgery Acceptability
41
Persuade others that someone elses public verification key belongs to you
Others will verify it and believe that the message was signed by you. This is a particularly neat attack because you do not need to obtain that other persons signature key An interesting variant of this attack for hand-written signatures arises if you steal someone elses mail when a new credit card is sent out to them if you just sign this blank card then you can easily masquerade as them.
42
1. How would you go about stealing someone elses private signature key? 2. How would you prevent someone persuading others that your public verification key is actually theirs?
43
44
What is the probability that: hash (Keith owes Fred 10 ) = hash (Keith owes Fred 100 )?
45
4.
5. 6.
4.
5. 6.
Since there are only 1000 different possible values of the hash, there is a very good chance that there will be at least one match
Introduction to Cryptography and Security Mechanisms 2005
46
47
48
Summary
Digital signatures are in some senses a complimentary technology to public key encryption, offering data origin authentication and non-repudiation of digital messages. Digital signatures have different properties and offer different guarantees to hand-written signatures. The security of digital signatures critically relies on the security of the keys that are used to create and verify them.
49