Voice Encryption using RSA Algorithm

Authors Avatar

Declaration

We, hereby declare that this project neither as a whole nor as a part there of has been copied out from any source. It is further declared that we have developed this project / thesis and the accompanied report entirely on the basis of our personal efforts made under the sincere guidance of our supervisor. No portion of the work presented in this report has been submitted in the support of any other degree or qualification of this or any other University or Institute of learning, if found we shall stand responsible.

                                                        Signature:______________

                                                        Naeem Akhtar

                                                        Signature:______________

                                                        Shirjeel Zafar

                                                        Signature:______________

                                                        Umair Ahmed

COMSATS INSTITUTE OF INFORMATION TECHNOLOGY, ISLAMABAD

July 2008


Voice Encryption using RSA Algorithm

An Under Graduate thesis submitted to the

Department of

ELECTRICAL ENGINEERING

As a Partial Fulfillment for the award of Degree

Bachelor of Science in Computer Engineering

by

Supervised by

Dr. Shahrukh Agha

Assistant Professor,

Department Of Electrical Engineering

CIIT Islamabad

                                

Mahmood Pervaiz

GM Electronics,

Department Of Electrical Engineering

CIIT Islamabad

COMSATS INSTITUTE OF INFORMATION TECHNOLOGY, ISLAMABAD

July 2008


Final Approval

This thesis Titled

Voice Encryption using RSA Algorithm

Submitted for the Degree of

Bachelor of Science in Computer Engineering

by

has been approved for

COMSATS INSTITUTE OF INFORMATION TECHNOLOGY

ISLAMABAD


______________________

Internal Examiner1                

Col. Mushtaq Ahmed

______________________

Internal Examiner2                

M. Bilal Qasim

______________________

External Examiner                

Muhammad Tahir

______________________

Head

Department of Electrical Engineering.


Dedication

This project has been consecrated to our beloved parents and elders, whose valued bolstering, fiscal support and continued motivation impelled this project to triumph over odd. This project is dedicated to our various mentors, without the principled backup, perennial auspices and perpetual impetus of whom; this project may have never reached its fate.


Acknowledgements

In the name of ALLAH, the most merciful and most beneficent.

With all due praise for the sovereign power of this universe, the Almighty ALLAH who has helped us broaden the horizons of our knowledge, gave us strength to produce this work and has furnished our mind with knowledge.

We are highly indebted to Dr Hassan Ahmed, HoD Electrical Engineering, CIIT Islamabad, who provided us an opportunity to work for industry and see the facets of practical life. We must thank Mr. Mumtaz A. Khan, Project Director, Margalla Electronics, NESCOM who put his faith in us and provided us a chance to work on this project along with his experienced team. Moreover, we also want to pay our gratitude to Mr. Zulfiqar Ali Bungash and Mr. Ali Arshad who have guided us during the course of this project. Their valuable suggestions and discussions were a source of motivation for us.

We are very grateful to Dr. Nazir A. Mir HoD Mathematics, CIIT Islamabad who helped us interfacing Maple kernel in MATLAB. We also thank Mr. Riaz Hussain and Mr. M. Aurangzeb Khan for their valuable time as an affectionate teacher and providing us with necessary help regarding their fields of interest.

Finally we are much thankful to our supervisors Mr. Mehmood Pervez and Dr. Shahrukh Agha, without their involvement and guidance this project has never been done. 


Table of Contents

1.        What is Encryption?                                                        1

1.1    Cryptography………..………………………………………....1

1.2        The Encryption Process…………..……………………….....1

1.3        Types of Encryption ………...………………………….….....2        

1.3.1        Secret Key Encryption….…….………………………...…...2

1.3.2        Public Key Encryption………….…………………………...3        

1.4        How does Encryption Work?….………..…………………….4

1.5        Reliability of Encryption………..…………..………………….4

1.6        Drawbacks of Encryption …..………………..……………….5

                        1.6.1        Bandwidth and Expenses Problems….……..…………...…...6

1.6.2        Secret Key Encryption.….…………………….………...…...6

1.6.3        Terrorism..…………….………………………...…….……...6        

2.        Different Techniques of Encryption_   _        _                 7

2.1        Data Encryption Standard..…………………………………...7

2.1.1        Mathematical Preliminaries of Algorithm…..……………….8

2.1.1.1        Generation of 16 Hexadecimal Keys………………...8

2.1.1.2        Creation of Sub Key….………………………...……9

2.1.1.3        Encoding Message Blocks…………………………...9

2.1.2        Mathematical Example………………………………………10

2.2        Advanced Encryption Standard………………………………22

                2.2.1        Algorithm Terms…………...……………………….……....22

                        2.2.1.1 Input / Output.……………...……………….……....23

                        2.2.1.2        Bytes………….…………...……………….……..…23

                        2.2.1.3        Array of Bytes…………………………….………....24

                        2.2.1.4 States…………………………………….…………..24

                        2.2.1.5        State as an Array……………………………………..25

                2.2.2        Mathematical Preliminaries…………………………………..25

                        2.2.2.1        Add Round Key……………………………………..26

                        2.2.2.2 Byte Sub……………………………………………..26
                        2.2.2.3        Shift Row……………………………………………27

                        2.2.2.4        Mix Column…………………………………………28

                                2.2.2.4.1        Matrix Multiplication………………..28

                                2.2.2.4.2        Galois Field Multiplication……….…29

3.        RSA Encryption                                 _   _        _                32

3.1        Mathematical Preliminaries of Algorithm..………………….33

3.1.1        Step 1…………………………………...…..……………….33

3.1.2        Step 2………………..………………………………………33

3.1.3        Step 3………………………………………………………..34

3.2        Mathematical Example………..………………………………34

3.3        RSA as Block Cipher…………..……………………………....35

3.4        RSA as Stream Cipher………..……………………………….36

4.        Stream Ciphers                                   _   _        _                37

4.1        Introduction……………….,..………………………………….37

4.2        Classifications...………….,..………………………………….37

        4.2.1        Synchronous Stream Ciphers…………...…………………….....38

        4.2.2        Self synchronizing Stream Cipher……………………………….38

4.3        RC4 Stream Cipher……...,..………………………………….39

        4.3.1        Generation of Key Stream………………………………………...40

        4.3.2        Implementation…………………………………………………….40

4.4        SEAL Stream Cipher…….,..………………………………….40

        4.4.1        Implementation…………………………………………………….40

4.5        Conclusion….…………….,..………………………………….41

5.        Design Implementation                                   _   _        _        41

5.1        Problems in RSA Encryption...……………………………….41

        5.1.1        Key Generation...…………………………………………………. 42

        5.1.2        Complex Calculations……………………………………………. 42

5.1.3        Timing Constraints..………………………………………………. 43

5.1.4        Deterministic Encryption Algorithm..……………………………. 43

5.1.4        Padding……………………………....……………………………. 43

5.2        Efficiency Methods……….,..………………………………….43

        5.2.1        Modular Exponentiation Method………...…………………….....43

        5.2.2        Exponentiation by Squaring……...……………………………….45

5.3        Efficiency using FPGA…...,..………………………………….46

        5.3.1        Module Spreading………..………………………………………...46

        5.3.2        Pre Calculation….………………………………………………….47

        5.3.3        Look Up Table Technique..……………………………………….47

4.4        SEAL Stream Cipher…….,..………………………………….40

        4.4.1        Implementation…………………………………………………….40

4.5        Conclusion….…………….,..………………………………….41

Appendix-A                                                                        60

Appendix-B                                                                        70

Appendix-C                                                                        79

Bibliography _________                                                        81


List of Acronyms

DES…………………………………………………………Data Encryption Standard

AES….………………………………………………..Advanced Encryption Standard

RSA……………………………………………………...Rivest, Shamir, and Adleman

FPGA.……...…………………………........................Field Programmable Gate Array

LFSR…………...……………………………………..Linear Feedback Shift Registers

SHA…………………………………………………………..Security Hash Algorithm

OFB…………………………………………………………….…….Output Feedback

CFB.…………………………………………………………………..Cipher Feedback

SSL……….……………………………………………………….Secure Socket Layer

WEP…..…………………………………………………Wireless Encryption Protocol

KSA…..…………………………………………………….Key Scheduling Algorithm
PRGA…….……………………………………Pseudo Random Generation Algorithm
SEAL……….……………………………..Software Optimized Encryption Algorithm


List of Figures

1.1        ROC curves for two out of 40 signers.……...………………………………1

1.2        Caption……………………………………...………………………………pg#

1.3        Caption………………...……………………………………………………pg#

1.4        Caption………………...……………………………………………………pg#

1.5        Caption………………...……………………………………………………pg#

2.1        Caption………………...……………………………………………………pg#

2.2        Caption………………...……………………………………………………pg#

2.3        Caption…………………...…………………………………………………pg#

2.4        Caption………………......….………………………………………………pg#

2.5        Caption………………...……………………………………………………pg#

.

.

.


List of Tables

1.1        Equal Error Rates (EER) For 14 Signers…...………………………………1

1.2        Caption……………………………………...………………………………pg#

1.3        Caption……………………………………...………………………………pg#

1.4        Caption……………………………………...………………………………pg#

1.5        Caption……………………………………...………………………………pg#

2.1        Caption……………………………………...………………………………pg#

2.2        Caption……………………………………...………………………………pg#

2.3        Caption……………………………………...………………………………pg#

2.4        Caption……………………………………...………………………………pg#

2.5        Caption……………………………………...………………………………pg#

.

.

.


Abstract

Security has always been an issue in communication. Cryptography has been used for this purpose since ages. With the advent of technology encryption schemes have been continuously proposed and improved. But technology has also been helpful in breaking these encryption schemes. Voice communication has its significance in personal interaction but any breach in this may cause serious losses. There has been a need to develop a new stronger technique which can be efficiently used for encrypting voice signals. Given that almost all encryption techniques for voice have been attacked overly and many of these attacks have been successful.

RSA encryption has always been considered as one of the strongest encryption techniques however due to its complex calculations and timing constraints it has not been used for the purpose of stream ciphers fully. But we can still see the use of RSA encryption in majority of stream cipher techniques for the purpose of key exchange.

This report proposes a method of using RSA encryption for voice considering the advent of technologies is now sufficient to carry out necessary operation within time constraints. The report tells about the path followed and also future enhancements and conclusive suggestions.

What is Encryption?

  1. Cryptography

Cryptography is basically an art of practicing and hiding information from other persons. It is the branch of Mathematics and Computer Science and in this age the cryptography is know and referred to as a technique called Encryption.

  1. The Encryption Process

Encryption is a process to convert the information into a form which is not understood by every person. Only those people who have some additional information and knowledge can understand the information.

The information or message that is transformed is called the plaintext, the method used to transform the plaintext is called the encryption algorithm or cipher and the final result is called the encrypted message or encoded message. It is also referred to as cipher text. This encrypted message is not readable by every person. To make it readable, an inverse process is used that is called Decryption. To decrypt the message, one need the additional information and knowledge referred to as Key.

Join now!

Encryption is used throughout the world to protect the data. The three main objectives of the encryption are as follows.

Confidentiality

Authenticity

Integrity

  • Confidentiality is the main objective of the encryption. It guarantees that only the intended user is able to read the message and it is unreadable for all other persons.
  • Authenticity is the other prime objective of the encryption. It ensures that the sender and receiver are the appropriate and authenticated persons to send and receive the information and can understand it.
  • Integrity is the third objective of the encryption and it guarantees that ...

This is a preview of the whole essay