Unit no-VI-Message Authontication
Unit no-VI-Message Authontication
In
this threat, the user is not sure about the originator of the message. Message
authentication can be provided using the cryptographic techniques that use secret
keys as done in case of encryption.
Limitations of MAC
There are two major limitations of MAC, both due to its symmetric nature of
operation −
Establishment of Shared Secret.
o It can provide message authentication among pre-decided legitimate
users who have shared key.
o This requires establishment of shared secret prior to use of MAC.
Inability to Provide Non-Repudiation
o Non-repudiation is the assurance that a message originator cannot
deny any previously sent messages and commitments or actions.
o MAC technique does not provide a non-repudiation service. If the
sender and receiver get involved in a dispute over message
origination, MACs cannot provide a proof that a message was indeed
sent by the sender.
o Though no third party can compute the MAC, still sender could deny
having sent the message and claim that the receiver forged it, as it is
impossible to determine which of the two parties computed the MAC.
A hash function is a mathematical function that converts a numerical input value into
another compressed numerical value. The input to the hash function is of arbitrary
length but output is always of fixed length.
Values returned by a hash function are called message digest or simply hash
values. The following picture illustrated hash function −
Features of Hash Functions
The typical features of hash functions are −
Fixed Length Output (Hash Value)
o Hash function coverts data of arbitrary length to a fixed length. This
process is often referred to as hashing the data.
o In general, the hash is much smaller than the input data, hence hash
functions are sometimes called compression functions.
o Since a hash is a smaller representation of a larger data, it is also
referred to as a digest.
o Hash function with n bit output is referred to as an n-bit hash
function. Popular hash functions generate values between 160 and
512 bits.
Efficiency of Operation
o Generally for any hash function h with input x, computation of h(x) is a
fast operation.
o Computationally hash functions are much faster than a symmetric
encryption.
Since, the hash value of first message block becomes an input to the second hash
operation, output of which alters the result of the third operation, and so on. This
effect, known as an avalanche effect of hashing.
Avalanche effect results in substantially different hash values for two messages that
differ by even a single bit of data.
Understand the difference between hash function and algorithm correctly. The hash
function generates a hash code by operating on two blocks of fixed-length binary
data.
Hashing algorithm is a process for using the hash function, specifying how the
message will be broken up and how the results from previous message blocks are
chained together.
An intruder can only see the hashes of passwords, even if he accessed the
password. He can neither logon using hash nor can he derive the password
from hash value since hash function possesses the property of pre-image
resistance.
Data Integrity Check
Data integrity check is a most common application of the hash functions. It is used
to generate the checksums on data files. This application provides assurance to the
user about correctness of the data.
The process is depicted in the following illustration −
The integrity check helps the user to detect any changes made to original file. It
however, does not provide any assurance about originality. The attacker, instead of
modifying file data, can change the entire file and compute all together new hash
and send to the receiver. This integrity check application is useful only if the user is
sure about the originality of file.
With HMAC, you can achieve authentication and verify that data is correct
and authentic with shared secrets, as opposed to approaches that use
signatures and asymmetric cryptography.
Secret keys. They must have a way to decode messages they get.
A secret key handles this task, and it's meant to stay secret and
hidden.
Algorithm. They must pick one hash function that all of their
messages will move through.
HMAC tester tools can help demonstrate how something like this works.
Imagine you're dealing with these inputs:
But the average computer user may never need to understand the math.
To them, knowing that their messages are protected may be all they
require.
Digital signatures are the public-key primitives of message authentication. In the
physical world, it is common to use handwritten signatures on handwritten or typed
messages. They are used to bind signatory to the message.
Similarly, a digital signature is a technique that binds a person/entity to the digital
data. This binding can be independently verified by receiver as well as any third
party.
Digital signature is a cryptographic value that is calculated from the data and a
secret key known only by the signer.
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. This requirement is very crucial in business applications, since likelihood
of a dispute over exchanged data is very high.
RSA Cryptosystem
This cryptosystem is one the initial system. It remains most employed cryptosystem
even today. The system was invented by three scholars Ron Rivest, Adi
Shamir, and Len Adleman and hence, it is termed as RSA cryptosystem.
We will see two aspects of the RSA cryptosystem, firstly generation of key pair and
secondly encryption-decryption algorithms.
Key Management
It goes without saying that the security of any cryptosystem depends upon how
securely its keys are managed. Without secure procedures for the handling of
cryptographic keys, the benefits of the use of strong cryptographic schemes are
potentially lost.
It is observed that cryptographic schemes are rarely compromised through
weaknesses in their design. However, they are often compromised through poor
key management.
There are some important aspects of key management which are as follows −
Cryptographic keys are nothing but special pieces of data. Key management
refers to the secure administration of cryptographic keys.
Key management deals with entire key lifecycle as depicted in the following
illustration −
There are two specific requirements of key management for public key
cryptography.
o Secrecy of private keys. Throughout the key lifecycle, secret keys
must remain secret from all parties except those who are owner and
are authorized to use them.
o Assurance of public keys. In public key cryptography, the public
keys are in open domain and seen as public pieces of data. By default
there are no assurances of whether a public key is correct, with whom
it can be associated, or what it can be used for. Thus key
management of public keys needs to focus much more explicitly on
assurance of purpose of public keys.
The most crucial requirement of ‘assurance of public key’ can be achieved through
the public-key infrastructure (PKI), a key management systems for supporting
public-key cryptography.
Digital Certificate
For analogy, a certificate can be considered as the ID card issued to the person.
People use ID cards such as a driver's license, passport to prove their identity. A
digital certificate does the same basic thing in the electronic world, but with one
difference.
Digital Certificates are not only issued to people but they can be issued to
computers, software packages or anything else that need to prove the identity in the
electronic world.
Digital certificates are based on the ITU standard X.509 which defines a
standard certificate format for public key certificates and certification
validation. Hence digital certificates are sometimes also referred to as X.509
certificates.
Public key pertaining to the user client is stored in digital certificates by The
Certification Authority (CA) along with other relevant information such as
client information, expiration date, usage, issuer etc.
CA digitally signs this entire information and includes digital signature in the
certificate.
Anyone who needs the assurance about the public key and associated
information of client, he carries out the signature validation process using
CA’s public key. Successful validation assures that the public key given in
the certificate belongs to the person whose details are given in the certificate.
The process of obtaining Digital Certificate by a person/entity is depicted in the
following illustration.
As shown in the illustration, the CA accepts the application from a client to certify
his public key. The CA, after duly verifying identity of client, issues a digital
certificate to that client.
Hierarchy of CA
With vast networks and requirements of global communications, it is practically not
feasible to have only one trusted CA from whom all users obtain their certificates.
Secondly, availability of only one CA may lead to difficulties if CA is compromised.
In such case, the hierarchical certification model is of interest since it allows public
key certificates to be used in environments where two communicating parties do not
have trust relationships with the same CA.
The root CA is at the top of the CA hierarchy and the root CA's certificate is a
self-signed certificate.
The CAs, which are directly subordinate to the root CA (For example, CA1
and CA2) have CA certificates that are signed by the root CA.
The CAs under the subordinate CAs in the hierarchy (For example, CA5 and
CA6) have their CA certificates signed by the higher-level subordinate CAs.
Certificate authority (CA) hierarchies are reflected in certificate chains. A certificate
chain traces a path of certificates from a branch in the hierarchy to the root of the
hierarchy.
The following illustration shows a CA hierarchy with a certificate chain leading from
an entity certificate through two subordinate CA certificates (CA6 and CA3) to the
CA certificate for the root CA.
Verifying a certificate chain is the process of ensuring that a specific certificate
chain is valid, correctly signed, and trustworthy. The following procedure verifies a
certificate chain, beginning with the certificate that is presented for authentication −
A client whose authenticity is being verified supplies his certificate, generally
along with the chain of certificates up to Root CA.
Verifier takes the certificate and validates by using public key of issuer. The
issuer’s public key is found in the issuer’s certificate which is in the chain
next to client’s certificate.
Now if the higher CA who has signed the issuer’s certificate, is trusted by the
verifier, verification is successful and stops here.
Else, the issuer's certificate is verified in a similar manner as done for client in
above steps. This process continues till either trusted CA is found in between
or else it continues till Root CA.