ch-3 part-II
ch-3 part-II
2 Digital Signature
Confidentiality ensures that messages cannot be intercepted and read by
eavesdroppers, i.e., encryption protects against passive attack
A different requirement is to protect against active attack (falsification of
data and transactions). Protection against such attacks is known as
message authentication
A message, file, document, or other collection of data is said to be
authentic when it is genuine(not altered) and comes from its alleged
source
A digital signature is not used to ensure the confidentiality of a message,
but rather to guarantee who sent the message, i.e.,
authentication(nonrepudiation); it proves who the sender is
Nonrepudation can be source repudiation(denial of transmission of
message by source) or destination repudiation(denial of receipt of message
by destination)
1
Digital signature is also used for Data Integrity; it ensures that messages are protected
against modification
Note: authentication may mean both nonrepudiation and data integrity and sometimes
only data integrity
Masquerade: The creation of messages by an opponent that are purported to come from an
authorized entity.
In real world, the receiver of message needs assurance that the message belongs to the
sender and he should not be able to repudiate the origination of that message.
Digital Signature for Assurance
Consider the situation where Bob has just sold Alice something for 500 Birr
through a
deal that is made by e-mail
Alice sends an e-mail accepting to pay 500 Birr
Two issues need to be taken care of in addition to authentication
Alice needs to be assured that Bob will not modify the amount and show that Alice
promised
to pay more than 500 Bir
Bob needs to be assured that Alice will not deny that she sends the message, i.e., source
repudiation
2
Digital signature reverses the asymmetric encryption process
4
Disadvantage: The public-key algorithm must be applied four times rather than
two in each communication which has an impact on efficiency.
It is also possible with symmetric encryption, as far as the key is shared in
secured way.
5
Digital Signature Using Message Digest
Problems in Digital Signature
Alice may claim that her private key has been stolen before the message
was sent
Alice may change her private key; a solution could be to have a central
authority that keeps track of changes in keys and that signed messages
be timestamped
Alice’s entire message is encrypted which may be expensive in terms of
processing requirements
It also requires a great deal of storage. Each document must be kept in
plaintext to be used for practical purposes. A copy also must be stored in
ciphertext so that the origin and contents can be verified in case of a
dispute
A better and cheaper method is to use a message digest
6
Hash function
A hash function H takes a message m of arbitrary length and produces a
bit string h, h= H(m)
When the hash value h is sent with the message m, it enables to determine
whether m has been modified or not; the principal objective of a hash
function is data integrity.
It is similar to cyclic-redundancy check(CRC) and Checksum
When a hash function is used to provide message authentication (integrity), the
hash function value is often referred to as a message digest
The two most common hashing algorithms are
MD5(Message Digest version 5) and
Secure Hash Algorithm or SHA(SHA-1 and later versions like SHA-256) by NIST.
h = H(m) is sent along m (not encrypted), where H is a cryptographic
hash function
7
If m is changed to m’, its hash
H(m’)will be different from h =
H(m) and can be easily detected
Alice first computes a message
digest and encrypts it with her
private key
E(𝐾𝐴−, H(m)) is sent so that
Bob knows that it comes from
Alice by decrypting it with her
public key
Bob decrypts the digest and
calculates the message digest; if
they match he knows the
message has not.
12
Properties of Hash Function
One-way function: It is computationally infeasible to find m that
corresponds to a known output of h
Or given a hash value h it should be difficult to find the message m such that h =
H(m)
That means you cannot “unhash” something
Collision resistance
Weak-collision resistance: It is computationally infeasible, given m and H, to
find m’
≠m such that H(m) = H(m’)
Strong-collision resistance: Given H, it is computationally infeasible to find any
two
different input values m and m’, such that H(m) = H(m’)
The output is of fixed-length no matter what input is given. This is exactly
how Windows stores passwords. For example, if the password is password,
then Windows will first hash it producing something like:
0BD181063899C9239016320B50D3E896693A96DF
13
3.3.4 Public Key Distribution
Public Announcement of Public Keys
Send a public key to any other participant or broadcast the key to
the community
But anyone can forge such a public announcement, i.e., some user could
pretend to be a legitimate user and send a public key to another participant
or broadcast it, so mechanism is required.
Public-key Infrastructure
We need a body that certifies the public key is that of the party we wish to
communicate with, i.e., Certification/ Certificate Authority (CA) that
signs (certifies) the public key.
Public-Key Infrastructure(PKI) is the set of hardware, software, people,
policies, and procedures needed to create, manage, store, distribute, and
revoke digital certificates based on asymmetric cryptography
14
Users publish certificates with the X.509 standard (for formatting
certificates)
A certificate is a public key and some naming “stuff”, digitally signed
by someone you trust (third party), i.e., the CA
The resulting certificate will contain information like user’s name/ID,
user’s public key, name of CA, start date of certificate, and length of
time it is valid
The Internet Engineering Task Force (IETF) Public Key
Infrastructure
X.509 (PKIX) working group has been the driving force for deploying
a certificate-based architecture on the Internet
15
Elements of the PKIX model
End entity: Denotes end users, devices (e.g., servers, routers); end
entities typically consume and/or support PKI-related services
Certification Authority(CA): The issuer of certificates and (usually)
certificate revocation lists (CRLs)
Registration Authority(RA): An optional component that
can assume a number of administrative functions from the
CA
CRL issuer: An optional component that a CA can delegate
to publish CRLs
Repository: Any method for storing certificates and CRLs so that
they can be retrieved by end entities
16
Read about symmetric key distribution
Using symmetric key encryption
Using asymmetric key encryption
17
Concluding Remarks about Encryption
Advantages and disadvantages
Advantage of private-key (symmetric/secret-key) cryptography is that it provides better
secrecy but needs prearranged key exchange
Symmetric key cryptography is impractical for exchanging messages with a large group of
previously unknown correspondents over a public network, e.g., in e-commerce, for a
merchant to conduct transactions securely with millions of customers, each customer would
need a distinct key assigned by that merchant and transmitted over a separate secure
channel
Therefore, in practice, hybrid systems use public-key to establish session key for private key
18