# Cryptography

### Network systems security implementation of a file using rsa

Cryptography is oceran on interesting theories and mathematical solutions in this thesis, explains the history of cryptography and its importance to introduce the RSA and ellipse curve cryptography used in computers. The most important directions which can be taken place in cryptography along with in political view since it was proved .some of the fully hand experienced software's on different cryptographic algorithms will keen on the reader to know in what way and what they can be really do. there are some attacks which are some invented but guide us well know books for the further references.

The importance purpose of this thesis can be explained and concluded at the bottom. The various methods of holding and managing the key in different cryptographic algorithms had been clearly explained. The ellipse curve which is presently booming out to be the best like RSA algorithm with public key which is clearly focused and also explains with simpler examples, about why it is called as the next generation algorithm. The war between the cryptography will not stop here. It is described to revolutionize in the coming generation. Some of the likely topics have been derived by the software implementation and testing it to prove it works.

### INTRODUCTION:

Technology is the term most used in every aspect of our daily routine. Since ages technology has had a rapid growth. In every step of the total system technology occupies a greater portion; technology has also made a prominent mark in networking or file security. It is a fact that every individual has got some secrets which are supposed to be maintained private. The main objective of the project is designing, implementing and installing after the software components are being tested by Java ; which is one of the highly qualified methodologies of the networking or computing sectors. The project is mainly worked on the above specified ideas

Cryptography in system provides a safe and secure mailing along with quick and efficient messaging within the permissions available.

### CRYPTOGRAPHY:

Cryptography is the study of encrypting a plain text into a format which is unpredictable by every user, the main purpose of which is to attain privacy in communications (file system) from different modern applications. Cryptography has made its mark in both computer sciences and mathematics which is linked with computer security, engineering and information theory. Cryptography is divided into two, symmetric and asymmetric cryptography, using which network or e-mail system is maintained secure. It is used in protecting information from theft or alteration under user authentication. The most important agenda of cryptography is to maintain information private.

Cryptography refers to the information hiding and providing a secure means of communication between the desired parties. The data is encrypted using various cryptographic algorithms and is transmitted in the encrypted form which is later decrypted by the receiver by means of “Key”. Cryptography is helpful in protecting the data from being read, altered.

During those days of cryptography the message which is a plain text was converted to cipher by means of the encryption techniques and the cipher. The decryption algorithm is there to decrypt the encrypted cipher notation again to text or original size.

Cryptography is a study of encrypting a plain text into a format which is unpredictable or unreadable by any other person or machine who is not related or associated with the cryptography.

A machine or a man can never decode or decrypt once encrypted text without the knowledge of the ciphers, keys used in encrypting the plain text.

Cryptography is just not a recent discovery; it is being used since the ancient times to hide information. But the ciphers and keys used were not so complicated for decryption, but now in modern days with invention of computers it has become very easy for those classical ciphers to be decrypted and so in the encryption process a computer uses binary digits which is not understood. Easily other than the processors and programmers.

Cryptography is used in a wide range in our day to day world also.

Example: In ATM cards, computer passwords

### Cryptography provides:

Integrity: The process of protecting information against unauthorized modification is known as integrity. The key exchange is required in here for the information to be unaffected during transmission from the end point of the source to the recipient, where the recipient should find it unaltered.

Confidentiality/privacy: The process of ensuring that no intruder can read or understand the message other than the proposed recipient is confidentiality, for which an algorithm is required, known cipher algorithm.

Non repudiation: It is the mechanism to provide a proof that the sender has sent the message using digital signatures and etc., from the evolved technology in the process of non repudiation.

Authentication: The recipient of the message should identify the origin of the message i.e., the sender's identity appropriately for which an algorithm is required i.e., asymmetric or public key algorithm.

### Fundamental Principles:

The fundamental principles of cryptography are

Redundancy: It maintains the encrypted message unreadable or being not in the form which is understood by a human is redundancy.

Freshness: The message received by the recipient can be assured as a fresh one by ensuring that several measures have been taken to keep the information secure.

### Cryptography primitives:

The primitives of cryptography are

Random Number Generation

Symmetric Encryption

Asymmetric Encryption

Hash Function

### Basics in cryptography:

Plain Text: The information which is in the human readable form or language, as unique form that of binary data which is read only by a machine.

Cipher Text: It is the encrypted form of the plain text which involves two things that is plain text and key. Keys convert the plain text to two different cipher texts which is actually a random stream of data and meaningless.

Encryption: The process of converting the plain text into human unreadable form or cipher text using encryption algorithms to maintain the message private from unauthorized people is known as encryption.

Decryption: The process of decoding the encrypted message to plain text using keys is known as decryption which requires a decryption algorithm and is done at the receiving edge.

Private Key: A symmetric or a secret key is a private key which is the input of the encryption algorithm in the encrypting process of the plain text. The shared key is of value independent to the algorithm and the plain text.

Public Key: A key which is accessible by any person easily or a key which is available to every person is known as a public key which is used in the asymmetric key encryption process.

* Ref: Page no.30 (Cryptography and network security principals and practices forth edition from WILLIAM STALLINGS)

### Pre-requisits

1) Prime number or pirmality theory:

The numbers which can be divisible by 1 and by itself and no other numbers are called prime numbers. The number which can be factorized is called primality test.

Like 2, 3,5,7,11…..

2 has only two factors 2 and 1

Similarly 3, 5and soon.

2) Modulus function: it is an wrong guides many that it is just a positive number it is clearly explained based on the clock how the clock was coming back into their position after completing their 24 hours like once finishing the 24 hours it is back to their postion1.similarly the mode functionality is all about it is very common value which is applied with a limited applications to a variable.

Example

38 \equiv 14 \pmod {12}\,

And same

38 \equiv 2 \pmod {12}\,

3)Euler's Totient function: according to this theory the functions T(n) will be the totient function for n>0 is explained as no.of the +ve integers < or = to n that can be the coprime to n.

For instance T(n) when n=9 then T(n)=6,count the coprime numbers till 9 aare 5 then (1,2,3,4,5,7) and the number itself then it will make it as six.

Hence T(9)=6 and T(10)=6,T(13)=8 then ‘T'can be defined as totient function.

Example: \varphi(36)=\varphi\left(3^2 2^2\right)=36\left(1-\frac{1}{3}\right)\left(1-\frac{1}{2}\right)=36\cdot\frac{2}{3}\cdot\frac{1}{2}=12.

4) Extended Euclidean algorithm:

ax + by = \gcd(a, b). \,

5)Addition chain:

Some of the methods can be understand only with examples.

Find addition chain for 31 of length 7.

Ans:

2=1+1.

3=2+1

6=3+3

Soon till 31=30+1

This happens simply seven times the length 7 imply the of accompaniments likely to it.

### Types of Cryptography:

As said earlier, cryptography has been divided into two

1. Private or Symmetric key cryptography

2. Public or Asymmetric key cryptography

Symmetric key cryptography: Here in symmetric key cryptography the use of single key in both encryption and decryption process is prominent. This type of encrypting technique is also called as secret key or private key or single key or shared key encryption.

As in above , the sender sends the plain text, but it is not exactly transmitted the same through internet as it undergoes a transformation in-between the sender and the recipient. The transformation includes the encryption of the plain text to cipher text using the shared secret key with encryption algorithm. After the encryption process, the cipher text is transmitted through a global network like internet, which at the receiving end is again decrypted with the same key with a decryption algorithm to the plain text. The use of single key for both encrypting and decrypting functions is called symmetric encryption.

Now, it is clear that the shared key should be known to both sender and the recipient which is a secret. The major complexity is the key distribution.

The symmetric key algorithm is categorized into two, block cipher and stream cipher. Stream ciphers operate only on one bit of data at a time and execute some feedback mechanism, which keeps the key changing persistently. Where as in block cipher method, encryption is done to every block of data with the same key for which plain text is always encrypted to the same cipher text but in stream cipher text method the encryption process of plain text to cipher text every time differs.

Examples for symmetric key algorithms are AES (Advanced encryption

Standard), RC4, Blowfish, and TDES.

Ref: Page no.29 (Cryptography and network security principals and practices forth edition from WILLIAM STALLINGS

### What is a symmetric key algorithmic cryptography?

There is some important data about the cipher and there is two types of symmetric cryptography

1. Steram cipher

2. Block cipher

In this there are using some different procedures to likewise .when there stream cipher taken into the different encryption mean while to the time taking unit key to each and every single streaming time .where as the block cipher is encrypted as chunks of information using a unique key to each the blocks there is defined both in combination the block cipher can be used only single key to different blocks of information or data but the stream cipher .with different key with but uses only one key at each time. There stream cipher can be divided into to two stages' self-synchronous cipher and synchronous stream cipher.

Self-synchronous cipher is a system of how the first ie..N-bit is identified to function on the nth bit stream this is the problem with this. If there is an gadget value in the middle of this then there will be n gadgets value accordingly .so this why it can be called as different to stream the data without lose.

There are some block ciphers which can be differently categorized to be known.

Electrical codebook mode (ECB): the key was secured and the plain text is the raw data with the following of blocks of text. If there are any two common texts then there will be the common cipher text to it. There can be commonly known by the block ciphers. It is very harm to simple brute-forcing attacks.

1. Cipher block chaining mode (CBC): this procedure on the odds methods to encrypted the data .it is a simple OR and XOR functional method .in this case the two same blocks with the same message will not get the same cipher text.

2. Cipher fed back mode (CFB): this is a basic methods of n lock cipher implementations which is similar to the self-synchronizing stream cipher. This is very crucial technical's each block is encrypted to an it is very wrathful in same situations such as terminal interactions.

3. Output feedback mode (OFB): this block cipher is same as the synchronises stream cipher. This block cipher deletes the common cipher text to be produced again they the interdicting on internal feed back technique. And introduce an individual cipher text to both the same cipher text function. The symmetric key cryptography is used in different other encryption method isothere are included 1the algorithm.

DES: in 1970's IBM and national bureau stands (NBS) know as WIST since 1977.i this DES block cipher it is first time used the highest as the trend i.e. 56-bit key that was very easy to state the method used and it was very easy and no need to spend much time on the decrypt such as try data but as the time changing the important often computer have increased. then it is encrypted to the sage of 112bit key for DES government purpose .in 1990's the interaction with their standards was never that serious.

To know more about the DES. It was a mark able particular generated with the American national standard .fundamental information processing standards. Attacks of DES will be occurred from the electrical frontiers foundation.

This DES has special way of considering the encryption .it falls like first it encrypting the message and then it tries to encrypting there encrypted message .one more time and the third time again the same .it within this there message can be corrupted and it can't be retrieve.

This important variantation of DES which strength it is.

### Triple DES (3DES):

There are 3encryption stages of the same data with step by step procedure i.e. One after on the in this case there will be use 565-biy key to encrypt it and again decrypt the send encrypted data. at the third stage encrypt the send encrypted data. at the other end so it happens to several messages like encrypt and encrypt finally corrupt.

DESX: it is used into the existing for 64-buts which was added to the plain text and encrypt the hash method.

AES: NIST stands for the relating this encryption will no longer and it is used to be a excellent for more time. in 1977 with the announcement of public key they have signed this AES at the Dec 2001there advertised and announced effectively they are replacing the DES in advanced versions .but with the key management system don't have a scope of getting 100% security it by the rijman and daeman interdicted the project using the block cipher is completely different and in advanced to those days. but it was the same as symetric.so it all interdicted here doing job to get a huge keys and the structure of data .the length was not the huge problem. The description of the key and there manager becoming a huge problem for them.

International data encryption algorithm. The block cipher was expressed into the one key but there will be the different in it this was invented by explained by xuejia and James Massey in 1992's.

Rivest cipher: named after the Ron rivest the great men it is synchronise key algorithm.

RC1: it assumed theoretically it can't be interdicted in real time or we can't test in practical analyses.

RC2: the 64-bit block cipher to the different size has been designed instead of proves DES .it was not advertised but with his licensed it called RFC2268.

RC3: it was fail because it was very fizzy and can be broken very early.

RC4: this is and synchronise key algorithm which can be with the stream cipher encryption with different variable cipher keys. It makes profit and widely used by many.

RC5: this is very good algorithm and encryption thermo used in particular cases. it used different key size with different blocks of various size s to encrypt and this method helps it to sport of the invertible without the keys .but the spreading the key can be done in evitable and vulnerable RC6,RC5,RC6 had made the AES 2nd algorithm with completing involved asthmatics.

Blowfish: Bruce Schneider has indented this and it had supplied itself as one of the external standards methodologies in cryptography he used the DES the synchronises block cipher .it can be introduce in various sizes and key length for various length of blocks as well .it was interdicted for 32-bit to 448-bit key length .a normal PC in a classroom.

Two fish: the key was completely based on their size as the key was strong then the fish algorithm has intruded itself to be effective .with this cases it tends to be work the new techniques .but invention the strength to commercial work by Intel was breaking their stuff it is used in the cipher the texting in 128-bit or 192 or 256-bitas well .but as the same as the symmetric cipher which is not that much second then the key may be disclosed.

Camellia: the secure key of the symmetric block cipher algorithm has been invented by the Nippon telegraph and telephone (NIT) corresponding mixed with the Mitsubishi electrical (MEC) in near 2000.for the high bit encryption the symmetric key system has been use for the same AES. but with the difficulty it can be go on 8-bit process and 32-bit process as well it was the first open pretty good privacy.MMISTYI, which is designed by Mitsubishi cold it cannot be shake not that much but contributed clearly secure and fast encryption routine (SAFER).there is very small and famous as it was utilized at a time for every computer has its own strength to decrypt it utilized 10-bit,64-bit and 128-bit.

### Public or Asymmetric key:

Asymmetric key cryptography is the most modern technique of cryptography which forms a strong base for data encryption, digital certificates and digital signatures. This Public key cryptography is associated with many cryptosystems and cryptographic algorithms due to its distinctive features. Here, in public key encryption every member has their own couple of keys among which only one key is a secret and the other key is considered public. This is a very good security process. This is the most common method with the encrypting communications i.e. E-mail systems.

In public key encryption, the key is made with two divisions, one as a private and the other as a public key. Both of them collectively make your key pair. The keys are twisted together so that we can encrypt with one key and decrypt with the other. The important part of public key encryption is its security and unreliability.

In the process of communication, a secret message can be sent to anybody by obtaining their public key either from e-mail or key server. That is, your public key can be distributed among anybody whom you want to communicate with. After receiving the message from the sender through a global network, the secret message can be decrypted with the secret key which is owned by you, and for a reply back you should possess his public key which is later decrypted with his secret key. The conclusion for this encrypting process is, the transfer of plain text involves public keys and the decryption of cipher text involves the secret keys.

The main advantage of asymmetric key encryption is, there is no need to send anything in secret i.e. passwords etc. over an insecure channel like internet. Public key goes out to the globe where as the secret key is kept to yourself and is only used to generate your messages. You have no need to share your secret key with anybody unlike in symmetric key cryptography. If you find your secret key is being hacked, you can cancel your pair of tangled keys and rebuild them from scratch.

### Hash functions:

There are other names for the hash function or message digest or one way functions .it is very common and the sided function. The encryption algorithm is single sided; it has some particular –length hash key.

Prominently known as MD2, MD4, MD5 is introduced in many ftp systems and some file server in order to check the recipients of file completely.

Why There are too many cryptographic algorithms , why ?which one is the secured among those?

Each algorithm is varied from the other in the means of application of every individual one.

Integrity of message: to maintain the integrity of a communication channel, it is necessary to understand the hash function. If a message is sent with a practical hashing function where in a little data is missing in the message, then the result will be another hashing function. so, this is very good at data verification. It is used in virus scanning procedures &in others for comparing identical data. Hash functions help in differentiating two identical messages in different hash functions .picture hashing is also used in various other contexts which is very much useful.

Security of conversation: Maintaining privacy in a huge network is very important as there are many methods to get through the messages .the encryption of a message in a unique method is very important so that, even through the message is published in a huge network; it is only possible for the person with the Wright key to decrypt it. This is done with a symmetric key application which producers the private matter to the Wright person.

Non-repudiation: When two people are having a conversation, it certain that the conversation is kept private and is understand by both of them .the messages are obviously 100%encrypted.but ,it is important that the key distribution is not corrupt in between the conversation ,maintained of the key safely is also consider. Many computers don't have a possible structure which can message much number of keys to operate them with each other and it is also difficult to understand the tabular forms which are a waste of time .this could be overcome by public key cryptography.

Software implementation and screen shots of each cipher with examples, all the files utilized in this thesis are available in the cd provided with the hand copy. The software are referenced to codeproject.com

NEEDS AND USES IN NETWORKS: Cryptography mainly used in networks it is used in anywhere in TCP/IP stack, it is not common at physical level. With the level of cryptography to the user and its purpose.

Cryptography mainly used in more than data confidentiality the security services like authentication, access control, data confidentiality, data integrity, on-repudiation rely in a combination of various security mechanism, these rely in cryptography will be in the one form or another.

Cryptography is also used in same protocols which can be help get a difficult security services, which can be called as security protocols.

### Key security:

The consistency of the encryption process depends on :

Size of the key pair, normally the size is 2048 bits

The capacity to authenticate the recipient's public key

Protecting the password that unlocks the private key

The communication through public key encryption depends on the appropriate identity of the public and private keys. In the encryption process of a message to anybody, we desire to be confident that the key belongs to us. A small description of the key pair is given below:

A key pair contains five different characteristics in it :

1. User ID: It is generally the e-mail address of the key holder. It should be made sure that it is spelt accurately.

2. Key ID: A unique ID mechanically generated by the public key encryption program.

3. Finger print: It is a unique identifier that is produced or generated from the public key.

4. Date of creation: This gives the information about the key pair say, when it was created.

5. Date of expiry: This gives the information about the expiry date or the last valid date of the key pair.

### RSA ALGORITHM:

RSA (Ron Rivest, Ali Shamir, Leonar Adleman) is an algorithm in cryptography which is one of the most preferred algorithm in asymmetric key encryption method in internet encryption and authentication method which uses an algorithm developed in 1997. RSA mainly supports two things i.e. digital signatures and encryption process. This algorithm is used universally for the above specified significances in web or net browsers. This is also part of Intuit's Quicken, Lotus Notes and many other products. The encryption method is owned by RSA security.

RSA algorithm involves the multiplication of two large prime numbers and some other supplementary operations to derive a set of two numbers which constitute public and private keys. Once the public and private keys are generated, the original prime numbers are of no use and can be discarded. Both public and private keys involve in the process of encryption/decryption but the secret key is kept private with key holder forever. By using this RSA system, there is no need for the secret key to be sent in the internet.

The private key is used in decrypting the message that has been encrypted by public key. For example, if a message is sent, only the public key can be but not the private key from the central administrator. When the receiver receives the text sent from the source, the receiver can decrypt it with his secret key and along with the process of encryption both the users can authenticate with each other by using their secret keys to encrypt a digital certificate (DC). When the source receives it, he can use the public key to decrypt it.

Rsa: http://searchsecurity.techtarget.com/sDefinition/0,,sid14_gci214273,00.html#

RSA algorithm is secure because of the factorization problem. The base of RSA is the complexity involved in factorizing large or great numbers. For which more than 1000 bits are used.

Ref: Page no.268 (Cryptography and network security principals and practices forth edition from WILLIAM STALLINGS)

### Steps involved in RSA algorithm.

1. Key Generation Process

2. Encryption Process

3. Decryption Process

Key generation process:

RSA algorithm involve in a public key and also in a secret key. this key can be known to each and every person and it is utilized for encrypting text (or) information .the information or data or text encrypted with the public key will be decrypted only with a secret key .the keys (such as private key or secret key a and public key)for the RSA algorithm are generated as shown in above.

Choose two different prime numbers like p & q then after achieving the two prime numbers we need to check the status that is p!=q

A prime number is a number or a positive than which doesn't have integer factors other can be divided by that self i.e. the number which can be divided by integer 1 and itself only in some cases it can also known as composite number with the primality test we can found the prime number. By using these primality test we can find weather the number is prime or not as divergent to essentially decomposing the number into its ingredient prime factor (this ca be called as prime factorization) by using different if needed .for the secrete reasons then p and q positive integer will be selected uniformly at random and must be equal or same bit-length.

After choosing the prime numbers calculate the value of modulus n

Therefore n=p*q and this modulus n is used for both secret and public keys.

Then calculate the phi(ɸ) value, then ɸ (n)=(p-1)*(q-1)

This ɸ (n) is called as toting function. If we consider p as prime number then ɸ (p) = (p-1) and same for q.

Select one integer (which is public key exponent ) e and that value should be 1<e<ɸ (n).The public key exponent e and toting function ɸ (n) share no divisor other than integer 1,such that greatest common divisor gcd(e,ɸ )=1.so that e and ɸ (n) are co- prime.

Calculate the d(private key exponent) by using modular arithmetic, which satisfies congruence relation

de =1(mod ɸ(n))

The public key consist the {n, e} and secret key is {n, d}.here n is modulus, e is encryption exponent and d is decryption exponent, this must be kept secret.

### ENCRYPTION PROCESS:

The data or message will be in a human readable form before encryption i.e. it can be known as plain text. These messages can be consider as ‘m' and after the encryption that is cipher text it can be as 'c'. Therefore

### DECRYPTION PROCESS:

After getting the cipher text at the receiver end private key or secret key ‘d' is used to decrypt the encrypt message.

These process is slightly slow than the encryption because then decryption process is extension is same longer then encrypted in this case we will use the Chinese reminder theorem (CRT)will be used to speed up the decryption process. With this method process same changes will be occurs in the RSA key generation process since same extra value should be computed and stored with secret (d) key. However in this more implementation will be taken place to improve the speed up i.e. fast of the decryption process with the use of CRT(Chinese reminder theorem)

Ref: Page no.270 (Cryptography and network security principals and practices forth edition from WILLIAM STALLINGS)

### RSA STANDERDS:

### PKCS#1

The PKCS#1 stand will explain the usage of Chinese reminder theorem with RSA this defines the encryption process, key generation process, decryption process, public key format, digital signatures padding.

Security of RSA:

RSA cryptosystem security is not that much secured as it provides various possibilities for attackers to attack the messages in different approaches. These approaches mainly include [Abdullah Al Hasib et al, 2008]:

1) Brute Force Attack

2) Mathematical Attack

3) Timing Attack

4) Chosen Cipher Attack

### 1. Brute Force Attack

Brute Force Attack makes, in this case the attackers can easily coming to know RSA private key and whit this we can say that RSA short secret key will not be secure by next to Brute Force Attack. But this can be overcome by using the big keys to prevent these private keys. As long as providing the long keys for security but it may takes long time to encrypt and decrypt which is very slow.[wally wang,2006].

### 2. Mathematical Attack

Against RSA security, there is one more attack which is mathematical attack which is considerable attacks. It helps more for the attackers to catch the RSA private key. In this process the attackers use some properties in the mathematical way to break the RSA algorithm. So, to overcome the process of RSA private key, the private key length must be raised and take large number which the attackers can face some problems to find this prime factor. With this we can say that the length of modulus will not be extending 2048 bits [Abdullah al et al,2008].

### 3. Timing Attack

The creation of modular supporter implementations in RSA crates time variations. With the time difference help these attackers can find the value of private or secret key by time intend it takes computation. The attacks can be secured from the attackers in three ways like as by indicating constant exponentiation time for all exponentiations, by calculating the raw or cipher text along the a random number and by assigning a random delay to the exponentiation algorithm [Antonio lagana,2004]

### 4. Chosen Cipher text Attack

The encrypting and decrypting process for cipher text in RSA is very simple as it is common to the combining the relative plain texts. This mathematical process leads RSA to go under for the harmed attacks. By combining the plain text with the random number at the level of implementation itself, there is a possibilities to avoid these limitations [William stallings,2006].

With the above methods it can be known that, the RSA is unable to define the best security to the private key. the attackers can be plain easily. With the most famous attacks RSA provides many prevents solution to protect the key from attackers. As long as with the various results for every attack so they will not totally over with the attacks and proves the attackers.

Padding in cryptography: this process is used to refer to a total number of different positions of RSA algorithm this is normally utilised with some padding scheme. The main process of this paddin g scheme is used to control the no. of attacks that potentially work in a position to RSA without padding .so to overcome these attacks or problems ,practical RSA algorithm implementing normally insert some type procedures, randomized padding into the value 'm'(plain text)before encrypting it. These structured padding ensures that ‘m' plain text will go into the sort of insure plain text and that specified message, it once padded will encrypted to one of a great number of different position cipher text. In the RSA algorithm standard such as PKCS#1 was specially designed storing or securely pad message .protecting to RSA encryption. Because with this schemes pad the plain text (m) with a few number of extra bits, the length of the unpadding message (m) must be extent smaller. The RSA padding schemes must be suspiciously modified as to avoid tough attacks which can be fascinated by a expected message .structure at the begins of the of these versions PKCS#1 is used a structure that this twisted RSA was proceed semantically encryption scheme. In this ve3rsion was found after then susceptible to a practical adaptive chosen cipher text attack. This version contest of OAEP (optimal asymmetric encryption padding) which can overcome .these RSA stand such as PKCS#1 was also in cooperates procedures schemes crated to extra security for RSA signatures.

Security and practical considerations: This security of the RSA crypto system is completely depends on the two mathematical problems.

### Factoring large numbers

### RSA problem

These decryption of an cipher text is consideration to be impracticable on the assumption that together of the problem are very harder they won't get any solution for the algorithms while they exists .conducting the security or protection against illegally decryption may requested the addition of the some padding scheme.

Attacks: Some more various attacks are to be noted from the book'' cryptanalytic attacks on RSA'',by prof.song y.yan(university of Bedfordshire uk and Massachusetts institute of technology,USA).

According to the book, there are interesting attacks on various systems, among which some of them are given below:

Integer factorization attacks

Discrete logarithm attacks

Quantum computing attacks

Simple elementary attacks

Public exponential attacks

Private exponential attacks

Side channel attacks.

Example 1: If the values selected for ‘p' and ‘q' are small

RSA algorithm describes mainly three stages that is generation, encryption and decryption.

### Step 1: Key generation algorithm

Ø Let us take the values of ‘p' and ‘q' as

p = 3

q = 7

Then,

ð Modulus (n) = p * q

= 3 * 7

= 21

ð φ (n) = (p-1) * (q-1)

= (3-1) * (7-1)

= 2 * 6

= 12

Ø Choose a small number for ‘e' where it should be co-prime to ‘m' that is it should follow the below expression:

gcd (e, φ (n)) = 1.

if e = 2, then gcd (2, 12) = 2

if e = 3, then gcd (3, 12) = 3

if e = 4, then gcd (4, 12) = 4

if e = 5, then gcd (5, 12) = 1

From these values, it can be understood that “e=5” is the value which satisfied the expression and the least number among all the values. So, consider

e =5

Ø Compute the ‘d' value by using the below expression

e * d = 1[mod φ (n)]

ð d = e-1(modφ (n))

ð de = 1+ nm, where ‘n' is any type of integer.

ð d = (1+ mn)

e

Now, consider various values for ‘n' and identify the‘d' value

if n = 0, then d = (1+ 12 * 0)/5 = 1/5 = 0.2

if n = 1, then d = (1+ 12 * 1)/5 = 13/5 = 2.6

if n = 2, then d = (1+ 12 * 2)/5 = 25/5 = 5

if n = 3, then d = (1+ 12 * 3)/5 = 37/5 = 7.4

Ø Finally,

p = 3, q = 7

φ = 20, e = 5 and d =5

Hence, Public key (n, e) = (21, 5)

Private Key (n, d) = (21,5)

### Step 2: Encryption

Ø Calculate the cipher text (c), where

c = ke mod n

Ø Let us consider the plain text message ‘k' that need to be send as 8, that is k = 8.

Ø c = ke mod n

= 83 % 21.

=512 % 21

= 25

Ø Hence, c = 25.

### Step 3: Decryption

Ø Original message (k) = cd mod n

Ø To verify the decryption compute the value of ‘k'

k = 177 mod n

= (173 mod 21 ) (173mod 21) (17 mod 21) mod 21

= 29 * 29 * 17 mod 21

= 14297 mod 21

=5.

Ø Hence, the selected value is correct that is k = 8.

Example 2: If the values considered for ‘p' and ‘q' are large

### Step 1: Key generation algorithm

Ø Let'sconsider p = 791053

q = 1930763

Ø Then,

ð Modulus (n) = p * q

= 791053 * 1930763

n = 1527335863439

ð φ= (p-1) * (q-1)

= (791053-1) * (1930763-1)

= 791052 * 1930762

= 1527333141624

Ø Select a small number for ‘e' where it should follow the below expression:

gcd (e, φ (n)) = 1.

e = 2, then GCD of (2, 1527333141624) = 2

e = 3, then GCD of (3, 1527333141624) = 3

e = 4, then GCD of (4, 1527333141624) = 4

e = 5, then GCD of (5, 1527333141624) = 1

So, the least number from all the values is 1, and the corresponding value of ‘e' is e = 5.

Ø Calculate the value of ‘d' by using the below expression

e * d = 1[mod φ (n)]

ð d = e-1(modφ (n))

ð de = 1+ nm, where ‘n' is any type of integer.

ð d = (1+ mn)

e

Now, let us consider various values for ‘n' to recognize the value of ‘d'

if n = 0, then d = (1+ 1527333141624 * 0)/5 = 1/5= 0.2

if n = 1, then d = (1+ 1527333141624 * 1)/5

= 1527333141625/5

= 305466628325

if n = 2, then d = (1+ 1527333141624 * 2)/5

= 305466283248/5

= 61093256649.8

if n = 3, then d = (1+ 1527333141624 * 3)/5

= 458199424873/5

= 91639884974.6

Ø Finally,

p = 791053, q = 1930763

φ = 1527335863439, e = 5 and d =305466628325

Hence, Public key (n, e) = (1527335863439, 5)

Private Key (n, d) = (1527335863439, 5)

### Step 2: Encryption

Ø Calculate the cipher text (c), where

c = ke mod n

Ø Let us consider the plain text message ‘k' that need to be send as 8, that is k = 2738493837223424273479.

Ø c = ke mod n

= (2738493837223424273479)5 % (1527335863439).

= (27384938372234242734791 mod 1527335863439) (27384938372234242734791 mod 1527335863439) (27384938372234242734791 mod 1527335863439) (27384938372234242734791 mod 1527335863439) (27384938372234242734791 mod 1527335863439) % (1527335863439)

= ……………..

In the case of derive the value of ‘c' it may takes some long time, this is described as one of the critical and huge problem with large integer values ‘p' and ‘q' and it needs a large amount of information than compare to the numbers considered in previous example (example 1). This large quantity of data calculation method leads to complicate results and impacts on time consumption. There will be some Modular exponentiation on repeated division and inherently manages to process slow mainly when the divisor and the larges dividend. At the end, encryption and decryption process will become very slow. Therefore we coming to know that the selection of large integers for two prime numbers gives much more security to the data or information or message while the transforming the message but reduces the speed of the system.

### Issues of RSA algorithm:

While implementing the RSA there are some main problems faced in it

* When Choosing p and q

* Taking the value ‘e ‘

* Computing value ‘d'

* In encrypting and decrypting of Modular exponentiation

* Modular exponentiation algorithm

Choosing p and q – This is the first stage in the RSA algorithm. Here, the number is chosen for ‘p' randomly and it can be with the bit length of n/2. In this case the ‘p' can be taken as odd, there will be used some lowest bit and two highest bits. Then ‘n; is set as the highest bit. At last, Miller-Rabin algorithm makes sure that the ‘p' is a prime number. Similarly, the number ‘q' can be taken. From this case, it can be say that selecting two numbers in the first stage RSA includes a big process.

Taking the value ‘e' – In this RSA algorithm, the choosing the number for ‘e' plays a major role as make sure that gcd (e, φ (n)) = 1.This mathematical expression is equal to the given expressions

gcd (e, p-1) = q and gcd (e, q-1) = 1

In order to equaling the given two expressions, make sure that the selecting the value of ‘e' as a prime number. From this case, it can be described that the user is fail to chose the value ‘e' correctly ‘e' then the coming value of this algorithm will be wrong.

Computing the value ‘d' – The ‘d' value will be intend the below expression

e * d = 1[mod φ (n)]

d = e-1(mod φ (n))

this can be know by using Bhagdad method.

Encryption and decryption of Modular exponentiation –

* In this Encryption process that c = ke mod n, it can be calculated only by selecting the proper value for ‘e' like (3, 17 or 65537).

* Decryption process will be finished by applying Chinese Remainder Theorem (CRT) which are described below:

cd mod n = (υp xp+ υq xq) mod n

Where, υp= cd mod p,

υq= Cd mod q and

xp= q (q-1 mod p), xq= p (p-1 mod q)

For the further efficiency can be improved by using Fermat's Little Theorem for computing υp and v

Where, υp= cd mod p

= c (u (p-1) + υ) mod p

= 1ucυ mod p

= cυ mod p

### Fermat's Little Theorem

“This theorem states that if p is a prime then a(p-1) ≡ 1(mod p) for 1 ≤ a ≤ (p-1)” [Johan Hastad and Marin Lindkvist, 2006]. For example, if p = 7 and a = 2 then

26 = 64 ≡ 1(mod 7)

Modular exponentiation algorithm – It is the basic calculations steps taken in RSA algorithm and this process will be applied effectively by using the below formula:

AB mod n = (Π bi ≠ 0 [A 2i mod n]) mod n

From the above context, it can be known that implementation of RSA algorithm is a big method and it can be applied effectively only while selecting the p, q, and e are accurate.

### Eclipse curve based cryptography.

This cryptography was changed the life a and it study for hiding the information with some certain technologies at the same point they had been into scene. the elliptic curve have the better curves focused with the algebra has changed during an abelian group .it is called elliptical curve.

The above diagram make clear by the opportunities the elliptical curve. there are some more important things other than just the curve. There is a tangent line going through the single point of the curve.

Y^2=x^3+ax+b.

If there is a coefficients of function 2 or say 3the curve will not be in general. If the point O is infinitive y^2=p(x),assumes that the point p can be any curve or with a particular order of 3 degree then x without any roots then we can say as plain is non singular.

In the below we going describe about the functionality of the elliptical curve such that equality relation of their applied software and the evidence of the small key as shown in a example.

Lets take the below two curve which can be explained the pints of the real time of the world.

ECexamples01.png (360×190)

The notation of the geometric was written in the algebraic as.

y^2 = x^3 + ax + b\,

There is some singular and non singular curves. But the curve of the ellipse always be the non singular the other point of the discriminate of the ellipse is given below.

\Delta = -16(4a^3 + 27b^2). \,

The law grope

\Delta = -16(4a^3 + 27b^2). \,

If as we assuming that there will be two points on the ellipse curve p,q. these can explain the different point that is third one with that two points it will be R. if the line drawn through the other two pints that is p,q is parallel to y or x-axis then the third one will b infinite.

Then the existing relation will be P+Q+R=0 now let as discuss about the regardence of the cryptography in a easy way in few steps. let assume that p(a prime)are there are two more integer which is a,b with the discrete logarithm problem the goal is to decrees the integer k>0,so as to complete the equation a^k=b(mod p) will be on different equation solving the log base a of b.

Hypothesis will be using as base f the cryptographic algorithm ex:Diffie Helman portel.

As we are discussing the curve will allow some rules are they have their own properties to describe the equation with the given diagram is y^2=x^3+Ax+B.the rules is the cord and tangent are breaking into the functionalities.

Now hoping that the equation of the ellipse is coming to know clearly so we can go into the real port.

The ECDLP was became the elements to R ,Q was placing on the ellipse curve it is possible to find the point k on the curve such that R=KQ.

Simple mathematics:

The discrete log k of two points on the curve y^2=x^3+9x+17 is given as below. The two points are Q(4,5) and P(16,5).

The simple way of the answer is to multiply the point p with 1,2,3,4,5 and go on..

P=(16,5)

2P = (20,20)

3P=(14,14) and go on to 9P=(4,5) on the graph.

So we can get that 9P=Q. so the descript function can be found and k=9.

But in the real time the value of k will be the larger that cannot correctly determined in the RSA while the decryption method the delay time will be due to the size of keys and cracking goes with sub exponential a^rot(n0 with a key size ellipse curve its explains about log problem which needs small time but it is not easy to crack and develops fully exponentially a^n to compare RSA we tries and allocation different ways and points on the curve and ellipse size of the key and link ratios as with its similar strength in them.

Hence the ECC give equivalent strength and security that of the RSA with a smaller key size.

This result in

* Fast systems

* Consumption of power is low

* Utilizing the CPU is also low

* We can still increase other security needs with this as it is swift.

*

Here the equalent strength of ECC and security for the RSA key size will be smaller.

### The result is:

System fast

The power consumption is less

Ths usage of the CPU is less

We can increase the other security if it is in the swift it is in desperate position.

Certicom was described in 1985 by Dr. Scott, Vanstone and Dr. Ron.

In 1997 initially released the first commercial based product using ECC.

This is a Certicom production.

### IMPLEMENTATON:

Demonstration of working model

To demonstrate the software we might be configuring the necessary steps on the computer and ensure that the pre requisites are fulfilled to the requirements of the software. As it not ‘.exe' file we should be following the steps as shown below.

### Pre requisites:

1) Install JDK 1.5 software .

2) Locate ‘jdk1.5.0.07' file to C:\Program Files\Java\jdk1.5.0_07

3) In order to run the java compiler machine set the path in variable list of your computer to jdk1.5.0.07 in the following steps.

a) Go to ‘My computer' right click the' My Computer' click on ‘Properties' then click on ‘Advanced'

b) Now you can see ‘Environmental variables'. Click on it.

c) You will get the window in which there are two divisions and on the top division we will ditect the JAVA_HOME as variable _name and set its value to C:\Program Files\Java\jdk1.5.0_07

i.e click on new in user variables and type in ‘JAVA_HOME'.

Under the variable value section copy and paste

‘C:\Program Files\Java\jdk1.5.0_07'.

d) Now lets set the processing variables which you can see just under the user variables . Follow the steps as

e) Click on New

f) Variable_name : PATH

g) Variable_value : ‘C:\Program Files\Java\jdk1.5.0_07\bin;.;'

h) To test if the machine is running fine. Open the command promte type in cmd or command. Type javac the machine should show you different commands listed according to javac and should ot say command not found.

Now we are ready to go to the code sction

Copy the code to local drive so that the machine can access the files quick and easy to locate for itself.

Open the command prompt window type in cmd and press enter.

Now change the directory path to the place where we have stored the code. Say ‘C:\code'

So type in ‘cd \' and press enter

It will go to ‘C:\>' Now type in ‘cd code'. It will change to ‘c:\code>'

In order to notice the java machine is running type in javac

We will get many commands and instructions and various things about java commands. It confirms the machine is running fine from this directory. In order to run things with complete control run the whole process in Admin mode that means right click on cmd and open as Admin.

### Now the program section

### 1. CLIENT FRAME

Type ‘java Clifrm' in the command line and press enter. The client window appears. Just like below.

1

It is always important to open the client window first.

### 2. SERVER FRAME:

To run the server frame open another cmd in admin mode and redirect the directory to ‘c:\code' and run the command ‘java Serfrm'

1) c:\code>

2) c:\code>java Serfrm

Server window appears as below.

2

It is very important in any server client program to establish a connection before we implement any transfer of information. It is connection oriented program (as for this program, it is not always necessary to be connection oriented but this program always recommends connection oriented only)

On server window click on - [Start Server] to start the server.

### 3. SERVER ENTERED

8. Type message in client form and click on [Send Data]

9. Goto server and click on [Received data] and observe data is displayed

10. In server click on [View Received cipher] and observe encrypted data

11. Similar way even we can verify in client side encrypted data by clicking on [View Sent cipher]

12. In client select "files" and enter path of file and click on [Send Data]

13. Goto server and click on [Received data] and observe file is displayed

14. In server click on [View Received cipher] and observe encrypted file.

3

### 4. CLIENT INITIATES HANDSHAKE

In client window click on [Initiate Handshake]

4

The client sends a request to the running server to initiate connection and the server replies to the sent message as sent finished message as you can see on the server side and acknowledges the client to get the hand shake and displays that message as Handshake completed successfully in server window and that message is here'd by client and ask to server as Finished handshake successfully.

### 5. HANDSHAKE SUCCESSFUL ON CLIENT SIDE

5

### 6. HANDSHAKE SUCCESSFUL ON SERVER SIDE

6

### 7. CLIENT SENDING A MESSAGE

7

In this client side we are trying to send a message like, SNIST, so as we seeing on the screen. We can type a message like SNIST in the message page on the screen, we can see some buttons like: send data, view received data, view send cipher. So after typing the message. click the send data button then the message will be send to the server side once we send the message you will see the message like ‘'sending block1''. Once the server receives this message the client side receives a message as ‘data send successfully'.

### 8. SERVER VIEWING THE RECEIVED MESSAGE

Now at the server side to check the received data click the received button so we can view the like SNIST as a received message and see the raw data click the view received cipher button then we see the cipher message.

### 9. SERVER VIEWING THE RECEIVED CIPHER

From the above screen we coming to know that the server received a message from the client, so if we need to check the received message then press the view received data button then we can see the received message but in the case of view the received cipher message then go to view received cipher button then we can see the raw data which is in a unreadable language.

### 10. SERVER SENDING A MESSAGE

At the server side the message appliers we process on view the data in order to see the received cipher which is raw data taken from client process view receiver cipher now it try and send a message from server to the cipher for given as the data so type in ‘THANK YOU' .and press send at the bottom of the window we get the status messages as sending block1.. This indicates the message send in blocks when the data is received it gets an acknowledgment and so it stats as data send successfully.

### 11. CLIENT VIEWING THE RECEIVED MESSAGE

Now we go to the client side click on the receiver data we get ‘THANKYOU' message in the window to see the received cipher click on view received cipher. We will see the raw data that is cipher send by server as a message transfer is successful.

### 12. CLIENT VIEWING THE RECEIVED CIPHER

At the client side to view the received data it can be like an encrypted message so at the back end we can see like an raw data so see this raw data press the button of view received cipher so we can see the cipher message.

### 13. CLIENT SENDING A FILE

In this above screen at the appilcation data this is file to send and at the down of the page there is saying the foulder and to send the data this is some button to click that is send data button so, once we press the send data button then the data will be send to the server side and while the data ot file sending we can get a message like sending block1 and once the data send succesful to the server side the we can see the message like data sent succesfully.

### 14. SERVER OPENING THE RECEIVED FILE

From the above screen we can say that file was received from the client so to see the received data then press the view received data button then can see the data which was received from the client.

### 15. SERVER VIEWING THE RECEIVED CIPHER FILE

in the above case we are clear about the file which is received from the client and to see the received file we pressed the view received data button and we seen the received file but in the case to see the received raw file we need to press the view received cipher button then we can see the raw data what we received from the client side.

### 16. SERVER SENDING A FILE

With the server side we can say that the data or file sending to the client side ,so click on the file point and at the down of the page we can say that the file is in the folder ‘ E' with the browsing and then go and press on the send data button then the data or file will be sent while the data was sending to the client we can see the message like sending block1 at the bottom but once the file received at the client send then we can see the message as file or data send successfully.

### 17. CLIENT OPENIG THE RECEIVED FILE

In this case as we know the server sent a file to client .so here the client needs to check what file received from the server .so at the application data click on the files and at the down as we know the folder then to see the received file go on the send data button and press it then we can see the received file on the screen.

### 18. CLIENT VIEWING THE FILE CIPHER

On this further case as we know the file was sent by the server with some secret links and the at the client side to see the received data pressed the view received data button and they seen the received file button but in this stage need to check the received raw file so as we did in the client received file method we can apply the same method on checking cipher file as click on the view received cipher button then we can see the raw file.