Вы находитесь на странице: 1из 12

SALESIAN POLYTECHNIC UNIVERSITY

SYSTEMS ENGINEER
NETWORK SECURITY
NAMES: Chacón S., Quiroga F., Rosero S.
DATE: Nov 7 of 19
SUBJECT: Feistel encryption

Table of Contents
OBJECTIVE ..................................................................................................................................... 2
General objective ...................................................................................................................... 2
Specific objectives ..................................................................................................................... 2
ABSTRACT ...................................................................................................................................... 2
CHAPTER 1 ..................................................................................................................................... 3
Encryption ................................................................................................................................. 3
Types of encryption according to your keys ............................................................................. 3
Feistel Encryption ...................................................................................................................... 4
Block Encryption .................................................................................................................... 4
Product Encryption................................................................................................................ 5
Disadvantage ......................................................................................................................... 5
Operation of a Feistel network ............................................................................................. 5
Reversibility of the algorithm ................................................................................................ 6
CHAPTER 2 ..................................................................................................................................... 6
CODING ......................................................................................................................................... 6
CONCLUSIONS ............................................................................................................................. 12
BIBLIOGRAPHY............................................................................................................................. 12

Table of Contents
Figure 1 Cifrado Feistel.................................................................................................................. 6
Figure 2 Interface .......................................................................................................................... 7
Figure 3 Called methods................................................................................................................ 7
Figure 4 Filling method.................................................................................................................. 8
Figure 5 Replacement method ...................................................................................................... 8
Figure 6 Permutation method ....................................................................................................... 9
Figure 7 Mirror and auxiliary vector.............................................................................................. 9
Figure 8 Encrypted vector ........................................................................................................... 10
Figure 9 Flip vector ...................................................................................................................... 10
Figure 10 Encryption and Decryption.......................................................................................... 11
OBJECTIVE
General objective
Develop software that allows the encryption of plain text using the Feistel structure that
helps to understand the processes of encryption and decryption algorithms
Specific objectives
 Use Netbeans as the main IDE for the development of the application.

 Understand the use of algorithm using corresponding permutations and

substitutions

 Implement in the programming code a graphical interface that allows obtaining


an executable of the entire program as a result

ABSTRACT
In cryptography, encryption is a procedure that uses an encryption algorithm with a

certain key to transform a message, without attending to its linguistic structure or

meaning, in such a way that it is incomprehensible or, at least, difficult to understand to

any person who does not have the secret key of the algorithm. The encryption and

decryption keys can be the same , different or both. The character set used in the

unencrypted message may not be the same as the character set used in the encrypted

message. Simmetric when using the same key to encrypt and decrypt. The best known

methods of this type of encryption are DES, Triple DES and AES. Asymmetric when

using different keys: a couple consisting of a public key, which is used to encrypt, and a

private key, which is used to decrypt. The fundamental point on which this public / private

decomposition is based is the practical impossibility of deducing the private key from the

public key. This type of encryption is also called public key cryptography or PKE . The

best known methods of this type of encryption are RSA and ElGamal. The use of a

symmetric or asymmetric system depends on the tasks to be accomplished. Asymmetric

cryptography has two main advantages: it eliminates the problem of secure transmission

of the key and allows electronic signature.


CHAPTER 1
Encryption
In cryptography, encryption is a procedure that uses an encryption algorithm with a

certain key (encryption key) to transform a message, without attending to its linguistic

structure or meaning, in such a way that it is incomprehensible or, at least, difficult to

understand to any person who does not have the secret key (decryption key) of the

algorithm. The encryption and decryption keys can be the same (symmetric
cryptography), different (asymmetric cryptography) or both (hybrid cryptography).

The character set (alphabet) used in the unencrypted message may not be the same as the
character set used in the encrypted message.

Sometimes encrypted text is written in blocks of equal length. These blocks are called

groups. These groups provided an additional form of verification, since the encrypted text

obtained must have an integer number of groups. If you don't have that whole number of

groups when encrypting the plain text, then you usually fill in the end with zeros or
nonsense characters.

Although encryption can make the contents of a document secret, it is necessary to

complement it with other cryptographic techniques in order to communicate securely. It


may be necessary to guarantee the integrity of the authentication of the parties, etc.

Types of encryption according to your keys


An encryption system is called:

Simmetric when using the same key to encrypt and decrypt. The best known methods of
this type of encryption are DES, Triple DES and AES.

asymmetric when using different keys: a couple consisting of a public key, which is used

to encrypt, and a private key, which is used to decrypt. The fundamental point on which

this public / private decomposition is based is the practical impossibility of deducing the
private key from the public key. This type of encryption is also called public key
cryptography or PKE ( Public- Key Encryption ). The best known methods of this type
of encryption are RSA and ElGamal .

The use of a symmetric or asymmetric system depends on the tasks to be

accomplished. Asymmetric cryptography has two main advantages: it eliminates the

problem of secure transmission of the key and allows electronic signature. However, it

does not replace symmetric systems, since the calculation times are obviously shorter
with symmetric systems than with asymmetric ones.

Feistel Encryption

Starting to look at that entertain me for a while, I started to look for some kind of

encryption, after a while to achieve the conclusion that should start from

the methods used before or methods in which are "based" current methods of

encryption, so that I found the Feistel Algorithm which I will present today.

Is a method of encryption designed by block Horst Feistel , it is also known as

Red Feistel or chain Feistel , a lot of block ciphers use, being the most known the
algorithm Data Encryption Standard ( DES) which more later probably I will be

publishing something about it, remember that the types of encryption according to their

algorithms can be: block encryption, where encryption is done block by block and
encryption in flow, where encryption is done bit by bit.

Block Encryption

Symmetric (or private) cryptography is the oldest cryptography system. It is used from
the time of Julio Cesar until today.
It is characterized by using the same key to encrypt and decrypt.

All security is based on the privacy of this secret key, called symmetric because it is the
same for the sender and the receiver.

Product Encryption

The algorithms of symmetric encryption are based on the concepts of confusion (trying

to hide the relationship between the plaintext, ciphertext and key, ie make simple

substitutions) and dissemination (try to spread the influence of each bit of the original

message as much as possible between the encrypted message (that is, perform
permutations) that combine to give rise to the so-called product encryption.

These techniques basically consist of slicing the message into blocks of fixed size, and
applying the encryption function to each of them.

Disadvantage

- If the block size is small, the system is equivalent to a classic replacement encryption
(vulnerable to a statistical analysis of the plain text).

Operation of a Feistel network

 The initial block is divided into two parts: left (L) and right (R).

 A function f that provides confusion and adequate dissemination is applied to the

right side. In this function, the key ( ki ) occupies an important place , it must

remain secret and should only be known by the sender and receiver of the

message.

 The result of this function is applied to the left part of the block using an XOR

 The two parts are exchanged and the process is iterated, this time with the changed
papers.
Figure 1 Cifrado Feistel

Reversibility of the algorithm

The algorithm must be reversible: suppose it is a black box that has a block as input and

the encoded block as output. It must be possible to link that coded block with an identical

black box in structure (changing the keys logically) that applied to the coded block will
return the original block.

CHAPTER 2

CODING

The program is structured by methods, a method was performed for each encryption

action using vectors. The code fully mimics the original Feistel encryption procedure, that

is, it works by division of blocks, in this case 4-character blocks.

The following are the main coding blocks that work in the program

1.- To execute the whole procedure, all the fields requested in the interface must be filled

in, then choose if you want to encrypt or decrypt, and finally press the “Accept” button
Figure 2 Interface

The "Accept" button has the following coding in case of encryption and for decryption it

is similar:

Figure 3 Called methods


2.- The main methods are:

fill (): This method completes the blocks with “0” to be able to perform the encryption, if

there is a block with less than 4 characters it completes it or if there is an odd number of

blocks it creates an entire block.

Figure 4 Filling method

substitution () and substitutions (): The substitution method takes blocks of 4 characters

increases or decreases the value entered in the interface in ASCII, then skips a block and

continues as follows as the Feistel algorithm.

Figure 5 Replacement method


permutation () and permutations (): These methods take blocks of 4 characters, perform

the permutation according to the values entered in the interface in encryption or

decryption, skip a block and continue with the following, for which a mirror vector and a

auxiliary vector.

Figure 6 Permutation method

Figure 7 Mirror and auxiliary vector


flip (): This method inverts blocks of 4 characters, for which a mirror vector is used and

the main vector is cleaned.

Figure 8 Encrypted vector

Figure 9 Flip vector


3.- Finally, the content of the vectors containing the information already encrypted or

decrypted in the JTextArea is shown

Encryption:

Figure 10 Encryption and Decryption


CONCLUSIONS
 Incorporate as Netbeans IDE proved to be of benefit since it worked in Java

programming language, therefore, this IDE supports any development language.

 This symmetric encryption algorithm is safe compared to the current one, because

it uses several iterations and permutations which makes it efficient when

protecting passwords or any text.

 Handling various methods in programming, makes this code can be reused and

modified quickly, in this way to obtain a graphical interface that is user friendly.

BIBLIOGRAPHY
[Stallings, 2004] W. Stallings, “Comunicaciones y Redes de Computadores”. 7º Edición. Pearson

Education, Madrid, 2004.

• [Tanenbaum, 2003] A.S. Tanenbaum, “Redes de Computadoras”. 4º Edición. Pearson Education,

Mexico, 2003.

[Gil, 2010] P.Gil, J. Pomares, F.A. Candelas, “Redes y Transmisión de Datos”. Publicaciones

Universidad de Alicante, 2010. Transparencias asociadas al libro en Repositorio de la Universidad

de Alicante (RUA)

• [Torres, 2001] F. Torres, F.A. Candelas, S.T. Puente, “Sistemas para la Transmisión de Datos”.

2º Edición. Publicaciones Universidad de Alicante, Alicante, 2001.

Вам также может понравиться