Giter Site home page Giter Site logo

encrypt-decrypt-gozintachains's Introduction

Encrypt-Decrypt-GozintaChains

Using Gozinta chains to generate a new password encoding algorithm for a typical unix text file.

PROBLEM STATEMENT

A gozinta chain for n is a sequence {1,a,b,...,n} where each element properly divides the next. There are eight gozinta chains for 12: {1,12} ,{1,2,12}, {1,2,4,12}, {1,2,6,12}, {1,3,12}, {1,3,6,12}, {1,4,12} and {1,6,12}. Let g(n) be the number of gozinta chains for n, so g(12)=8. g(48)=48 and g(120)=132. Use these chains to generate a new password encoding algorithm for a typical unix text file.

MODEL

1.Usage: $ make -f makefile
                $./encoder file-name key 0(encryption)/1(decryption)\n

2.The key can be alphanumeric.

3.The input file must contain only alphanumeric characters and space. [a-zA-z0-9 ]

4.During the encryption, for a given input file the encrypted contents are stored in a file called encrypt.txt

5.For decryption pass the encrypt.txt file along with the key, the decrypted content is displayed on the terminal.

APPROACH

CIPHER SYSTEM DETAILS

1.Key : A alphanumeric key
2.Cipher Generation: 
	Generate the first longest Gozinta chain based upon the ascii values of each character in the given Key, combine the chains to form the Shift Key. The Shift Key is wrapped around the text, the corresponding text character value and the key value is added and after the mod operation the value of the output cipher character is determined.
3.Deciphering:
	Given the Key as input, the shift key is calculated. From the value of the corresponding text character , the key value is subtracted and after the mod operation the input text value is retrieved.

CIPHER SYSTEM OUTCOME

Upon calling the encrypt function with the input text file and the key,  based on the cipher generation, a encrypt.txt file is generated where in the input text file contents are encrypted and stored.
Upon calling the decrypt function with the key and encrypt.txt file, the Deciphering process is carried out and the result is displayed on the terminal.
If the key provided is the original key then the original contents are retrieved accurately
If the key provided is not the original key, the output will contain garbled text. 

Contributors

  1. Deepika
  2. Gunashree

encrypt-decrypt-gozintachains's People

Contributors

deep-j avatar gunashree-r-v avatar

Watchers

James Cloos avatar

Forkers

gunashree-r-v

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.