1 / 22

Crypto Laboratory Winter 2007-2008

Crypto Laboratory Winter 2007-2008. Alexander Grechin and Zohar Rogel Under supervision of Zvika Berkovich. Development technology. C# language (VS 2005) and Microsoft .NET framework 2.0 Reflection technology Built-in graphics features Simple GUI generation. Purchased knowledge.

trella
Download Presentation

Crypto Laboratory Winter 2007-2008

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. Crypto LaboratoryWinter 2007-2008 Alexander Grechin and Zohar Rogel Under supervision of Zvika Berkovich

  2. Development technology • C# language (VS 2005) and Microsoft .NET framework 2.0 • Reflection technology • Built-in graphics features • Simple GUI generation

  3. Purchased knowledge • We’ve learned about some known ciphers and their history • Experienced in application development from the beginning to the end • Learned additional skills in C# programming language • We’ve learned more about built-in abilities of C# such as drag-drop feature and visual manipulation of simple graphics

  4. Introduction • The purpose of this project is to create the demonstration program which allows: • Encrypt and decrypt English texts • Break encrypted English texts • Build and execute strategy – a sequence of operations • Operation may be encryption, decryption or cracking of some message with specific cipher and parameters

  5. Introduction • The program contains a set of ciphers • 4 ciphers • User can add his own ciphers • User builds class that implements a defined interface • Received dll file copied to work directory

  6. Introduction • There are two logical parts in the project: • Build framework program that will supply the user a convenient way to work with ciphers • Develop several ciphers and attach them to the framework program

  7. Framework application • Allows the user to work with ciphers • There are two ways to use the application: • Working using graphic interface – GUI application • Working in command line – Console application • In both cases the single core is used

  8. GUI Application • Allows the user to: • Input and output texts • Get log messages • Execute single operation • Build and execute strategy • Examples

  9. Console Application • Allows the user building and execution of strategies only

  10. Combined working scenario • User builds strategy in GUI application • GUI application translates the strategy to the format of Console application • GUI application calls for command line • User continues working in command line • Example

  11. Core module • Serves both applications • GUI application • Console application

  12. Module diagram

  13. Cipher attaching • Each cipher implemented as independent module and implements ICipher interface • Core module looking for these modules in current directory • Using Reflection mechanism the Core instantiates the ciphers • Ciphers pointed through ICipher interface

  14. Ciphers • Some simple ciphers were chosen: • Shift cipher (Julius Caesar cipher) • Transposition cipher (Rail fence cipher) • Simple Substitution cipher • Poly-alphabetic cipher (Vigenère cipher)

  15. Julius Caesar cipher • Each letter in the plaintext is replaced by a letter at some fixed number of positions down the alphabet • For example, with a shift of 3: • A -> D • B -> E

  16. Rail fence cipher • The plaintext is written downwards on successive "rails" of an imaginary fence, then moving up when we get to the bottom. The message is then read off in rows.

  17. Rail fence cipher - example • Plaintext: transposition • Number of “rails” = 3 T S I N R N P S T O A O I • Cipher text: TSIN RNPSTO AOI

  18. Substitution cipher • Each letter in the plaintext is replaced by a letter in the substituted alphabet • Creating substituted alphabet: writing out a keyword, removing repeated letters • Writing all the remaining letters in the alphabet • The plaintext is encrypted using the substituted alphabet

  19. Substitution cipher - example • Keyword: “zebras” • Plaintext alphabet / Ciphertext alphabet : • abcdefghijklmnopqrstuvwxyz • ZEBRASCDFGHIJKLMNOPQTUVWXY • Message: • flee at once. we are discovered! • Encrypted message: • SIAA ZQ LKBA. VA ZOA RFPBLUAOAR!

  20. Vigenère cipher • Consists of several Caesar ciphers in sequence with different shift values • Creating substituted alphabet: using a Vigenère table – alphabet written out in 26 rows, each alphabet is shifted to the left by one letter • Writing out a keyword in a cyclic way, opposite to plaintext • Each letter is substituted according to the keyword and the table

  21. Vigenère cipher - example • Using Vigenère table (see below) and a keyword: • Plaintext: attackatdawn • Keyword: LEMONLEMONLE • Ciphertext: LXFOPVEFRNHR

  22. Summary • This project allowed us to purchase knowledge about: • Some ciphers encryption and decryption algorithms • Some ciphers auto-crack algorithms • Working with C# and .NET environment using VS 2005 • Stages of application development

More Related