Giter Site home page Giter Site logo

hritish42 / tsha Goto Github PK

View Code? Open in Web Editor NEW
8.0 1.0 1.0 2.32 MB

I've Proposed a method to verify fake documents using cryptography techniques, designed and modified original SHA-1 algorithm to make it collision free and harder to Brute Force.๐Ÿ

Python 66.71% HTML 14.74% CSS 9.36% PHP 9.19%
t-sha cryptography crypto security hash algorithm sha1

tsha's Introduction

Totally Secure Hashing Algorithm (T-SHA)

forthebadge made-with-python forthebadge TSHA MIT license

Link to code

Generic badge Generic badge

๐Ÿค” What is this?

  • Doctoring of documents has been quite common these days.
  • Proposed a method to verify fake documents
  • Designed and modified the SHA-1 algorithm.
  • Collision-free and harder to Brute Force .

T-SHA features:-

  • Collision resistance
  • Immpossible to Bruteforce
  • Complex algorithm

It uses:

  • Fiestal Ciphers,
  • XOR,
  • OR
  • AND operations ,
  • Circularshifting ,
  • Padding and a-lot of things.
  • 160 Rounds. (Changeable)

One round compromises of ...

Cryptographic functions designed to keep data secured. It works by transforming the data using a hash function: an algorithm that consists of bitwise operations, modular additions, and compression functions. The hash function then produces a fixed-size string that looks totally different from the original. These algorithms are designed to be one-way functions, meaning that once theyโ€™re transformed into their respective hash values, itโ€™s virtually impossible to transform them back into the original data. There are a total of 160 rounds in TSHA.

ScreenShot1

A common application of TSHA is to encrypting passwords, as the server-side only needs to keep track of a specific userโ€™s hash value, rather than the actual password. This is helpful in case an attacker hacks the database, as they will only find the hashed functions and not the actual passwords, so if they were to input the hashed value as a password, the hash function will convert it into another string and subsequently deny access. An arbitrary constant of any length is given as input. The MSG is passed to SHA1 which gives an output of 160 bits or convert it to 160 bits in the hexadecimal form which is then converted to the binary form of 160 bits.

It is then divided into two parts left and right of 80 bits each. The left 80 bit is passed to sha1 twice and converted to 160 bits and is circular shifted 5 bits. This is divided into two 80 bits of named a1 and x1. The right part is passed to sha1 twice and is circularly shifted by 9 bits and passed thrice through sha1. This is divided into two 80 bits of named a2 and x2.

x1 and x2 are passed through and function which gives an output k1. a1 and a2 is passed through and function which gives an output k2. K1 and k2 are appended together. the given output will go through the same procedure 160 times and the final output will become our hash.

Screenshots

ScreenShot4 ScreenShot5

Method to verify documents:

  • Upload the file on the cloud
  • Get it signed
  • Share the link!

ScreenShot2

In the above scenario, A Organization (university) will register with cloud services and upload the original certification of a person.

We will sign a hash using TSHA and store it on our cloud. ScreenShot3 Now, if the same person applies for a job at a company. Then the company can come to our website and verify the document by uploading the same document that person provided them or can directly verify the document stored in our cloud.

How to use the algorithm and verify for collosion?

I've made a web application for demonstration of the TSHA , Implemented conversion of text to hash and file signing & verifying Functions. The web application can be found in my repository.

Requirements

  • For checking collosion you need to have heavy computation power.
  • For using the TSHA all you need is python3 installed.
 sudo apt-get install python3.6

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. Please make sure to update tests as appropriate.

License

MIT

tsha's People

Contributors

hritish42 avatar

Stargazers

 avatar  avatar Shamik avatar Rohan Paul avatar Jahnavi Mishra avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

hritishk

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.