Unit 3
Unit 3
Unit 3
Digital Signature and Authentication Schemes: Digital signature-Digital Signature Schemes and
their Variants- Digital Signature Standards-Authentication: Overview- Requirements Protocols -
Applications - Kerberos -X.509 Directory Services.
Digital Signature:
A digital signature is a mathematical technique used to validate the authenticity and integrity of a
digital document, message or software. It's the digital equivalent of a handwritten signature or
stamped seal, but it offers far more inherent security.
Digital signatures can provide evidence of origin, identity and status of electronic documents,
transactions or digital messages. Signers can also use them to acknowledge informed consent. In
many countries, including the U.S., digital signatures are considered legally binding in the same
way as traditional handwritten document signatures.
Encryption – Process of converting electronic data into another form, called ciphertext, which
cannot be easily understood by anyone except the authorized parties. This assures data security.
Decryption– Process of translating code to data.
The message is encrypted at the sender’s side using various encryption algorithms and decrypted at
the receiver’s end with the help of the decryption algorithms.
When some message is to be kept secure like username, password, etc., encryption and decryption
techniques are used to assure data security.
Types of Encryption
Symmetric Encryption– Data is encrypted using a key and the decryption is also done using the
same key.
Asymmetric Encryption-Asymmetric Cryptography is also known as public-key cryptography. It
uses public and private keys to encrypt and decrypt data. One key in the pair which can be shared
with everyone is called the public key. The other key in the pair which is kept secret and is only
known by the owner is called the private key. Either of the keys can be used to encrypt a message;
the opposite key from the one used to encrypt the message is used for decryption.
Public key– Key which is known to everyone. Ex-public key of A is 7, this information is known
to everyone.
Private key– Key which is only known to the person who’s private key it is.
A digital signature is a mathematical technique used to validate the authenticity and integrity of a
message, software, or digital document.
Key Generation Algorithms: Digital signature is electronic signatures, which assure that the
message was sent by a particular sender. While performing digital transactions authenticity and
integrity should be assured, otherwise, the data can be altered or someone can also act as if he was
the sender and expect a reply.
Signing Algorithms: To create a digital signature, signing algorithms like email programs create a
one-way hash of the electronic data which is to be signed. The signing algorithm then encrypts the
hash value using the private key (signature key). This encrypted hash along with other information
like the hashing algorithm is the digital signature. This digital signature is appended with the data
and sent to the verifier. The reason for encrypting the hash instead of the entire message or
document is that a hash function converts any arbitrary input into a much shorter fixed-length
value. This saves time as now instead of signing a long message a shorter hash value has to be
signed and moreover hashing is much faster than signing.
Signature Verification Algorithms: Verifier receives Digital Signature along with the data. It
then uses Verification algorithm to process on the digital signature and the public key (verification
key) and generates some value. It also applies the same hash function on the received data and
generates a hash value. Then the hash value and the output of the verification algorithm are
compared. If they both are equal, then the digital signature is valid else it is invalid.
The steps followed in creating digital signature are :
Message digest is computed by applying hash function on the message and then message digest is
encrypted using private key of sender to form the digital signature. (digital signature = encryption
(private key of sender, message digest) and message digest = message digest algorithm(message)).
Digital signature is then transmitted with the message.(message + digital signature is transmitted)
Receiver decrypts the digital signature using the public key of sender.(This assures authenticity, as
only sender has his private key so only sender can encrypt using his private key which can thus be
decrypted by sender’s public key).
The receiver now has the message digest.
The receiver can compute the message digest from the message (actual message is sent with the
digital signature).
The message digest computed by receiver and the message digest (got by decryption on digital
signature) need to be same for ensuring integrity.
Message digest is computed using one-way hash function, i.e. a hash function in which
computation of hash value of a message is easy but computation of the message from hash value of
the message is very difficult.
Legal documents and contracts: Digital signatures are legally binding. This makes them ideal for
any legal document that requires a signature authenticated by one or more parties and guarantees
that the record has not been altered.
Sales contracts: Digital signing of contracts and sales contracts authenticates the identity of the
seller and the buyer, and both parties can be sure that the signatures are legally binding and that the
terms of the agreement have not been changed.
Financial Documents: Finance departments digitally sign invoices so customers can trust that the
payment request is from the right seller, not from a bad actor trying to trick the buyer into sending
payments to a fraudulent account.
Health Data: In the healthcare industry, privacy is paramount for both patient records and research
data. Digital signatures ensure that this confidential information was not modified when it was
transmitted between the consenting parties.
Federal, state, and local government agencies have stricter policies and regulations than many
private sector companies. From approving permits to stamping them on a timesheet, digital
signatures can optimize productivity by ensuring the right person is involved with the proper
approvals.
Shipping Documents: Helps manufacturers avoid costly shipping errors by ensuring cargo
manifests or bills of lading are always correct. However, physical papers are cumbersome, not
always easily accessible during transport, and can be lost. By digitally signing shipping documents,
the sender and recipient can quickly access a file, check that the signature is up to date, and ensure
that no tampering has occurred.
Drawbacks of Digital Signatures
Dependence on Key Management: Digital signatures rely on the secure management of
cryptographic keys. This means that the sender must keep their private key safe and secure from
unauthorized access, while the recipient must verify the sender’s public key to ensure its
authenticity. Any failure in key management can compromise the security of the digital signature.
Complexity: Digital signatures require a complex process of key generation, signing, and
verification. This can make them difficult to implement and use for non-technical users.
Compatibility: Different digital signature algorithms and formats may not be compatible with
each other, making it difficult to exchange signed messages across different systems and
applications.
Legal Recognition: Although digital signatures have legal recognition in many countries, their
legal status may not be clear in all jurisdictions. This can limit their usefulness in legal or
regulatory contexts.
Revocation: In case of key compromise or other security issues, digital signatures must be revoked
to prevent their misuse. However, the revocation process can be complex and may not be effective
in all cases.
Cost: Digital signatures may involve additional costs for key management, certificate issuance,
and other related services, which can make them expensive for some users or organizations.
Limited Scope: Digital signatures provide authentication and integrity protection for a message,
but they do not provide confidentiality or protection against other types of attacks, such as denial-
of-service attacks or malware.
EXAMPLE:
Original Message : encryption
g used : 5860696954522417707188952371547944035333315907890
g^a used : 4711309755639364289552454834506215144653958055252
g^k used : 12475188089503227615789015740709091911412567126782
g^ak used : 39448787632167136161153337226654906357756740068295
Decrypted Message : encryption
In this cryptosystem, the original message M is masked by multiplying gak to it. To remove the
mask, a clue is given in form of gk. Unless someone knows a, he will not be able to retrieve M.
This is because finding discrete log in a cyclic group is difficult and simplifying knowing ga and
gk is not good enough to compute gak.
Advantages:
We will be focussing on DSA. The NIST(National Institute of Standards and Technology) accepted
the Digital Signature Algorithm as a standard in 1994. The digital signature algorithm is similar to
asymmetric encryption in many ways but departs from it slightly.
In contrast to asymmetric encryption, the Digital Signature Algorithm generates a digital signature
from two 160-bit values using mathematical functions.
Apply the hash function to this simple text message then our hash code is generated.
Hash code, along with the random variable k, is given input to the signature algorithm.
For this signature, we use the global public key PUA. Along with this, we will use the
private key of the sender PRA.
Along with the simple text, we will get two components named s and r.
The hash function is applied along with the s and r components to a verifying function.
The verifying function uses the global public key and the sender's public key.
What is ECDSA?
The Elliptic Curve Digital Signature Algorithm is a Digital Signature Algorithm (DSA) that
uses elliptic curve cryptography keys. It is a very efficient equation that is based on cryptography
with public keys. ECDSA is utilized in many security systems, is popular in encrypted messaging
apps, and is the foundation of Bitcoin security (with Bitcoin “addresses” serving as public keys).
Elliptic Curve Digital Signature Algorithms (ECDSA) have recently received significant
attention, particularly from standards developers, as alternatives to existing standard
cryptosystems such as integer factorization cryptosystems and discrete logarithm problem
cryptosystems. In security applications, crypto-algorithms are always the most significant
fundamental tool.
As we have studied, signature is a way of authenticating the data coming from a trusted
individual. Similarly, digital signature is a way of authenticating a digital data coming from a
trusted source. Digital Signature Standard (DSS) is a Federal Information Processing
Standard(FIPS) which defines algorithms that are used to generate digital signatures with the
help of Secure Hash Algorithm(SHA) for the authentication of electronic documents. DSS only
provides us with the digital signature function and not with any encryption or key exchanging
strategies.
Sender Side : In DSS Approach, a hash code is generated out of the message and following
inputs are given to the signature function –
1. The hash code.
2. The random number ‘k’ generated for that particular signature.
3. The private key of the sender i.e., PR(a).
4. A global public key(which is a set of parameters for the communicating principles) i.e.,
PU(g).
These input to the function will provide us with the output signature containing two components
– ‘s’ and ‘r’. Therefore, the original message concatenated with the signature is sent to the
receiver. Receiver Side : At the receiver end, verification of the sender is done. The hash code of
the sent message is generated. There is a verification function which takes the following inputs –
1. The hash code generated by the receiver.
2. Signature components ‘s’ and ‘r’.
3. Public key of the sender.
4. Global public key.
The output of the verification function is compared with the signature component ‘r’. Both the
values will match if the sent signature is valid because only the sender with the help of it private
key can generate a valid signature.
Benefits of advanced signature:
1.A computerized signature gives better security in the exchange. Any unapproved individual
can’t do fakeness in exchanges.
2. You can undoubtedly follow the situation with the archives on which the computerized mark is
applied.
3. High velocity up record conveyance.
4. It is 100 percent lawful it is given by the public authority approved ensuring authority.
5. In the event that you have marked a report carefully, you can’t deny it.
6. In this mark, When a record is get marked, date and time are consequently stepped on it.
7.It is preposterous to expect to duplicate or change the report marked carefully.
8. ID of the individual that signs.
9. Disposal of the chance of committing misrepresentation by a sham.
Kerberos:
Database:
The Authentication Server verifies the access rights of users in the database.
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:
The user sends the Ticket and Authenticator to the Server.
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
It doesn’t work well in a timeshare environment
Secured Kerberos Server
Requires an always-on Kerberos server
Stores all passwords are encrypted with a single key
Assumes workstations are secure
May result in cascading loss of trust.
Scalability
Applications
notes_2
Key Distribution Center (KDC)
A trusted third-party that verifies user identities located on a Domain Controller (DC), such as the
Active Directory domain.
Authentication Server (AS): Confirms that the access request the user is making is from a
known service and issues Ticket Granting Tickets (TGTs).
Ticket Granting Service (TGS): Confirms that the access request the user is making is
from a known service and issues service tickets.
Client
Refers to the user or the service the user wants to access. There are often multiple clients within a
realm.
Contains the majority of information that needs to pass between the AS and TGS, such as client ID,
service ID, hostname, IP address, session keys, timestamps, time-to-live (TTL). TGTs are
encrypted using a server’s secret key.
Authenticator Message
The Kerberos authentication process consists of eight steps, across three different stages:
1. The user account sends a plaintext message to the Authentication Server (AS), e.g. a
request to access a particular service, including the user ID.
2. The AS confirms whether or not the request is coming from an authorized user by checking
the User ID in the database.
If the User ID belongs to an authorized user, the AS retrieves the user’s password from the
database and uses it as a key to decrypt the request.
5. The User receives and decrypts the TGT before sending it to the TGS.
6. The TGS receives and decrypts the TGT, performs validation, then generates a service
ticket.
7. The User receives and decrypts the Service Ticket (ST), creates an Authenticator Message,
and sends both tickets to the Service.
8. The Service performs decryption and validation on the ST and Authenticator Message,
creates a new Authenticator Message, and sends this final message to the User to enable
access.
This client authentication process enables mutual authentication between the User and the
Service. Passwords are never shared across the unencrypted network with Kerberos.
Kerberos Uses
Kerberos implementations are used on a number of operating systems and networking systems to
verify user accounts.
Examples include:
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.
Once an X.509 certificate is provided to a user by the certified authority, that certificate is
attached to it like an identity card. The chances of someone stealing it or losing it are less,
unlike other unsecured passwords. With the help of this analogy, it is easier to imagine how
this authentication works: the certificate is basically presented like an identity at the
resource that requires authentication.
Public Key certificate use
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.
Extension block: This field contains additional standard information.
Signature: This field contains the hash code of all other fields which is encrypted by the
certified authority private key.
Many protocols depend on X.509 and it has many applications, some of them are given below: