UNIT III - DIS Notes
UNIT III - DIS Notes
Digital signature technology requires all parties trust that the person who creates
the signature image has kept the private key secret. If someone else has access
to the private signing key, that party could create fraudulent digital signatures in
the name of the private key holder.
The RSA idea can also be used for signing and verifying a message. In this case,
it is called the RSA digital signature scheme. The digital signature scheme
changes the roles of the private and public keys.
First, the private and public keys of the sender, not the receiver, are used.
Second, the sender uses her own private key to sign the document; the receiver
uses the sender’s public key to verify it.
If we compare the scheme with the conventional way of signing, we see that the
private key plays the role of the sender’s own signature, the sender’s public key
plays the role of the copy of the signature that is available to the public.
Obviously Alice cannot use Bob’s public key to sign the message because then
any other person could do the same. The below figure gives the general idea
behind the RSA digital signature scheme.
Message digests are designed to protect the integrity of a piece of data or media
to detect changes and alterations to any part of a message. They are a type of
cryptography utilizing hash values that can warn the copyright owner of any
modifications applied to their work. Message digest hash numbers represent
specific files containing the protected works. One message digest is assigned to
particular data content. It can reference a change made deliberately or
accidentally, but it prompts the owner to identify the modification as well as the
individual(s) making the change. Message digests are algorithmic numbers.
This term is also known as a hash value and sometimes as a checksum.
Sender A wants to send a message M to the receiver B along with the digital
signature S calculated over the message M
Step1: The sender A uses the message digest algorithm to calculate the message
digest MD1 over the original message M
Step 2: The sender A now encrypts the message digest with her private key. The
output of this process is called the digital signature.
Step 3: Now the sender A sends the original message M along with digital
signature DS to receiver B
Step 4: After the receiver B receives the original message M and the sender A’s
digital signature, B uses the same message digest algorithm which was used by
A and calculate its own message digest MD2 as shown below.
Step 5: The receiver B now uses the sender’s A’s public key to decrypt the
digital signature. Note that A had used his private key to decrypt the message
digest MD1 to form the digital signature. Therefore only A’s public key can be
used to decrypt it. The output of this process is the original message digest
which was calculated by A (MD1) in step 1.
b. B is also assured that the message came from A and not from someone
else attached, posing as A
Thus, the principle of digital signature is quite strong, secure and reliable.
El-gamal digital signature scheme:
Schnorr Digital Signature Scheme
The problem with the ElGamal digital signature scheme is that p needs to be
very large to guarantee that the discrete log problem is intractable in Zp*. The
recommendation is a p of at least 1024 bits. This could make the signature as
large as 2048 bits. To reduce the size of the signature, Schnorr proposed a new
scheme based on ElGamal, but with a reduced signature size.
It is a digital signature system famous for its ease of use and was one of the first
whose security was discovered by specific discrete logarithm problems. Schnorr
Signature Scheme produces concise signatures and is effective.
Working of Schnorr Signature Scheme
Elliptic Curve Digital Signature Scheme
Our last scheme is the elliptic curve digital signature scheme, which is DSA
based on elliptic curves, as we discussed in Chapter 10. The scheme sometimes
is referred to as ECDSA (elliptic curve DSA). Figure 13.15 gives the general
idea behind ECDSS. In the signing process, two functions and an extractor
create two signatures; in the verifying process the output of one function (after
passing through the extractor) is compared to the first signature for verification.
Functions f1 and f3 actually create points on the curve. The first creates a new
point from the signer’s private key (which is a point); the second creates a new
point from the signer’s two public keys (which are the points). Each extractor
extracts the first coordinates of the corresponding point in modular arithmetic.
The details of inputs and the functions will be discussed shortly.
Bob sends B to Alice. Alice signs the blinded message using the signing
algorithm defined in the RSA digital signature Sb = Bd mod n, in which d is
Alice’s private key. Note that Sb is the signature on the blind version of the
message. Bob simply uses the multiplicative inverse of his random number b to
remove the blind from the signature. The signature is S = Sb b−1 mod n. We can
prove that S is the signature on the original message as defined in the RSA
digital signature scheme
Preventing Fraud It appears that Bob can get Alice to sign a blind message that
may later hurt her. For example, Bob’s message could be a document, claiming
to be Alice’s will, that will give everything to Bob after her death. There are at
least three ways to prevent such damage: a. The authorities can pass a law that
Alice is not responsible for signing any blind message that is against her
interest. b. Alice can request a document from Bob that the message she will
sign does not hurt Alice. c. Alice could require that Bob proves his honesty
before she signs the blind message.
Digital Signature Standard (DSS)
The Digital Signature Standard (DSS) was adopted by the National Institute of
Standards and Technology (NIST) in 1994. NIST published DSS as FIPS 186.
DSS uses a digital signature algorithm (DSA) based on the ElGamal scheme
with some ideas from the Schnorr scheme. DSS has been criticized from the
time it was published. The main complaint regards the secrecy of DSS design.
The second complaint regards the size of the prime, 512 bits. Later NIST made
the size variable to respond to this complaint. Figure 13.13 gives the general
idea behind the DSS scheme.
In the signing process, two functions create two signatures; in the verifying
process, the output of one function is compared to the first signature for
verification. This is similar to Schnorr, but the inputs are different. Another
difference is that this scheme uses the message digest (not the message) as part
of inputs to functions 1 and 3. The interesting point is that the scheme uses two
public moduli: p and q. Functions 1 and 3 use both p and q; function 2 uses only
q. The details of inputs and the functions will be discussed shortly.
Key Generation Before signing a message to any entity, Alice needs to generate
keys and announce the public ones to the public. 1. Alice chooses a prime p,
between 512 and 1024 bits in length. The number of bits in p must be a multiple
of 64. 2. Alice chooses a 160-bit prime q in such a way that q divides (p − 1). 3.
Alice uses two multiplication groups and ; the second is a subgroup of the first.
4. Alice creates e1 to be the qth root of 1 modulo p (e1 p = 1 mod p). To do so,
Alice chooses a primitive element in Zp, e0, and calculates e1 = e0 (p−1)/q mod
p. 5. Alice chooses d as the private key and calculates e2 = e1 d mod p. 6.
Alice’s public key is (e1, e2, p, q); her private key is (d).
Signing The following shows the steps to sign the message: 1. Alice chooses a
random number r (1 ≤ r ≤ q). Note that although public and private keys can be
chosen once and used to sign many messages, Alice needs to select a new r each
time she needs to sign a new message. 2. Alice calculates the first signature S1
= (e1 r mod p) mod q. Note that the value of the first signature does not depend
on M, the message. 3. Alice creates a digest of message h(M). 4. Alice
calculates the second signature S2 = (h(M) + d S1)r −1mod q. Note that the
calculation of S2 is done in modulo q arithmetic. 5. Alice sends M, S1, and S2
to Bob.
Verifying Following are the steps used to verify the message when M, S1, and
S2 are received: 1. Bob checks to see if 0 < S1 < q. 2. Bob checks to see if 0 <
S2 < q. 3. Bob calculates a digest of M using the same hash algorithm used by
Alice. 4. Bob calculates V = [(e1 h(M)S2 −1 e2 S1S2 −1 ) mod p] mod q. 5. If
S1 is congruent to V, the message is accepted; otherwise, it is rejected.
What is Authentication?
3. Credential theft and account takeover—a vast majority of cyber attacks use
social engineering techniques to take over trusted accounts. Robust
authentication, both for external and internal communications, is critical to
prevent modern cyber threats. The Zero Trust security paradigm, adopted by the
US government and security giants like Google, Microsoft, and AWS, has
secure authentication at its core.
Authentication Requirements
Disclosure
Traffic analysis
Discovery of the pattern of traffic between parties.
Masquerade
Content modification
Sequence modification
Timing modification
Destination repudiation
PAP is the least secure protocol for authenticating users, primarily because it is
not encrypted. This is a login process that requires a username/password
combination to access the specified system, and verifies the provided
credentials against a user directory.
3. The local device checks if the hash value of the response matches the
expected response, and if so, establishes an authenticated connection
(“handshake”). Otherwise, it closes the connection.
CHAP is more secure than PAP, because PAP only performs authentication
when the user is first authenticated, while CHAP verified authentication on an
ongoing basis.
OIDC helps a client service verify the identity of end-users. It can also share (on
request) user claims such as name and email address.
OIDC works with various clients, including single-page applications (SPA) and
mobile applications. Here are key benefits of OIDC:
●You can use OIDC for single sign-on (SSO) across several applications.
●OIDC uses JSON Web Tokens (JWT), and HTTP flows to avoid sharing end-
user credentials with client services.
●The protocol comes with built-in consent, requiring explicit consent from
users before sharing their data.
JWTs use a digital certificate to prove who issued the claim. Technically, a
JSON Web Token includes three parts: a header, specifying the algorithm used
in the certificate, a payload, which contains the information included in the
claim, and the digital signature.
The Authentication Server performs the initial authentication and ticket for
Ticket Granting Service.
●Database:
The Authentication Server verifies the access rights of users in the database.
The Ticket Granting Server issues the ticket for the Server
Kerberos Overview:
●Step-1:
User login and request services on the host. Thus user requests for ticket-
granting service.
●Step-2:
Authentication Server verifies user’s access right using database and then gives
ticket-granting-ticket and session key. Results are encrypted using the Password
of the user.
●Step-3:
The decryption of the message is done using the password then send the ticket
to Ticket Granting Server. The Ticket contains authenticators like user names
and network addresses.
●Step-4:
Ticket Granting Server decrypts the ticket sent by User and authenticator
verifies the request then creates the ticket for requesting services from the
Server.
●Step-5:
●Step-6:
The server verifies the Ticket and authenticators then generate access to the
service. After this User can access the services.
Kerberos Limitations
● Each network service must be modified individually for use with Kerberos
● Scalability
Is Kerberos Infallible?
Applications
●Single Sign-On (SSO): Kerberos offers a Single Sign-On (SSO) solution that
enables users to log in once to access a variety of network resources. A user can
access any network resource they have been authorized to use after being
authenticated by the Kerberos server without having to provide their credentials
again.
The core of the X.509 authentication service is the public key certificate
connected to each user. These user certificates are assumed to be produced by
some trusted certification authority and positioned in the directory by the user or
the certified authority. These directory servers are only used for providing an
effortless reachable location for all users so that they can acquire certificates.
X.509 standard is built on an IDL known as ASN.1. With the help of Abstract
Syntax Notation, the X.509 certificate format uses an associated public and
private key pair for encrypting and decrypting a message.
●Version number: It defines the X.509 version that concerns the certificate.
●Serial number: It is the unique number that the certified authority issues.
●Signature Algorithm Identifier: This is the algorithm that is used for signing
the certificate.
●Issuer name: Tells about the X.500 name of the certified authority which
signed and created the certificate.
●Period of Validity: It defines the period for which the certificate is valid.
●Subject Name: Tells about the name of the user to whom this certificate has
been issued.
●Subject’s public key information: It defines the subject’s public key along with
an identifier of the algorithm for which this key is supposed to be used.
●Signature: This field contains the hash code of all other fields which is
encrypted by the certified authority private key.
Applications of X.509 Authentication Service Certificate:
Many protocols depend on X.509 and it has many applications, some of them
are given below:
● Web server security with the help of Transport Layer Security (TLS)/Secure
Sockets Layer (SSL) certificates
● Email certificates
● Code signing
● Digital Identities