Giter Club home page Giter Club logo

hill-cipher's Introduction

Program Details

General Implementation

  • Hill Cipher program is implemented using OOP, there are two crypter classes, one for text and one for audio. They inherit from the parent class hill_cipher.

  • Key matrix is generated automatically at the moment of creating crypter object, or you can pass certain key as a parameter. You can update the key any time you want.

  • Text crypter only works for Georgian text and audio crypter only for .wav files.

  • Methods of audio crypter updates files on its own, but text crypter just returns the modified text.

  • The program just uses inverse matrix to decrypt data, it doesn't solve the linear system.

For more detailed information see the comments in code!

Analysis

Accuracy

  • Text crypter is fully accurate, it decrypts the text including punctuation marks and result is exactly the same text as original one since it uses maximal certain modular range.
  • Audio crypter is not fully accurate, since it uses only specific modular range, while some numeric data of audio can be out of this modular range, so it is not possible to recover data completely with this implementation.

Time Efficiency

The Program performance is not the best, however it is fast enough to use in some certain cases, since generating the key matrix is the most inefficient task in my code, but it generates only once during the process and uses same matrix for the data at default. It is important that the time is linearly dependent on data size, because number of blocks are linearly dependent on data size and each block is multiplied by the same key only once. Thus, it needs asymptotically the same amount of time for bigger data as smaller one.

Storage Efficiency

The storage efficiency of the code is reasonable, and the memory requirements are generally influenced by the key size and the length of the input text. Efficiency for key is O(size^2) and for text it is O(length). Same happens for audio, because it needs linear storage efficiency for audio file, and it uses the matrix generated using the same method as for text

Conclusion

Pros and Cons

Pros:

  • Customizable alphabet mapping
  • High accuracy of Key generation and validation
  • Well-structured and readable using OOP and commenting

Cons:

  • Alphabet Mapping Limitation, only predefined characters
  • Decrypted audio is not fully the same as original
  • Limited Error Handling

Use Cases

In the real world, only hill cipher is not generally used. There are more advanced cryptographic techniques to encrypt data, However, generally, this code can be applied to many cases:

  • Safe communication in chats for text and voice messages by not letting unauthorised user to read this data.
  • Exam paper encryption can be a useful way to prevent leaking of the information about it.
  • Military communication involves also confidentiality. Transmitted messages must remain secure by encrypting.

hill-cipher's People

Contributors

gigagoriashvili avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.