IEEE Paper Template in A4 (V1)

advertisement
Performance Analysis of RSA and ElGamal for Audio
Security
Tin Zar Nwe, Su Wai Phyo
Department of Information Technology
Mandalay Technological University
Abstract – Nowadays, internet and network applications are
growing rapidly across the world. Information security is
one of the most challenging aspects in these applications.
The main aim of cryptography is to enhance the data
confidentiality and privacy by making the information
unintelligible. The encryption algorithms provide a secure
communication over the internet and play a crucial role in
efficient information security systems. This system provides
the performance analysis of RSA and ElGamal algorithms
for audio security depending on the execution time. To
analyze the performance, audio (.mp3) file format with
various file sizes are used in the execution time of two
algorithms. The system is implemented by using c#
programming language.
Keywords – asymmetric encryption, cryptography, ElGamal,
RSA, security, symmetric encryption
I. INTRODUCTION
The computer and communication technology’s today,
video conferencing, multimedia, online teaching systems,
security of bank cards, etc are becoming very popular.
Data communication is an important aspect of our living
and so, protection of data from misuse is essential.
Among them, audio file security plays one of the vital
roles. To tackle these security problems, cryptography
algorithms are very essential ways. Cryptographic
techniques are used to provide the protection of data and
information while transmission over the network. The
various algorithms are available for the security services
like confidentiality, data integrity, authentication and
non-reputation to protect against the attacks [1]. Modern
cryptography involves not only the disciplines of
mathematics but also computer sciences and engineering.
II. CRYPTOGRAPHY AND SECURITY
Cryptography is the science of using mathematics to
encrypt and decrypt data and thus it provides a secure
way to store sensitive information or transmit it across
insecure networks such as the internet, so that it cannot be
read by anyone except the intended recipient. There are
two types of cryptographic algorithms available for
encryption and decryption process. These are symmetric
and asymmetric cryptographic systems [3].
In symmetric cryptographic systems a single key (a
secret key) is shared for sender and recipient. Even these
algorithms are more efficient (in term of speed of
encryption process), key management is difficult in real
environment. Data can be easily decrypted if a weak key
is used in the algorithms. Figure 2 shows symmetric
encryption cryptography.
Figure 2. Symmetric encryption
To
overcome
these
problems,
symmetric
cryptographic algorithms utilize a single key pair of
public and private keys, which are related mathematically
and a private key can’t be derived from public key.
Information or message encrypted by a public key is
decrypted only with the corresponding private key.
Asymmetric cryptographic algorithms depend on very
large number based computation. Figure 3 shows
asymmetric encryption cryptography.
Figure 1. Encryption and decryption
A cryptosystem defines a pair of transformations called
encryption and decryption. Figure 1 shows the simple
flow diagram of encryption algorithms. Encryption means
protecting the transmitting of data that it should not be
intercepted by anyone except the one who known how to
transform it back [2]. There are multiple variations of
message encryption. Message can be encrypted either by
using secret key encryption called symmetric encryption
or by using public key encryption called asymmetric
encryption. This system is intended to evaluate the
performance analysis of two public key algorithms for
audio security.
Figure 3. Asymmetric encryption
Cryptography provides a number of security goals to
provide protection to data. Following are the goals of
cryptography [4].
 Confidentiality
Ensures that transmitted information is
accessible only for reading by the authorized
parties.
 Authentication


Ensures that origin of message is correctly
identified, with an assurance that the identity is
not false.
Integrity
Ensures that only authorized parties are able to
modify
the
transmitted
information.
Modification includes writing, changing,
deleting of transmitted information.
Non-repudiation
Requires that neither sender nor receiver of
message should be able to deny the transmission.
III. BACKGROUND THEORIES FOR PROPOSED SYSTEM
Asymmetric encryption also knows as public key
encryption. Two mathematically generated keys are used,
one key for encryption and the other key for decryption.
Private key is used as secret key and public key is broadly
available [5]. So, everyone can encrypt the message but
only the holder of a private key can acrually decrypt the
message and read it. In the proposed system, two public
key algorithms such as RSA and ElGamal are used for
audio security.
A. Rivest-Sharmir-Adleman (RSA) Algorithm
RSA algorithm is most widely used public key
cryptosystem today. It may used to provide both secrecy
and digital signature. RSA uses the prime number to
generate the public and private key based on
mathematical fact and multiplying large number together.
It uses block size data in which plaintext and ciphertext
are integers between 0 and n-1for some values n. Size of
n is considered 1024 bits or 309 decimal digits. In this
two different keys are used for encryption and decryption
purpose [6]. As sender knows encryption key and
receiver knows decryption key.
RSA encryption scheme can be divided into three
stages:
 Key Generation Stage
 Encryption Stage
 Decryption Stage
Key Generation
 Select random prime numbers p and q,
and check that p!=q
 Compute modulus n=pq
 Compute phi, ϕ = (p-1)(q-1)
 Select public exponent e, 1<e<ϕ such
that gcd (e, ϕ) =1
 Public key is {n, e}, private key is d
Encryption Algorithm
 Obtain the recipient’s public key (n, e)
 Represents the plaintext message as a
positive integer m
 Computes the ciphertext c = me mod n
 Sends the ciphertext c to recipient
Decryption Algorithm
 Uses his private key (n, d) to compute m
= cd mod n
 Extracts the plaintext from the integer
representative m
Figure 4. RSA Algorithm
The security of any public-key algorithm, whether
based onthe rivate
difficulty
large m
numbers
or the
key of
(n, factoring
d) to compute
= cd mod
difficult of taking
discrete
logarithms
of
large
numbers,
n
depends on the size of those large numbers. If the number
Extracts the plaintext from integer
is small enough, the user have no security. The
representative
m reading the key and reading the
encryption
stage includes
message if input string is message. The operation of RSA
is shown in Figure 4.
B. ElGamal Algorithm
The ElGamal cryptosystem is a very successful
implementation of Diffie-Hellman algorithm. Taher
ElGamal in 1985 proposed ElGamal cryptosystem
algorithm in a type of public-key algorithm which is
used over finite fields and its security is based on the
Discrete Logarithm Problem (DLP) [7]. Using DLP is
due to the difficulty of finding discrete logarithm while
the inverse operation of exponentiation can be compute
in a straight-forward fashion.
The ElGamal public key system uses modular
exponeniation as the bases of a one way trap door
function. This makes ElGamal more well known
attractive as RSA system. The ElGamal algorithm can be
described with three stages as follows:
 Key Generation Stages
 Encryption Stages
 Decryption Stages
Key Generation
 Choose a random prime p.
 Compute a random multiplicative
generator element g of f*p.
 Choose a random number x€ᴜfp-1 as the
private key
 Compute the public key by y = gx mod p
 Make (p, g, y) public, and keep (x) as
private key
Encryption Algorithm
 Obtain the recipient’s public key (p, g,
y)
 Choose a random integer k€ᴜfp-1
 Compute a ciphertext pair (c1, c2):
c1=gk mod p and c2=gx mod p
 Sends the ciphertext (c1, c1) to recipient
Decryption Algorithm
 Use his private key x to compute m =
c2/c1x mod p
 Extract the plaintext from the integer
representative m
Figure 5. ElGamal Algorithm
IV. PROPOSED SYSTEM DESIGN
The proposed system utilizes two public key
algorithms. RSA and ElGamal algorithms are used to
analyze in performance (execution time). Encryption and
decryption time comparison of the proposed system is
shown in Figure 6 and 7. In the system, the audio file
(.mp3) format is encrypted with each public key
algorithm. And then, analyze the differences of their time
for performance comparison. As shown in Figure 6,
firstly, the user loads the plaintext audio file for
encryption and chooses the algorithm. Then he or she
performs encryption with corresponding public key. After
the encryption process, the user has to save the encryption
time and cipher audio.
Finally, the performance analysis of decryption times
must be performed for two public key algorithms.
V. TEST AND RESULT OF THE PROPOSED SYSTEM
The following results are generated by implementing
the proposed system. Firstly, the user can see the main
interface form of the system as shown in Figure 8.
Start
Load plaintext(Audio)
Encryption with RSA’s
public key
Encryption with
ElGamal’s public key
Output Cipher Audio
Output Cipher Audio
Save encryption
time
Save encryption
time
Figure 8. Main Interface
First, the user can choose one of the algorithms. If he
or she chooses RSA, generates a key pair from key
generation button and save the public and private keys as
illustrated in Figure 9.
Compare
Result
End
Figure 6. System design for encryption time comparison
After saving the different execution times on input
plaintext audio of each algorithm, he or she analyses the
execution times for two algorithms.
Start
Load Cipher Audio
Figure 9. Key Generation of the System
Decryption with RSA’s
private key
Decryption with
ElGamal’s private key
Output Plaintext Audio
Output Plaintext Audio
Save decryption
time
Save decryption
time
Then, the user has to load the desire audio file and
public key. Then, he or she can perform encryption
process by using RSA algorithm and save encryption time
and resulting cipher audio. The cipher audio cannot be
played as shown in Figure 10.
Compare
Result
End
Figure 7. System design for decryption time comparison
In the decryption process as shown in Figure 7, he or
she has to load the cipher audio of each algorithm. Then,
the user performs the decryption process with the
corresponding private key. The procedure of the
decryption process is the same as the encryption process.
Figure 10. Audio Encryption with RSA Algorithm
For the decryption process, the user has to load the
cipher audio and corresponding private key. Then, he or
she performs decryption process with RSA algorithm and
save the decryption time. The audio file can play as
illustrated in Figure 11.
Figure 14. Audio Encryption Time Comparison of Two Algorithms
Audio decryption time comparison of two algorithms
is illustrated in Figure 15.
Figure 11. Audio Decryption with RSA Algorithm
The audio encryption process with ElGamal algorithm
is performed as illustrated in Figure 12. He or she saves
the encryption time and cipher audio.
Figure 15. Audio Decryption Time Comparison of Two Algorithms
The experiment for performance analysis of RSA and
ElGamal algorithms are performed by using different file
sizes and same data format such as audio (.mp3).
According to the analysis, it can be clearly seen that RSA
algorithm is faster than ElGamal algorithm.
Figure 12. Audio Encryption with RSA Algorithm
The audio decryption process is performed with
ElGamal algorithm as illustrated in Figure 13. The user
saves the decryption time and produces the original
plaintext audio file.
Figure 13. Audio Decryption with ElGamal Algorithm
After the implementation processes of the proposed
system, the performance analylsis of audio encryption is
illustrated in Figure 14.
VI. CONCLUSIONS
At the present day, the hardware developments are
significantly
improved
and
the
cryptographic
computation can be performed faster. On the other hand,
the attackers can also attack on the cryptography
algorithms faster. Therefore, the longer key size and fast
security services will be needed. So, public key
cryptography is the best for key management. According
to their analysis results, encryption and decryption time
of RSA algorithm are significantly faster than ElGamal
algorithm. By comparing these systems, the user can
know and can choose the suitable algorithms. This system
is intended to apply in the real data communication
environment in order to obtain the confidentiality, secrecy
of important data and can choose the better cryptographic
algorithms.
As further extension, other public key algorithms can
also be analyzed for not only execution time comparison
but also security. Moreover, other types of file formats
such as (.txt, .jpg, etc) can be utilized for performance
comparison.
REFERENCES
[1]
Saurabh Sharma and Pushpendra Kumar Pateriya, A Study on
Different Approaches of Selective Encryption Technique,
International Journal of Computer Science and Communication
Networks, Vol2 (6), 658-662.
[2]
[3]
[4]
[5]
[6]
[7]
Omar M.Barukab, Asif Irshad Khan, Mahaboob Sharief Shaik,
MV Ramana Murthy, “Secure Communication Using Symmetric
and Asymmetric Cryptographic Techniques”, I.J.Information
Engineering and Electronic Business, 2012, 2, 36-42,
(http://www.mecs-press.org).
Schneier B., “Applied Cryptography”, John Wiley New York.
O.P Verma, Ritu Agarwal, Dhiraj Dafouti and Shobha Tyagi,
“Performance analysis of Data Encryption Algorithms”, IEEE
Delhi Technological University, India, 2011.
Mac OS X Developer Library, “Security Overview”, Retrieved
on March 18th 2012 from, http://developer.apple.com/ library/
mac/#documentation/Security/Conceptual/SecurityOverview/Cry
ptographicServices/CryptographicServices.html.
Mohit Marwaha, Rajeev Bedi, Amritpal Singh, Tejinder Singh,
“Comparative Analysis of Cryptographic Algorithms”,
International
Journal
of
Advanced
Engineering
Technology/IV/III/ July-Sept., 2013/ 16-18.
S. Upadhyay (2011), “Attack on RSA Cryptosystem”,
International Journal of Scientific and Engineering Research
(IJSER), Volume 2, Issue 9, September 2011. Pp 1-4.
Download