tharox97
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # Certoshi - A Decentralized Certificate Issuance and Verification System powered by Ethereum Smart Contracts ![](https://i.imgur.com/fPlaUCp.jpg) You can view the DEMO of the application [here](https://youtu.be/ZZOoJguZkeY)!! 🚀 You are welcome to visit the live website connected to the Ethereum Rinkeby network at https://certoshi.vercel.app/ 😁 [Click here to view other screenshots of our application!](#Use-Cases) ## Documentation Contents - [Installation & Set Up](#Installation-&-Set-Up) - [Downloading repository](#Downloading-repository) - [Setting up Blockchain on Local Network](#Setting-up-Blockchain-on-Local-Network) - [Setting up Blockchain on Ethereum Rinkeby Test Network](#Setting-up-Blockchain-on-Ethereum-Rinkeby-Test-Network) - [Setting up Client Application](#Setting-up-Client-Application) - [Security & Testing](#Security--Testing) - [Smart Contracts Funtionality Testing](#Smart-Contracts-Funtionality-Testing) - [Smart Contracts Security Testing & Analysis](#Smart-Contracts-Security-Testing-Analysis) - [Use-Cases](#Use-Cases) - [Registering Institutes by Central Authority](#Use-Case-1-Registering-Institutes) - [Issuing Certificates by Institutes](#Use-Case-2-Issuing-Certificates) - [Issuing Certificates by Institutes](#Use-Case-2-Issuing-Certificates) - [Viewing Certificates by Employers/Public](#Use-Case-4-Viewing-Certificates) --- ## Installation & Set Up Node Version Used: 14.16.1 NPM Version Used: 6.14.12 Add metamask plugin to your supported browser (chrome) from [here](https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn?hl=en) and login Please follow the instructions below closely. As some packages are not well maintained, you may face some issues in installation. If you do face issues in installation, you may refer to [Debug.md](Debug.md) to view suggestions on how to debug. ### Downloading repository ```bash git clone https://github.com/thawalk/Certoshi.git cd Certoshi ``` ### Setting up Blockchain on Local Network There are two ways to set up local blockchain with Truffle Ganache, either with GUI or CLI. 1. Create a `.env` file Populate the following environment variables: ``` LOCAL_ENDPOINT=http://127.0.0.1:8545 NETWORK_ID=1337 ``` > The port number and network ID can be changed to your preference > An example `.env.example` file is created for reference. You can copy and paste the contents of the file and edit the variables. 2. Download Truffle Visit https://www.trufflesuite.com/truffle for more information ```bash npm install -g truffle ``` > Truffle helps us with deployment, testing, migration, etc. 3. Install node dependencies ```bash npm install ``` #### Option 1 - Using Ganache GUI 1. Download Ganache GUI Visit [Truffle Ganache](https://www.trufflesuite.com/ganache) to download the application 2. Create a ganache workspace & run ganache blockchain network Click on 'New Workspace' and under 'Add Project', select the `truffle-config.js` file in the Certoshi directory. This should create a new workspace project with the same truffle settings defined in the `truffle-config.js` file. ![](https://i.imgur.com/gnWVdrN.png) ![](https://i.imgur.com/hMZzFto.png) Once created with the workspace open, the local ganache blockchain network should be running on the defined port and network ID. > Note: This blockchain network will be running as long as the Ganache GUI Application is open with the workspace. 3. Deploy Smart Contracts Npm scripts has been included for ease of contract deployment. You may view the commands used under `package.json` for better understanding In the root directory of Certoshi ```bash truffle compile npm run deploy:local ``` #### Option 2 - Using Ganache CLI In your terminal/bash 1. Install Ganache CLI ```bash npm install -g ganache-cli ``` 2. Run Ganache blockchain network ```bash npm run ganache ``` In the root directory of Certoshi 3. Deploy Smart Contracts ```bash npm run deploy:local ``` ### Setting up Blockchain on Ethereum Rinkeby Test Network For our application, we will be running it on the Rinkeby test network, feel free to use other test networks like Ropsten, just change the settings accordingly. #### Getting ether on Rinkeby Before you are able to deploy the smart contracts, you will need some ether in your account first. Visit the [Rinkeby faucet](https://faucet.rinkeby.io/) and follow the instructions on the page to get some ether transferred to your account. #### Deploying Smart Contracts We will be using Infura to help us deploy easily on our development set up with truffle. Visit [Infura](https://infura.io/) to create an ethereum project. Click on settings and change the 'endpoints' to Rinkeby and copy the endpoint link for the environment variables below. For the mnemonic, use your metamask account mneumonic. ``` PROJECT_ENDPOINT=https://rinkeby.infura.io/v3/12345 MNEMONIC="<your account's mnemonic with the ether on rinkeby>" ``` Connect to the rinkeby test network in your metamask and then, deploy the smart contracts. ```bash npm run deploy:testnet ``` > Alternatively, may use [Ethereum's Remix](https://remix.ethereum.org/) for smart contract development and deployment as well, without using Infura. > Regardless, we will be using Infura on our client application as well, and will reuse this endpoint. ### Setting up Client Application The client application (which is built with [React.js](https://reactjs.org/)) is located under the `/client` folder in the directory. ```bash cd client ``` 1. Install dependencies ```bash npm install ``` 2. Create a `.env`file Populate the following environment variables: ``` REACT_APP_INFURA_PROJECT_ENDPOINT=https://rinkeby.infura.io/v3/12345 REACT_APP_LOCAL_ENDPOINT=http://127.0.0.1:8545 REACT_APP_NETWORK_ID=1337 ``` > The port number and network ID can be changed to your preference > Use the same Infura project endpoint with instructions given above > An example `.env.example` file is created for reference. You can copy and paste the contents of the file and edit the variables. 3. Start application ### Option 1 - To connect to local blockchain network ```bash npm start ``` To use the front-end application running at http://localhost:3000/, connect to the Localhost Network in metamask ![](https://i.imgur.com/pjkb80e.png) Import in the account that you used to deploy the contracts using the private key of the account, you can find it in the key symbol of the Ganache UI beside your account. ![](https://i.imgur.com/f090jmt.png) ### Option 2 - To connect to Rinkeby test network ```bash npm run start:testnet ``` To use the front-end application running at http://localhost:3000/, connect to the Rinkeby Test Network in metamask and use the account that you used to deploy the contracts. ![](https://i.imgur.com/m2W1PUI.png) > This will connect to the Rinkeby network with Infura, only for viewing of certificates. The other functions uses the Ethereum-based browsers (connected to Metamask wallets) to access the network. --- ## Security & Testing ### Smart Contracts Funtionality Testing This will run the testing files with the test cases defined the files, located under `/test` folder Make sure the local ganache blockchain network is running first before testing. Testing will be done on the local network. ```bash truffle test ``` > If these test cases pass, you are good. If not, please double check the local blockchain network is set up correctly (especially the Port number and network ID) ### Smart Contracts Security Testing & Analysis We are using Mythrill to conduct security analysis of our Smart Contracts - `Institutions.sol` and `Certification.sol`. This will be run on Docker images, so make sure you have [Docker](https://www.docker.com/) on your machine. ```bash # Set up docker pull mythril/myth docker run mythril/myth --help docker run mythril/myth disassemble -c "0x6060" # Mounting and Running analysis on Smart Contracts docker run -v %(cd)%:/contracts mythril/myth analyze /contracts/Institutions.sol docker run -v %(cd)%:/contracts mythril/myth analyze /contracts/Certification.sol ``` > Refer to the [Mythrill documentation](https://mythril-classic.readthedocs.io/en/master/installation.html) if you need instructions running on other OS --- ## Use-Cases You are welcome to visit the live website connected to the Ethereum Rinkeby network at https://certoshi.vercel.app/ 😁 There are **4 main Use Cases**: [1. **Registering Institutes** by Central Authority](#Use-Case-1-Registering-Institutes) [2. **Issuing Certificates** by Institutes](#Use-Case-2-Issuing-Certificates) [3. **Revoking Certificates** by Institutes](#Use-Case-3-Revoking-Certificates) [4. **Viewing Certificates** by Employers/Public](#Use-Case-4-Viewing-Certificates) > For Use Cases 1 to 3, [Metamask](https://metamask.io/) extension is needed to connect to the Ethereum Rinkeby network, as well as the required authorizations. > Use Case 4 can be accessed by anyone on any browser 🔽 Here are some additional screenshots of our application to view how it works! ### Use Case 1: Registering Institutes Interface to Register an Institute ![](https://i.imgur.com/gwi9dId.jpg) Confirmation on Registering an Institute ![](https://i.imgur.com/VtmqS1F.jpg) Success on Registering an Institute ![](https://i.imgur.com/BadkZi8.jpg) Unauthorized Access to page for Registering Institutes ![](https://i.imgur.com/ZZ9wwSP.jpg) ### Use Case 2: Issuing Certificates Interface to Issue a Certificate ![](https://i.imgur.com/ohcU6oD.jpg) Success on Issuing a Certificate ![](https://i.imgur.com/FurGKID.jpg) Unauthorized Access to page for Issuing Certificates ![](https://i.imgur.com/b8IVIrq.jpg) ### Use Case 3: Revoking Certificates Interface to Revoke a Certificate ![](https://i.imgur.com/WiUwAWb.jpg) Success on Revoking a Certificate ![](https://i.imgur.com/0CF7wpF.jpg) Certificate before it is revoked ![](https://i.imgur.com/v4zTt0y.jpg) Certificate after it is revoked ![](https://i.imgur.com/Zd6kJfG.jpg) ### Use Case 4: Viewing Certificates Interface to enter Certificate ID to view Certificate ![](https://i.imgur.com/AVGQBPd.jpg) Example of Verified Certificate ![](https://i.imgur.com/SUXWxyU.jpg) Additional Information of a Verified Certificate ![](https://i.imgur.com/ipSe2CW.jpg) Example of a Revoked Certificate ![](https://i.imgur.com/2EJgWQu.jpg) Additional Information of a Revoked Certificate ![](https://i.imgur.com/y8RY03L.jpg) Accessing an Invalid Certificate ![](https://i.imgur.com/iY61dQZ.jpg) ### Others Accessing Use Cases 1 to 3 on a normal browser without Metamask ![](https://i.imgur.com/imSzQpj.jpg) --- ## Team Members - [Tharun Adhi Narayan](https://github.com/thawalk) - [Wong Ye Qi Daryll](https://github.com/daryllman) - [Akmal Hakim Teo](https://github.com/Akmalhakimteo)

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully