Summary of the invention
The characteristic that the present invention is stored for electronic evidence centralization in the prior art, easily distorted, provided herein is one kind to be based on
The electronic evidence of block chain intelligence contract deposits card method, realizes that the cochain of electronic evidence Hash stores by intelligent contract, according to
Contract limits the permission of different identity, realizes access control, using the decentralization of block chain, the characteristics such as can not distort, protect
Hinder the integrality of electronic evidence, the property tested and can not tamper.
Technical scheme is as follows:
A kind of electronic evidence based on block chain intelligence contract deposits card method comprising following steps: on block chain top
Administration by it is event driven, with state, obtain recognize in many ways and can be according to the intelligence of preset condition automatic data processing
Contract, the intelligence contract have the function of to deposit card data upload function, deposit card data query, block chain address authorization function, downloading
It deposits card data function, upload analysis result function;
It deposits witness person and card is deposited by intelligent contract progress evidence, evidence hash value and library key are stored in block by intelligent contract
In chain;
Verification personnel pass through the inquiry that intelligent contract carries out evident information, return to evidence hash value, evidence hash value place
Details including block height;
Administrative staff pass through intelligent contract and authorize to researcher;
Researcher passes through intelligent contract and carries out the downloading of evidence and the upload of evidence analysis result;
Further, it is described deposit witness person evidence carried out by intelligent contract deposit card, intelligent contract by evidence hash value with
Library key is stored in block chain, is specifically included:
Step 1: deposit witness person by client real name registration generate identity-based block chain address, as deployment and
Call the block chain address of intelligent contract;
Step 2: it deposits witness person and logs in client, witness person's block chain address is deposited in load, and card data and evidence library are deposited in upload
Key, server-side will deposit card data and be stored in third party database, and be generated using sha256 hash algorithm and deposit card data
Hash value;
Step 3: server-side will have upload, inquiry, downloading and authorization function by the block chain address for depositing witness person
Intelligent contract code is deployed on block chain, which only deposits the block chain address of witness person's block chain address and authorization
It can call.After intelligent contract deployment success, it stores evidence hash value and library key into block chain, while returning to client
Hold evidence hash value and evidence hash value ID;
Further, the verification personnel pass through the inquiry that intelligent contract carries out evident information, return to evidence hash value, card
According to the details including block height where hash value, specifically include:
Step 4: verification personnel generate the block chain address of identity-based by the registration of client real name, as calling intelligence
The block chain address of energy contract;
Step 5: verification personnel log in client, load verification personnel block chain address, input evidence hash value ID inquiry
Deposit card data details;
Step 6: server-side calls the query function of intelligent contract to return to client by verification personnel's block chain address
Details including block height where evidence hash value, evidence hash value, block height where evidence hash value is evidence
The position that hash value stores in block chain is seen for being presented to user, while inquiry log being recorded in block chain;
Further, the administrative staff pass through the authorization that intelligent contract carries out researcher, specifically include: step 7:
Administrative staff generate the block chain address of identity-based by the registration of client real name, as the block chain for calling intelligent contract
Location;
Step 8: administrative staff log in client, load administrative staff's block chain address, input evidence hash value ID and Shen
Please the investigation of evidence researcher's block chain address, authorized;
Step 9: server-side by administrative staff's block chain address call the authorization function of intelligent contract to researcher into
Row authorization, while au-thorization log being recorded in block chain.
Further, the researcher passes through the downloading that intelligent contract carries out evidence, specifically includes:
Step 10: researcher generates the block chain address of identity-based by the registration of client real name, as calling intelligence
The block chain address of energy contract;
Step 11: researcher logs in client, loads researcher's block chain address, inputs evidence hash value ID,
Extract library key;
Step 12: server-side calls the return library key function of intelligent contract by researcher's block chain address, returns
The library key of evidence hash value ID is returned, while library key log recording will be extracted into block chain;
Step 13: researcher inputs evidence hash value ID and library key in client, extracts complete in database
Data;
Step 14: server-side calls the permission arbitration functions of intelligent contract, judgement by researcher's block chain address
Whether the block chain address of researcher authorizes, and meets permission, returns to complete proof data, otherwise returns to permission error, simultaneously
Evidence log recording will be extracted into block chain;
Step 15: researcher carries out cryptographic Hash calculating by identical sha256 hash algorithm, to partial data, will
Calculated hash value is compared with the hash value in block chain, and if the same evidence is not tampered with, otherwise, proof data
It has distorted unavailable;
Further, the researcher, which logs in client upload evidence analysis result and deposits witness person, checks analysis knot
Fruit specifically includes:
Step 10 six: researcher logs in client, loads block chain address, uploads evidence analysis result.
Step 10 seven: server-side calls the upload evidence analysis result of intelligent contract by the block chain address of researcher
Function, will be in the analysis result write-in block chain to evidence;
Step 10 eight: it deposits witness person and logs in client, load block chain address, input evidence hash value ID again, check
Evidence analysis result;
Step 10 nine: server-side calls the inquiry evidence analysis result of intelligent contract by depositing the block chain address of witness person
Function returns to evidence analysis result to client.
It advantages of the present invention and has the beneficial effect that:
(1), the present invention is that the electronic evidence based on block chain deposits card method, and block chain is a kind of linked data structure,
Data block is arranged according to timestamps ordering.It is one kind based on current password theory guarantee it is non-distort, genuine point
Cloth account book.Specifically, block chain technology stores using linked data structure and verifies data.It is assisted using distributed node
Quotient's consistency algorithm i.e. common recognition algorithm generates and more new data.Data transmission and access peace are ensured using cryptographic algorithm theory
Entirely.Therefore, block chain has the characteristics that decentralization, can not distort, is traceable.The characteristics of using block chain, the present invention will be electric
Sub- evidence is stored in block chain, and the decentralization storage for realizing electronic evidence, provides electronics at the data integrity for ensureing electronic evidence
Evidence can be traced.
(2), the present invention is based on the intelligent contract of block chain, realize that entire electronic evidence deposits the core logic function of card method
Energy.Intelligent contract is operated on block chain, by it is event driven, with state, obtain recognize in many ways and being capable of basis
The program of preset condition automatic data processing.By intelligent contract, core logic functions execute automatically according to condition, not by the external world
It is transparent, reliable to ensure that electronic evidence deposits card process for condition interference.
(3), the present invention carries out the judgement of permission by intelligent contract, obtains researcher's ability downloading data of authorization,
Ensure the safety of electronic evidence.
(4), the present invention stores log information by block chain simultaneously, and all upload data check data, downloading number
According to the operation with upload analysis result, all it is recorded in block chain, realizes can not distorting for operation log.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, detailed
Carefully describe.Described embodiment is only a part of the embodiments of the present invention.
The technical solution that the present invention solves above-mentioned technical problem is:
User carries out authentication by client, and after authentication passes through, client generates the block chain of identity-based
Address, as the block chain address for calling and disposing intelligent contract.
As shown in Fig. 2, it is as follows to deposit the flow chart that witness person's login client deposit card by intelligent contract:
It deposits witness person and logs in client, witness person's block chain address is deposited in load, submits proof data and library key, server-side
Card data will be deposited and be stored in third party database, while generating the hash value for depositing card data.
Server-side is disposed on intelligent contract to block chain by depositing the block chain address of witness person, and intelligent contract is by evidence
In hash value and library key deposit block chain, while returning to client evidence hash value and evidence hash value ID.
As shown in figure 3, verification personnel login client is as follows by the flow chart that intelligent contract is investigated:
Verification personnel log in client, load verification personnel block chain address, and card number is deposited in input evidence hash value ID inquiry
According to details, server-side calls the query function of intelligent contract to return to client evidence hash by verification personnel's block chain address
Value, the details such as block height where evidence hash value, while inquiry log being recorded in block chain.
As shown in figure 4, administrative staff's login client is as follows by the flow chart that intelligent contract is authorized:
Administrative staff log in client, load administrative staff's block chain address, input evidence hash value ID and application investigation
Researcher's personnel's block chain address of evidence, is authorized.
Server-side calls the authorization function of intelligent contract to authorize to researcher by administrative staff's block chain address,
Au-thorization log is recorded in block chain simultaneously.
Evidence is extracted by intelligent contract and uploads analysis result as shown in figure 5, researcher logs in client
Flow chart is as follows:
Researcher logs in client, loads researcher's block chain address, inputs evidence hash value ID, library is close in advance
Key.Server-side calls the return library key function of intelligent contract by researcher's block chain address, returns to evidence hash value ID
Library key, while will extract library key log recording into block chain.Researcher inputs evidence hash value ID in client
And library key, extract the partial data in database;
Server-side calls the permission arbitration functions of intelligent contract by researcher's block chain address, judges researcher's
Whether block chain address authorizes, and meets permission, otherwise returned data returns to permission error, while will extract certificate log recording
Into block chain.
Researcher carries out cryptographic Hash calculating by identical sha256 hash algorithm, to partial data, will be calculated
Hash value is compared with the hash value in block chain, is if the same not tampered with.Otherwise, it is unavailable that card data are deposited.
Researcher uploads evidence analysis result by client.
Server-side calls the upload evidence analysis result function of intelligent contract by researcher's block chain address, will analyze
As a result it is written in block chain.
It deposits witness person and logs in client, witness person's block chain address is deposited in load, is inputted evidence hash value ID again, is checked card
According to analysis result.
Server-side calls the inquiry evidence analysis result function of intelligent contract by depositing witness person's block chain address, returns to card
According to analysis result to client.
The above embodiment is interpreted as being merely to illustrate the present invention rather than limit the scope of the invention.?
After the content for having read record of the invention, technical staff can be made various changes or modifications the present invention, these equivalent changes
Change and modification equally falls into the scope of the claims in the present invention.