SlideShare a Scribd company logo
IOSR Journal of Computer Engineering (IOSR-JCE)
e-ISSN: 2278-0661, p- ISSN: 2278-8727Volume 10, Issue 5 (Mar. - Apr. 2013), PP 26-31
www.iosrjournals.org
www.iosrjournals.org 26 | Page
Achieving data integrity by forming the digital signature using
RSA and SHA-1 algorithm
Isha Shingari, Sourabh Singh Verma
M.Tech Computer Science Engineering, Dept. of Computer Science Engineering Mody Institute Of Technology
and Science
Abstract: Technology has been touching our lives in almost every domain. With the advent of modern
technologies, the need of enhancing its security also arises. Data security has become one of the most important
issues of concern. Data security is achieved with the help of adapting certain security measures. Here, in this
paper we have analyzed the various cryptographic concepts. Encryption and decryption are two most important
aspects of cryptography and data security. The special light has been thrown on data integrity and protection
issues. The RSA algorithm has been explained. The implementation of the algorithm has also been given with
the help of proving a graphical interface. The data integrity has been established at the client and receiver end
by not limiting it to a standalone application.
Keywords: cryptography, data security, information security, data integrity, RSA, SHA-1, client/server
I. Introduction
The concept of network security and cryptography is not new. It has been touching many areas which
include the strong data encryption techniques, trusted third party access and a secure communication channel.
While talking about data security, it can be considered as the main aspect of the secure data transmission over an
unreliable network. Data security has become one of the major challenging issues which need a great deal of
attention. The information could be accessed for malicious reasons. Therefore it has become very crucial to
come up with the suitable security measures for making the data security stronger[1].
The meaning of information security suggests the protection of information systems from the unauthorized use,
disclosure, modification, perusal, recording, destruction or access. This area is often related with the protection
of integrity, availability and confidentiality of information.
The key concepts associated with information security are integrity, confidentiality, availability,
authenticity and non-repudiation. The term integrity suggests that the data cannot be modified undetectably. It
can be considered as the special case of ACID transaction processing. Confidentiality is the term which is used
to denote the disclosure of information to unauthorized individuals or the systems. The credit card transactions
on the internet preserve the confidentiality and thus maintain the privacy of the people.
Availability means that the information should always be available when it is needed. The computing systems
which are used to store and process the information, the security controls use to protect it and communicate
channels used to access it, must function in the correct manner. It thereby ensures the protection of information
from the Denial Of Services attack.
The authenticity of information means that the data, transactions, communications and documents used
should be genuine. There is a validation of both the parties and it is checked whether they are same which they
claim to be. The non-repudiation means that the two information exchanging parties cannot deny their retrieval
and transmission of information. It means that the one party cannot deny the fact of receiving the information
nor the other party can deny having sent the information.
II. Data Integrity
The term data integrity suggests the security against the unauthorized modification of messages. The
data integrity is very close to the classical subjects in communication which is the error detection code. The
latter one is the procedure for the detection of errors which can be introduced in the messages due to the fault
generated in the communications. It is often considered that by the usage of the information which has been
modified maliciously, stands at the same risk as using the information which contains the defects due to the
errors introduced in data processing or communications[2].
The asymmetric and symmetric ciphers play a remarkable role to establish the user authentication and
confidentiality, but it cannot guarantee the data integrity. There must be alternate measures for ensuring the data
integrity which can be possible through the added layer of security. Message digests generally posses the
following characteristics:
 A variable length input is taken which is used then to generate the fixed length output which is known as
the hash or a message digest.
Achieving data integrity by forming the digital signature using RSA and SHA-1 algorithm
www.iosrjournals.org 27 | Page
 It is not computationally feasible for calculating the message which is based on the digest.
 It is also infeasible to find out the two messages which will generate the same digest, this feature is known
as collision resistance.
 Thereby, the message digests or hashes achieve the data integrity by applying of the complex math to the
data for ensuring that this data has not been tampered on its route towards the final destination.
 Data integrity is needed only in the situations where the value of data being transferred is high enough to
warrant the added layer of security versus the risks involved in exposing the digital data.
III. Cryptography
The word “cryptography” has its Greek origin and it is literally translated as the “secret writing”. When
the digital communications were not invented, the cryptographic methods were the only way used by military
people for espionage. With the advent of modern technologies in communication, the individuals and businesses
can transport information at a very marginal price with the help of public networks like Internet. This makes the
data to be exposed over the medium. Therefore it is very important for the businesses to make sure that the
sensitive date is transferred from one point to another in a secure manner.
Cryptography is the mechanism which helps in achieving the security by making the data
incomprehensible to everyone except the projected receiver. The term encryption involves the conversion of the
plaintext into the cipher text. The plaintext is the readable data and the cipher text is a data which is impossible
to read without the key. The key acts as the medium to convert the plain text into cipher text and vice versa. The
process of conversion of cipher text into the plain text is called decryption. The key for encryption and
decryption is meant to be secret and the strength of key decides the privacy of cipher text.
Figure 1: encryption and decryption
Types of Cryptography
There are two kinds of cryptographic algorithms: Public Key Cryptography and Secret Key Cryptography
a. Public Key Cryptography
This kind of cryptographic system uses two keys. One key is used for encryption and another key is used for the
decryption. This is also known as the asymmetric cryptography.
 Every user owns two keys- one public key which is known to all the users and one is key is private key
which is kept secret. The private and public key are mathematically linked.
 The encryption is performed using the public key and the process of decryption is undertaken with the
help of private key.
 The examples are RSA and ECC(Elliptic Key Cryptography)
 It supports non-repudiation and considered very secure.
b. Secret Key Cryptography
 This kind of cryptographic system uses the same key for encryption as well as decryption. This is
known as symmetric cryptography.
 The sender and receiver should have the same key for communicating successfully.
 The examples are DES, 3-DES, RC4, RC5
Achieving data integrity by forming the digital signature using RSA and SHA-1 algorithm
www.iosrjournals.org 28 | Page
 It is widely used and very popular and the generated key is very strong.
 The non-repudiation cannot be achieved, and the generated key is subject to be intercepted by the
hackers.
IV. The RSA algorithm
The RSA algorithm is for the public key cryptography which is based on the factoring of large integers.
The algorithm is named after its invertors Ron Rivest, Adi Shamir and Len Adleman, who invented it in the year
1977. The RSA algorithm is known to be most widely used public key cryptography based algorithm around the
world. The RSA algorithm can be used for both public key encryption as well as digital signatures. The security
of this algorithm is based on its difficulty to factorize the large integers.
Through the RSA cryptosystem, the sender can send the encrypted message to the receiver without any kind of
previous exchange of secret keys. Sender uses the receiver’s public key for encrypting the text and the receiver
uses its public key for decryption. RSA can also be used to sign a message, so A can sign a message using their
private key and B can verify it using A's public key[3].
3.1 Operations in RSA algorithm
The RSA algorithm involves a three step procedure which includes the key generation, encryption and
decryption.
3.1.1.Key generation
The RSA algorithm starts with the generation of key pair which includes the public key and a private key. The
public key is known to all the users and it is used for encryption. The decryption is achieved by private key.
The keys for the algorithm are generated by following the given procedure:
1. Select the two distinct prime numbers say p and q.
 Keeping in mind the security reasons, the integers p and q should be selected randomly and should be
of the similar bit length. The prime numbers could be identified conducting the primality test.
2. Compute the value of the modulus say n. n= p*q.
 The value of n is used for both private and public keys and is called as the modulus.
3. The next step is to calculate the value of Euler’s totient function. This function is denoted as :
∅ 𝑛 = 𝑝 − 1 (𝑞 − 1)………………(1)
4. The next is to choose an integer(let us name it e)such that the value of e should lie between 1 and Ø(n).
One more thing which is to be kept in mind is that the value of gcd(e, Ø(n)) should be 1. It means that
the number e and Ø(n) are coprime.
 “e” is the public key exponent
 The most common value of e is 65,537. The smaller values of e like 5 are supposed to be less secure in
certain settings. [4]
5. Then the value of d is calculated. 𝑑 ≡ 𝑒 1 𝑚𝑜𝑑 Ø 𝑛 ………………….(2)
 d is known as the multiplicative inverse of e modØ(n).
 The above equation (2) is more clearly stated as
(de) = 1 mod Ø(n)……………..(3)
 This is calculated as the Extended Euclidean algorithm .
 “d” is the private key component.
By the (3) equation, the public key consists of the modulus(n) and the public key exponent(e). The
private key consists of two parameters one is the modulus(n) and other is exponent (d) which must be
kept secret. The values of p, q, and Ø(n) should be kept secret. These three values are used for
calculating the value of d.
3.1.2Encryption
The sender sends its public key( n,e) to the receiver. The private key is kept secret. Then the receiver sends the
message M to the sender. The message is converted into an integer where its value lies between 0 and n. This is
done by the padding scheme. Then the cipher text is calculated. С=m ͤ(mod n)……………………….(4)
3.1.3Decryption
The sender can recover the message (m) from the cipher text ( c ) by using the private key component (d) by
using the equation:
m = c ^d (mod n)………………………(5)
Achieving data integrity by forming the digital signature using RSA and SHA-1 algorithm
www.iosrjournals.org 29 | Page
Figure 2: encryption and decryption in RSA
IV. Implementation
We perform to obtain data integrity through digital signature. In this project, the digital signature is
obtained in two stages.
The two stages are:
1. Encryption by RSA algorithm
2. Creating message digest by SHA-1 algorithm
In our approach, we have implemented RSA using the Java platform. In this case we have not fixed up any kind
of intervals for the selection of prime numbers. We are generating the prime numbers randomly. The prime
numbers are generated and they are generating the public key and the private key components. These public key
and private key have been used for encrypting the text message by the user. The encrypted message is saved in
the database along with the original message. A graphical interface has been provided to enhance the
understanding. We name the project as data integrity.
We wish to calculate the RSA encrypted message by generating the private and public key. We have also
generated the message digest by using the SHA-1 algorithm. Here, we wish to achieve the data integrity by
1. Encrypting the user input text
2. Forming the message digest.
3. We have made a sender window.
Figure 3. A snapshot of implementation of RSA algorithm in Java.
We have made the receiver end also. In the receiver end:
1. The message is decrypted using the RSA algorithm.
2. The message digest of the decrypted text is calculated using the SHA-1 algorithm.
3. If the message digest match at the sender and receiver end then the data integrity is achieved else it is
not achieved.
Achieving data integrity by forming the digital signature using RSA and SHA-1 algorithm
www.iosrjournals.org 30 | Page
Figure:4 Snapshot of receiver end
The complete procedure can be completed in the format of sender and receiver side on one computer. This
procedure is implemented in the client and server environment on different computers as well. To better
understand it, the flowchart of the system is given.
Figure 5: flowchart of the system
The application is run on the client end and the server end. The message from the client end is passed onto the
server. This way the data integrity is achieved.
Figure 6: application layout of the system
Achieving data integrity by forming the digital signature using RSA and SHA-1 algorithm
www.iosrjournals.org 31 | Page
V. Conclusion
The encrypted text has been successfully generated using the RSA algorithm. We have made one
sender end. In this, the private key and the public key have been generated. The message digest is formed at the
sender end and receiver end using the SHA-1 algorithm. The graphical interface enhances the understanding and
achieves faster results.
VI. Future Scope
The above approach uses the RSA and SHA-1 algorithm. It can be further used in VANET kind of a
scalable environment.
References
[1] http://en.wikipedia.org/wiki/Information_security
[2] modern cryptography theory and practice , chapter 10, 10.1 section
[3] Introduction to Cryptography By Mohan Atreya (matreya@rsasecurity.com)
[4] Boneh, Dan (1999). "Twenty Years of attacks on the RSA Cryptosystem". Notices of the American Mathematical Society 46 (2):
203–213.

More Related Content

PDF
Hybrid cryptographic technique using rsa algorithm and scheduling concepts
PDF
Analysis of Cryptographic Algorithms for Network Security
PDF
International Journal of Engineering Research and Development (IJERD)
PDF
Analysis of Cryptography Techniques
PDF
International Refereed Journal of Engineering and Science (IRJES)
PDF
Performance Comparison of File Security System using TEA and Blowfish Algorithms
PDF
CNS Solution
Hybrid cryptographic technique using rsa algorithm and scheduling concepts
Analysis of Cryptographic Algorithms for Network Security
International Journal of Engineering Research and Development (IJERD)
Analysis of Cryptography Techniques
International Refereed Journal of Engineering and Science (IRJES)
Performance Comparison of File Security System using TEA and Blowfish Algorithms
CNS Solution

What's hot (18)

PDF
Modified RSA-based algorithm: a double secure approach
PDF
Prevention of Cheating Message based on Block Cipher using Digital Envelope
PPTX
Encryption by fastech
PDF
A New Method for Encrypting Digital Data Using Symmetric Key in Information E...
PDF
A novel approach to information security using safe
PDF
A novel approach to information security using safe exchange of encrypted dat...
PPTX
Security services and mechanisms
PDF
Security of rabin p key encapsulation mechanism
PDF
Iaetsd a novel approach to provide the security for distributed adaptive netw...
PDF
Privacy Enhanced Online Payment System
PDF
A Study of Different Partitioning Clustering Technique
PDF
Comparative study of private and public key cryptography algorithms a survey
PDF
A novel paradigm in authentication system
PDF
Cryptography and Network Lecture Notes
PDF
Literature Survey: Secure transmitting of data using RSA public key implement...
PDF
Network security unit 1,2,3
DOCX
Seminar report on symmetric key
PDF
Vtu network security(10 ec832) unit 2 notes..
Modified RSA-based algorithm: a double secure approach
Prevention of Cheating Message based on Block Cipher using Digital Envelope
Encryption by fastech
A New Method for Encrypting Digital Data Using Symmetric Key in Information E...
A novel approach to information security using safe
A novel approach to information security using safe exchange of encrypted dat...
Security services and mechanisms
Security of rabin p key encapsulation mechanism
Iaetsd a novel approach to provide the security for distributed adaptive netw...
Privacy Enhanced Online Payment System
A Study of Different Partitioning Clustering Technique
Comparative study of private and public key cryptography algorithms a survey
A novel paradigm in authentication system
Cryptography and Network Lecture Notes
Literature Survey: Secure transmitting of data using RSA public key implement...
Network security unit 1,2,3
Seminar report on symmetric key
Vtu network security(10 ec832) unit 2 notes..
Ad

Viewers also liked (20)

PDF
Automatic generation control of two area interconnected power system using pa...
PDF
G0933443
PDF
Voltage Enhancement in Distribution System using Voltage Improvement Factor
PDF
L01246974
PDF
Efficient Technique for Image Stenography Based on coordinates of pixels
PDF
An Overview of TRIZ Problem-Solving Methodology and its Applications
PPT
и.а.крылов викторина
PDF
Manual completo
PDF
Hit and fill
PDF
A Video Watermarking Scheme to Hinder Camcorder Piracy
PPTX
Body in mind
PDF
Decadence Strategy
PDF
Scalability Enhancement of Push/Pull Server functions by converting Stateless...
PDF
Electronic and Vibrational Properties of Pbsns3
DOCX
Cynthia yeo cv2 nov
PDF
C01461422
PDF
Analysis of Pseudogap in Superconductors
PDF
Two Factor Authentication Using Smartphone Generated One Time Password
PPSX
Re:Thinking Audience Engagement with an online exhibit
PDF
An effective citation metadata extraction process based on BibPro parser
Automatic generation control of two area interconnected power system using pa...
G0933443
Voltage Enhancement in Distribution System using Voltage Improvement Factor
L01246974
Efficient Technique for Image Stenography Based on coordinates of pixels
An Overview of TRIZ Problem-Solving Methodology and its Applications
и.а.крылов викторина
Manual completo
Hit and fill
A Video Watermarking Scheme to Hinder Camcorder Piracy
Body in mind
Decadence Strategy
Scalability Enhancement of Push/Pull Server functions by converting Stateless...
Electronic and Vibrational Properties of Pbsns3
Cynthia yeo cv2 nov
C01461422
Analysis of Pseudogap in Superconductors
Two Factor Authentication Using Smartphone Generated One Time Password
Re:Thinking Audience Engagement with an online exhibit
An effective citation metadata extraction process based on BibPro parser
Ad

Similar to Achieving data integrity by forming the digital signature using RSA and SHA-1 algorithm (20)

PPTX
Fundamental Concept of Cryptography in Computer Security
PDF
Design of Hybrid Cryptography Algorithm for Secure Communication
PDF
HYBRID CRYPTOGRAPHIC TECHNIQUE USING RSA ALGORITHM AND SCHEDULING CONCEPTS
PPTX
Cryptography and Network Security Principles.pptx
PDF
A NEW PROPOSED SYMMETRIC KEY ALGORITHM FOR MODERN CRYPTOGRAPHIC
PDF
A Survey on Cryptographic Techniques for Network Security.pdf
PPTX
Introduction to Network Security
PPTX
Encryption in Cryptography
PDF
METHODS TOWARD ENHANCING RSA ALGORITHM : A SURVEY
PDF
SECURITY BASED ISSUES IN VIEW OF CLOUD BASED STORAGE SYSTEM
PPTX
CN GP 4 Cryptogaraphy.pptx
PPTX
Computer Introduction (Data Encryption)-Lecture05
PDF
Paper id 312201534
PDF
Securing Cloud Data The Role of Cryptography.pdf
PDF
A REVIEW STUDY OF CRYPTOGRAPHY TECHNIQUES
PDF
Tokenization vs Encryption Difference Explained.pdf
PPTX
PRESENTATION ON CRYPTOGRAPHY.pptx
PDF
A Survey On The Cryptographic Encryption Algorithms
PDF
L017136269
PDF
Comparison of Various Encryption Algorithms and Techniques for improving secu...
Fundamental Concept of Cryptography in Computer Security
Design of Hybrid Cryptography Algorithm for Secure Communication
HYBRID CRYPTOGRAPHIC TECHNIQUE USING RSA ALGORITHM AND SCHEDULING CONCEPTS
Cryptography and Network Security Principles.pptx
A NEW PROPOSED SYMMETRIC KEY ALGORITHM FOR MODERN CRYPTOGRAPHIC
A Survey on Cryptographic Techniques for Network Security.pdf
Introduction to Network Security
Encryption in Cryptography
METHODS TOWARD ENHANCING RSA ALGORITHM : A SURVEY
SECURITY BASED ISSUES IN VIEW OF CLOUD BASED STORAGE SYSTEM
CN GP 4 Cryptogaraphy.pptx
Computer Introduction (Data Encryption)-Lecture05
Paper id 312201534
Securing Cloud Data The Role of Cryptography.pdf
A REVIEW STUDY OF CRYPTOGRAPHY TECHNIQUES
Tokenization vs Encryption Difference Explained.pdf
PRESENTATION ON CRYPTOGRAPHY.pptx
A Survey On The Cryptographic Encryption Algorithms
L017136269
Comparison of Various Encryption Algorithms and Techniques for improving secu...

More from IOSR Journals (20)

PDF
A011140104
PDF
M0111397100
PDF
L011138596
PDF
K011138084
PDF
J011137479
PDF
I011136673
PDF
G011134454
PDF
H011135565
PDF
F011134043
PDF
E011133639
PDF
D011132635
PDF
C011131925
PDF
B011130918
PDF
A011130108
PDF
I011125160
PDF
H011124050
PDF
G011123539
PDF
F011123134
PDF
E011122530
PDF
D011121524
A011140104
M0111397100
L011138596
K011138084
J011137479
I011136673
G011134454
H011135565
F011134043
E011133639
D011132635
C011131925
B011130918
A011130108
I011125160
H011124050
G011123539
F011123134
E011122530
D011121524

Recently uploaded (20)

PPT
introduction to datamining and warehousing
PPTX
Fundamentals of safety and accident prevention -final (1).pptx
PPT
Introduction, IoT Design Methodology, Case Study on IoT System for Weather Mo...
PDF
Level 2 – IBM Data and AI Fundamentals (1)_v1.1.PDF
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PPTX
CURRICULAM DESIGN engineering FOR CSE 2025.pptx
PDF
Soil Improvement Techniques Note - Rabbi
PPTX
Artificial Intelligence
PPT
Occupational Health and Safety Management System
PPT
Total quality management ppt for engineering students
PDF
Unit I ESSENTIAL OF DIGITAL MARKETING.pdf
PPTX
Nature of X-rays, X- Ray Equipment, Fluoroscopy
PDF
Exploratory_Data_Analysis_Fundamentals.pdf
PDF
Artificial Superintelligence (ASI) Alliance Vision Paper.pdf
PDF
null (2) bgfbg bfgb bfgb fbfg bfbgf b.pdf
PDF
Analyzing Impact of Pakistan Economic Corridor on Import and Export in Pakist...
PPTX
UNIT - 3 Total quality Management .pptx
PDF
Visual Aids for Exploratory Data Analysis.pdf
PPTX
introduction to high performance computing
PDF
PREDICTION OF DIABETES FROM ELECTRONIC HEALTH RECORDS
introduction to datamining and warehousing
Fundamentals of safety and accident prevention -final (1).pptx
Introduction, IoT Design Methodology, Case Study on IoT System for Weather Mo...
Level 2 – IBM Data and AI Fundamentals (1)_v1.1.PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
CURRICULAM DESIGN engineering FOR CSE 2025.pptx
Soil Improvement Techniques Note - Rabbi
Artificial Intelligence
Occupational Health and Safety Management System
Total quality management ppt for engineering students
Unit I ESSENTIAL OF DIGITAL MARKETING.pdf
Nature of X-rays, X- Ray Equipment, Fluoroscopy
Exploratory_Data_Analysis_Fundamentals.pdf
Artificial Superintelligence (ASI) Alliance Vision Paper.pdf
null (2) bgfbg bfgb bfgb fbfg bfbgf b.pdf
Analyzing Impact of Pakistan Economic Corridor on Import and Export in Pakist...
UNIT - 3 Total quality Management .pptx
Visual Aids for Exploratory Data Analysis.pdf
introduction to high performance computing
PREDICTION OF DIABETES FROM ELECTRONIC HEALTH RECORDS

Achieving data integrity by forming the digital signature using RSA and SHA-1 algorithm

  • 1. IOSR Journal of Computer Engineering (IOSR-JCE) e-ISSN: 2278-0661, p- ISSN: 2278-8727Volume 10, Issue 5 (Mar. - Apr. 2013), PP 26-31 www.iosrjournals.org www.iosrjournals.org 26 | Page Achieving data integrity by forming the digital signature using RSA and SHA-1 algorithm Isha Shingari, Sourabh Singh Verma M.Tech Computer Science Engineering, Dept. of Computer Science Engineering Mody Institute Of Technology and Science Abstract: Technology has been touching our lives in almost every domain. With the advent of modern technologies, the need of enhancing its security also arises. Data security has become one of the most important issues of concern. Data security is achieved with the help of adapting certain security measures. Here, in this paper we have analyzed the various cryptographic concepts. Encryption and decryption are two most important aspects of cryptography and data security. The special light has been thrown on data integrity and protection issues. The RSA algorithm has been explained. The implementation of the algorithm has also been given with the help of proving a graphical interface. The data integrity has been established at the client and receiver end by not limiting it to a standalone application. Keywords: cryptography, data security, information security, data integrity, RSA, SHA-1, client/server I. Introduction The concept of network security and cryptography is not new. It has been touching many areas which include the strong data encryption techniques, trusted third party access and a secure communication channel. While talking about data security, it can be considered as the main aspect of the secure data transmission over an unreliable network. Data security has become one of the major challenging issues which need a great deal of attention. The information could be accessed for malicious reasons. Therefore it has become very crucial to come up with the suitable security measures for making the data security stronger[1]. The meaning of information security suggests the protection of information systems from the unauthorized use, disclosure, modification, perusal, recording, destruction or access. This area is often related with the protection of integrity, availability and confidentiality of information. The key concepts associated with information security are integrity, confidentiality, availability, authenticity and non-repudiation. The term integrity suggests that the data cannot be modified undetectably. It can be considered as the special case of ACID transaction processing. Confidentiality is the term which is used to denote the disclosure of information to unauthorized individuals or the systems. The credit card transactions on the internet preserve the confidentiality and thus maintain the privacy of the people. Availability means that the information should always be available when it is needed. The computing systems which are used to store and process the information, the security controls use to protect it and communicate channels used to access it, must function in the correct manner. It thereby ensures the protection of information from the Denial Of Services attack. The authenticity of information means that the data, transactions, communications and documents used should be genuine. There is a validation of both the parties and it is checked whether they are same which they claim to be. The non-repudiation means that the two information exchanging parties cannot deny their retrieval and transmission of information. It means that the one party cannot deny the fact of receiving the information nor the other party can deny having sent the information. II. Data Integrity The term data integrity suggests the security against the unauthorized modification of messages. The data integrity is very close to the classical subjects in communication which is the error detection code. The latter one is the procedure for the detection of errors which can be introduced in the messages due to the fault generated in the communications. It is often considered that by the usage of the information which has been modified maliciously, stands at the same risk as using the information which contains the defects due to the errors introduced in data processing or communications[2]. The asymmetric and symmetric ciphers play a remarkable role to establish the user authentication and confidentiality, but it cannot guarantee the data integrity. There must be alternate measures for ensuring the data integrity which can be possible through the added layer of security. Message digests generally posses the following characteristics:  A variable length input is taken which is used then to generate the fixed length output which is known as the hash or a message digest.
  • 2. Achieving data integrity by forming the digital signature using RSA and SHA-1 algorithm www.iosrjournals.org 27 | Page  It is not computationally feasible for calculating the message which is based on the digest.  It is also infeasible to find out the two messages which will generate the same digest, this feature is known as collision resistance.  Thereby, the message digests or hashes achieve the data integrity by applying of the complex math to the data for ensuring that this data has not been tampered on its route towards the final destination.  Data integrity is needed only in the situations where the value of data being transferred is high enough to warrant the added layer of security versus the risks involved in exposing the digital data. III. Cryptography The word “cryptography” has its Greek origin and it is literally translated as the “secret writing”. When the digital communications were not invented, the cryptographic methods were the only way used by military people for espionage. With the advent of modern technologies in communication, the individuals and businesses can transport information at a very marginal price with the help of public networks like Internet. This makes the data to be exposed over the medium. Therefore it is very important for the businesses to make sure that the sensitive date is transferred from one point to another in a secure manner. Cryptography is the mechanism which helps in achieving the security by making the data incomprehensible to everyone except the projected receiver. The term encryption involves the conversion of the plaintext into the cipher text. The plaintext is the readable data and the cipher text is a data which is impossible to read without the key. The key acts as the medium to convert the plain text into cipher text and vice versa. The process of conversion of cipher text into the plain text is called decryption. The key for encryption and decryption is meant to be secret and the strength of key decides the privacy of cipher text. Figure 1: encryption and decryption Types of Cryptography There are two kinds of cryptographic algorithms: Public Key Cryptography and Secret Key Cryptography a. Public Key Cryptography This kind of cryptographic system uses two keys. One key is used for encryption and another key is used for the decryption. This is also known as the asymmetric cryptography.  Every user owns two keys- one public key which is known to all the users and one is key is private key which is kept secret. The private and public key are mathematically linked.  The encryption is performed using the public key and the process of decryption is undertaken with the help of private key.  The examples are RSA and ECC(Elliptic Key Cryptography)  It supports non-repudiation and considered very secure. b. Secret Key Cryptography  This kind of cryptographic system uses the same key for encryption as well as decryption. This is known as symmetric cryptography.  The sender and receiver should have the same key for communicating successfully.  The examples are DES, 3-DES, RC4, RC5
  • 3. Achieving data integrity by forming the digital signature using RSA and SHA-1 algorithm www.iosrjournals.org 28 | Page  It is widely used and very popular and the generated key is very strong.  The non-repudiation cannot be achieved, and the generated key is subject to be intercepted by the hackers. IV. The RSA algorithm The RSA algorithm is for the public key cryptography which is based on the factoring of large integers. The algorithm is named after its invertors Ron Rivest, Adi Shamir and Len Adleman, who invented it in the year 1977. The RSA algorithm is known to be most widely used public key cryptography based algorithm around the world. The RSA algorithm can be used for both public key encryption as well as digital signatures. The security of this algorithm is based on its difficulty to factorize the large integers. Through the RSA cryptosystem, the sender can send the encrypted message to the receiver without any kind of previous exchange of secret keys. Sender uses the receiver’s public key for encrypting the text and the receiver uses its public key for decryption. RSA can also be used to sign a message, so A can sign a message using their private key and B can verify it using A's public key[3]. 3.1 Operations in RSA algorithm The RSA algorithm involves a three step procedure which includes the key generation, encryption and decryption. 3.1.1.Key generation The RSA algorithm starts with the generation of key pair which includes the public key and a private key. The public key is known to all the users and it is used for encryption. The decryption is achieved by private key. The keys for the algorithm are generated by following the given procedure: 1. Select the two distinct prime numbers say p and q.  Keeping in mind the security reasons, the integers p and q should be selected randomly and should be of the similar bit length. The prime numbers could be identified conducting the primality test. 2. Compute the value of the modulus say n. n= p*q.  The value of n is used for both private and public keys and is called as the modulus. 3. The next step is to calculate the value of Euler’s totient function. This function is denoted as : ∅ 𝑛 = 𝑝 − 1 (𝑞 − 1)………………(1) 4. The next is to choose an integer(let us name it e)such that the value of e should lie between 1 and Ø(n). One more thing which is to be kept in mind is that the value of gcd(e, Ø(n)) should be 1. It means that the number e and Ø(n) are coprime.  “e” is the public key exponent  The most common value of e is 65,537. The smaller values of e like 5 are supposed to be less secure in certain settings. [4] 5. Then the value of d is calculated. 𝑑 ≡ 𝑒 1 𝑚𝑜𝑑 Ø 𝑛 ………………….(2)  d is known as the multiplicative inverse of e modØ(n).  The above equation (2) is more clearly stated as (de) = 1 mod Ø(n)……………..(3)  This is calculated as the Extended Euclidean algorithm .  “d” is the private key component. By the (3) equation, the public key consists of the modulus(n) and the public key exponent(e). The private key consists of two parameters one is the modulus(n) and other is exponent (d) which must be kept secret. The values of p, q, and Ø(n) should be kept secret. These three values are used for calculating the value of d. 3.1.2Encryption The sender sends its public key( n,e) to the receiver. The private key is kept secret. Then the receiver sends the message M to the sender. The message is converted into an integer where its value lies between 0 and n. This is done by the padding scheme. Then the cipher text is calculated. С=m ͤ(mod n)……………………….(4) 3.1.3Decryption The sender can recover the message (m) from the cipher text ( c ) by using the private key component (d) by using the equation: m = c ^d (mod n)………………………(5)
  • 4. Achieving data integrity by forming the digital signature using RSA and SHA-1 algorithm www.iosrjournals.org 29 | Page Figure 2: encryption and decryption in RSA IV. Implementation We perform to obtain data integrity through digital signature. In this project, the digital signature is obtained in two stages. The two stages are: 1. Encryption by RSA algorithm 2. Creating message digest by SHA-1 algorithm In our approach, we have implemented RSA using the Java platform. In this case we have not fixed up any kind of intervals for the selection of prime numbers. We are generating the prime numbers randomly. The prime numbers are generated and they are generating the public key and the private key components. These public key and private key have been used for encrypting the text message by the user. The encrypted message is saved in the database along with the original message. A graphical interface has been provided to enhance the understanding. We name the project as data integrity. We wish to calculate the RSA encrypted message by generating the private and public key. We have also generated the message digest by using the SHA-1 algorithm. Here, we wish to achieve the data integrity by 1. Encrypting the user input text 2. Forming the message digest. 3. We have made a sender window. Figure 3. A snapshot of implementation of RSA algorithm in Java. We have made the receiver end also. In the receiver end: 1. The message is decrypted using the RSA algorithm. 2. The message digest of the decrypted text is calculated using the SHA-1 algorithm. 3. If the message digest match at the sender and receiver end then the data integrity is achieved else it is not achieved.
  • 5. Achieving data integrity by forming the digital signature using RSA and SHA-1 algorithm www.iosrjournals.org 30 | Page Figure:4 Snapshot of receiver end The complete procedure can be completed in the format of sender and receiver side on one computer. This procedure is implemented in the client and server environment on different computers as well. To better understand it, the flowchart of the system is given. Figure 5: flowchart of the system The application is run on the client end and the server end. The message from the client end is passed onto the server. This way the data integrity is achieved. Figure 6: application layout of the system
  • 6. Achieving data integrity by forming the digital signature using RSA and SHA-1 algorithm www.iosrjournals.org 31 | Page V. Conclusion The encrypted text has been successfully generated using the RSA algorithm. We have made one sender end. In this, the private key and the public key have been generated. The message digest is formed at the sender end and receiver end using the SHA-1 algorithm. The graphical interface enhances the understanding and achieves faster results. VI. Future Scope The above approach uses the RSA and SHA-1 algorithm. It can be further used in VANET kind of a scalable environment. References [1] http://en.wikipedia.org/wiki/Information_security [2] modern cryptography theory and practice , chapter 10, 10.1 section [3] Introduction to Cryptography By Mohan Atreya ([email protected]) [4] Boneh, Dan (1999). "Twenty Years of attacks on the RSA Cryptosystem". Notices of the American Mathematical Society 46 (2): 203–213.