1 / 41

CIPHERSET

Learn about CIPHERSET, a project that provides an overview of encryption and decryption methods such as DES and AES for data security. Explore implementation examples and understand the objectives of this project.

rosemaryk
Download Presentation

CIPHERSET

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CIPHERSET GÖKSEL SARIKAYA

  2. Content • Introduction • Definition • DES ( Data Encryption Standart ) • AES ( Advanced Encryption Standart ) • Project Overview • Project Implementation • Examples CIPHERSET

  3. Objectives • Security We don’t want other people to see some informations openly, we want the informations to be hidden. • Saving some servers from overburden In this way, servers don’t need to use their sources to make encryption and decryption operations. CIPHERSET

  4. Cipher • When Julius Caesar sent messages to his generals, he didn't trust his messengers. So he replaced every A in his messages with a D, every B with an E, and so on through the alphabet. Only someone who knew the "shift by 3" rule could decipher his messages. And encryption and decryption so begin. CIPHERSET

  5. Cipher ( Cont’d ) • Data that can be read and understood without any special measures is called plaintext or cleartext. • The method of disguising plaintext in such a way as to hide its substance is called encryption. • Encrypting plaintext results in unreadable gibberish called ciphertext. • The process of reverting ciphertext to its original plaintext is called decryption. CIPHERSET

  6. DES ( Data Encryption Standart ) • Data Encryption Standard (DES) is a widely-used method of data encryption using a private (secret) key that was judged so difficult to break by the U.S. government that it was restricted for exportation to other countries. • DES applies a 56-bit key to each 64-bit block of data. The process can run in several modes and involves 16 rounds or operations. CIPHERSET

  7. DES ( Cont’d ) CIPHERSET

  8. DES ( Cont’ d ) • DES has two main process : • Key Generator Process • 64-bit Data Block Process CIPHERSET

  9. Key Generator Process • Get a 64-bit key from the user. • Perform PC-1 permutation on the 64-bit key. (The parity bits are discarded, reducing the key to 56 bits. Bit 1 (the most significant bit) of the permuted block is bit 57 of the original key, bit 2 is bit 49, and so on with bit 56 being bit 4 of the original key.) ( 56 bits ). • Split the permuted key into two halves. CIPHERSET

  10. Key Generator Process ( Cont’d ) • Perform one or two circular left shifts on both halves. Iteration # 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16Left Shifts 1 1 2 2 2 2 2 2 1 2 2 2 2 2 2 1 • Perform PC-2 permutation on the shifted key bits. ( 48 bits ) • Repeat all these processes until K[16] has been calculated. CIPHERSET

  11. 64-bit Data Block Process • Get a 64-bit data block. • Perform the initial permutation on the data block. • Split the block into two halves. The first 32 bits are called Left[0], and the last 32 bits are called Right[0]. • Expand the 32-bit Right[i-1] into 48 bits according to the bit-selection function below. CIPHERSET

  12. 64-bit Data Block Process ( Cont’d ) • Exclusive-or E(R[i-1]) with K[i]. • Break E(R[i-1]) xor K[i] into eight 6-bit blocks. Bits 1-6 are B[1], bits 7-12 are B[2], and so on with bits 43-48 being B[8]. • Substitute the values found in the S-boxes for all B[j]. Start with j = 1. All values in the S-boxes should be considered 4 bits wide. • Take the 1st and 6th bits of B[j] together as a 2-bit value (call it m) indicating the row in S[j] to look in for the substitution. CIPHERSET

  13. 64-bit Data Block Process ( Cont’d ) • Take the 2nd through 5th bits of B[j] together as a 4-bit value (call it n) indicating the column in S[j] to find the substitution. • Replace B[j] with S[j][m][n]. • Repeat these processes until all 8 blocks have been replaced. • Permute the concatenation of B[1] through B[8] with Permutation P. CIPHERSET

  14. 64-bit Data Block Process ( Cont’d ) • Exclusive-or the resulting value with L[i-1]. • L[i] = R[i-1]. • Loop back to 4.1 until K[16] has been applied. • Perform the final permutation on the block R[16]L[16]. CIPHERSET

  15. DES ( Cont’d ) • Decryption To decrypt, use the same process, but just use the keys K[i] in reverse order. That is, instead of applying K[1] for the first iteration, apply K[16], and then K[15] for the second, on down to K[1]. CIPHERSET

  16. AES ( Advance Encryption Standart ) • The input and output for the AES algorithm each consist of sequences of 128 bits (digits with values of 0 or 1). • The Cipher Key for the AES algorithm is a sequence of 128, 192 or 256 bits. Other input, output and Cipher Key lengths are not permitted by this standard. CIPHERSET

  17. AES ( Cont’d ) CIPHERSET

  18. AES ( Cont’d ) • At the start of the Cipher, the input is copied to the State array using the some conventions. After an initial Round Key addition, the State array is transformed by implementing a round function 10, 12, or 14 times (depending on the key length), with the final round differing slightly from the first Nr-1 rounds. The final State is then copied to the output . CIPHERSET

  19. AES ( Cont’d ) CIPHERSET

  20. AES ( Cont’d ) • AES has four main processes : • SubBytes • ShiftRows • MixColumns • AddRoundKey CIPHERSET

  21. SubBytes • The SubBytes() transformation is a non-linear byte substitution that operates independently on each byte of the State using a substitution table (S-box). CIPHERSET

  22. SubBytes ( Cont’d ) • For example, if S1 , 1 {53}, then the substitution value would be determined by the intersection of the row with index ‘5’ and the column with index ‘3’ in the table. This would result in S1 , 1 having a value of {ed}. CIPHERSET

  23. ShiftRows • In the ShiftRows() transformation, the bytes in the last three rows of the State are cyclically shifted over different numbers of bytes (offsets). The first row, r = 0, is not shifted. CIPHERSET

  24. MixColumns • The MixColumns() transformation operates on the State column-by-column, treating each column as a four-term polynomial. CIPHERSET

  25. AddRoundKey • In the AddRoundKey() transformation, a Round Key is added to the State by a simple bitwise XOR operation. Each Round Key consists of Nb words from the key schedule CIPHERSET

  26. Key Expansion • The AES algorithm takes the Cipher Key, K, and performs a Key Expansion routine to generate a key schedule. The Key Expansion generates a total of Nb (Nr + 1) words: the algorithm requires an initial set of Nb words, and each of the Nr rounds requires Nb words of key data. CIPHERSET

  27. Key Expansion ( Cont’d ) CIPHERSET

  28. Project Overview Clean Text Encrypted / Decrypted Text Set Algorithm Set KEY Encrypt / Decrypt CIPHERSET

  29. Project Overview • Object Oriented Structure • Modular • Easily Expandable CIPHERSET

  30. Project Overview CIPHERSET

  31. Project Overview • Command Packets: • 1-SetKey: keylength, key,Dir : pc -> kit • 2-ACK_SetKey:ACK for getting key. kit -> pc • 3-NACK_SetKey, NACK for getting key.kit -> pc • 4-SetAlgorithm: algorithmType , pc -> kit • 5-ACK_ SetAlgorithm ,kit -> pc • 6-NACK_ SetAlgorithm , kit -> pc CIPHERSET

  32. Project Overview • 7-Encrypt : datalen, data . pc -> kit • 8-ACK_ Encrypt, kit -> pc • 9-NACK_ Encrypt,kit -> pc • 10-Decrypt: datalen, data. pc -> kit • 11-ACK_Decrypt kit -> pc • 12-NACK_Decrypt kit -> pc • 13-GetEncryptedData : encrypteddatalen, encrypteddata. kit -> pc • 14-ACK_ GetEncryptedData, pc -> kit • 15-NACK_ GetEncryptedData, pc -> kit CIPHERSET

  33. Project Overview • 16-GetDecryptedData: decrypteddatalen, decrypteddata kit -> pc • 17-ACK_GetDecryptedData pc -> kit • 18-NACK_GetDecryptedData pc -> kit • 19-Rescyn, pc -> kit • 20- ACK_Rescyn kit -> pc • 21- Error: error code, kit -> pc , pc -> kit CIPHERSET

  34. Data Structure DELIMETER ( 0x30)(0x30) COMMAND DELIMETER ( 0x30)(0x30) CIPHERSET

  35. Data Structure • Command Packets Structure • For all command types: • 1- Command type (1 byte) • 2- Length (2 byte) Total length of packet • 3- Special area for commands ( n bytes ) • Special areas for special commands: • 1-SetKey: • 1 byte keylength, • keylength bytes key. • 2-SetAlgorithm: • 1 byte algorithm type. CIPHERSET

  36. Data Structure • 3-Encrypt • 2 byte datalen, • 2 byte sequence number • datalen bytes data • 4-Decrypt • 2 byte datalen, • 2 byte sequence number • datalen bytes data • 5-GetEncryptedData : • 2 byte encrypteddatalen, • 2 byte sequence number • encrypteddatalen bytes encrypteddata CIPHERSET

  37. Data Structure • 6-GetDecryptedData: • 2 byte decrypteddatalen, • 2 byte sequence number • decrypteddatalen bytes decrypteddata • 7-Rescyn, • No special area • 8-Error • 4 byte errorcode CIPHERSET

  38. Hardware – MCF5282 • MCF5282 Integrated ColdFire Version 2 Microcontroller • The MCF5282 is the first microcontroller based on Freescale Semiconductor's 32-bit ColdFire core integrated with Ethernet, Flash and CAN. This device offers advanced communications features, a rich peripheral set and a variety of supporting software and development tools. CIPHERSET

  39. Hardware – MCF5282 • V2 ColdFire core delivering 76 (Dhrystone 2.1) MIPS at 80 MHz running from Cache/RAM  (max running from internal flash 66 MIPS) • 512KB embedded flash memory • 64 Kbytes of static RAM • 10/100 Ethernet MAC • Cache for external access support • Address decode and chip selects • CAN 2.0B controller area network interface with 16 message buffers • Three UARTs with DMA capability • 8-channel 10-bit queued analog-to-digital converter (QADC) • Four 32-bit timers with capture, compare and DMA capability • Eight 16-bit timer channels for capture, compare, and pulse width modulation • Four periodic interrupt timers (PITs) • I2C bus controller CIPHERSET

  40. PROJECT IMPLEMENTATION CIPHERSET

  41. THANK YOU FOR YOUR PATIENCE... CIPHERSET

More Related