CN110930145A - Cold wallet generation method, transaction information processing method, device and storage medium - Google Patents

Cold wallet generation method, transaction information processing method, device and storage medium Download PDF

Info

Publication number
CN110930145A
CN110930145A CN202010079946.7A CN202010079946A CN110930145A CN 110930145 A CN110930145 A CN 110930145A CN 202010079946 A CN202010079946 A CN 202010079946A CN 110930145 A CN110930145 A CN 110930145A
Authority
CN
China
Prior art keywords
transaction
path
seed file
target
generating
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
CN202010079946.7A
Other languages
Chinese (zh)
Other versions
CN110930145B (en
Inventor
白光宇
曹炜
钱京
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hengbao Co Ltd
Original Assignee
Jiangsu Hengbao Intelligent System Technology Co Ltd
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 Jiangsu Hengbao Intelligent System Technology Co Ltd filed Critical Jiangsu Hengbao Intelligent System Technology Co Ltd
Priority to CN202010079946.7A priority Critical patent/CN110930145B/en
Publication of CN110930145A publication Critical patent/CN110930145A/en
Application granted granted Critical
Publication of CN110930145B publication Critical patent/CN110930145B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/30Payment architectures, schemes or protocols characterised by the use of specific devices or networks
    • G06Q20/36Payment architectures, schemes or protocols characterised by the use of specific devices or networks using electronic wallets or electronic money safes
    • 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

Landscapes

  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Engineering & Computer Science (AREA)
  • Finance (AREA)
  • Strategic Management (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Computer Security & Cryptography (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The application provides a cold wallet generating method, a transaction information processing device, electronic equipment and a readable storage medium. In this way, the generated cold wallet has the account address specially used for the hidden transaction and the parent seed file with the related function key which can be used for generating the hidden transaction, so that the cold wallet can complete the ZCash hidden transaction, and the problem that the existing cold wallet device does not support the complex hidden transaction is solved.

Description

Cold wallet generation method, transaction information processing method, device and storage medium
Technical Field
The application relates to the technical field of blockchain, in particular to a cold wallet generating method, a transaction information processing method, a device, equipment and a readable storage medium.
Background
At present, digital currency such as bitcoin is stored in a cold wallet mode generally, and because the key of the cold wallet is managed off line, a signature result is provided only at the time of transaction, and the risk of digital currency leakage is reduced to the minimum. In addition, the cold wallet is easy to carry, and when the cold wallet is lost, the cold wallet can restore all information on other hardware in a recovery mode so that the cold wallet can be used as a mainstream mode for digital currency storage.
ZCash is digital currency capable of hiding transaction information, and the current ZCash transaction types are divided into two types, namely hidden transactions and transparent transactions according to the description of related documents of the ZCash. However, the existing cold wallet devices supporting Zcash on the market only support transparent transactions, and complex hidden transactions are abandoned. Accordingly, it is desirable to provide a cold wallet architecture that can support Zcash hidden transactions.
Disclosure of Invention
An embodiment of the present application provides a cold wallet generating method, a transaction information processing method, a device, an electronic device, and a readable storage medium, so as to solve the problem that the existing cold wallet device does not support a complex hidden transaction.
The embodiment of the application provides a cold wallet generation method based on ZCash, which comprises the following steps:
acquiring mnemonics corresponding to a user; the mnemonic words are words or word groups with actual expression meanings;
generating a father seed file according to the mnemonic words and storing the father seed file;
obtaining a hidden transaction function key corresponding to the target path directory according to the father seed file;
and generating an account address corresponding to the hidden transaction according to the hidden transaction function key corresponding to the target path directory, and sending the account address to a target application program for storage.
In the implementation process, corresponding father seed files are generated and stored by obtaining mnemonics corresponding to the users, hidden transaction function keys corresponding to the target path directory are obtained according to the father seed files, account addresses corresponding to the hidden transactions are generated according to the hidden transaction function keys corresponding to the target path directory and are sent to the target application program for storage. In this way, the generated cold wallet has the account address specially used for the hidden transaction and the parent seed file with the related function key which can be used for generating the hidden transaction, so that the cold wallet can complete the ZCash hidden transaction, and the problem that the existing cold wallet device does not support the complex hidden transaction is solved.
Further, it should be understood that the Zcash protocol defines a wallet management policy for hidden transactions. In particular, the ZCash protocol proposes to use zip-32 to manage the key and address of the hidden transaction. However, according to the protocol specification of Zcash, in the wallet management structure of zip-32, a 32-byte random sequence is used as a seed to generate and derive a secret key, although the security of the wallet can be guaranteed by using the random sequence, for a user, recording the 32-byte random sequence is too complicated to remember, and once the 32-byte random sequence is lost, the Zcash wallet cannot be backed up and restored, which affects the use of the user. In the scheme provided by the embodiment of the application, the mnemonic words with actual expression meanings are used for generating the parent seed file, so that the functional key and the account address required by the hidden transaction are obtained, when the ZCash cold wallet is backed up and restored, a user only needs to input the mnemonic words, and the mnemonic words have the actual expression meanings, so that the mnemonic words are more convenient for the user to memorize and are not easy to lose.
Further, the obtaining of the hidden transaction function key corresponding to the target path directory according to the parent seed file includes:
generating a child seed file of each path directory in the current account path according to the parent seed file;
and deriving a hidden transaction function key corresponding to the target path directory according to the sub-seed file of the target path directory in each path directory.
It should be noted that, in the current Zcash protocol, for convenience of management and security, Zcash divides a plurality of hierarchies, and path directories of different hierarchies may correspondingly generate corresponding hidden transaction function keys, so that the hidden transaction function keys have corresponding account addresses that can be used for performing hidden transactions. In practical applications, when a cold wallet is generated, in order to generate an account address for performing a hidden transaction, a current account path is generated, where the current account path is a path sequence from a first hierarchy to a target path directory in an mth hierarchy for generating the account address. In the implementation process, the child seed files of the path directories in the current account path are generated step by step according to the parent seed file, and then the hidden transaction function key corresponding to the target path directory can be derived according to the child seed files of the target path directory in the path directories, so that the hidden transaction function key corresponding to the target path directory is obtained. In addition, the whole process only generates the hidden transaction function key corresponding to the target path directory, and the other path directories only generate the sub-seed files, so that the cold wallet is generated by adopting the mode, the calculation amount is smaller, and the generation efficiency of the cold wallet is higher.
Furthermore, in the current account path, each path directory has an upper-level dependency relationship and a lower-level dependency relationship; the generating of the child seed file of each path directory in the current account path according to the parent seed file comprises: generating a child seed file of a first-level path directory in the current account path according to the parent seed file; generating a sub-seed file of an n +1 th level path directory depending on the path directory according to the sub-seed file of the nth level path directory in the current account path; and n is a positive integer greater than or equal to 1.
In the implementation process, the lower-level sub-seed file is generated by depending on the upper-level sub-seed file, so that only the hidden transaction function key corresponding to the target path directory is generated in the whole process, and the other path directories only generate the sub-seed files, so that the calculation amount is smaller, and the generation efficiency of the cold wallet is higher.
Further, after the generating the child torrent files of the path directories in the current account path according to the parent torrent file, the method further includes:
and generating an account address corresponding to the transparent transaction according to the sub-seed file of the target path directory in each path directory, and sending the account address to the target application program for storage.
In the implementation process, after the child torrent files of all path directories in the current account path are generated according to the parent torrent files, the account addresses corresponding to the transparent transactions are generated according to the child torrent files of the target path directories in all path directories. Therefore, two sets of keys and two sets of account addresses of the transparent transaction and the hidden transaction can be obtained through the same set of operation, the operation amount and the operation time are reduced, and meanwhile, the compatibility of the transparent transaction and the hidden transaction can be improved, so that the transparent transaction and the hidden transaction can be carried out simultaneously.
Further, the generating a father seed file according to the mnemonic words includes: searching a pre-stored mnemonic word list to obtain a mnemonic word sequence corresponding to the mnemonic word; and performing abstract calculation on the mnemonic word sequence to obtain a parent seed file.
In the implementation process, the father seed file is generated according to the mnemonic words by looking up the table and carrying out abstract calculation, the whole process is reliable to implement, and the method has high practical application value.
Further, the acquiring the mnemonic word corresponding to the user comprises:
receiving mnemonics input by the user and transmitted by the target application program;
or acquiring mnemonics distributed to the user by the target application program when the user applies for the cold wallet.
In actual life, when a user applies for a cold wallet for the first time, the target application program can distribute corresponding mnemonics for the user, transmit the mnemonics to equipment for executing the scheme provided by the embodiment of the application, and generate the cold wallet based on the mnemonics, so that user intervention is not needed in the process, and user experience is good. When the cold wallet needs to be backed up or restored, the user only needs to input the mnemonic word in the target application program, and the device executing the scheme provided by the embodiment of the application can automatically generate the cold wallet by acquiring the mnemonic word from the target application program, so that the cold wallet is greatly convenient for the user to use.
Further, when the obtained mnemonic word is the mnemonic word which is allocated to the user by the target application program when the user applies for the cold wallet, before obtaining the hidden transaction function key corresponding to the target path directory according to the parent seed file, the method further includes:
the current account path is randomly generated.
When the user applies for the cold wallet for the first time, an account address corresponding to the hidden transaction is generated by randomly generating a current account path and is sent to a target application program for storage. The method is simple to implement and high in scheme feasibility.
Further, when the obtained mnemonic word is the mnemonic word input by the user and transmitted from the target application program, before the hidden transaction function key corresponding to the target path directory is obtained according to the parent seed file, the method further includes:
randomly generating a current account path;
after generating an account address corresponding to a hidden transaction according to the hidden transaction function key corresponding to the target path directory and before sending the account address to a target application program for storage, the method further includes:
notifying the account address to a background server;
receiving a transaction query result of the background server to the account address;
and determining that the transaction query result is that a transaction record exists.
In the implementation process, when the user backs up or restores the cold wallet, a current account path is randomly generated, then the background server determines whether a transaction record exists in an account address corresponding to the current account path, if so, the transaction record indicates that the transaction record is the account address used by the user before, and the transaction record is sent to the target application program for storage, so that the cold wallet is backed up or restored.
Further, the method further comprises: and when the transaction query result shows that no transaction record exists, regenerating a current account path.
In the implementation process, if the background server determines that the account address corresponding to the current account path does not have the transaction record, that is, the background server indicates that the account address corresponding to the current account path has the maximum probability that the account address is not the account address used by the user before, the background server regenerates the current account path and determines whether the account address has the transaction record again, so that the reliability of the scheme of the application is improved.
The embodiment of the application also provides a transaction information processing method, which comprises the following steps:
acquiring transaction information transmitted by a target application program and an account address of a local terminal to be transacted;
obtaining a current account path according to the account address;
sequentially generating sub-seed files of all path directories in the current account path according to a pre-stored father-seed file to obtain the sub-seed files of the target path directory;
deriving a hidden transaction function key corresponding to the target path directory according to the sub-seed file of the target path directory;
and processing the transaction information by using a hidden transaction function key corresponding to the target path directory, and returning the processed transaction information to the target application program.
It should be noted that, according to the wallet management policy for hidden transactions defined in the Zcash protocol, it is proposed in the Zcash protocol to use zip-32 to manage the key and address of the hidden transaction. And the key derivation way of Zip-32 is: after the parent keys of the 4 functional keys are generated through seed (parent seed file), the child keys are generated through the corresponding parent keys, so that the keys need to be calculated more than 4 times when the child keys of the primary path directory in the current account path are generated, the calculation occupies more resources, and the efficiency is low.
In order to solve the problem, in the implementation process, the transaction information and the account address of the local terminal to be transacted are obtained, that is, the current account path is obtained according to the account address, and then the sub-seed files of each path directory in the current account path are sequentially generated according to the parent seed file in the cold wallet, so that the sub-seed file of the target path directory is obtained. And deriving a hidden transaction function key of the target path directory according to the sub-seed file of the target path directory. Therefore, calculation for each level except the target path directory only needs one time, calculation steps are saved, keys of all functions are generated in the last step, and storage space is saved.
The embodiment of the present application further provides a cold wallet generating device based on Zcash, including: the system comprises a first acquisition module, a parent seed file generation module, a key generation module and an account address generation control module;
the first acquisition module is used for acquiring mnemonics corresponding to the user; the mnemonic words are words or word groups with actual expression meanings;
the father seed file generating module is used for generating and storing a father seed file according to the mnemonic words;
the key generation module is used for obtaining a hidden transaction function key corresponding to the target path directory according to the father seed file;
and the account address generation control module is used for generating an account address corresponding to the hidden transaction according to the hidden transaction function key corresponding to the target path directory and sending the account address to a target application program for storage.
An embodiment of the present application further provides a transaction information processing apparatus, including: the system comprises a second acquisition module, a path recovery module, a derivation module and a processing module;
the second acquisition module is used for acquiring the transaction information transmitted by the target application program and the account address of the home terminal to be transacted;
the path recovery module is used for obtaining a current account path according to the account address;
the derivation module is used for sequentially generating sub-seed files of all path directories in the current account path according to a pre-stored father-seed file to obtain the sub-seed files of the target path directory; deriving a hidden transaction function key corresponding to the target path directory according to the sub-seed file of the target path directory;
and the processing module is used for processing the transaction information by using the hidden transaction function key corresponding to the target path directory and returning the processed transaction information to the target application program.
The embodiment of the application also provides an electronic device supporting ZCash, which comprises a processor, a memory and a communication bus; the communication bus is used for realizing connection communication between the processor and the memory; the processor is configured to execute one or more first programs stored in the memory to implement any one of the above Zcash-based cold wallet generating methods; or the processor is used for executing one or more second programs stored in the memory so as to realize the transaction information processing method.
There is also provided in an embodiment of the present application a readable storage medium storing one or more programs, the one or more programs being executable by one or more processors to implement any of the cold wallet generating methods described above; or to implement the above-described transaction information processing method.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and that those skilled in the art can also obtain other related drawings based on the drawings without inventive efforts.
Fig. 1 is a schematic flowchart of a Zcash-based cold wallet generation method according to an embodiment of the present disclosure;
FIG. 2 is a schematic diagram of a process for generating a mnemonic vocabulary according to an embodiment of the present application;
fig. 3 is a schematic diagram illustrating generation of a hidden transaction function key in a cold wallet according to an embodiment of the present application;
fig. 4 is a schematic flowchart of a transaction information processing method according to an embodiment of the present application;
fig. 5 is a schematic diagram illustrating generation of a hidden transaction function key in another cold wallet provided in an embodiment of the present application;
fig. 6 is a schematic flowchart of a transaction method for performing transparent transaction and hidden transaction simultaneously according to an embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of a Zcash-based cold wallet generating apparatus according to an embodiment of the present disclosure;
fig. 8 is a schematic structural diagram of a transaction information processing apparatus according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.
The first embodiment is as follows:
for the purposes of illustrating the concepts of the present application, some knowledge related to cold purses is described herein. The cold wallet typically includes four parts, a secure medium, a general storage medium, a target application (upper computer software), and a backend server. The security medium and the common storage medium are arranged in a security electronic device, and the security medium is mainly used for storing and calculating information with high confidentiality; the common storage medium mainly transmits information transmitted by the upper computer and transmits the information to the secure medium for processing (note that the upper computer and the secure medium use a secure encryption channel for communication, so that no information is stored in the common medium). The target application program is arranged on an upper computer (such as a user terminal and other equipment) and used for interacting with a user and distributing corresponding random sequences or mnemonics to the user when the user applies for a cold wallet. The background server is used for storing the block node information and decomposing and interpreting the information to form a data structure of the response. The embodiment of the application provides a cold wallet generating method based on ZCash based on the role of a secure electronic device.
Referring to fig. 1, fig. 1 is a schematic flowchart of a Zcash-based cold wallet generation method provided in an embodiment of the present application, including:
s101: and acquiring mnemonics corresponding to the user.
It should be noted that, the Zcash protocol proposes to use zip-32 to manage the key and address of the hidden transaction. However, by using zip-32, the target application generates a 32-byte random sequence, which needs to be remembered by the user as the private key of the user, but for the user, recording the 32-byte random sequence is really too complicated to remember, and once the 32-byte random sequence is lost, the Zcash wallet cannot be backed up and restored, which affects the use of the user.
Therefore, in the embodiment of the present application, a word or a group of words having an actual expression meaning is assigned to the user as a mnemonic word, and the generation of the cold wallet is realized according to the mnemonic word. Therefore, when the ZCash cold wallet is backed up and restored, the user only needs to input the mnemonic words, and the mnemonic words have actual expression meanings, so that the mnemonic words are more convenient for the user to memorize and are not easy to lose.
In the embodiment of the present application, the scheme shown in fig. 1 has at least the following two implementation scenarios. First, the user applies for a cold wallet for the first time. At this time, the target application program can allocate the mnemonic words for the user, and transmit the mnemonic words to the secure electronic device, so that the secure electronic device can perform cold wallet generation based on the mnemonic words. And secondly, the cold wallet can be used for backup and recovery of the cold wallet by the user. At the moment, the user only needs to input the mnemonic words in the target application program, the target application program can transmit the mnemonic words to the safety electronic equipment, and the safety electronic equipment can automatically generate the cold wallet, so that the use of the user is greatly facilitated.
It should be noted that when the target application transmits the mnemonic to the secure electronic device, the mnemonic is converted into ASCII code and transmitted to the secure electronic device, so that the secure electronic device can process the mnemonic.
S102: and generating a father seed file according to the mnemonic words and storing the father seed file.
In the embodiment of the application, the secure electronic device may search a pre-stored mnemonic word list to obtain a mnemonic word sequence corresponding to the mnemonic word, and then perform abstract calculation on the mnemonic word sequence to obtain a parent seed file. In the embodiment of the present application, the digest calculation may be implemented by using a BLAKE algorithm or the like.
It should be further noted that, in the embodiment of the present application, for the mnemonic vocabulary, referring to the steps shown in fig. 2, the secure electronic device may be generated in advance by using a bip-39 method.
For example, an entropy sequence may be generated first, and then a checksum (checksum) is calculated by a hash algorithm (e.g., an algorithm such as SHA 256), and the checksum is added to the back of the entropy sequence to obtain a new sequence. Next, the obtained new sequence is evenly distributed according to the number of the mnemonic words to generate the mnemonic word sequence corresponding to the mnemonic words, for example, as shown in fig. 2, the mnemonic word sequence corresponding to abandon is 000000000, the mnemonic word sequence corresponding to ability is 000000001, and the like, and the obtained new sequence is stored in the mnemonic word table.
Note that the parent seed file generated in the embodiment of the present application is stored in a secure medium.
S103: and obtaining a hidden transaction function key corresponding to the target path directory according to the parent seed file.
It should be noted that the functional key is for a hidden transaction, and since information such as addresses of both parties of the hidden transaction and transaction amount needs to be hidden in the hidden transaction, corresponding functional keys are needed, for example, ivk key and ovk key specially used for viewing transaction information, ask key for signing a special description (expenditure description) part, nsk key for calculating a nullfiier parameter, esk key for sequentially encrypting transaction parameters, and dk key for generating a functional key related to a hidden transaction address may need to be used. The transparent transaction does not need to hide the address of both parties of the transaction, the transaction amount and other information, so that a related function key does not need to be generated.
It should be noted that, in the current Zcash protocol, for convenience of management and security, Zcash is divided into multiple hierarchies, each hierarchy corresponds to a corresponding directory (herein, referred to as a path directory), and a corresponding hidden transaction function key may be generated in the path directory, so that the path directory has a corresponding account address that can be used for performing hidden transactions.
In addition, in the plurality of hierarchical levels divided by Zcash, there is a hierarchical dependency relationship between the hierarchical levels, that is, the generation of the function key by the path directory in the lower hierarchical level depends on the function key generated by the path directory in the corresponding upper hierarchical level. Typically, the first level has 232Each path directory corresponding to the nextThe hierarchical path directory is also 232The whole hierarchy is in tree structure. Therefore, in actual operation, in order to generate an account address, a path (referred to as a current account path herein) needs to be given to determine a path sequence from the first hierarchy to the target path directory in the mth hierarchy for generating the account address. Illustratively, a current account path may be randomly generated by a random algorithm. The destination path directory is a path directory used for generating an account address in the current account path during the current account address generation process.
In a possible implementation manner of the embodiment of the present application, after the current account path is determined, hidden transaction function keys at each level may be obtained according to a method suggested by a zip-32 in a Zcash protocol. In the method, keys required to be generated comprise ask, nsk, ovk and dk, and in addition, in order to avoid that keys under one path directory are leaked to cause that keys under other path directories are also leaked, a chain code cm is added as a parameter. When hidden transaction function keys of all levels are derived, after a parent key under a path directory of a first level in a current account path is generated through a seed file, child keys under path directories of other levels are all generated through a parent key of a path directory corresponding to the previous level.
For example, as shown in fig. 3, parent keys askm, nskm, ovkm and dkm of the path directory of the corresponding first hierarchy are generated based on the parent seed file seed, and a chain code cm is added, and then keys ask0, nsk0, ovk0 and dk0 of the a1 path directory of the second hierarchy and keys ask1, nsk1, ovk1 and dk1 of the B1 path directory are derived in parallel according to the parent keys askm, nskm, ovkm and dkm. Further generating keys ask0/0, nsk0/0, ovk0/0 and dk0/0 of an A11 path directory of a third level based on the keys ask0, nsk0, ovk0 and dk0 of the A1 path directory; the keys ask1, nsk1, ovk1 and dk1 of the B1 path directory are used for generating keys ask1/0, nsk1/0, ovk1/0 and dk1/0 of the B11 path directory of the third level in parallel and the keys ask1/1, nsk1/1, ovk1/1 and dk1/1 of the B12 level path directory.
It should be noted that when the cold wallet is used to generate an account address corresponding to a hidden transaction, only the function key of a certain path directory needs to be obtained. If the cold wallet is generated in the above manner, in the generation process of the account address, the function key of each path directory needs to be calculated, thereby occupying more computing resources. In addition, after the cold wallet is generated in the above manner, since the functional key of the target path directory still needs to be generated in the above manner in the process of performing the hidden transaction, the wallet needs to calculate the functional key of each path directory during each transaction in the process of performing the hidden transaction using the cold wallet, thereby occupying more computing resources and slowing down the transaction speed. For this reason, in another possible implementation of the embodiments of the present application, it is also possible:
generating a child seed file of each path directory in the current account path according to the parent seed file; and deriving a hidden transaction function key corresponding to the target path directory according to the sub-seed file of the target path directory in each path directory.
Specifically, the child seed file of the first-level path directory in the current account path may be generated according to the parent seed file, and then the child seed file of the (n + 1) th-level path directory depending on the path directory may be generated according to the child seed file of the nth-level path directory in the current account path, so as to generate the child seed file of each path directory in the current account path. Note that n is a positive integer of 1 or more.
When the method is adopted for realizing, the cold wallet generates the account address corresponding to the hidden transaction and the hidden transaction process, only the child seed files of all levels are required to be sequentially generated according to the parent seed file, so that the child seed file of the target path directory required by the transaction is obtained, and then the hidden transaction function key of the target path directory is obtained according to the derivation of the child seed file of the target path directory.
S104: and generating an account address corresponding to the hidden transaction according to the hidden transaction function key corresponding to the target path directory, and sending the account address to the target application program for storage.
For example, hash calculation may be performed on the hidden transaction function key corresponding to the target path directory, and an address version number may be added to generate an address sequence, and then the address sequence is encoded and transformed by bech32 to obtain an account address corresponding to the hidden transaction. And after the account address corresponding to the hidden transaction is obtained, the secure electronic equipment transmits the account address to a target application program through a common medium for storage, namely, the generation of the part of the hidden transaction in the cold wallet is completed.
It should be noted that the cold wallet may also have portions of the transaction that are transparent. It can also be implemented in mnemonic fashion for the part of the cold wallet that is used to conduct transparent transactions. In the embodiment of the application, a mnemonic word can be used for generating a parent seed file, the parent seed file is a parent seed file in hidden transactions and transparent transactions, and a key required by the transparent transactions can be generated by adopting a key generation mode different from that of the hidden transactions based on the parent seed file. However, in consideration of compatibility of two transactions and calculation amount, in a feasible implementation manner of the embodiment of the present application, on the basis of the feasible implementation scheme that the hidden transaction function key of the target path directory is derived from the sub-seed file of each path directory in the current account path and further from the sub-seed file of the target path directory in each path directory, the sub-seed file of the target path directory may be used as a key for the transparent transaction, and the account address corresponding to the transparent transaction is generated according to the sub-seed file of the target path directory. When the cold wallet is transacted, the transparent transaction and the hidden transaction are both keys calculated by the same calculation mechanism, so that the transparent transaction and the hidden transaction are better in compatibility and can be performed simultaneously, two calculations are not needed, and the processing efficiency is higher.
It should be noted that the account address corresponding to the generated transparent transaction also needs to be sent to the target application for saving.
It should be noted that, for the cold wallet, in order to ensure the security of the transaction, the secure electronic device only needs to store the parent seed file, the target application program stores the account address, and the related key used in the transaction process is obtained by generating the parent seed file during the transaction.
It should also be noted that, in the embodiment of the present application, there is a certain difference in the cold wallet generation process performed by the secure electronic device when the user applies for the cold wallet for the first time and the cold wallet backup or recovery is performed by the user. Specifically, the method comprises the following steps:
when the user applies for the cold wallet for the first time, after receiving the mnemonic words distributed to the user by the target application program when the user applies for the cold wallet, the secure electronic device generates a parent seed file according to the mnemonic words and stores the parent seed file in the secure medium. And then, randomly generating a current account path, and obtaining a hidden transaction function key corresponding to the target path directory according to the parent seed file and the current account path.
When the user performs cold wallet backup or recovery, the safe electronic equipment generates a father seed file according to the mnemonic words and stores the father seed file in a safe medium after receiving the mnemonic words input by the user from the target application program. And then, randomly generating a current account path, obtaining a hidden transaction function key corresponding to the target path directory according to the parent seed file and the current account path, and further generating and obtaining an account address. At this time, the account address needs to be notified to the background server, the background server queries the account, if a transaction record exists, the transaction record indicates that the account address is the account address used by the user before, and the transaction record is sent to the target application program for storage, so that the cold wallet can be backed up or restored. If no transaction record exists, the fact that the account address corresponding to the current account path has the maximum probability that the account address is not the account address used by the user before is shown, so that the current account path can be regenerated, the account address corresponding to the current account path is regenerated and notified to the background server, and the background server queries the account.
The cold wallet generated by the Zcash-based cold wallet generation method provided by the embodiment of the application has the account address specially used for the hidden transaction and the parent seed file which can be used for generating the related function key of the hidden transaction, so that the Zcash hidden transaction can be completed by the cold wallet, and the problem that the existing cold wallet device does not support the complex hidden transaction is solved.
Further, it should be understood that the Zcash protocol defines a wallet management policy for hidden transactions. In particular, the ZCash protocol proposes to use zip-32 to manage the key and address of the hidden transaction. However, according to the protocol specification of Zcash, in the wallet management structure of zip-32, a 32-byte random sequence is used as a seed to generate and derive a secret key, although the security of the wallet can be guaranteed by using the random sequence, for a user, recording the 32-byte random sequence is too complicated to remember, and once the 32-byte random sequence is lost, the Zcash wallet cannot be backed up and restored, which affects the use of the user. In the scheme provided by the embodiment of the application, the mnemonic words with actual expression meanings are used for generating the parent seed file, so that the functional key and the account address required by the hidden transaction are obtained, when the ZCash cold wallet is backed up and restored, a user only needs to input the mnemonic words, and the mnemonic words have the actual expression meanings, so that the mnemonic words are more convenient for the user to memorize and are not easy to lose.
In addition, in a possible implementation manner of the embodiment of the application, the cold wallet generates a child seed file of each path directory of the current account path through the parent seed file, and further generates a hidden transaction function key of a corresponding level according to the child seed file of the target path directory in each path directory. When the mechanism is applied to a transaction process, the cold wallet only needs to generate the child seed files of all levels according to the parent seed file, and then derives the hidden transaction function key required by the transaction according to the child seed file of the target path directory, and the hidden transaction function key of each level does not need to be calculated, so that the calculation amount is reduced, the calculation efficiency is improved, and the transaction speed is accelerated.
In addition, in a feasible implementation manner of the embodiment of the application, the transparent transaction and the hidden transaction can use the same target path directory, and use the sub-seed file in the hidden transaction as a key, so that the compatibility between the transparent transaction and the hidden transaction is improved while the memory requirement of a user is reduced.
Example two:
on the basis of the first embodiment, the present embodiment provides a transaction information processing method executed by a secure electronic device in a transaction process. After the cold wallet is generated based on the cold wallet generating method provided in the first embodiment, when a hidden transaction is performed, a process thereof may be as shown in fig. 4, which includes:
s401: and acquiring the transaction information and the account address of the local terminal to be transacted.
It should be noted that, when a cold wallet is used for conducting a transaction, after a user logs in an APP (i.e., a target application) corresponding to the cold wallet, the user needs to input transaction information in the target application and select an account address of a local terminal used for the transaction (i.e., an account address of the local terminal to be transacted), and the target application transmits the transaction information and the account address of the local terminal to be transacted to the secure electronic device.
It should be noted that, the process described in fig. 4 in this embodiment of the present application is only directed to the process when the hidden transaction is executed, that is, the account address of the local end to be transacted should be the account address corresponding to the hidden transaction.
It should be noted that for a cold wallet that supports both hidden and transparent transactions, the user may also need to select the transaction type before selecting the account address of the home terminal for the transaction in the target application. With respect to the process described in fig. 4, the transaction type selected by the user is a hidden transaction, and the process that the transaction type selected by the user is a transparent transaction is not described in fig. 4.
S402: and obtaining the current account path according to the account address.
It should be understood that the account address is calculated from the current account path, and the current account path may be obtained by parsing through the account address. The specific analysis mode may refer to a Zcash protocol, which is not described in detail herein.
S403: and sequentially generating the sub-seed files of all path directories in the current account path according to the pre-stored father-seed file to obtain the sub-seed files of the target path directory.
S404: and deriving a hidden transaction function key corresponding to the target path directory according to the sub-seed file of the target path directory.
Illustratively, as shown in fig. 5, the secure electronic device may sequentially generate a child seed0 of the first level path directory according to the saved parent seed file seed, and add a chain code cm 0. Generating a sub-seed 0/0 of the first path directory in the second level based on the sub-seed 0 of the first level path directory and adding a chain code cm 0/0; and generating a sub-seed 0/1 for the second path directory in the second level and adding a chain code cm 0/1. Generating a sub-seed 0/1/0 of the first path directory in the third stage based on the sub-seed 0/1, and adding a chain code cm 0/1/0; and generating a sub-seed 0/1/1 for the second path directory in the third level and adding a chain code cm 0/1/1. And generating a sub-seed 0/0/0 of a third path directory in the third level based on the sub-seed 0/0 of the second path directory in the second level, adding a chain code cm0/0/0, and deriving hidden transaction function keys ask, nsk, ovk and dk based on the sub-seed 0/0/0.
S405: and processing the transaction information by using the hidden transaction function key corresponding to the target path directory, and returning the processed transaction information to the target application program.
It should be understood that, the specific processing manner of the transaction information using each function key may refer to the specification of the Zcash protocol, and is not described in detail in this application.
It should also be understood that in the embodiment of the present application, the transaction information may include a target transaction address and a target transaction output amount. And after the processed transaction information is returned to the target application program, the target application program packages the processed transaction information so as to send the transaction information to the background server, and the background server is further linked to the block chain to complete the transaction.
In the embodiment of the application, two transaction methods for simultaneously performing the transparent transaction and the hidden transaction are further provided, and the method can be applied to the cold wallet which is generated based on the cold wallet generation method of the first embodiment and simultaneously supports the transparent transaction and the hidden transaction.
The first mode, as shown in fig. 6, includes:
s601: the target application obtains transaction information and a transaction type.
The transaction information includes a target transaction address and a target transaction output amount. The transaction types include transparent transactions and hidden transactions.
S602: and when the UTXO in the account address corresponding to the transaction type is smaller than the target transaction output amount, acquiring the UTXO in the account address corresponding to the other transaction type.
It should be noted that, in the embodiment of the present application, when it is found that the UTXO (Unspent Transaction Output) in the account address corresponding to the Transaction type selected by the user is smaller than the target Transaction Output amount, an interface may be provided first to enable the user to determine whether to complement the UTXO in the account address corresponding to another Transaction type, and after the user determines to adopt the UTXO, the UTXO in the account address corresponding to another Transaction type is obtained, so as to improve user experience.
It should be appreciated that the information of the transparent transaction is not encrypted and the entire transparent transaction UTXO is readily available. Due to the hidden characteristic of the hidden transaction, the UTXO on the account address of the local terminal to be traded is generally required to be collected by the background server under the condition that the user inputs transaction information, but the calculation amount of the background server is not large because only the UTXO on one address needs to be collected.
S603: when the UTXO in the account address corresponding to the other transaction type is larger than the difference value between the target transaction output amount and the UTXO in the account address corresponding to the transaction type: and setting a first target transaction output amount corresponding to the transaction type as UTXO in the account address corresponding to the transaction type, and setting a second target transaction output amount corresponding to another transaction type as a difference value between the target transaction output amount and UTXO in the account address corresponding to the transaction type.
For example, taking the user-selected hidden transaction as an example, assume that the target transaction output amount input by the user is 10 Zcash coins, assume that in the cold wallet, there are 8 Zcash coins in UTXO in the account address of the hidden transaction, and there are 3 Zcash coins in the account address corresponding to the transparent transaction. When the cold wallet initiates a transaction, the UTXO in the account address of the hidden transaction is found to be smaller than the target transaction output amount, the UTXO in the account address of the hidden transaction is not enough to complete the transaction, and the difference is 2 ZCash coins. And further acquiring the UTXO in the account address corresponding to the transparent transaction, and finding that the UTXO in the account address corresponding to the transparent transaction is larger than 2 ZCash coins, so that the total UTXO of a user is enough to complete the transaction, at the moment, setting the target transaction output amount of the hidden transaction to be 8 ZCash coins, and setting the target transaction output amount of the transparent transaction to be 2 ZCash coins. The user-selected transparent transaction case is similar to the example process described above and will not be described in detail.
S604: and sending the first target transaction output amount corresponding to the transaction type, the account address corresponding to the transaction type and the target transaction address to the safety electronic equipment as a group of data, and sending the second target transaction output amount corresponding to the other transaction type, the account address corresponding to the other transaction type and the target transaction address to the safety electronic equipment as another group of data.
Assume that the user selected transaction type is a hidden transaction and the other transaction type is a transparent transaction. The secure electronic device generates a current account path corresponding to the hidden transaction according to the account address corresponding to the hidden transaction, and returns the processed first target transaction output amount and the target transaction address to the target application program with reference to the process of fig. 4. And meanwhile, the safety electronic equipment generates a current account path corresponding to the transparent transaction according to the account address corresponding to the transparent transaction, generates a sub-seed file of a target path directory in the current account path corresponding to the transparent transaction according to the parent seed file, and then processes the output amount of the second target transaction and the target transaction address by taking the sub-seed file of the target path directory as a private key of the transparent transaction and returns the processed output amount and the target transaction address to the target application program.
In particular, when generating a cold wallet, the account address for the transparent transaction and the account address for the hidden transaction may be derived based on the same target path directory. At this time, only one current account path needs to be generated in the secure electronic device, and the sub-seed files of the path directories in the current account path are calculated once.
S605: and the target application program packages the data returned by the safety electronic equipment and sends the data to the back-end server.
And the background server links the data sent by the target application program to the block chain to complete the transaction.
In a second mode, a dual-type synchronous transaction option may be provided, and after the user selects the option, the target application may display the UTXO in the account address of the hidden transaction and the UTXO in the account address of the transparent transaction to the user, and request the user to input a target transaction output amount for the desired transaction in each account address and a corresponding target transaction address. After the user inputs the target transaction output amount and the corresponding target transaction address, which are required to be transacted, in each account address input by the user are sent to the safety electronic equipment by the target application program, the safety electronic equipment generates a corresponding current account path according to the account address, sequentially generates sub-seed files of each path directory in the current account path according to the stored parent seed file, obtains the sub-seed files of the target path directory, and derives the hidden transaction function key of the target path directory according to the sub-seed files of the target path directory. Then, a target transaction address and a target transaction output amount corresponding to the hidden transaction are processed by using the hidden transaction function key and returned to the target application program; and using the sub-seed file of the target path directory as a private key of the transparent transaction to process a target transaction address and a target transaction output amount corresponding to the transparent transaction and return the target transaction address and the target transaction output amount to the target application program. And the target application program packages the data returned by the safety electronic equipment and sends the data to the back-end server. And the background server links the data sent by the target application program to the block chain to complete the transaction.
It should be understood that the above described manners are only examples of several possible transaction manners after the cold wallet is generated by using the cold wallet generation method provided in the embodiment of the present application, and do not represent that the present application can only implement transactions in the above several manners.
Example three:
based on the same inventive concept, the embodiment of the present application further provides a Zcash-based cold wallet generating apparatus 100 and a transaction information processing apparatus 200. Referring to fig. 7 and 8, fig. 7 shows a Zcash-based cold wallet generating apparatus in one-to-one correspondence with the method shown in fig. 1, and fig. 8 shows a transaction information processing apparatus in one-to-one correspondence with the method steps shown in fig. 4. It should be understood that the specific functions of the apparatus 100 and the apparatus 200 can be referred to the above description, and the detailed description is omitted here as appropriate to avoid redundancy. The devices 100 and 200 include at least one software functional module that can be stored in memory in the form of software or firmware or solidified in the operating system of the devices 100 and 200. Specifically, the method comprises the following steps:
referring to fig. 7, the apparatus 100 includes: the system comprises a first acquisition module 101, a parent seed file generation module 102, a key generation module 103 and an account address generation control module 104. Wherein:
a first obtaining module 101, configured to obtain a mnemonic word corresponding to a user; the mnemonic words are words or word groups with actual expression meanings;
a father seed file generating module 102, configured to generate and store a father seed file according to the mnemonic word;
the key generation module 103 is configured to obtain a hidden transaction function key corresponding to the target path directory according to the parent seed file;
and the account address generation control module 104 is configured to generate an account address corresponding to the hidden transaction according to the hidden transaction function key corresponding to the target path directory, and send the account address to the target application program for storage.
In a feasible implementation manner of the embodiment of the present application, the key generation module 103 is specifically configured to generate a child seed file of each path directory in the current account path according to the parent seed file, and derive a hidden transaction function key corresponding to the target path directory according to the child seed file of the target path directory in each path directory.
In the above feasible implementation, in the current account path, each path directory has an upper-level dependency relationship and a lower-level dependency relationship; the key generation module 103 is further configured to generate a child seed file of a first-level path directory in the current account path according to the parent seed file, and generate a child seed file of an n + 1-level path directory that depends on the path directory according to a child seed file of an nth-level path directory in the current account path; n is a positive integer of 1 or more.
In the above feasible embodiment, the key generation module 103 is further configured to generate an account address corresponding to the transparent transaction according to the sub-seed file of the target path directory in each path directory, and send the account address to the target application for storage.
In a feasible implementation manner of the embodiment of the present application, the parent seed file generating module 102 is specifically configured to search a pre-stored mnemonic word table to obtain a mnemonic word sequence corresponding to a mnemonic word; and performing abstract calculation on the mnemonic word sequence to obtain a parent seed file.
In a possible implementation manner of the embodiment of the present application, the first obtaining module 101 is specifically configured to receive a mnemonic word input by a user from a target application; or acquiring mnemonics distributed to the user by the target application program when the user applies for the cold wallet.
In a feasible implementation manner of the embodiment of the present application, when the obtained mnemonic word is a mnemonic word allocated to the user by the target application when the user applies for the cold wallet, the parent seed file generating module 102 is further configured to randomly generate a current account path.
In a feasible implementation manner of the embodiment of the present application, when the obtained mnemonic word is a mnemonic word input by a user and transmitted from the target application, the parent seed file generating module 102 is further configured to randomly generate a current account path. The account address generation control module 104 is further configured to notify the background server of the account address before sending the account address corresponding to the generated hidden transaction to the target application for saving; receiving a transaction query result of the background server to the account address; determining that the transaction query result is that a transaction record exists.
Further, the parent seed file generating module 102 is further configured to regenerate a current account path when the transaction query result indicates that no transaction record exists.
Referring to fig. 8, the apparatus 200 includes a second obtaining module 201, a path restoring module 202, a deriving module 203, and a processing module 204;
a second obtaining module 201, configured to obtain transaction information sent by the target application program and an account address of a local terminal to be transacted;
a path recovery module 202, configured to obtain a current account path according to the account address;
the derivation module 203 is configured to sequentially generate child seed files of each path directory in the current account path according to a pre-stored parent seed file, so as to obtain child seed files of a target path directory; deriving a hidden transaction function key corresponding to the target path directory according to the sub-seed file of the target path directory;
the processing module 204 is configured to process the transaction information using the hidden transaction function key corresponding to the target path directory, and return the processed transaction information to the target application program.
It should be understood that, for the sake of brevity, the contents described in some embodiments are not repeated in this embodiment.
Example four:
the present embodiment provides an electronic device supporting Zcash, which is shown in fig. 9 and includes a processor 901, a memory 902, and a communication bus 903. Wherein:
the communication bus 903 is used for connection communication between the processor 901 and the memory 902.
The processor 901 is configured to execute one or more first programs stored in the memory 902 to implement the Zcash-based cold wallet generating method in the first embodiment;
or, the processor 901 is configured to execute one or more second programs stored in the memory 902, so as to implement the transaction information processing method in the second embodiment.
It will be appreciated that the configuration shown in fig. 9 is merely illustrative and that the electronic device may include more or fewer components than shown in fig. 9 or have a different configuration than shown in fig. 9. For example, the electronic device also has components such as a display screen, a keyboard, and the like. It should be further noted that the electronic device described in the embodiments of the present application may be the secure electronic device described in the first and second embodiments, and the processor 901 and the memory 902 may be components of the secure medium in the secure electronic device.
The present embodiment further provides a readable storage medium, such as a floppy disk, an optical disk, a hard disk, a flash Memory, a usb (secure digital Card) Card, an MMC (Multimedia Card) Card, etc., in which one or more programs for implementing the above steps are stored, and the one or more programs can be executed by one or more processors to implement the Zcash-based cold wallet generating method in the first embodiment or the transaction information processing method in the second embodiment. And will not be described in detail herein.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
In addition, units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
Furthermore, the functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
In this document, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions.
In this context, a plurality means two or more.
The above description is only an example of the present application and is not intended to limit the scope of the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (14)

1. A cold wallet generation method based on ZCash is characterized by comprising the following steps:
acquiring mnemonics corresponding to a user; the mnemonic words are words or word groups with actual expression meanings;
generating a father seed file according to the mnemonic words and storing the father seed file;
obtaining a hidden transaction function key corresponding to the target path directory according to the father seed file;
and generating an account address corresponding to the hidden transaction according to the hidden transaction function key corresponding to the target path directory, and sending the account address to a target application program for storage.
2. The Zcash-based cold wallet generating method as claimed in claim 1, wherein the obtaining of the hidden transaction function key corresponding to the target path directory according to the parent seed file comprises:
generating a child seed file of each path directory in the current account path according to the parent seed file;
and deriving a hidden transaction function key corresponding to the target path directory according to the sub-seed file of the target path directory in each path directory.
3. The Zcash-based cold wallet generation method of claim 2, wherein each path directory has a top and bottom level dependency relationship in the current account path; the generating of the child seed file of each path directory in the current account path according to the parent seed file comprises:
generating a child seed file of a first-level path directory in the current account path according to the parent seed file;
generating a sub-seed file of an n +1 th level path directory depending on the path directory according to the sub-seed file of the nth level path directory in the current account path; and n is a positive integer greater than or equal to 1.
4. The ZCash-based cold wallet generation method of claim 2,
after the generating the child torrent files of the path directories in the current account path according to the parent torrent file, the method further includes:
and generating an account address corresponding to the transparent transaction according to the sub-seed file of the target path directory in each path directory, and sending the account address to the target application program for storage.
5. The Zcash-based cold wallet generation method of any one of claims 1-4, wherein the generating of the parent seed file according to the mnemonic comprises:
searching a pre-stored mnemonic word list to obtain a mnemonic word sequence corresponding to the mnemonic word;
and performing abstract calculation on the mnemonic word sequence to obtain a parent seed file.
6. The Zcash-based cold wallet generation method of any one of claims 1-4, wherein the acquiring a mnemonic corresponding to the user comprises:
receiving mnemonics input by the user and transmitted by the target application program;
or acquiring mnemonics distributed to the user by the target application program when the user applies for the cold wallet.
7. The Zcash-based cold wallet generating method of claim 6, wherein when the obtained mnemonic word is the mnemonic word allocated to the user by the target application when the user applies for the cold wallet, before obtaining the hidden transaction function key corresponding to the target path directory according to the parent seed file, the method further comprises:
the current account path is randomly generated.
8. The Zcash-based cold wallet generating method as claimed in claim 6, wherein when the obtained mnemonic is the mnemonic input by the user from the target application, before obtaining the hidden transaction function key corresponding to the target path directory according to the parent seed file, the method further comprises:
randomly generating a current account path;
after generating an account address corresponding to a hidden transaction according to the hidden transaction function key corresponding to the target path directory and before sending the account address to a target application program for storage, the method further includes:
notifying the account address to a background server;
receiving a transaction query result of the background server to the account address;
and determining that the transaction query result is that a transaction record exists.
9. The Zcash-based cold wallet generation method of claim 8, further comprising:
and when the transaction query result shows that no transaction record exists, regenerating a current account path.
10. A transaction information processing method, comprising:
acquiring transaction information transmitted by a target application program and an account address of a local terminal to be transacted;
obtaining a current account path according to the account address;
sequentially generating sub-seed files of all path directories in the current account path according to a pre-stored father-seed file to obtain the sub-seed files of the target path directory;
deriving a hidden transaction function key corresponding to the target path directory according to the sub-seed file of the target path directory;
and processing the transaction information by using a hidden transaction function key corresponding to the target path directory, and returning the processed transaction information to the target application program.
11. A ZCash-based cold wallet generation apparatus, comprising: the system comprises a first acquisition module, a parent seed file generation module, a key generation module and an account address generation control module;
the first acquisition module is used for acquiring mnemonics corresponding to the user; the mnemonic words are words or word groups with actual expression meanings;
the father seed file generating module is used for generating and storing a father seed file according to the mnemonic words;
the key generation module is used for obtaining a hidden transaction function key corresponding to the target path directory according to the father seed file;
and the account address generation control module is used for generating an account address corresponding to the hidden transaction according to the hidden transaction function key corresponding to the target path directory and sending the account address to a target application program for storage.
12. A transaction information processing apparatus characterized by comprising: the system comprises a second acquisition module, a path recovery module, a derivation module and a processing module;
the second acquisition module is used for acquiring the transaction information transmitted by the target application program and the account address of the home terminal to be transacted;
the path recovery module is used for obtaining a current account path according to the account address;
the derivation module is used for sequentially generating sub-seed files of all path directories in the current account path according to a pre-stored father-seed file to obtain the sub-seed files of the target path directory; deriving a hidden transaction function key corresponding to the target path directory according to the sub-seed file of the target path directory;
and the processing module is used for processing the transaction information by using the hidden transaction function key corresponding to the target path directory and returning the processed transaction information to the target application program.
13. An electronic device supporting Zcash, comprising: a processor, a memory, and a communication bus;
the communication bus is used for realizing connection communication between the processor and the memory;
the processor is configured to execute one or more first programs stored in the memory to implement the Zcash-based cold wallet generating method according to any one of claims 1 to 9;
or, the processor is configured to execute one or more second programs stored in the memory to implement the transaction information processing method according to claim 10.
14. A readable storage medium storing one or more programs, the one or more programs being executable by one or more processors to implement the Zcash-based cold wallet generating method according to any one of claims 1 to 9, or to implement the transaction information processing method according to claim 10.
CN202010079946.7A 2020-02-04 2020-02-04 Cold wallet generation method, transaction information processing method, device and storage medium Active CN110930145B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010079946.7A CN110930145B (en) 2020-02-04 2020-02-04 Cold wallet generation method, transaction information processing method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010079946.7A CN110930145B (en) 2020-02-04 2020-02-04 Cold wallet generation method, transaction information processing method, device and storage medium

Publications (2)

Publication Number Publication Date
CN110930145A true CN110930145A (en) 2020-03-27
CN110930145B CN110930145B (en) 2020-05-12

Family

ID=69854685

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010079946.7A Active CN110930145B (en) 2020-02-04 2020-02-04 Cold wallet generation method, transaction information processing method, device and storage medium

Country Status (1)

Country Link
CN (1) CN110930145B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111585992A (en) * 2020-04-26 2020-08-25 数网金融有限公司 Method, client and storage medium for detecting network attack
CN112001717A (en) * 2020-10-27 2020-11-27 四川泰立科技股份有限公司 Method, system and storage medium for calculating encryption currency of digital television
CN112073183A (en) * 2020-08-07 2020-12-11 深圳区块大陆科技有限公司 Block chain account generation method
CN112184223A (en) * 2020-09-28 2021-01-05 江苏恒宝智能系统技术有限公司 Block chain account protection method and device, electronic equipment and storage medium
CN112291355A (en) * 2020-10-30 2021-01-29 上海阿吉必信息技术有限公司 Key backup and recovery method and device for block chain wallet
CN114760054A (en) * 2022-06-14 2022-07-15 浙江毫微米科技有限公司 Key management method and device based on digital wallet and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160335628A1 (en) * 2014-05-15 2016-11-17 Adam Mark Weigold System and method for digital currency storage, payment and credit
WO2019043466A1 (en) * 2018-06-12 2019-03-07 フレセッツ株式会社 Wallet device for cryptocurrency, and signature method using said device
CN109474420A (en) * 2018-10-26 2019-03-15 深圳市元征科技股份有限公司 A kind of private key backup method and relevant device
CN109685499A (en) * 2018-11-01 2019-04-26 苏州蜗牛数字科技股份有限公司 A kind of SIM card and implementation method of embedded digital wallet function
CN110544090A (en) * 2019-09-06 2019-12-06 东信和平科技股份有限公司 Digital currency hard wallet application implementation method, SIM card and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160335628A1 (en) * 2014-05-15 2016-11-17 Adam Mark Weigold System and method for digital currency storage, payment and credit
WO2019043466A1 (en) * 2018-06-12 2019-03-07 フレセッツ株式会社 Wallet device for cryptocurrency, and signature method using said device
CN109474420A (en) * 2018-10-26 2019-03-15 深圳市元征科技股份有限公司 A kind of private key backup method and relevant device
CN109685499A (en) * 2018-11-01 2019-04-26 苏州蜗牛数字科技股份有限公司 A kind of SIM card and implementation method of embedded digital wallet function
CN110544090A (en) * 2019-09-06 2019-12-06 东信和平科技股份有限公司 Digital currency hard wallet application implementation method, SIM card and system

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111585992A (en) * 2020-04-26 2020-08-25 数网金融有限公司 Method, client and storage medium for detecting network attack
CN112073183A (en) * 2020-08-07 2020-12-11 深圳区块大陆科技有限公司 Block chain account generation method
CN112184223A (en) * 2020-09-28 2021-01-05 江苏恒宝智能系统技术有限公司 Block chain account protection method and device, electronic equipment and storage medium
CN112001717A (en) * 2020-10-27 2020-11-27 四川泰立科技股份有限公司 Method, system and storage medium for calculating encryption currency of digital television
CN112291355A (en) * 2020-10-30 2021-01-29 上海阿吉必信息技术有限公司 Key backup and recovery method and device for block chain wallet
CN112291355B (en) * 2020-10-30 2022-09-09 上海阿吉必信息技术有限公司 Key backup and recovery method and device for block chain wallet
CN114760054A (en) * 2022-06-14 2022-07-15 浙江毫微米科技有限公司 Key management method and device based on digital wallet and storage medium

Also Published As

Publication number Publication date
CN110930145B (en) 2020-05-12

Similar Documents

Publication Publication Date Title
CN110930145B (en) Cold wallet generation method, transaction information processing method, device and storage medium
US20210027289A1 (en) Asset transaction method, storage medium, and computer device
US9811684B1 (en) Token-based storage service
EP3208714B1 (en) Data reconstruction method, apparatus and system in distributed storage system
CN110602147B (en) Data encryption safe storage method, system and storage medium based on cloud platform
KR20230157929A (en) Transfer cryptocurrency from a remote access restricted wallet
Li et al. Towards privacy-preserving storage and retrieval in multiple clouds
CN111737720B (en) Data processing method and device and electronic equipment
CN108829899B (en) Data table storage, modification, query and statistical method
CN103942292A (en) Virtual machine mirror image document processing method, device and system
CN110022315A (en) Weight management method, device and equipment in a kind of piece of chain type account book
US11907379B2 (en) Creating a secure searchable path by hashing each component of the path
CN111325535A (en) Block chain private key management method, system and storage medium based on elliptic curve migration
CN104573557B (en) Cloud data storage method and device and cloud data restoration method
CN105447166A (en) Keyword based information search method and system
US20230214513A1 (en) Mechanism for multi-factor authentication based on data
CN112866406A (en) Data storage method, system, device, equipment and storage medium
KR101428649B1 (en) Encryption system for mass private information based on map reduce and operating method for the same
CN109687970B (en) Mobile block chain full node and implementation method thereof
CN105141418A (en) Certificate authentication method and system
KR101873879B1 (en) Data distribution storage apparatus and method using relative difference set generated from the group having the two-dimensional element
US20220138050A1 (en) Method for storage management, electronic device, and computer program product
CN109525649B (en) Data processing method and device for zookeeper client
CN114995949A (en) Container mirror image construction method and device
JP7327517B2 (en) Hidden hash table construction system, reference system, and method thereof

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20210226

Address after: 212355 Hengtang Industrial Zone, Danyang City, Zhenjiang City, Jiangsu Province

Patentee after: HENGBAO Corp.

Address before: 210019 8th floor, building 4a, international R & D headquarters park, 68 Aoti street, Jianye District, Nanjing City, Jiangsu Province

Patentee before: JIANGSU HENGBAO INTELLIGENT SYSTEM TECHNOLOGY Co.,Ltd.

TR01 Transfer of patent right