Skip to content

amanag7/EvidenceManagement-frontend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Evidence Management System

Evidence Management System based on Hyperledger Sawtooth using IPFS with PBFT or PoET Consensus mechanism.

Note: This repository consist only the code for the Evidence Management System's React web client.

Check out the Transaction Processor code and Full Documentation here

arch

Signing

Module: src/services/signing.js

Sawtooth use Secp256k1 for signing.

Useful APIs:

Signatures form the basis for verifiable identity and correctness on most, if not all, blockchains. First, a private key is generated; it's basically just a random set of bytes. This key is kept secret. Next, a cryptographic algorithm uses these bytes to derive a public key which can be widely shared. Finally, a signature is generated by combining the private key with some message. This signature, the message, and the public key are then all distributed together.

private key             message    private key
    |                         \     /
    v                          v   v
public key                   signature

While others won't ever be able to deduce the original private key, they will be able to confirm that the public key and signature came from the same private key and that the message was not altered. Not even a single byte. This powerful cryptographic tool is fundamental to how blockchains work.

public key -
             \
 signature - - - > ???
             /
   message -

A simple signing API is built using Secp256k1, a common cryptographic algorithm used by Bitcoin, Ethereum, and Hyperledger Sawtooth. It will be relying on the library secp256k1-node.

Note that this library uses Node Buffers (basically raw bytes) as the format of choice for keys and signatures. One of the things to do is to convert these bytes to and from hex strings. Make sure you are familiar with Buffer's from and toString methods.

Web flow

To be added soon

Screenshots

Login Page

Register Page

Generated Keys

Create Evidence Page

List of Evidences Page

Environment Variables

In .env file

REACT_APP_REST_API_URL = "http://localhost:4000" # Sawtooth's Rest Api Proxy 
REACT_APP_FAMILY_NAME = "evidence_management_system" # Transaction Processor Family Name
REACT_APP_FAMILY_VERSION = "0.0" # Transaction Processor Family Version
REACT_APP_EMS_KEYS = "emsKeys" # Local Stroge Key Name
REACT_APP_IPFS_GATEWAY = "https://ipfs.infura.io:5001/"
REACT_APP_IPFS_BASE_URL = "https://ipfs.io/ipfs/"

Folder Structure

EvidenceManagement-frontend/
    ├── README.md
    ├── node_modules/
    ├── public/
    ├── img/
    └── src/
        ├── components/
        ├── pages/
        ├── services/
        ├── App.js
        └── index.js

Local development

Requirements and dependencies:

Installation:

  1. Clone the repository
git clone https://github.com/amanag7/EvidenceManagement-frontend.git
  1. Change Directory
cd EvidenceManagement-frontend
  1. npm install
npm i
  1. Edit .env file according to your environment

  2. Run the application

npm start
  1. Building the application
npm run build:prod

License

MIT

About

Frontend for the application of Blockchain in an Evidence Management System.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •