WO2020108114A1 - 基于区块链的数据存证方法及装置、电子设备 - Google Patents

基于区块链的数据存证方法及装置、电子设备 Download PDF

Info

Publication number
WO2020108114A1
WO2020108114A1 PCT/CN2019/110650 CN2019110650W WO2020108114A1 WO 2020108114 A1 WO2020108114 A1 WO 2020108114A1 CN 2019110650 W CN2019110650 W CN 2019110650W WO 2020108114 A1 WO2020108114 A1 WO 2020108114A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
computing environment
secure computing
pluggable
blockchain
Prior art date
Application number
PCT/CN2019/110650
Other languages
English (en)
French (fr)
Inventor
郑坤坤
翁欣雨
王林青
蒋海滔
张鸿
李富强
Original Assignee
阿里巴巴集团控股有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 阿里巴巴集团控股有限公司 filed Critical 阿里巴巴集团控股有限公司
Publication of WO2020108114A1 publication Critical patent/WO2020108114A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3829Payment protocols; Details thereof insuring higher security of transaction involving key management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures

Definitions

  • One or more embodiments of this specification relate to the field of blockchain technology, and in particular to a blockchain-based data certification method and device, and electronic equipment.
  • Blockchain technology also known as distributed ledger technology, is an emerging technology in which several computing devices jointly participate in "bookkeeping" and jointly maintain a complete distributed database.
  • Blockchain technology has the characteristics of decentralization, openness and transparency, each computing device can participate in database records, and data synchronization can be quickly performed between computing devices. To apply.
  • This specification proposes a blockchain-based data certification method, which is applied to pluggable devices that are docked with terminal devices; where the pluggable devices are equipped with a secure computing environment; A private key corresponding to the pluggable device; the method includes:
  • obtaining a data summary of the target data collected by the terminal device includes:
  • signing the data digest based on the private key corresponding to the pluggable device in the secure computing environment includes:
  • the data digest is signed based on the private key corresponding to the pluggable device in the secure computing environment.
  • a key generation algorithm is stored in the secure computing environment
  • the method also includes:
  • the generated private key is bound to the user's identity information, and the binding relationship is stored in the secure computing environment.
  • signing the data digest based on the private key corresponding to the pluggable device in the secure computing environment includes:
  • publishing the signed data summary to the blockchain includes:
  • the terminal device includes a law enforcement recorder or a driving recorder;
  • the target data includes one or a combination of video data, audio data, and image data.
  • the pluggable device is equipped with a USB interface; the pluggable device implements hardware docking with the terminal device through the USB interface.
  • the pluggable device is equipped with an SE secure computing chip; the secure computing environment is a secure computing environment built on the SE secure computing chip.
  • the pluggable device is equipped with an LED indicator; the method further includes:
  • This specification also proposes a blockchain-based data certification device, which is applied to a pluggable device docked with a terminal device; wherein, the pluggable device is equipped with a secure computing environment; the secure computing environment stores The private key corresponding to the pluggable device; the device includes:
  • An obtaining module obtaining a data summary of target data collected by the terminal device
  • a signature module to sign the data digest based on the private key corresponding to the pluggable device in the secure computing environment
  • the publishing module publishes the signed data digest to the blockchain, and the node device in the blockchain verifies the signature of the data digest based on the public key corresponding to the private key, and After the signature verification is passed, the data digest is stored in the blockchain for data certification.
  • the acquisition module :
  • the signature module :
  • the data digest is signed based on the private key corresponding to the pluggable device in the secure computing environment.
  • a key generation algorithm is stored in the secure computing environment
  • the device also includes:
  • An authentication module acquiring identity information input by a user of the pluggable device when using the pluggable device for the first time; performing identity authentication for the user based on the obtained identity information;
  • a generation module if the identity authentication for the user is passed, the key generation algorithm is called in the secure computing environment to generate the private key and the public key; and, the generated private key and the use The user's identity information is bound, and the binding relationship is stored in the secure computing environment.
  • the signature module :
  • the release module :
  • the terminal device includes a law enforcement recorder or a driving recorder;
  • the target data includes one or a combination of video data, audio data, and image data.
  • the pluggable device is equipped with a USB interface; the pluggable device implements hardware docking with the terminal device through the USB interface.
  • the pluggable device is equipped with an SE secure computing chip; the secure computing environment is a secure computing environment built on the SE secure computing chip.
  • the pluggable device is equipped with an LED indicator; the device further includes:
  • a control module that controls the LED indicator to remind the user of the working state of the pluggable device; wherein the working state includes the working state of performing calculations in the secure computing environment; and, in the secure computing environment The working status of the operation completed in.
  • This manual also proposes a pluggable device, including:
  • Memory for storing machine executable instructions
  • the pluggable device is docked with the terminal device; the pluggable device is equipped with a secure computing environment; the secure computing environment stores The private key corresponding to the pluggable device;
  • the pluggable device since the pluggable device is equipped with a secure computing environment, and the private key corresponding to the pluggable device is stored in the secure computing environment; therefore, by connecting the pluggable device with the terminal device Hardware docking, you can conveniently provide a secure computing environment for terminal devices; make pluggable devices can be used as general-purpose security hardware, and hardware docking with different terminal devices to provide a safe computing environment for different terminal devices; and, When the terminal device needs to deposit the collected data on the blockchain, it can use the stored private key to sign the data collected by the terminal device in the secure computing environment mounted on the pluggable device, and The signed data is released to the blockchain for data storage, so that the data stored on the blockchain can be prevented from being tampered with illegally during the propagation process, and the data security when storing the data on the blockchain is guaranteed;
  • FIG. 2 is a hardware structural diagram of a pluggable device provided by an exemplary embodiment
  • FIG. 4 is a schematic diagram of another pluggable device docking with a terminal device provided by an exemplary embodiment
  • FIG. 5 is a schematic structural diagram of an electronic device provided by an exemplary embodiment
  • FIG. 6 is a block diagram of a blockchain-based data certification device provided by an exemplary embodiment.
  • this specification proposes a technical solution that uses pluggable devices to build a secure computing environment for terminal devices to conveniently store the data collected by the terminal devices on the blockchain.
  • the safe computing environment is provided to the terminal equipment;
  • the SE (Secure Elements) secure computing chip can be mounted on the pluggable device to build a secure budget environment for the pluggable device, and store the private key corresponding to the pluggable device in the secure computing environment.
  • a general interface such as USB can be reserved on the terminal device, so that the pluggable device can access the terminal device through these general interfaces, realize hardware docking with the terminal device, and provide the completed secure computing environment to the terminal device.
  • the terminal device can calculate the data summary of the collected target data, and then send the calculated data summary to the pluggable device; or, the terminal device can directly send the collected target data to the pluggable device, which can be The plug-in device performs summary calculation locally to obtain a data summary of the target data.
  • the node device in the blockchain can obtain the public key corresponding to the pluggable device's private key, and then verify the signature of the data digest based on the public key; if After the signature is verified, the data digest can be stored in the blockchain for data certification.
  • the pluggable device since the pluggable device is equipped with a secure computing environment, and the private key corresponding to the pluggable device is stored in the secure computing environment; therefore, by connecting the pluggable device with the terminal device Hardware docking, you can conveniently provide a secure computing environment for terminal devices; make pluggable devices can be used as general-purpose security hardware, and hardware docking with different terminal devices to provide a safe computing environment for different terminal devices; and, When the terminal device needs to deposit the collected data on the blockchain, it can use the stored private key to sign the data collected by the terminal device in the secure computing environment mounted on the pluggable device, and The signed data is released to the blockchain for data storage, so that the data stored on the blockchain can be prevented from being tampered with illegally during the propagation process, and the data security when storing the data on the blockchain is guaranteed;
  • the terminal device can no longer need to deposit the original content of the collected data on the blockchain, but the original data collected
  • the data summary of the content is stored on the blockchain, so that the terminal device can serve as the hub of the physical world and the on-chain world, and it is more convenient to store the collected data on the blockchain for certification; and, for the acquisition of terminal equipment
  • the terminal device can submit the collected data as evidence to a third party, which can significantly improve the availability of the data collected by the terminal device.
  • FIG. 1 is a block chain-based data storage method provided by an embodiment of the present specification, which is applied to a pluggable device docked with a terminal device; wherein, the pluggable device is equipped with a secure computing Environment; the private key corresponding to the pluggable device is stored in the secure computing environment; the method performs the following steps:
  • Step 104 sign the data digest based on the private key corresponding to the pluggable device in the secure computing environment
  • the above-mentioned blockchain may specifically be a consortium chain consisting of a server of a third-party payment platform, a domestic bank server, an overseas bank server, and several user node devices as member devices.
  • the operator of the alliance chain can rely on the alliance chain to deploy online services such as cross-border transfer and asset transfer based on the alliance chain online.
  • the above terminal device may include any form of terminal device that can join the blockchain as a node device and deposit the collected data on the blockchain;
  • the terminal device may specifically include a law enforcement recorder or a driving recorder.
  • Law enforcement recorders or driving recorders can be added to the blockchain as nodes, and the collected streaming data such as video data and audio data can be stored on the blockchain for certification.
  • the above target data including any type of data collected by the terminal device, needs to be completed in the distributed database of the blockchain for data certification;
  • the above target data may specifically be stream data such as video data, audio data, and image data collected by terminal devices such as law enforcement recorders or driving recorders.
  • the pluggable device may specifically implement hardware docking with the terminal device through the hardware interface provided on the terminal device.
  • the specific way to build a secure computing environment in the hardware environment of the terminal device is not particularly limited in this specification.
  • the SE secure computing chip can be introduced into the hardware environment of the pluggable device, and the SE secure computing chip can be used to store and maintain the private key of the pluggable device to build a secure computing environment.
  • FIG. 2 is a hardware structural diagram of a pluggable device shown in this specification.
  • the above pluggable device may specifically include a housing, a PCB circuit board disposed inside the housing, a USB interface installed on the PCB circuit board, an SE security computing chip, and an LED indicator light.
  • the above SE secure computing chip is electrically connected to the USB interface, and is used to provide a secure computing environment for the pluggable device, and store and maintain the private key corresponding to the pluggable device.
  • USB interface is electrically connected to the above-mentioned SE security computing chip and is used for hardware docking with the terminal device;
  • a USB socket can be provided on the portable recording device, and a USB interface can be provided on the pluggable device.
  • the USB interface is inserted into the USB socket of the portable recording device to implement hardware docking with the portable recording device.
  • USB interface described in this specification refers to the end of the USB device as a USB slave; and the USB socket described in this specification refers to the end of the USB device as a USB host.
  • the above-mentioned pluggable device is executing in the above-mentioned secure computing environment The working state of the calculation; and in the above-mentioned secure computing environment, after the signature processing of the target data collected by the terminal device based on the private key stored in the secure budget environment is completed, it can be said that the pluggable device is in the secure computing environment The working status of the completed operation.
  • the above control logic may specifically be that the pluggable device can control the LED indicator to be on when the operation is performed in the secure computing environment provided by the SE secure computing chip Status, to indicate that the pluggable device is in the working state of "in operation”; and when the pluggable device completes the calculation in the secure computing environment provided by the SE secure computing chip, it can control the LED indicator to be off , To indicate that the pluggable device is in the working state of "end of operation".
  • a solution based on TEE can be adopted to build a secure computing environment for terminal devices.
  • TEE Trusted Execution Environment
  • the software environment of the existing hardware such as the existing main processing chip
  • the hardware environment of the pluggable device can be transformed (no need to introduce additional secure computing chips).
  • To build a trusted execution environment use the trusted execution environment to store and maintain the private keys of pluggable devices to build a secure computing environment.
  • a solution based on SE+TEE may be adopted to build a secure computing environment for terminal devices.
  • the SE secure computing chip can be used to store and maintain the private key of the pluggable device
  • the TEE can be used to provide a secure computing environment for the pluggable device.
  • the above pluggable device can be added as a node device to the blockchain (also called device on-chain), and the private key corresponding to the pluggable device is built for the pluggable device Storage and maintenance in a secure computing environment.
  • the private key corresponding to the pluggable device may specifically be a private key held by the pluggable device or a private key held by a user of the pluggable device.
  • the "private key corresponding to the pluggable device" described in this specification may be specifically generated by the device manufacturer of the pluggable device for the pluggable device at the device production stage and is generated by the pluggable device
  • the private key held by the pluggable device may also be a private key generated by the pluggable device for the user when the user uses the pluggable device, and held by the user personally.
  • the private key and the public key held by the pluggable device may be generated by the device manufacturer for the pluggable device at the device production stage, and the private key is written in advance by the device manufacturer Into the safe computing environment of the pluggable device for storage and maintenance.
  • the private key and public key held by the pluggable device are not related to the identity of the user of the pluggable device.
  • the same private key that the device manufacturer writes in the secure computing environment of the pluggable device by default can be shared.
  • the private key and public key generated by the pluggable device can be associated with the identity of the user of the pluggable device.
  • the pluggable device can be based on the identity information of different users.
  • the user generates a pair of private key and public key respectively, binds the generated private key with the identity information of each user, and then stores and maintains the binding relationship in a secure computing environment.
  • the manufacturer of the pluggable device may write the key generation algorithm into the secure computing environment of the pluggable device in advance.
  • the pluggable device may prompt the user to input identity information for identity authentication; wherein, the data type of the identity information entered by the user and the pluggable device are used.
  • the identity authentication method in this manual is not particularly limited in this specification; for example, a traditional authentication method such as entering a password or password may be used, or an authentication method such as fingerprint or face-based physiological characteristics may be used.
  • the pluggable device After the pluggable device obtains the identity information input by the user, it can determine whether the private key bound to the identity information is stored in the secure computing environment; if the private key bound to the identity information is not stored in the secure computing environment The key indicates that the user is a new user using the pluggable device for the first time. At this time, the terminal device can authenticate the user based on the obtained identity information; if the identity authentication for the user is passed, the user can insert The device can call the above-mentioned key generation algorithm in the above-mentioned secure computing environment to generate a pair of private and public keys, and bind the generated private key to the user's identity information, and then bind the binding relationship in the above-mentioned secure computing Storage and maintenance in the environment. In this specification, the user can use the terminal device to collect data, and in the secure computing environment on the pluggable device, sign the collected data based on the pluggable device's private key and publish it to the block Data certification is carried out on the chain.
  • the terminal device when storing the collected target data on the blockchain, the terminal device may only need to store the collected data locally, and summarize the data of the collected data on the blockchain It is only necessary to deposit the certificate on the Internet, and it is no longer necessary to deposit the original content of the collected data on the blockchain.
  • the terminal device can also follow the preset The time period of the streaming data is divided into pieces of way
  • the terminal device can take the video data every N minutes as a shard, calculate the data summary of the shard, and then deposit the data summary of the shard in the blockchain, and strictly Ensure the chronological order of the data summary of each shard stored on the blockchain to facilitate backtracking.
  • the pluggable device can obtain a data summary of the target data collected by the terminal device, and in a secure computing environment, based on The private key held by the plug-in device signs the data digest of the target data.
  • the data summary of the target data collected by the terminal device may be specifically calculated locally by the terminal device, or may be calculated locally by the pluggable device.
  • the terminal device can calculate the data summary of the target data locally when depositing the collected target data on the blockchain; for example, the data summary can be based on a specific
  • the hash algorithm calculates the hash value of the target data; then, the terminal device can send the calculated data summary of the target data to the dockable pluggable device; and the pluggable device can receive the terminal
  • the data summary of the target data sent by the device and the data summary of the received target data are signed in the secure computing environment based on the private key held by the pluggable device.
  • the private key stored and maintained in the secure computing environment of the pluggable device is generated by the device manufacturer for the pluggable device during the device production stage, the private key held by the pluggable device Key; in this case, you can introduce an identity authentication mechanism for users of pluggable devices, prompting the user to enter identity information for identity authentication; when the pluggable device obtains the identity information entered by the user, it can be based on The obtained identity information authenticates the user; if the identity authentication for the user is passed, the pluggable device can be in the secure computing environment based on the pluggable device stored and maintained in the secure computing environment Hold the private key and sign the data digest.
  • the private key stored and maintained in the secure computing environment of the pluggable device is a private key generated by the terminal device for the user and held by the user; at this time, in the secure computing environment The binding relationship between the user's identity information and the private key is stored and maintained in advance.
  • the pluggable device when it obtains the identity information input by the user, it can query the binding relationship maintained in the secure computing environment to determine whether the private information bound to the identity information is stored in the secure computing environment If the private key bound to the identity information is stored in the secure computing environment, the pluggable device can sign the data digest based on the queried private key in the secure computing environment.
  • the pluggable device may be based on the obtained identity information Perform identity authentication on the user, and after the identity authentication is passed, call the key generation algorithm stored in the secure computing environment to generate a private key and a public key for the user, and use the generated private key to perform a summary of the data Signature processing; and, bind the generated private key with the user's identity information, and then store and maintain the binding relationship in a secure computing environment.
  • the pluggable device when the pluggable device is in a secure computing environment, based on the private key stored in the secure computing environment, after signing the data summary of the target data collected by the terminal device, the signed data summary can be , To publish in the blockchain;
  • a blockchain transaction can be constructed based on the signed data digest, and the transaction can be broadcast and diffused to other node devices.
  • the signed data digest can be directly published in the blockchain by the pluggable device, or the plugged device can send the signed data digest to the terminal device, and then the terminal device in the blockchain To publish.
  • the consensus mechanism adopted by the blockchain described in this specification is not particularly limited in this specification. In practical applications, the operator of the blockchain can flexibly based on actual needs select.
  • the terminal device when the terminal device collects the target data, when depositing on the blockchain, it can also describe the target data and the data summary of the target data. And deposit certificates on the blockchain.
  • the data summary and the description information of the target data can be Carry out the overall signature; package the data summary and the description information of the target data as a whole; then, publish the signed data summary and the description data of the target data to the blockchain for data certification.
  • a blockchain transaction can be constructed based on the description data of the above target data and the signed data summary, and the transaction can be broadcast and diffused to other node devices.
  • the specific content contained in the description information of the above target data is not particularly limited in this specification, and in practical applications, it can cover any content related to the above target data;
  • the data collection time, collection location, and data-related objects are usually extremely important attributes of the data as evidence documents; therefore, in this specification, the description information of the above target data, Specifically, it may include a collection time, a collection location of the target data, and a combination of one or more of the objects related to the target data.
  • the target data collection time may specifically be the terminal authority interacts with the time authentication center when the target data is collected, and obtains the authoritative authorized time obtained from the time authentication center ( Timestamp).
  • the collection location of the target data may be an accurate collection location obtained by calling the positioning module (such as a GPS module) carried by the terminal device in real time when the terminal device collects the target data.
  • the object related to the above target data may be a related object manually input by a legal user of the terminal device after the terminal device collects the target data.
  • the description information of the video data may specifically include the authoritative authorized time and the collection obtained from the time certification center when the video data is collected.
  • the law enforcement recorder calls the precise collection location obtained by the positioning module in real time, and the vehicle information and driver information related to the video data input by the law enforcement officer.
  • the terminal device when the terminal device needs to deposit the collected data on the blockchain, it can use the stored private key to sign the data collected by the terminal device in the secure computing environment mounted on the pluggable device. And release the signed data to the blockchain for data storage, so as to avoid illegal tampering of the data stored on the blockchain during the propagation process, and to ensure data security when storing data on the blockchain;
  • a pluggable device can complete device chaining in advance, obtain a public-private key pair as an identity on the blockchain, and maintain and store the private key in a secure computing environment.
  • the user can insert the USB interface on the pluggable device into the USB socket of the terminal device and connect with the terminal.
  • the device realizes hardware docking and provides the secure computing environment of the pluggable device to the terminal device to quickly transform the terminal device into an already-on-chain device to complete the data certification on the blockchain.
  • the terminal device completes the data certification the user needs to deposit the data collected by other terminal devices on the blockchain, and can perform the same operation to perform hardware docking with the above pluggable device , To quickly transform the terminal device into a device already on the chain.
  • the terminal device can no longer need to deposit the original content of the collected data on the blockchain, but the original data collected
  • the data summary of the content is stored on the blockchain, so that the terminal device can serve as the hub of the physical world and the on-chain world, and it is more convenient to store the collected data on the blockchain for certification; and, for the acquisition of terminal equipment
  • the terminal device can submit the collected data as evidence to a third party, which can significantly improve the availability of the data collected by the terminal device.
  • the third-party institution when the user submits the flow data collected by the law enforcement recorder or driving recorder as evidence to a third-party institution (such as a judicial institution or an insurance company), the third-party institution only needs to recalculate the data summary of the obtained data, and The data summary of the data matches the data summary of the data stored on the blockchain, so that the legality of the obtained data can be conveniently verified, so that in this way, the law enforcement recorder or driving recorder can be significantly improved The high availability of the collected data as legal evidence files.
  • a third-party institution such as a judicial institution or an insurance company
  • this specification also provides an embodiment of a blockchain-based data storage device.
  • the embodiment of the blockchain-based data certification device of this specification can be applied to electronic devices.
  • the electronic device may be a pluggable device docked with a terminal device; the electronic device is equipped with a secure computing environment, and a private key corresponding to the electronic device is stored in the secure computing environment, and device embodiments may be It can be realized by software, or by hardware or a combination of hardware and software. Taking software implementation as an example, as a logical device, it is formed by reading the corresponding computer program instructions in the non-volatile memory into the memory through the processor of the electronic device where it is located.
  • FIG. 5 it is a hardware structure diagram of the electronic equipment where the blockchain-based data certification device is located in this specification, except for the processor, memory, network interface, and In addition to the non-volatile memory, the electronic device in which the apparatus is located in the embodiment generally may include other hardware according to the actual function of the electronic device, which will not be repeated here.
  • Fig. 6 is a block diagram of a blockchain-based data certification device shown in an exemplary embodiment of this specification.
  • the obtaining module 601 obtains a data summary of the target data collected by the terminal device
  • the publishing module 603 publishes the signed data digest to the blockchain to verify the signature of the data digest based on the public key corresponding to the private key by the node device in the blockchain After the signature verification is passed, the data digest is stored in the blockchain for data certification.
  • the signature module 602 the signature module 602:
  • the data digest is signed based on the private key corresponding to the pluggable device in the secure computing environment.
  • a key generation algorithm is stored in the secure computing environment
  • the device 60 also includes:
  • An authentication module 604 (not shown in FIG. 5), acquiring the identity information input by the user of the pluggable device when using the pluggable device for the first time; targeting the user based on the acquired identity information Identity verification;
  • the generation module 605 (not shown in FIG. 5), if the identity authentication for the user is passed, call the key generation algorithm in the secure computing environment to generate the private key and public key; and, will generate The private key is bound to the user's identity information, and the binding relationship is stored in the secure computing environment.
  • the signature module 602 the signature module 602:
  • the pluggable device is equipped with an SE secure computing chip; the secure computing environment is a secure computing environment built on the SE secure computing chip.
  • the pluggable device is equipped with an LED indicator; the device 60 further includes:
  • the control module 606 (not shown in FIG. 5) controls the LED indicator to remind the user of the working state of the pluggable device; wherein, the working state includes a working state in which operations are being performed in the secure computing environment ; And, the working state of completing the calculation in the safe computing environment.
  • the relevant parts can be referred to the description of the method embodiments.
  • the device embodiments described above are only schematic, wherein the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, may be located in One place, or can be distributed to multiple network modules. Some or all of the modules can be selected according to actual needs to achieve the objectives of the solution in this specification. Those of ordinary skill in the art can understand and implement without paying creative labor.
  • the system, device, module or module explained in the above embodiments may be implemented by a computer chip or entity, or by a product with a certain function.
  • a typical implementation device is a computer, and the specific form of the computer may be a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email sending and receiving device, and a game control Desk, tablet computer, wearable device, or any combination of these devices.
  • the pluggable device includes: a processor and a memory for storing machine-executable instructions; wherein, the processor and the memory are usually connected to each other through an internal bus.
  • the device may also include an external interface to be able to communicate with other devices or components.
  • the pluggable device is docked with the terminal device; the pluggable device is equipped with a secure computing environment; the secure computing environment stores The private key corresponding to the pluggable device;
  • the data digest is signed based on the private key corresponding to the pluggable device in the secure computing environment.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Accounting & Taxation (AREA)
  • Physics & Mathematics (AREA)
  • Finance (AREA)
  • General Business, Economics & Management (AREA)
  • Strategic Management (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Storage Device Security (AREA)

Abstract

公开一种基于区块链的数据存证方法,应用于与终端设备对接的可插拔设备;其中,所述可插拔设备搭载了安全运算环境;所述安全运算环境中存储了与所述可插拔设备对应的私钥;包括:获取所述终端设备采集到的目标数据的数据摘要;在所述安全运算环境中基于与所述可插拔设备对应的私钥对所述数据摘要进行签名;将签名后的所述数据摘要发布至所述区块链,以由区块链中的节点设备基于所述私钥对应的公钥对所述数据摘要的签名进行验证,并在所述签名验证通过后,将所述数据摘要在区块链中进行数据存证。

Description

基于区块链的数据存证方法及装置、电子设备 技术领域
本说明书一个或多个实施例涉及区块链技术领域,尤其涉及一种基于区块链的数据存证方法及装置、电子设备。
背景技术
区块链技术,也被称之为分布式账本技术,是一种由若干台计算设备共同参与“记账”,共同维护一份完整的分布式数据库的新兴技术。由于区块链技术具有去中心化、公开透明、每台计算设备可以参与数据库记录、并且各计算设备之间可以快速的进行数据同步的特性,使得区块链技术已在众多的领域中广泛的进行应用。
发明内容
本说明书提出一种基于区块链的数据存证方法,应用于与终端设备对接的可插拔设备;其中,所述可插拔设备搭载了安全运算环境;所述安全运算环境中存储了与所述可插拔设备对应的私钥;所述方法包括:
获取所述终端设备采集到的目标数据的数据摘要;
在所述安全运算环境中基于与所述可插拔设备对应的私钥对所述数据摘要进行签名;
将签名后的所述数据摘要发布至所述区块链,以由区块链中的节点设备基于所述私钥对应的公钥对所述数据摘要的签名进行验证,并在所述签名验证通过后,将所述数据摘要在区块链中进行数据存证。
可选的,获取所述终端设备采集到的目标数据的数据摘要,包括:
接收所述终端设备发送的由所述终端设备采集到的目标数据的数据摘要;或者,接收所述终端设备发送的由所述终端设备采集到的目标数据,并在本地计算所述目标数据进的数据摘要。
可选的,在所述安全运算环境中基于与所述可插拔设备对应的私钥对所述数据摘要进行签名,包括:
获取所述可插拔设备的使用用户输入的身份信息;
基于获取到的所述身份信息针对所述使用用户进行身份认证;
如果针对所述使用用户的身份认证通过,在所述安全运算环境中基于与所述可插拔设备对应的私钥对所述数据摘要进行签名。
可选的,所述安全运算环境中存储了密钥生成算法;
所述方法还包括:
获取所述可插拔设备的使用用户在首次使用所述可插拔设备时输入的身份信息;
基于获取到的所述身份信息针对所述使用用户进行身份认证;
如果针对所述使用用户的身份认证通过,在所述安全运算环境中调用所述密钥生成算法生成所述私钥以及公钥;以及,
将生成的所述私钥与所述使用用户的身份信息进行绑定,并将绑定关系在所述安全运算环境进行存储。
可选的,在所述安全运算环境中基于与所述可插拔设备对应的私钥对所述数据摘要进行签名,包括:
获取所述可插拔设备的使用用户输入的身份信息;
确定所述安全运算环境中是否存储了与所述身份信息绑定的私钥;
如果是,在所述安全运算环境中基于与所述身份信息绑定的私钥对所述数据摘要进行签名。
可选的,将签名后的所述数据摘要发布至所述区块链,包括:
将签名后的所述数据摘要发布至所述区块链;或者,将签名后的所述数据摘要发送至所述终端设备,以由所述终端设备将所述数据摘要发布至所述区块链。
可选的,所述终端设备包括执法记录仪或者行车记录仪;所述目标数据包括视频数据、音频数据、图像数据中的一种或者多种的组合。
可选的,所述可插拔设备搭载了USB接口;所述可插拔设备通过所述USB接口与所述终端设备实现硬件对接。
可选的,所述可插拔设备搭载了SE安全计算芯片;所述安全运算环境为基于所述SE安全计算芯片搭建的安全运算环境。
可选的,所述可插拔设备搭载了LED指示灯;所述方法还包括:
控制所述LED指示灯向用户提示所述可插拔设备的工作状态;其中,所述工作状态包括正在所述安全运算环境中执行运算的工作状态;以及,在所述安全运算环境中完成运算的工作状态。
本说明书还提出一种基于区块链的数据存证装置,应用于与终端设备对接的可插拔设备;其中,所述可插拔设备搭载了安全运算环境;所述安全运算环境中存储了与所述可插拔设备对应的私钥;所述装置包括:
获取模块,获取所述终端设备采集到的目标数据的数据摘要;
签名模块,在所述安全运算环境中基于与所述可插拔设备对应的私钥对所述数据摘要进行签名;
发布模块,将签名后的所述数据摘要发布至所述区块链,以由区块链中的节点设备基于所述私钥对应的公钥对所述数据摘要的签名进行验证,并在所述签名验证通过后,将所述数据摘要在区块链中进行数据存证。
可选的,所述获取模块:
接收所述终端设备发送的由所述终端设备采集到的目标数据的数据摘要;或者,接收所述终端设备发送的由所述终端设备采集到的目标数据,并在本地计算所述目标数据进的数据摘要。
可选的,所述签名模块:
获取所述可插拔设备的使用用户输入的身份信息;
基于获取到的所述身份信息针对所述使用用户进行身份认证;
如果针对所述使用用户的身份认证通过,在所述安全运算环境中基于与所述可插拔设备对应的私钥对所述数据摘要进行签名。
可选的,所述安全运算环境中存储了密钥生成算法;
所述装置还包括:
认证模块,获取所述可插拔设备的使用用户在首次使用所述可插拔设备时输入的身份信息;基于获取到的所述身份信息针对所述使用用户进行身份认证;
生成模块,如果针对所述使用用户的身份认证通过,在所述安全运算环境中调用 所述密钥生成算法生成所述私钥以及公钥;以及,将生成的所述私钥与所述使用用户的身份信息进行绑定,并将绑定关系在所述安全运算环境进行存储。
可选的,所述签名模块:
获取所述可插拔设备的使用用户输入的身份信息;
确定所述安全运算环境中是否存储了与所述身份信息绑定的私钥;
如果是,在所述安全运算环境中基于与所述身份信息绑定的私钥对所述数据摘要进行签名。
可选的,所述发布模块:
将签名后的所述数据摘要发布至所述区块链;或者,将签名后的所述数据摘要发送至所述终端设备,以由所述终端设备将所述数据摘要发布至所述区块链。
可选的,所述终端设备包括执法记录仪或者行车记录仪;所述目标数据包括视频数据、音频数据、图像数据中的一种或者多种的组合。
可选的,所述可插拔设备搭载了USB接口;所述可插拔设备通过所述USB接口与所述终端设备实现硬件对接。
可选的,所述可插拔设备搭载了SE安全计算芯片;所述安全运算环境为基于所述SE安全计算芯片搭建的安全运算环境。
可选的,所述可插拔设备搭载了LED指示灯;所述装置还包括:
控制模块,控制所述LED指示灯向用户提示所述可插拔设备的工作状态;其中,所述工作状态包括正在所述安全运算环境中执行运算的工作状态;以及,在所述安全运算环境中完成运算的工作状态。
本说明书还提出一种可插拔设备,包括:
处理器;
用于存储机器可执行指令的存储器;
其中,通过读取并执行所述存储器存储的与基于区块链的基于区块链的数据存证的控制逻辑对应的机器可执行指令,所述处理器被促使:
获取终端设备采集到的目标数据的数据摘要;其中,所述可插拔设备与所述终端设备对接;所述可插拔设备搭载了安全运算环境;所述安全运算环境中存储了与所述可 插拔设备对应的私钥;
在所述安全运算环境中基于与所述可插拔设备对应的私钥对所述数据摘要进行签名;
将签名后的所述数据摘要发布至所述区块链,以由区块链中的节点设备基于所述私钥对应的公钥对所述数据摘要的签名进行验证,并在所述签名验证通过后,将所述数据摘要在区块链中进行数据存证。
在以上技术方案中,一方面,由于可插拔设备搭载了安全运算环境,并且在该安全运算环境中存储了与可插拔设备对应的私钥;因此通过将可插拔设备与终端设备进行硬件对接,就可以便捷的为终端设备提供安全的运算环境;使得可插拔设备可以作为通用的安全硬件,与不同的终端设备进行硬件对接,为不同的终端设备提供安全的运算环境;而且,当终端设备需要将采集到的数据在区块链上进行存证时,可以在可插拔设备上搭载的安全运算环境中,利用存储的私钥对终端设备采集到的数据进行签名,并将签名后的数据发布至区块链进行数据存证,从而可以避免在区块链上存证的数据在传播过程中被非法篡改,保障在区块链上存证数据时的数据安全;
另一方面,通过对区块链上进行数据存证的流程进行改进,终端设备可以不再需要将采集到的数据的原始内容在区块链上存证,而是将采集到的数据的原始内容的数据摘要在区块链上存证,使得终端设备可以作为物理世界和链上世界的枢纽,更加便捷的将采集到的数据在区块链上进行存证;而且,对于获得终端设备采集到的数据的第三方而言,由于通过将获得的数据的数据摘要,与在区块链上存证的该数据的数据摘要进行匹配,就可以便捷的对获得的数据进行合法性验证;因此,使得终端设备可以将采集到的数据作为证据提交给第三方,可以显著的提升终端设备采集到的数据的可用性。
附图说明
图1是一示例性实施例提供的一种基于区块链的数据存证方法的流程图;
图2是一示例性实施例提供的一种可插拔设备的硬件结构图;
图3是一示例性实施例提供的一种可插拔设备与终端设备对接的示意图;
图4是一示例性实施例提供的另一种可插拔设备与终端设备对接的示意图;
图5是一示例性实施例提供的一种电子设备的结构示意图;
图6是一示例性实施例提供的一种基于区块链的数据存证装置的框图。
具体实施方式
由于在区块链存储的数据具有不可篡改的特性,因此将数据存储在区块链上来做数据存证,是业界目前的主流趋势。
然而,在实际应用中,对于一些流数据;比如,执法记录仪或者行车记录仪采集到的视频流、音频流等数据;由于其自身所需占用的存储空间较大,则通常无法直接存储到区块链上进行存证。
但在一些场景下,这类流数据却又存在着强烈的存证需求;比如,在司法存证的场景,对于执法记录仪或者行车记录仪采集到的视频流,可能会作为证据提交给司法部门。
由于缺乏数据认证手段,这类流数据作为证据的合法性,通常会存在广泛质疑。因此,对于这类流数据,最好的处理方式还是存储在区块链上进行数据局存证;同时,还需要能够更加便捷的验证这些存证的数据作为司法证据的合法性。
基于以上需求,本说明书提出一种利用可插拔设备为终端设备搭建安全运算环境,来便捷的将终端设备采集到的数据在区块链上进行存证的技术方案。
在实现时,可以预先在可插拔设备上搭建安全运算环境,在安全运算环境中存储与可插拔设备对应的私钥,并通过将可插拔设备与终端设备进行硬件对接,将搭建完成的安全运算环境提供给终端设备;
例如,可以在可插拔设备上搭载SE(Secure Element,安全元件)安全计算芯片,为可插拔设备搭建安全预算环境,在安全运算环境中存储与可插拔设备对应的私钥。同时,可以在终端设备上预留诸如USB等通用接口,使得可插拔设备可以通过这些通用接口接入终端设备,与终端设备实现硬件对接,将搭建完成的安全运算环境提供给终端设备。
进一步的,终端设备在采集到需要在区块链上存证的数据之后,可插拔设备可以获取终端设备所采集到的目标数据的数据摘要;
例如,终端设备可以计算采集到的目标数据的数据摘要,再将计算出的数据摘要发送给可插拔设备;或者,终端设备可以将采集到的目标数据直接发送给可插拔设备,由可插拔设备在本地进行摘要计算,得到该目标数据的数据摘要。
可插拔设备在获取终端设备所采集到的目标数据的数据摘要之后,可以在可插拔设备搭载的安全运算环境中,基于存储的私钥,对该目标数据的数据摘要进行签名处理,然后将签名后的数据摘要发布至区块链。
例如,可以由可插拔设备直接将签名后的数据摘要发布至区块链;或者,可插拔设备也可以将签名后的数据摘要发送至终端设备,由终端设备将签名后的数据摘要发布至区块链。
区块链中的节点设备在收到发布的签名后的数据摘要之后,可以获取与该可插拔设备的私钥对应的公钥,然后基于该公钥对该数据摘要的签名进行验证;如果签名验证通过,可以将该数据摘要存储到区块链中进行数据存证。
在以上技术方案中,一方面,由于可插拔设备搭载了安全运算环境,并且在该安全运算环境中存储了与可插拔设备对应的私钥;因此通过将可插拔设备与终端设备进行硬件对接,就可以便捷的为终端设备提供安全的运算环境;使得可插拔设备可以作为通用的安全硬件,与不同的终端设备进行硬件对接,为不同的终端设备提供安全的运算环境;而且,当终端设备需要将采集到的数据在区块链上进行存证时,可以在可插拔设备上搭载的安全运算环境中,利用存储的私钥对终端设备采集到的数据进行签名,并将签名后的数据发布至区块链进行数据存证,从而可以避免在区块链上存证的数据在传播过程中被非法篡改,保障在区块链上存证数据时的数据安全;
另一方面,通过对区块链上进行数据存证的流程进行改进,终端设备可以不再需要将采集到的数据的原始内容在区块链上存证,而是将采集到的数据的原始内容的数据摘要在区块链上存证,使得终端设备可以作为物理世界和链上世界的枢纽,更加便捷的将采集到的数据在区块链上进行存证;而且,对于获得终端设备采集到的数据的第三方而言,由于通过将获得的数据的数据摘要,与在区块链上存证的该数据的数据摘要进行匹配,就可以便捷的对获得的数据进行合法性验证;因此,使得终端设备可以将采集到的数据作为证据提交给第三方,可以显著的提升终端设备采集到的数据的可用性。
下面通过具体实施例并结合具体的应用场景对本说明书进行描述。
请参考图1,图1是本说明书一实施例提供的一种基于区块链的数据存证方法,应用于与终端设备对接的可插拔设备;其中,该可插拔设备搭载了安全运算环境;该安全运算环境中存储了与该可插拔设备对应的私钥;所述方法执行以下步骤:
步骤102,获取所述终端设备采集到的目标数据的数据摘要;
步骤104,在所述安全运算环境中基于与所述可插拔设备对应的私钥对所述数据摘要进行签名;
步骤106,将签名后的所述数据摘要发布至所述区块链,以由区块链中的节点设备基于所述私钥对应的公钥对所述数据摘要的签名进行验证,并在所述签名验证通过后,将所述数据摘要在区块链中进行数据存证。
在本说明书所描述的区块链,具体可以包括私有链、公有链以及联盟链等,在本说明书中不进行特别限定。
例如,在一个场景中,上述区块链具体可以是由第三方支付平台的服务器、境内银行服务器、境外银行服务器、以及若干用户节点设备作为成员设备组成的一个联盟链。该联盟链的运营方可以依托于该联盟链,来在线部署诸如基于联盟链的跨境转账、资产转移等在线业务。
上述终端设备,可以包括能够作为节点设备加入区块链,并将采集到的数据在区块链上进行存证的任意形式的终端设备;
例如,在实际应用中,上述终端设备具体可以包括执法记录仪或者行车记录仪等。执法记录仪或者行车记录仪可以作为节点加入区块链,并将采集到的诸如视频数据、音频数据等流数据,在区块链上进行存证。
其中,将数据在区块链上进行存证,是指将数据作为证据在区块链中进行持久化存储。
上述目标数据,包括由终端设备采集到的,需要在区块链的分布式数据库中完成数据存证的任意类型的数据;
例如,上述目标数据具体可以是诸如执法记录仪或者行车记录仪等终端设备采集到的视频数据、音频数据、图像数据等流数据。
在本说明书中,可以为终端设备搭建安全运算环境,并利用搭建的安全运算环境,来存储和维护用于对终端设备需要在区块链上存证的数据进行签名的私钥。
在实现时,可以预先在可插拔设备上搭建安全运算环境,在该安全运算环境中存储与可插拔设备对应的私钥,并通过将可插拔设备与终端设备进行对接的方式,将在可插拔设备上搭建完成的安全运算环境,提供给终端设备。
通过这种方式,可以不再需要对终端设备的硬件环境进行改造,在终端设备的硬 件环境中引入新的硬件来为终端设备搭建安全运算环境,而只需要通过将可插拔设备与终端设备进行、对接,就可以便捷的为终端设备提供安全的运算环境,使得可插拔设备可以作为通用的硬件与不同的终端设备进行硬件对接,为不同的终端设备提供安全的运算环境。
其中,终端设备与可插拔设备之间进行对接的具体方式,在本说明书中不进行特别限定,本领域技术人员在将本说明书的技术方案付诸实现时,可以进行灵活的选择;
在示出的一种实现方式中,可插拔设备具体可以通过终端设备上提供的硬件接口,与终端设备实现硬件对接。
当然,在实际应用中,除了以上示出的可插拔设备通过终端设备提供的硬件接口,与终端设备实现硬件对接以外,在实际应用中,也可以通过软件接口实现对接;
例如,在一种实现方式中,也可以在终端设备上提供蓝牙接口,而可插拔设备可以通过终端设备上的蓝牙接口,与终端设备建立蓝牙连接,进行无线数据通信实现对接。
其中,在终端设备的硬件环境中搭建安全运算环境的具体方式,在本说明书中也不进行特别限定。
在示出的一种实施方式中,可以采用基于SE(Secure Element,安全元件)的解决方案,为可插拔设备搭建安全运算环境。
在这种解决方案下,可以在可插拔设备的硬件环境中引入SE安全计算芯片,利用SE安全计算芯片存储和维护可插拔设备的私钥,来搭建安全运算环境。
请参见图2,图2为本说明书示出的一种可插拔设备的硬件结构图。
如图2所示,上述可插拔设备具体可以包括壳体,设置在壳体内部的PCB电路板,安装在PCB电路板上的USB接口、SE安全计算芯片、以及LED指示灯灯。
其中,上述SE安全计算芯片与USB接口电连接,用于面向可插拔设备提供安全运算环境,存储和维护与可插拔设备对应的私钥。
上述USB接口,与上述SE安全计算芯片电连接,用于与终端设备进行硬件对接;
例如,请参见图3和图4,以终端设备为便携式录音设备为例,可以在便携式录音设备上提供USB插口,在可插拔设备上提供USB接口,用户可以通过将可插拔设备上的USB接口,插入该便携式录音设备的USB插口中,与该便携式录音设备实现硬件对接。
其中,需要说明的是,本说明书中描述的USB接口,是指USB设备中作为USB Slave的一端;而本说明书中描述的USB插口,是指USB设备中作为USB host的一端。
上述LED指示灯,与上述SE安全计算芯片电连接,用于向用户提示可插拔设备当前的工作状态;
例如,在实现时,可以利用SE安全计算芯片自身的处理能力,在SE安全计算芯片中植入一些用于控制LED指示灯来提示可插拔设备的工作状态的控制逻辑,通过SE安全计算芯片来执行这些控制逻辑,来向用户提示可插拔设备的工作状态。
其中,在本说明书中,可插拔设备的工作状态,具体可以包括正在上述安全运算环境中执行运算的工作状态;以及,在上述安全运算环境中完成运算的工作状态。
例如,在上述安全运算环境中,基于该安全运算环境存储的私钥,对终端设备采集到的目标数据进行签名处理的过程中,可以称之为上述可插拔设备正在上述安全运算环境中执行运算的工作状态;而在上述安全运算环境中,基于该安全预算环境存储的私钥对终端设备采集到的目标数据签名处理完成后,可以称之为上述可插拔设备在上述安全运算环境中完成运算的工作状态。
需要说明的是,通过LED指示灯向用户提示可插拔设备的工作状态的具体控制逻辑,本领域技术人员在将本说明书的技术方案付诸实现时,可以基于实际的需求进行定义,在本说明书中不进行特别限定;
例如,在示出的一种实现方式中,上述控制逻辑具体可以是,可插拔设备在SE安全计算芯片提供的安全运算环境中执行运算的过程中,可以控制该LED指示灯处于常亮的状态,来表示可插拔设备处于“正在运算中”这一工作状态;而当可插拔设备在SE安全计算芯片提供的安全运算环境中完成运算后,可以控制该LED指示灯处于熄灭的状态,来表示可插拔设备处于“运算结束”这一工作状态。
在示出的另一种实现方式中,上述控制逻辑具体也可以是,可插拔设备在SE安全计算芯片提供的安全运算环境中执行运算的过程中,可以控制该LED指示灯保持熄灭,来表示可插拔设备处于“运算中”这一工作状态;而当可插拔设备在SE安全计算芯片提供的安全运算环境中完成运算后,可以控制该LED指示灯按照预设的频率进行多次闪烁,来表示可插拔设备处于“运算结束”这一工作状态。
当然,在本说明书,除了通过在可插拔设备的硬件环境中,引入SE安全计算芯片的方式,来为可插拔设备搭建安全运算环境以外,在实际应用中,显然也可以通过其它 的方式,为可插拔设备搭载安全运算环境;
例如,在示出的一种实施方式中,可以采用基于TEE(Trusted Execution Environment,可信执行环境)的解决方案,为终端设备搭建安全运算环境。在这种解决方案下,可以对可插拔设备的硬件环境中已有的硬件(比如已有的主处理芯片)的软件环境进行改造(不需要引入额外的安全计算芯片),在该软件环境中来搭建可信执行环境,利用该可信执行环境存储和维护可插拔设备的私钥,来搭建安全运算环境。
又如,在示出的另一种实施方式,可以采用基于SE+TEE的解决方案,为终端设备搭建安全运算环境。在这种解决方案下,可以利用SE安全计算芯片来存储和维护可插拔设备的私钥,利用TEE来面向可插拔设备提供安全的运算环境。
在本说明书中,上述可插拔设备可以作为节点设备加入到区块链(也称之为设备上链),并将与该可插拔设备对应的私钥,在为该可插拔设备搭建的安全运算环境中进行存储和维护。
其中,与可插拔设备对应的私钥,具体可以是由可插拔设备持有的私钥,也可以是可插拔设备的使用用户所持有的私钥。
也即,本说明书中描述的“与可插拔设备对应的私钥”,具体可以是可插拔设备的设备生产商在设备生产阶段,为该可插拔设备生成的,并由该可插拔设备持有的私钥;也可以是由可插拔设备在用户使用该可插拔设备时,由可插拔设备自主的为该用户生成的,并由该用户个人持有的私钥。
在示出的一种实施方式中,可插拔设备持有的私钥以及公钥,可以由设备生产商在设备生产阶段为可插拔设备生成,并由设备生产商预先将该私钥写入该可插拔设备的安全运算环境中进行存储和维护。
在这种情况下,可插拔设备持有的私钥以及公钥,则与可插拔设备的使用用户的身份并不关联。对于该可插拔设备的不同的使用用户而言,可以共用由设备生产商默认写入该可插拔设备的安全运算环境中的同一个私钥。
在示出的一种实施方式中,可插拔设备持有的私钥以及公钥,也可以由可插拔设备自主的为该可插拔设备的使用用户生成,并由可插拔设备将该私钥写入该可插拔设备的安全运算环境。
在这种情况下,可插拔设备自主生成的私钥以及公钥,可以与可插拔设备的使用用户的身份相关联,可插拔设备可以基于不同的使用用户的身份信息,为不同的使用用 户分别生成一对私钥和公钥,并将生成的私钥与各使用用户的身份信息分别进行绑定,然后将绑定关系在安全运算环境中进行存储和维护。
例如,在实现时,可插拔设备的生产商可以预先将密钥生成算法写入该可插拔设备的安全运算环境。当可插拔设备的使用用户在使用可插拔设备时,可插拔设备可以提示使用用户输入身份信息进行身份认证;其中,使用用户输入的身份信息的数据类型,以及可插拔设备所采用的身份认证方式,在本说明书中均不进行特别的限定;例如,可以采用诸如输入密码或者口令的传统认证方式,也可以采用诸如基于指纹或者人脸等生理特征的认证方式。
当可插拔设备获取到使用用户输入的身份信息后,可以确定安全运算环境中是否存储了与该身份信息绑定的私钥;如果安全运算环境中并未存储与该身份信息绑定的私钥,表明该使用用户为首次使用该可插拔设备的新用户,此时终端设备可以基于获取到的该身份信息对该使用用户进行身份认证;如果针对该使用用户身份认证通过,则可插拔设备可以在上述安全运算环境中调用上述密钥生成算法生成一对私钥以及公钥,并将生成的私钥与该使用用户的身份信息进行绑定,然后将绑定关系在上述安全运算环境中进行存储和维护。在本说明书中,用户可以使用终端设备进行数据采集,并在该可插拔设备上的安全运算环境中,基于该可插拔设备的私钥对采集到的数据进行签名后,发布至区块链上进行数据存证。
其中,在本说明书中,终端设备在将采集到的目标数据在区块链上进行存证时,可以仅需要将采集到的数据在本地存储,将采集到的数据的数据摘要在区块链上进行存证即可,不再需要将采集到的数据的原始内容在区块链上进行存证。
需要说明的是,在实际应用中,如果终端设备采集到的目标数据为诸如视频数据、音频数据等流数据,这类流数据在区块链上进行存证时,终端设备也可以按照预设的时间周期,对流数据进行分片存证的方式;
例如,以视频数据为例,终端设备可以将每N分钟的视频数据作为一个分片,计算该分片的数据摘要,然后将该分片的数据摘要在区块链中进行存证,并严格保证在区块链上存证的各分片的数据摘要在时间上的顺序,以便于进行回溯。
在本说明书中,终端设备在将采集到的目标数据在区块链上进行存证时,可插拔设备可以获取终端设备采集到的目标数据的数据摘要,并在安全运算环境中,基于可插拔设备持有的私钥对该目标数据的数据摘要进行签名处理。
其中,终端设备采集到的目标数据的数据摘要,具体可以由终端设备在其本地进行计算,也可以由可插拔设备在其本地进行计算。
在示出的一种实施方式中,终端设备在将采集到的目标数据在区块链上进行存证时,可以在本地计算该目标数据的数据摘要;比如,该数据摘要具体可以是基于特定的哈希算法计算该目标数据的哈希值(hash value);然后,终端设备可以将计算出的该目标数据的数据摘要,发送给对接的可插拔设备;而可插拔设备可以接收终端设备发送的目标数据的数据摘要,并将接收到的目标数据的数据摘要,在安全运算环境中,基于可插拔设备持有的私钥对该目标数据的数据摘要进行签名处理。
在示出的一种实施方式中,终端设备在将采集到的目标数据在区块链上进行存证时,也可以将采集到的目标数据的原始内容发送给可插拔设备;而可插拔设备可以接收终端设备发送的目标数据,并在本地计算接收到的目标数据的数据摘要,然后在安全运算环境中,基于可插拔设备持有的私钥对计算出的目标数据的数据摘要进行签名处理。
其中,在一种场景下,如果可插拔设备的安全运算环境中存储和维护的私钥,为设备生产商在设备生产阶段为可插拔设备生成的,由可插拔设备持有的私钥;在这种情况下,可以引入对可插拔设备的使用用户的身份认证机制,提示使用用户输入身份信息进行身份认证;当可插拔设备获取到使用用户输入的身份信息后,可以基于获取到的身份信息对该使用用户进行身份认证;如果针对该使用用户的身份认证通过,可插拔设备可以在安全运算环境中,基于该安全运算环境中存储和维护的由该可插拔设备持有的私钥,对该数据摘要进行签名处理。在另一种场景下,如果可插拔设备的安全运算环境中存储和维护的私钥,为终端设备自主为使用用户生成的,由使用用户持有的私钥;此时,安全运算环境中预先存储和维护了使用用户的身份信息与私钥的绑定关系。
在这种情况下,当可插拔设备获取到该使用用户输入的身份信息后,可以查询安全运算环境中维护的绑定关系,确定安全运算环境中是否存储了与该身份信息绑定的私钥;如果安全运算环境中存储了该身份信息绑定的私钥,可插拔设备可以在安全运算环境中,基于查询到的该私钥,对该数据摘要进行签名处理。
当然,如果安全运算环境中并未存储与该身份信息绑定的私钥,表明该使用用户为首次使用该可插拔设备的新用户,此时可插拔设备可以基于获取到的该身份信息对该使用用户进行身份认证,并在身份认证通过后,调用安全运算环境中存储的密钥生成算法,为该使用用户生成私钥和公钥,并使用生成的私钥,对该数据摘要进行签名处理;以及,将生成的私钥与该使用用户的身份信息进行绑定,然后将绑定关系在安全运算环 境中进行存储和维护。
在本说明书中,当可插拔设备在安全运算环境中,基于安全运算环境中存储的私钥,对终端设备采集到的目标数据的数据摘要进行签名处理完成之后,可以将签名后的数据摘要,在区块链中进行发布;
例如,可以基于签名后的数据摘要构建一笔区块链交易(Transaction),将该交易向其它各节点设备进行广播扩散。
其中,签名后的数据摘要,可以由可插拔设备直接在区块链中进行发布,也可以由可插拔设备将签名后的数据摘要发送至终端设备,再由终端设备在区块链中进行发布。
而区块链中的节点设备在收到发布的该签名后的数据摘要后,可以获取与安全运算环境中存储的私钥对应的公钥,然后基于获取到的公钥对该数据摘要的签名进行验证;如果该数据摘要的签名验证通过,该节点设备可以在区块链中发起对该数据摘要的共识处理,并在该数据摘要共识处理通过后,将该数据摘要打包进区块在区块链中进行存储,以完成针对该数据摘要的数据存证。
其中,需要说明的是,本说明书中所描述的区块链所采用的共识机制,在本说明书中不进行特别限定,在实际应用中,区块链的运营方可以基于实际的需求来灵活的选择。
在示出的另一种实施方式中,终端设备在将采集到的目标数据时,在区块链上进行存证时,还可以将该目标数据的描述数据与该目标数据的数据摘要,一并在区块链上进行存证。
这种情况下,在可插拔设备的安全运算环境中,基于安全运算环境中存储的私钥,对该目标数据的数据摘要进行签名处理时,可以将该数据摘要和该目标数据的描述信息进行整体签名;即将数据摘要和该目标数据的描述信息进行打包后作为一个整体进行签名;然后,将签名后的数据摘要和上述目标数据的描述数据,发布至区块链进行数据存证。
例如,可以基于签名后的数据摘要和上述目标数据的描述数据构建一笔区块链交易,将该交易向其它各节点设备进行广播扩散。
或者,在另一种情况下,在可插拔设备的安全运算环境中,基于安全运算环境中存储的私钥,对该目标数据的数据摘要进行签名处理时,也可以仅针对该数据摘要进行签名;然后,将上述目标数据的描述数据,和将签名后的数据摘要,发布至区块链进行 数据存证。
例如,可以基于上述目标数据的描述数据,和签名后的数据摘要来构建一笔区块链交易,将该交易向其它各节点设备进行广播扩散。
其中,上述目标数据的描述信息所包含的具体内容,在本说明书中不进行特别限定,在实际应用中,可以涵盖与上述目标数据相关的任意内容;
在示出的一种实施方式中,由于数据的采集时刻、采集地点和数据相关的对象,通常为数据作为证据文件的极其重要的属性;因此,在本说明书中,上述目标数据的描述信息,具体可以包括上述目标数据的采集时刻、采集地点、以及上述目标数据相关的对象中的一个或者多个的组合。
其中,在示出的一种实施方式中,目标数据的采集时刻,具体可以是终端设备在采集到目标数据时,与时间认证中心进行交互,从时间认证中心获取到的经过认证的权威时刻(时间戳)。目标数据的采集地点,可以是终端设备采集到目标数据时,实时调用终端设备搭载的定位模块(比如GPS模块)获取到的精确采集地点。而与上述目标数据相关的对象,可以是终端设备在采集到目标数据后,由该终端设备的合法使用者手动输入的相关对象。
例如,以执法记录仪采集到的与车祸事件的取证视频数据为例,该视频数据的描述信息,具体可以包括采集到该视频数据的时刻从时间认证中心获取到的经过认证的权威时刻、采集到该视频数据的时刻执法记录仪实时调用定位模块获取到的精确采集地点、以及由执法者输入的与该视频数据相关的车辆信息、驾驶者信息等。
在以上技术方案中,一方面,由于可插拔设备搭载了安全运算环境,并且在该安全运算环境中存储了与可插拔设备对应的私钥;因此通过将可插拔设备与终端设备进行硬件对接,就可以便捷的为终端设备提供安全的运算环境;使得可插拔设备可以作为通用的安全硬件,与不同的终端设备进行硬件对接,为不同的终端设备提供安全的运算环境;
而且,当终端设备需要将采集到的数据在区块链上进行存证时,可以在可插拔设备上搭载的安全运算环境中,利用存储的私钥对终端设备采集到的数据进行签名,并将签名后的数据发布至区块链进行数据存证,从而可以避免在区块链上存证的数据在传播过程中被非法篡改,保障在区块链上存证数据时的数据安全;
例如,一台可插拔设备可以预先完成设备上链,取得作为在区块链上的身份的公 私钥对,并将私钥在安全运算环境中进行维护和存储。当用户需要将一台并未上链的设备采集到的数据在区块链上存证时,用户可以通过将可插拔设备上的USB接口,插入该终端设备的USB插口中,与该终端设备实现硬件对接,将可插拔设备的安全运算环境提供给终端设备,来快捷的将该终端设备改造成一台已经上链的设备,来完成在区块链上的数据存证。进一步的,当该终端设备在完成数据存证之后,用户需要就将其它的终端设备采集到的数据在区块链上存证时,可以执行相同的操作,与上述可插拔设备进行硬件对接,来快捷的将该终端设备也改造成一台已经上链的设备。
另一方面,通过对区块链上进行数据存证的流程进行改进,终端设备可以不再需要将采集到的数据的原始内容在区块链上存证,而是将采集到的数据的原始内容的数据摘要在区块链上存证,使得终端设备可以作为物理世界和链上世界的枢纽,更加便捷的将采集到的数据在区块链上进行存证;而且,对于获得终端设备采集到的数据的第三方而言,由于通过将获得的数据的数据摘要,与在区块链上存证的该数据的数据摘要进行匹配,就可以便捷的对获得的数据进行合法性验证;因此,使得终端设备可以将采集到的数据作为证据提交给第三方,可以显著的提升终端设备采集到的数据的可用性。
例如,对于执法记录仪或者行车记录仪等终端设备,只需要将采集到的视频数据、音频数据等流数据的原始内容在本地存储,并将这些流数据的原始内容的数据摘要在区块链上存证即可,不再需要将将这些流数据的原始内容在区块链上进行存证;
而且,用户在将执法记录仪或者行车记录仪采集到的流数据作为证据提交给第三方机构(比如司法机构或者保险公司)时,第三方机构只需要重新计算获得的数据的数据摘要,将该数据的数据摘要与在区块链上存证的该数据的数据摘要进行匹配,就可以便捷的对获得的数据进行合法性验证,从而通过这种方式,可以显著提升执法记录仪或者行车记录仪采集到的数据作为合法证据文件的高可用性。
与上述方法实施例相对应,本说明书还提供了一种基于区块链的数据存证装置的实施例。本说明书的基于区块链的数据存证装置的实施例可以应用在电子设备上。其中,所述电子设备可以是与终端设备对接的可插拔设备;所述电子设备搭载了安全运算环境,所述安全运算环境中存储了与所述电子设备对应的私钥,装置实施例可以通过软件实现,也可以通过硬件或者软硬件结合的方式实现。以软件实现为例,作为一个逻辑意义上的装置,是通过其所在电子设备的处理器将非易失性存储器中对应的计算机程序指令读取到内存中运行形成的。从硬件层面而言,如图5所示,为本说明书的基于区块链的数据存证装置所在电子设备的一种硬件结构图,除了图5所示的处理器、内存、网络接口、 以及非易失性存储器之外,实施例中装置所在的电子设备通常根据该电子设备的实际功能,还可以包括其他硬件,对此不再赘述。
图6是本说明书一示例性实施例示出的一种基于区块链的数据存证装置的框图。
请参考图6,所述基于区块链的数据存证装置60可以应用在前述图5所示的电子设备中,包括有:获取模块601、签名模块602和发布模块603。
获取模块601,获取所述终端设备采集到的目标数据的数据摘要;
签名模块602,在所述安全运算环境中基于与所述可插拔设备对应的私钥对所述数据摘要进行签名;
发布模块603,将签名后的所述数据摘要发布至所述区块链,以由区块链中的节点设备基于所述私钥对应的公钥对所述数据摘要的签名进行验证,并在所述签名验证通过后,将所述数据摘要在区块链中进行数据存证。
在本实施例中,所述获取模块601:
接收所述终端设备发送的由所述终端设备采集到的目标数据的数据摘要;或者,接收所述终端设备发送的由所述终端设备采集到的目标数据,并在本地计算所述目标数据进的数据摘要。
在本实施例中,所述签名模块602:
获取所述可插拔设备的使用用户输入的身份信息;
基于获取到的所述身份信息针对所述使用用户进行身份认证;
如果针对所述使用用户的身份认证通过,在所述安全运算环境中基于与所述可插拔设备对应的私钥对所述数据摘要进行签名。
在本实施例中,所述安全运算环境中存储了密钥生成算法;
所述装置60还包括:
认证模块604(图5中未示出),获取所述可插拔设备的使用用户在首次使用所述可插拔设备时输入的身份信息;基于获取到的所述身份信息针对所述使用用户进行身份认证;
生成模块605(图5中未示出),如果针对所述使用用户的身份认证通过,在所述安全运算环境中调用所述密钥生成算法生成所述私钥以及公钥;以及,将生成的所述私 钥与所述使用用户的身份信息进行绑定,并将绑定关系在所述安全运算环境进行存储。
在本实施例中,所述签名模块602:
获取所述可插拔设备的使用用户输入的身份信息;
确定所述安全运算环境中是否存储了与所述身份信息绑定的私钥;
如果是,在所述安全运算环境中基于与所述身份信息绑定的私钥对所述数据摘要进行签名。
在本实施例中,所述发布模块603:
将签名后的所述数据摘要发布至所述区块链;或者,将签名后的所述数据摘要发送至所述终端设备,以由所述终端设备将所述数据摘要发布至所述区块链。
在本实施例中,所述终端设备包括执法记录仪或者行车记录仪;所述目标数据包括视频数据、音频数据、图像数据中的一种或者多种的组合。
在本实施例中,所述可插拔设备搭载了USB接口;所述可插拔设备通过所述USB接口与所述终端设备实现硬件对接。
在本实施例中,所述可插拔设备搭载了SE安全计算芯片;所述安全运算环境为基于所述SE安全计算芯片搭建的安全运算环境。
在本实施例中,所述可插拔设备搭载了LED指示灯;所述装置60还包括:
控制模块606(图5中未示出),控制所述LED指示灯向用户提示所述可插拔设备的工作状态;其中,所述工作状态包括正在所述安全运算环境中执行运算的工作状态;以及,在所述安全运算环境中完成运算的工作状态。
上述装置中各个模块的功能和作用的实现过程具体详见上述方法中对应步骤的实现过程,在此不再赘述。
对于装置实施例而言,由于其基本对应于方法实施例,所以相关之处参见方法实施例的部分说明即可。以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理模块,即可以位于一个地方,或者也可以分布到多个网络模块上。可以根据实际的需要选择其中的部分或者全部模块来实现本说明书方案的目的。本领域普通技术人员在不付出创造性劳动的情况下,即可以理解并实施。
上述实施例阐明的系统、装置、模块或模块,具体可以由计算机芯片或实体实现,或者由具有某种功能的产品来实现。一种典型的实现设备为计算机,计算机的具体形式可以是个人计算机、膝上型计算机、蜂窝电话、相机电话、智能电话、个人数字助理、媒体播放器、导航设备、电子邮件收发设备、游戏控制台、平板计算机、可穿戴设备或者这些设备中的任意几种设备的组合。
与上述方法实施例相对应,本说明书还提供了一种可插拔设备的实施例。该可插拔设备包括:处理器以及用于存储机器可执行指令的存储器;其中,处理器和存储器通常通过内部总线相互连接。在其他可能的实现方式中,所述设备还可能包括外部接口,以能够与其他设备或者部件进行通信。
在本实施例中,通过读取并执行所述存储器存储的与基于区块链的数据存证的控制逻辑对应的机器可执行指令,所述处理器被促使:
获取终端设备采集到的目标数据的数据摘要;其中,所述可插拔设备与所述终端设备对接;所述可插拔设备搭载了安全运算环境;所述安全运算环境中存储了与所述可插拔设备对应的私钥;
在所述安全运算环境中基于与所述可插拔设备对应的私钥对所述数据摘要进行签名;
将签名后的所述数据摘要发布至所述区块链,以由区块链中的节点设备基于所述私钥对应的公钥对所述数据摘要的签名进行验证,并在所述签名验证通过后,将所述数据摘要在区块链中进行数据存证。
在本实施例中,通过读取并执行所述存储器存储的与基于区块链的数据存证的控制逻辑对应的机器可执行指令,所述处理器被促使:
接收所述终端设备发送的由所述终端设备采集到的目标数据的数据摘要;或者,接收所述终端设备发送的由所述终端设备采集到的目标数据,并在本地计算所述目标数据进的数据摘要。
在本实施例中,通过读取并执行所述存储器存储的与基于区块链的数据存证的控制逻辑对应的机器可执行指令,所述处理器被促使:
获取所述可插拔设备的使用用户输入的身份信息;
基于获取到的所述身份信息针对所述使用用户进行身份认证;
如果针对所述使用用户的身份认证通过,在所述安全运算环境中基于与所述可插拔设备对应的私钥对所述数据摘要进行签名。
在本实施例中,所述安全运算环境中存储了密钥生成算法;
通过读取并执行所述存储器存储的与基于区块链的数据存证的控制逻辑对应的机器可执行指令,所述处理器被促使:
获取所述可插拔设备的使用用户在首次使用所述可插拔设备时输入的身份信息;
基于获取到的所述身份信息针对所述使用用户进行身份认证;
如果针对所述使用用户的身份认证通过,在所述安全运算环境中调用所述密钥生成算法生成所述私钥以及公钥;以及,
将生成的所述私钥与所述使用用户的身份信息进行绑定,并将绑定关系在所述安全运算环境进行存储。
在本实施例中,通过读取并执行所述存储器存储的与基于区块链的数据存证的控制逻辑对应的机器可执行指令,所述处理器被促使:
获取所述可插拔设备的使用用户输入的身份信息;
确定所述安全运算环境中是否存储了与所述身份信息绑定的私钥;
如果是,在所述安全运算环境中基于与所述身份信息绑定的私钥对所述数据摘要进行签名。
在本实施例中,通过读取并执行所述存储器存储的与基于区块链的数据存证的控制逻辑对应的机器可执行指令,所述处理器被促使:
将签名后的所述数据摘要发布至所述区块链;或者,将签名后的所述数据摘要发送至所述终端设备,以由所述终端设备将所述数据摘要发布至所述区块链。
在本实施例中,所述可插拔设备搭载了LED指示灯;
通过读取并执行所述存储器存储的与基于区块链的数据存证的控制逻辑对应的机器可执行指令,所述处理器被促使:
控制所述LED指示灯向用户提示所述可插拔设备的工作状态;其中,所述工作状态包括正在所述安全运算环境中执行运算的工作状态;以及,在所述安全运算环境中完成运算的工作状态。
本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本说明书的其它实施方案。本说明书旨在涵盖本说明书的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本说明书的一般性原理并包括本说明书未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本说明书的真正范围和精神由下面的权利要求指出。
应当理解的是,本说明书并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本说明书的范围仅由所附的权利要求来限制。
以上所述仅为本说明书的较佳实施例而已,并不用以限制本说明书,凡在本说明书的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本说明书保护的范围之内。

Claims (21)

  1. 一种基于区块链的数据存证方法,应用于与终端设备对接的可插拔设备;其中,所述可插拔设备搭载了安全运算环境;所述安全运算环境中存储了与所述可插拔设备对应的私钥;所述方法包括:
    获取所述终端设备采集到的目标数据的数据摘要;
    在所述安全运算环境中基于与所述可插拔设备对应的私钥对所述数据摘要进行签名;
    将签名后的所述数据摘要发布至所述区块链,以由区块链中的节点设备基于所述私钥对应的公钥对所述数据摘要的签名进行验证,并在所述签名验证通过后,将所述数据摘要在区块链中进行数据存证。
  2. 根据权利要求1所述的方法,获取所述终端设备采集到的目标数据的数据摘要,包括:
    接收所述终端设备发送的由所述终端设备采集到的目标数据的数据摘要;或者,接收所述终端设备发送的由所述终端设备采集到的目标数据,并在本地计算所述目标数据进的数据摘要。
  3. 根据权利要求1所述的方法,在所述安全运算环境中基于与所述可插拔设备对应的私钥对所述数据摘要进行签名,包括:
    获取所述可插拔设备的使用用户输入的身份信息;
    基于获取到的所述身份信息针对所述使用用户进行身份认证;
    如果针对所述使用用户的身份认证通过,在所述安全运算环境中基于与所述可插拔设备对应的私钥对所述数据摘要进行签名。
  4. 根据权利要求1所述的方法,所述安全运算环境中存储了密钥生成算法;
    所述方法还包括:
    获取所述可插拔设备的使用用户在首次使用所述可插拔设备时输入的身份信息;
    基于获取到的所述身份信息针对所述使用用户进行身份认证;
    如果针对所述使用用户的身份认证通过,在所述安全运算环境中调用所述密钥生成算法生成所述私钥以及公钥;以及,
    将生成的所述私钥与所述使用用户的身份信息进行绑定,并将绑定关系在所述安全运算环境进行存储。
  5. 根据权利要求4所述的方法,在所述安全运算环境中基于与所述可插拔设备对应的私钥对所述数据摘要进行签名,包括:
    获取所述可插拔设备的使用用户输入的身份信息;
    确定所述安全运算环境中是否存储了与所述身份信息绑定的私钥;
    如果是,在所述安全运算环境中基于与所述身份信息绑定的私钥对所述数据摘要进行签名。
  6. 根据权利要求1所述的方法,将签名后的所述数据摘要发布至所述区块链,包括:
    将签名后的所述数据摘要发布至所述区块链;或者,将签名后的所述数据摘要发送至所述终端设备,以由所述终端设备将所述数据摘要发布至所述区块链。
  7. 根据权利要求1所述的方法,所述终端设备包括执法记录仪或者行车记录仪;所述目标数据包括视频数据、音频数据、图像数据中的一种或者多种的组合。
  8. 根据权利要求1所述的方法,所述可插拔设备搭载了USB接口;所述可插拔设备通过所述USB接口与所述终端设备实现硬件对接。
  9. 根据权利要求1所述的方法,所述可插拔设备搭载了SE安全计算芯片;所述安全运算环境为基于所述SE安全计算芯片搭建的安全运算环境。
  10. 根据权利要求1所述的方法,所述可插拔设备搭载了LED指示灯;所述方法还包括:
    控制所述LED指示灯向用户提示所述可插拔设备的工作状态;其中,所述工作状态包括正在所述安全运算环境中执行运算的工作状态;以及,在所述安全运算环境中完成运算的工作状态。
  11. 一种基于区块链的数据存证装置,应用于与终端设备对接的可插拔设备;其中,所述可插拔设备搭载了安全运算环境;所述安全运算环境中存储了与所述可插拔设备对应的私钥;所述装置包括:
    获取模块,获取所述终端设备采集到的目标数据的数据摘要;
    签名模块,在所述安全运算环境中基于与所述可插拔设备对应的私钥对所述数据摘要进行签名;
    发布模块,将签名后的所述数据摘要发布至所述区块链,以由区块链中的节点设备基于所述私钥对应的公钥对所述数据摘要的签名进行验证,并在所述签名验证通过后,将所述数据摘要在区块链中进行数据存证。
  12. 根据权利要求11所述的装置,所述获取模块:
    接收所述终端设备发送的由所述终端设备采集到的目标数据的数据摘要;或者,接收所述终端设备发送的由所述终端设备采集到的目标数据,并在本地计算所述目标数据 进的数据摘要。
  13. 根据权利要求11所述的装置,所述签名模块:
    获取所述可插拔设备的使用用户输入的身份信息;
    基于获取到的所述身份信息针对所述使用用户进行身份认证;
    如果针对所述使用用户的身份认证通过,在所述安全运算环境中基于与所述可插拔设备对应的私钥对所述数据摘要进行签名。
  14. 根据权利要求11所述的装置,所述安全运算环境中存储了密钥生成算法;
    所述装置还包括:
    认证模块,获取所述可插拔设备的使用用户在首次使用所述可插拔设备时输入的身份信息;基于获取到的所述身份信息针对所述使用用户进行身份认证;
    生成模块,如果针对所述使用用户的身份认证通过,在所述安全运算环境中调用所述密钥生成算法生成所述私钥以及公钥;以及,将生成的所述私钥与所述使用用户的身份信息进行绑定,并将绑定关系在所述安全运算环境进行存储。
  15. 根据权利要求14所述的方法,所述签名模块:
    获取所述可插拔设备的使用用户输入的身份信息;
    确定所述安全运算环境中是否存储了与所述身份信息绑定的私钥;
    如果是,在所述安全运算环境中基于与所述身份信息绑定的私钥对所述数据摘要进行签名。
  16. 根据权利要求11所述的装置,所述发布模块:
    将签名后的所述数据摘要发布至所述区块链;或者,将签名后的所述数据摘要发送至所述终端设备,以由所述终端设备将所述数据摘要发布至所述区块链。
  17. 根据权利要求11所述的装置,所述终端设备包括执法记录仪或者行车记录仪;所述目标数据包括视频数据、音频数据、图像数据中的一种或者多种的组合。
  18. 根据权利要求11所述的装置,所述可插拔设备搭载了USB接口;所述可插拔设备通过所述USB接口与所述终端设备实现硬件对接。
  19. 根据权利要求11所述的装置,所述可插拔设备搭载了SE安全计算芯片;所述安全运算环境为基于所述SE安全计算芯片搭建的安全运算环境。
  20. 根据权利要求11所述的装置,所述可插拔设备搭载了LED指示灯;所述装置还包括:
    控制模块,控制所述LED指示灯向用户提示所述可插拔设备的工作状态;其中,所述工作状态包括正在所述安全运算环境中执行运算的工作状态;以及,在所述安全运 算环境中完成运算的工作状态。
  21. 一种可插拔设备,包括:
    处理器;
    用于存储机器可执行指令的存储器;
    其中,通过读取并执行所述存储器存储的与基于区块链的基于区块链的数据存证的控制逻辑对应的机器可执行指令,所述处理器被促使:
    获取终端设备采集到的目标数据的数据摘要;其中,所述可插拔设备与所述终端设备对接;所述可插拔设备搭载了安全运算环境;所述安全运算环境中存储了与所述可插拔设备对应的私钥;
    在所述安全运算环境中基于与所述可插拔设备对应的私钥对所述数据摘要进行签名;
    将签名后的所述数据摘要发布至所述区块链,以由区块链中的节点设备基于所述私钥对应的公钥对所述数据摘要的签名进行验证,并在所述签名验证通过后,将所述数据摘要在区块链中进行数据存证。
PCT/CN2019/110650 2018-11-28 2019-10-11 基于区块链的数据存证方法及装置、电子设备 WO2020108114A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811432455.5A CN110033259B (zh) 2018-11-28 2018-11-28 基于区块链的数据存证方法及装置、电子设备
CN201811432455.5 2018-11-28

Publications (1)

Publication Number Publication Date
WO2020108114A1 true WO2020108114A1 (zh) 2020-06-04

Family

ID=67235273

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/110650 WO2020108114A1 (zh) 2018-11-28 2019-10-11 基于区块链的数据存证方法及装置、电子设备

Country Status (3)

Country Link
CN (2) CN113793151A (zh)
TW (1) TWI721552B (zh)
WO (1) WO2020108114A1 (zh)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112153151A (zh) * 2020-09-28 2020-12-29 刘华 一种基于区块链的智能制造车间安全管理方法及系统
CN112182609A (zh) * 2020-09-25 2021-01-05 中国建设银行股份有限公司 基于区块链的数据上链存储方法和追溯方法、装置及设备
CN112734578A (zh) * 2021-01-18 2021-04-30 北交金科金融信息服务有限公司 一种基于区块链技术的企业并购与融资信息服务平台
CN112887375A (zh) * 2021-01-13 2021-06-01 中南林业科技大学 一种基于区块链的消息验证方法及设备
CN112968782A (zh) * 2021-04-07 2021-06-15 北京安天网络安全技术有限公司 基于联盟链的安全评测方法及系统
CN113095828A (zh) * 2021-04-27 2021-07-09 支付宝(杭州)信息技术有限公司 基于区块链的数据存证方法及装置
CN113326504A (zh) * 2021-07-01 2021-08-31 厦门致联科技有限公司 一种防数据篡改的区块链上链方法

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113793151A (zh) * 2018-11-28 2021-12-14 创新先进技术有限公司 基于区块链的数据存证方法及装置、电子设备
CN111079136B (zh) * 2019-11-07 2022-02-11 北京科技大学 一种基于区块链技术的雾计算入侵检测特征共享系统
CN112966042A (zh) * 2019-12-12 2021-06-15 成都鼎桥通信技术有限公司 一种基于区块链的执法记录仪信息处理方法及系统
TWI828055B (zh) * 2022-01-28 2024-01-01 林楠桂 車輛交易智能程序存證方法

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107820238A (zh) * 2016-09-12 2018-03-20 国民技术股份有限公司 Sim卡、区块链应用安全模块、客户端及其安全操作方法
CN107819777A (zh) * 2017-11-17 2018-03-20 北京亿生生网络科技有限公司 一种基于区块链技术的数据存证方法及系统
CN207504911U (zh) * 2017-11-17 2018-06-15 北京亿生生网络科技有限公司 一种基于区块链技术的数据存证系统
CN108632381A (zh) * 2018-05-14 2018-10-09 济南浪潮高新科技投资发展有限公司 一种基于区块链的环境监督方法及系统
US20180308098A1 (en) * 2015-05-05 2018-10-25 ShoCard, Inc. Identity Management Service Using A Block Chain Providing Identity Transactions Between Devices
CN108717431A (zh) * 2018-05-11 2018-10-30 中国科学院软件研究所 一种基于区块链的电子证据存证、验证方法及系统
CN109583230A (zh) * 2018-10-31 2019-04-05 阿里巴巴集团控股有限公司 基于区块链的数据存证方法及装置、电子设备
CN109639410A (zh) * 2018-10-31 2019-04-16 阿里巴巴集团控股有限公司 基于区块链的数据存证方法及装置、电子设备
CN109660350A (zh) * 2018-10-31 2019-04-19 阿里巴巴集团控股有限公司 基于区块链的数据存证方法及装置、电子设备
CN110033259A (zh) * 2018-11-28 2019-07-19 阿里巴巴集团控股有限公司 基于区块链的数据存证方法及装置、电子设备

Family Cites Families (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI528217B (zh) * 2014-07-02 2016-04-01 柯呈翰 於線上加上即時檔案動態標籤、加密之系統及方法
US20160342989A1 (en) * 2015-05-21 2016-11-24 Mastercard International Incorporated Method and system for processing blockchain-based transactions on existing payment networks
US10402792B2 (en) * 2015-08-13 2019-09-03 The Toronto-Dominion Bank Systems and method for tracking enterprise events using hybrid public-private blockchain ledgers
US20170124464A1 (en) * 2015-10-28 2017-05-04 Fractal Industries, Inc. Rapid predictive analysis of very large data sets using the distributed computational graph
KR101772553B1 (ko) * 2015-12-29 2017-08-30 주식회사 코인플러그 파일에 대한 공증 및 검증을 수행하는 방법 및 서버
KR101727126B1 (ko) * 2015-12-29 2017-04-14 주식회사 코인플러그 파일에 대한 공증 및 검증을 수행하는 방법 및 서버
CN106452785B (zh) * 2016-09-29 2019-05-17 财付通支付科技有限公司 区块链网络、分支节点及区块链网络应用方法
CN107395557B (zh) * 2017-03-28 2020-05-15 创新先进技术有限公司 一种业务请求的处理方法及装置
CN107392040B (zh) * 2017-04-28 2019-08-09 阿里巴巴集团控股有限公司 一种共识验证的方法及装置
CN107169125B (zh) * 2017-05-31 2020-12-18 北京小米移动软件有限公司 多媒体资源的投放统计数据获取方法及装置
CN107342866A (zh) * 2017-06-30 2017-11-10 上海策赢网络科技有限公司 电子文书验证方法、设备及系统
CN107888375A (zh) * 2017-11-08 2018-04-06 深圳市携网科技有限公司 一种基于区块链技术的电子证据保全系统及方法
CN107959676B (zh) * 2017-11-27 2019-11-19 杭州云象网络技术有限公司 一种支持区块链技术加密体系的数据节点热插拔方法
CN108092982B (zh) * 2017-12-22 2020-10-23 广东工业大学 一种基于联盟链的数据存储方法及系统
CN108549825A (zh) * 2018-03-14 2018-09-18 中链科技有限公司 一种文件存证、验真和举证方法及装置
CN113537984A (zh) * 2018-06-26 2021-10-22 创新先进技术有限公司 基于区块链的内容验证方法及装置、电子设备
CN108898390B (zh) * 2018-06-27 2021-01-12 创新先进技术有限公司 基于区块链的智能合约调用方法及装置、电子设备

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180308098A1 (en) * 2015-05-05 2018-10-25 ShoCard, Inc. Identity Management Service Using A Block Chain Providing Identity Transactions Between Devices
CN107820238A (zh) * 2016-09-12 2018-03-20 国民技术股份有限公司 Sim卡、区块链应用安全模块、客户端及其安全操作方法
CN107819777A (zh) * 2017-11-17 2018-03-20 北京亿生生网络科技有限公司 一种基于区块链技术的数据存证方法及系统
CN207504911U (zh) * 2017-11-17 2018-06-15 北京亿生生网络科技有限公司 一种基于区块链技术的数据存证系统
CN108717431A (zh) * 2018-05-11 2018-10-30 中国科学院软件研究所 一种基于区块链的电子证据存证、验证方法及系统
CN108632381A (zh) * 2018-05-14 2018-10-09 济南浪潮高新科技投资发展有限公司 一种基于区块链的环境监督方法及系统
CN109583230A (zh) * 2018-10-31 2019-04-05 阿里巴巴集团控股有限公司 基于区块链的数据存证方法及装置、电子设备
CN109639410A (zh) * 2018-10-31 2019-04-16 阿里巴巴集团控股有限公司 基于区块链的数据存证方法及装置、电子设备
CN109660350A (zh) * 2018-10-31 2019-04-19 阿里巴巴集团控股有限公司 基于区块链的数据存证方法及装置、电子设备
CN110033259A (zh) * 2018-11-28 2019-07-19 阿里巴巴集团控股有限公司 基于区块链的数据存证方法及装置、电子设备

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112182609B (zh) * 2020-09-25 2024-02-02 中国建设银行股份有限公司 基于区块链的数据上链存储方法和追溯方法、装置及设备
CN112182609A (zh) * 2020-09-25 2021-01-05 中国建设银行股份有限公司 基于区块链的数据上链存储方法和追溯方法、装置及设备
CN112153151B (zh) * 2020-09-28 2024-02-02 山西万佳印业有限公司 一种基于区块链的智能制造车间安全管理方法及系统
CN112153151A (zh) * 2020-09-28 2020-12-29 刘华 一种基于区块链的智能制造车间安全管理方法及系统
CN112887375A (zh) * 2021-01-13 2021-06-01 中南林业科技大学 一种基于区块链的消息验证方法及设备
CN112887375B (zh) * 2021-01-13 2022-08-05 中南林业科技大学 一种基于区块链的消息验证方法及设备
CN112734578A (zh) * 2021-01-18 2021-04-30 北交金科金融信息服务有限公司 一种基于区块链技术的企业并购与融资信息服务平台
CN112734578B (zh) * 2021-01-18 2024-02-13 北交金科金融信息服务有限公司 一种基于区块链技术的企业并购与融资信息服务平台
CN112968782A (zh) * 2021-04-07 2021-06-15 北京安天网络安全技术有限公司 基于联盟链的安全评测方法及系统
CN112968782B (zh) * 2021-04-07 2023-04-28 北京安天网络安全技术有限公司 基于联盟链的安全评测方法及系统
CN113095828B (zh) * 2021-04-27 2023-09-01 支付宝(杭州)信息技术有限公司 基于区块链的数据存证方法及装置
CN113095828A (zh) * 2021-04-27 2021-07-09 支付宝(杭州)信息技术有限公司 基于区块链的数据存证方法及装置
CN113326504A (zh) * 2021-07-01 2021-08-31 厦门致联科技有限公司 一种防数据篡改的区块链上链方法

Also Published As

Publication number Publication date
CN110033259B (zh) 2021-08-31
TW202020701A (zh) 2020-06-01
TWI721552B (zh) 2021-03-11
CN110033259A (zh) 2019-07-19
CN113793151A (zh) 2021-12-14

Similar Documents

Publication Publication Date Title
WO2020108114A1 (zh) 基于区块链的数据存证方法及装置、电子设备
TWI701573B (zh) 基於區塊鏈的資料存證方法及裝置、電子設備
CN108898389B (zh) 基于区块链的内容验证方法及装置、电子设备
TWI741314B (zh) 基於區塊鏈的資料存證方法及裝置、電子設備
TWI694709B (zh) 基於區塊鏈的電子簽名方法及裝置、電子設備
CN108632268B (zh) 区块链访问的鉴权方法和装置、存储介质、电子装置
TWI706368B (zh) 基於區塊鏈的服務租賃方法、裝置、系統及電子設備
TW202018571A (zh) 基於區塊鏈的資料存證方法及裝置、電子設備
US11170092B1 (en) Document authentication certification with blockchain and distributed ledger techniques
CN108614878B (zh) 协议数据管理方法、装置、存储介质及系统
WO2020211496A1 (zh) 一种块链式账本中的签名验证方法、系统、装置及设备
WO2020108130A1 (zh) 基于区块链的业务处理方法及装置、电子设备
CN112418851A (zh) 数字版权登记、交易、保护方法与系统
CN111212074B (zh) 基于区块链的资格认定方法、装置、设备及存储介质
US20210012447A1 (en) Method and System for Processing Firearm-Related Data
CN112801659A (zh) 基于智能合约的隐私交易处理方法、装置及存储介质
CN116167766A (zh) 一种资产通证化方法及相关装置
CN111028059A (zh) 基于区块链的物品交换方法、装置、设备及存储介质
CN118118178A (zh) 基于区块链的数字资源处理方法、装置和计算机设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19888560

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19888560

Country of ref document: EP

Kind code of ref document: A1