The Three Encryption Methods Computer Science Essay

This undertaking comprises two parts. The first part required the pupils to take three encoding methods and behavior thorough research on it. The 2nd part is the development of a simple encoding and decoding plan that reads in text message over a web.

2.0 Introduction

The three encoding methods chose was Data Encryption Standard ( DES ) , Triple Data Encryption Standard ( 3DES ) , and Advance Encryption Standard ( AES ) . In-depth probe and survey were done harmonizing to the histories, backgrounds, schemes and mechanisms, advantages and drawbacks, and applications of the three encoding methods. These three encoding methods are critically evaluated and AES is the superior encoding method among the three.

The developers chose Ocular as their scheduling linguistic communication as it provides a user friendly GUI. The developers developed an Instant Messaging system which is feasible in a LAN or a wireless Ad-Hoc environment. The users can code and decode the coveted message with the key defined manually by the user.

3.0 Three Algorithms of Encryption

3.1 Data Encryption Standard ( DES )

Data Encryption Standard or known as DES is a United States authorities standard encoding algorithm for coding and decoding unclassified informations. DES is based on IBM ‘s Lucifer cypher and describe by Federal Information Processing Standards ( FIPS ) 46 as the most recent alteration in FIPS 46-3. DES is a block cypher that takes plaintext twine input and creates a cipher-text twine of the same length. IT uses a symmetric key i.e. utilizing the algorithm to code and decode. It had been used as a criterion for encoding until 200. It was replaced by the AES algorithm in 2001. After 25 old ages of analysis, its short key length was identified as the lone security job with DES. Although it ‘s broad spread usage came to an terminal, its design is still used in most block cyphers.

Three chief operations of DES are the XOR, substitution and permutation. DES encrypts and decrypts informations in 64-bit blocks utilizing 64-bit key. It takes a 64-bit block of plaintext as input and outputs a 64-bit block cypher text. Since it operates on blocks of the same size, it uses both substitutions and permutations in the algorithm. The chief algorithm is repeated 16 times to bring forth the cypher text. Although the input key is 64 spot long, merely 56 spots length is really used by DES, the least important ( right-side ) spot in each byte is a para spot and should be set so that there are ever uneven Numberss of 1s in every byte. As merely important spots of each byte are used and para spots are ignored, it consequences in a cardinal length of 56 spots. Authorized user of encrypted computing machine informations must hold the key that was used to code the information in order to decode it. Datas can be recovered from cypher by utilizing merely the exact same key. Unauthorized receivers of the cypher who knows the algorithm but do non hold the right key can non acquire the original informations algorithmically. However it may be possible to find the key by a beastly force “ exhaustion onslaught ” .

Degree centigrades: UsersabusaidDesktopDES1.jpg

Figure 1 shows DES encoding mechanism

However, there are several failings in DES. There have been several attacks to assail DES. The most popular attacks used are the additive cryptanalytics and differential cryptanalytics. These two attacks reduces the cardinal infinite needed for hunt from 2^56, 2^43 and @ ^27 severally. Other attacks used algebraic cryptanalytics, molecular calculation, nervous webs and optimisation heuristics. A study shows the clip it takes for cryptographer to interrupt cryptanalytic algorithms. In 1999, a distributed cyberspace undertaking broke a DES key in 23 hours utilizing thorough cardinal hunt method. The work was shared over 100,000 computing machines and 250 billion keys were checked every 2nd and a paper shows how to further cut down the thorough cardinal hunt of the DES.

3.2 Triple Data Encryption Standard ( 3DES )

3DES is an improved version of DES symmetric encoding algorithm. It is used 3 times on the same information which how 3DES got its name. 3DES is a block cypher which uses 48 unit of ammunitions in its calculation which is transits and permutations and has a cardinal length of 169 spots. The procedure o 3DES plants in which foremost, informations is encrypted utilizing a 56-bit key. Then the information is decrypted utilizing a different key. Finally, it is encrypted once more utilizing a wholly new key. Merely when the information had undergone these three phases, informations is sent to its concluding finish. A figure of manners of 3DES have been proposed

DES-EEE3: 3DES encoding with three different keys

DES-EDE3: Three DES operations in sequence encrypt-decrypt-encrypt with three different keys.

DES-EEE2 and DES-EDE2: same as old format except that the fist and 3rd operations use the same key.

hypertext transfer protocol: //

Figure 2 shows the 3DES encoding mechanism

3DES are used by the federal section and other authorities bureaus for cryptanalytic protection of classified information. The encoding is used at the physical bed of the ISO Open Systems Interconnection ( OSI ) Reference Model in telecommunications systems. Cryptanalysis can be used for hallmark in which the receiving system of the message can determine its beginning. On top of that it provides unity in the sense that the receiving system can verify if the message was modified during the transmittal. The transmitter besides can non deny that he or she sent the message. The functionality of 3DES is normally integrated within embedded systems. Some of the execution of 3DES are in DVDs, overseas telegram Television, DBS systems, HDTV, digital cameras and so on. 3DES besides are applied in networking applications. This is to supply web protection through informations privateness, unity, entree control and hallmark.

When utilizing three keys, requires a 168-bit random key as comparison to AES which uses 128-bit key. This may sound significantly stronger that AES but it fact, there are onslaughts on 3DES that reduced the strength of the 168-bit key to be closer to 112 spots. “ If 3DES truly worked at the full strength of its key, it would take 2^168 tests to decode the cipher-text. In fact, a more efficient onslaught merely takes 2^112 tests. When utilizing two keys, Triple DES requires a 112-bit random key. Clever onslaughts, nevertheless, can retrieve the cipher-text in 2^280 tests. “ ( Jones & A ; Bartlet Learning ) . Although 3DES have a clean record in which it had ne’er been broken, it is considered less efficient because it performs DES three times in which cost a great trade in calculating clip.

3.3 Advanced Encryption Method ( AES )

AES can besides be referred as Rijindael is an encoding algorithm invented by two Belgian cryptanalysts ; Joan Daemen and Vincent Rijimen ( Rouse, 2011 ) . AES is used and approved by the US authorities bureaus to protect sensitive but unclassified information ( Rouse, 2011 ) . AES uses block cypher algorithm which supports block size of 128 spots and cardinal sizes of 128, 192, and 256 spots ( Hurst, n. d. ) . AES is a classified as high quality and dependable informations encoding method to protect informations unity because the US Government officially denote the pattern of AES in their administration in 2003.

3.3.1 History

AES is a replacement for DES ( Data Encryption Standard ) which was a widely used algorithm in 1976 such as commercial applications and fiscal minutess. The National Institute of Standards and Technology ( NIST ) decided to farther develop a new encoding as the replacement for DES due to the little cardinal size and the addition of handiness in calculating power ( Hurst, n. d. ) . Subsequently, AES was selected among all the 15 rivals and this determination was widely honoured in the cryptanalytic community.

3.3.2 AES Algorithm

AES is a block cypher and hence maps on static-length blocks of informations, AES uses symmetric keys to code and decode the information ( Hurts, n. d. ) . For illustration the User A inputs a plaintext of 128 bytes and User B will have the end product of the encrypted plaintext in 128 bytes accordingly. In order to decode the encrypted plaintext, User B will hold to input the encoding keys defined by User A. Harmonizing to Jim Hurts, the encoding returns via a figure of unit of ammunitions as shown below ( Hurst, n. d. ) :

Number of Bit Keys


128-Bit Keys

10 Rounds

192-Bit Keys

12 Rounds

256-Bit Keys

14 Rounds

Table 1 shows the AES encoding unit of ammunitions

As mentioned, AES encrypts via static-length block size of 128-bits and cardinal size of 128-bits, 192-bits, or 256-bits. The 128-bits in a block are organised in a province of 4×4 bytes and each several unit of ammunition of encoding comprises of four stages to bring forth a new province.





Add Round Key

A Sub-Key will be combined with the generated province. The Sub-Key is derived from the chief key through a cardinal docket. The cardinal docket can generable infinite Sub-Keys through a defined set of algorithms. The Sub-Key size generated will be indistinguishable to the size of the generated province. The Sub-Key and the generated province will be merged with the logical sole OR ( XOR ) process. This measure disguises the original province and generates a new encrypted province.


Sub Bytes

In Sub Bytes, each byte in the generated province will be switched utilizing a Substitution Box ( S-BOX ) . The S-BOX transforms each byte by happening the multiplicative opposite of the byte in Rijindael ‘s finite field and returns to change overing the consequence with the binary additive algebra. Again, this measure transforms the encrypted province earlier to a new encrypted province.


Shift Rows

In this procedure, the bytes in the rows ( 4×4 ) will be shifted within the several row. The first row will be left unchanged, the 2nd row will be shifted by go forthing one byte, eventually 3rd and 4th rows will be shifted left two and three bytes correspondingly.


Mix Column

This stage can be viewed as a matrix generation procedure where an invertible additive transform will fall in all the four bytes of each column. The figure of input bytes will be tantamount to the figure of end product ( four input bytes will bring forth four end product bytes ) . Mix Column offers diffusion where dispersing the input of a individual plaintext character across assorted plaintext characters. The repeat of Shift Rows ad Mix Columns stairss will vouch the alteration of a individual character in the plaintext will alter all the characters in the end product of the cypher text or encrypted informations.

Table 2 shows the AES encoding procedure referenced from hypertext transfer protocol: //

3.3.3 Applications of AES

AES is widely adopted by sellers in both hardware and package by sellers because of its simple and yet efficient algorithm. Furthermore, sellers prefer to deploy AES because it decreases system complexness, costs, and endorses interoperability. AES is deployed in assorted engineerings and in commercial usage ( Hurst, n. d. ) . Today, AES is widely adopted in web security, for illustration high-end Virtual Private Network ( VPN ) package by sellers such as Cisco, Checkpoint, and Symantec has AES as portion of the encoding to guarantee informations unity ( Hurst, n. d. ) . Furthermore, Voice-Over-Protocol ( VoIP ) which is deriving popularity is utilizing AES by sellers to procure telecommunication security. Furthermore, WinZip uses AES as their security steps in their file compaction plan ( Hurst, n. d. ) .

3.4 Comparison

3.4.1 AES V DES

The first failing reference from DES is the short encoding key of 56 spots, which generates 2^56 combinations that can be easy crack by a beastly force onslaught ( Joan, 2011 ) . Furthermore, computing machine treating power has increased enormously over the old ages which make checking the 2^56 possible combinations easier. AES offers 128, 192, or 256 spot encoding key which is able to bring forth 2^128, 2^192, or 2^256 possible encoding keys dependent on the user ‘s penchant.

Second failing of DES is the comparatively little 64 spots block size while AES offers twice the sum which is 128 spots block size ( Joan, 2011 ) . Therefore, DES is merely able to let the user to direct a upper limit of 32GB informations in a individual encoding key while the AES offers a upper limit of 256 billion Gs in a individual encoding key. The block size defines the sum of information that the user can direct before holding indistinguishable blocks which will unwrap information.

3.4.2 AES V 3DES

The first failing found in 3DES is the same discovered in DES which is the short 56 spots encoding key but in 3DES the user can take to hold three encoding keys ( three discrete or two indistinguishable 1 discrete or three indistinguishable ) ( Joan, 2010 ) . 3DES offers encoding cardinal lengths of 168, 112, or 56 spots encoding cardinal lengths correspondingly. However, exposures still occurs when three indistinguishable encoding keys are applied which will take down the security degree ; 168 spots reduced to 112 spots and 112 spots reduced to 80 spots.

Another defect in 3DES is the same block length of 64 spots compared to AES which offers 128 spots ( Joan, 2010 ) . This issue is indistinguishable to DES because the user of 3DES will hold to exchange encoding keys every 32GB of informations transportation to guarantee the transmittal is secured by understating the possibilities of leaks.

Third issue with 3DES is public presentation concern because 3DES repetitions the encoding procedure thrice and therefore it takes longer clip to treat frailty versa compared to AES ( Joan, 2010 ) . Theoretically AES is on the upper manus of 3DES but there are hardware and package that are specially designed and developed for 3DES which will work quicker compared to AES ( Butter, 2007 ) . Although, 3DES may work better in some hardware and package however AES is still considered as the victor judging from the security impregnabilities offered.

3.4.3 DES vs 3DES V AES

Below is a comparing tabular array for DES, 3DES, and AES.





Key Length

56 spots

( k1, K2, and k3 ) 168 spots

( k1 and K2 ) 11 spots

128, 192, or 256 spots

Block Size

64 spots

64 spots

128, 192, or 256 spots

Cryptanalysis Resistance

Vulnerable to differential and additive cryptanalytics ; weak permutation tabular arraies

Vulnerable to differential, Brute Force aggressor could be analyse plaintext utilizing differential cryptanalytics

Strong against derived function, truncated derived function, additive, insertion, and square onslaughts


Proven inadequate

One merely weak which is Exit in DES

Considered secure

Possible Keies


2^112 or 2^168

2^128, 2^192, or 2^256

Time Required to Check All Possible Keys at 50 billion keys per second

For 56-bit key: 400 Dayss

For 112-bit key: 800 Dayss

For 128-bit key: 5 x 10^21 old ages

Table 3 shows the comparing between DES, 3DES, and AES referenced from hypertext transfer protocol: //

Based on the information above, AES is the greater encoding method among the three for the ground of security. First and for most of import ground is security degree offered by AES because the clip required to check all possible encoding cardinal combinations is 5 ten 10^21 old ages. Furthermore, the cryptanalytics opposition has proven DES and 3DES are non secured as AES offers. The chief ground for the insecurity of DES and 3DES is the low sum of possible encoding keys generated compared to AES. Therefore, AES is the better encoding method among the three.

4.0 Programing

The chosen scheduling linguistic communication for this undertaking is Ocular The developers conducted in-depth research on the developments of the plan. The developers watched tutorials on YouTube, browsed forums and bit-by-bit usher provided by bloggers in order to develop the plan successfully.

4.1 Screenshot

4.1.1 Waiter

Figure 3 shows the Server of the system

The user will hold to trip the Server by listening to the port figure preferred. The user can specify any larboard Numberss every bit long as the web is within a Local Area Network ( LAN ) or a wireless Ad-Hoc environment. The waiter will be able to see all confab messages between the clients including one-to-one confabs.

4.1.2 Client

Figure 4 shows the Client with the name “ Wong ” of the system

First, the user will hold to come in the IP Address of the Server in order to link to the user. Then, the user is able to see the figure of user ( s ) online on the top left of the system. As shown above, the user “ Wong ” encrypted the message “ How are you? ” with the encoding key of “ 123 ” , the message is so encrypted.

Figure 5 shows Client with the name “ Abu ” of the system

The figure above shows that the user “ Abu ” is having an encrypted message from user “ Wong ” . User “ Abu ” can decode the message by infixing the encrypted message to the Message Text Box provided and so identify in the encoding key defined by user “ Wong ” .

4.2 Ceaser Cipher Algorithm ( Code Implementation )

Function EncryptDecrypt ( ByVal text1 As String, ByVal key As String, ByVal isEncrypt As Boolean ) As String

Dim char1 As String

Dim char2 As String

Dim cKey As Byte

Dim strLength As Integer

Dim Result As String = “ ”

Dim J As Integer = -1

If text1 & lt ; & gt ; “ ” And IsNumeric ( key ) Then

strLength = text1.Length

For I As Integer = 0 To strLength – 1

char1 = text1.Substring ( one, 1 )

If J & lt ; key.Length – 1 Then

J = J + 1


J = 0

End If

cKey = Val ( key.Substring ( J, 1 ) )

If isEncrypt Then

char2 = Chr ( Asc ( char1 ) + cKey )


char2 = Chr ( Asc ( char1 ) – cKey )

End If

Result & A ; = char2



MsgBox ( “ Enter text or key! ” )

End If

Return Result

End Function

Figure 6 above shows the codification for Caeser Encryption

The codification above is the execution of Caeser cypher in the plan created by the developing squad. In this plan, “ EncryptDecrypt ” Function was created to execute permutation of text which in this instance text is shifted into ASCII character based on the key that will be define by user. Variable “ Char1 ” is declared as twine which will be the text messaged keyed in by user. The length of the text message will so be calculated and the value will be stored in variable “ strLength ” . A for cringle will be used to set up the character in array format ( “ char1 = text1.Substring ( one, 1 ) ” ) . An “ If else ” statement is used to specify each array figure of characters of “ Char1 ” . Then, the value of the key for encoding will be used ( “ cKey = Val ( key.Substring ( J, 1 ) ” ) to replace the message by character. For illustration if the key ‘s value is 1, and the text message is “ hello ” all the text will be substitute by one in which “ H ” will be “ I ” , “ Tocopherol ” will be “ F ” , “ L ” will be “ M ” and “ O ” will be “ P ” . The value will be determined by the cardinal depending on the value and length of the key. Then, a status is set utilizing an “ If Else ” statement to replace the message utilizing the key. If button encrypt is clicked, so it will execute the permutation but if button decrypt is clicked so it will reserve the procedure which will be decrypted. If the status of the chief IF else is non met, i.e. message is clean and the key that is set for encoding is non met ( cardinal should be in Numberss ) , a popup message will look to come in the value.

Private Sub btCrypt_Click ( ByVal transmitter As System.Object, ByVal e As System.EventArgs ) Handles btCrypt.Click

txtResult.Text = EncryptDecrypt ( txtText.Text, txtKey.Text, True )

End Bomber

Private Sub btDecrypt_Click ( ByVal transmitter As System.Object, ByVal e As System.EventArgs ) Handles btDecrypt.Click

txtResult.Text = EncryptDecrypt ( txtText.Text, txtKey.Text, False )

End Bomber

Figure 7 shows the codification for Caeser Encryption

Finally, the button of encrypt and decoding will be assigned to “ txtResult.Text ” textbox upon click these two button. As an illustration, when snaping encrypt, value of “ txtText.Text ” ( message ) and “ txtKey.Text ” ( Key ) will utilize the map created earlier and the consequence of the encoding will be displayed at “ txtResult.Text ” . Decryption follows the same map merely the difference is, the value of the encrypted text should be written in “ txtText.Text ” .

5.0 Decision

Throughout the undertaking, the developers found that no security steps can vouch a solid unbreakable security system in the universe of Information Technology. There are many causes and loopholes that might take to the security escape. The lone method that can guarantee the security degree is at the highest is to maintaining the security measures up-to-date with the latest processs such as HP Tipping Point Intrusion Prevention System, Intrusion Detection System and many more.

( 2629 Words )