project screenshot 1
project screenshot 2
project screenshot 3

File Verifier

Verify the integrity of your files with Polygon File Verifier. Import file and get its hash. Choose to store the hash in the blockchain or verify if it has been stored before with its address of origin. Ensure your downloads are exactly what they pretend to be!

File Verifier

Created At

Road to Web3

Winner of

trophy

🏊 Polygon Pool Prize

Project Description

A lightweight dapp with the purpose of verifying files and ensuring you have the correct ones with the usage of SHA256 algorithm.

SHA256 hash is calculated of an imported file. Then you have the option of:

  1. insert the hash in the blockchain with your address as the origin.
  2. get an address of origin of an imported file.
  3. verify if the hash of your file matches the address of origin you enter (or get from usecase 2).

Stored information in the blockchain are address of origin and block number which can be displayed in the application. We thought blockchain is a perfect storage for such important information as a file integrity hash, because it's there forever unchanged.

This way, you can ensure the files you download or find are the right ones you expect, if you can get a published address/hash from the original developer.

Use cases:

  1. you find a random flash drive and connect it to your PC (which you shouldn't anyway). Eventually you find there some files, among them an installer of an application you suddenly might have the need to use! Then you can check if the installer has been recorded in the blockchain by the developer.
  2. developers of freeware often publish their file hashes online. You can easily check if your downloaded file is the same.
  3. you can also just get a SHA256 hash with no blockchain interaction if ever you need.

Please note: this project is made by junior developers of Dobby Labs www.dobbylabs.com We are yet unsure if we want to expand on this project but we would be open to cooperation and we would love to hear from you! If you are interested in cooperation of any kind you can find the contact at our website.

How it's Made

We are using npm packages for the frontend with lite-server for local deploy. Contract is written in solidity and deployed on Polygon Mumbai Testnet https://github.com/Simecekk/fileOriginValidator with hardhat.

Considering contract, we chose SHA256 as the hash to save because it fits into bytes32 solidity value types perfectly and there is a minimal chance of collisions with this type of hash. Frontend is interacting with blockchain with ethersjs library. Bootstrap serves as the styling skeleton for our project. Metamask wallet is integrated via Ethereum Provider API. SHA256 hashes of files are generated with Crypto.subtle. One person took the responsibility of building the contract and its deployment. Next developer initiated the project frontend and made a simple application which allows for connecting metamask wallet, meanwhile the third dev started working on the hashing using javascript libraries.

Then we grouped the tasks together and continued building the whole project, by expanding Metamask functionality, visuals and frontend logic. For graphics we are using royalty free images and icons as we do not have a dedicated designer in our team. Not only exclusive to, possible expansions are: adding a backend where we store information about file searches, like counters of how many times each file were searched. Perhaps even some hosting of the files themselves to store them. Adding more wallets support and expand hash algorithms (including contract itself). IPFS could also be included in our project. This project is just the rough MVP from which a more powerful verifying tool could be built upon.

background image mobile

Join the mailing list

Get the latest news and updates