Summary of the invention
In order to solve the above technical problems, the embodiment of the present application provides a kind of IBE key updating method based on UTXO model
And device, to achieve the purpose that realize the key updating to target user, technical solution is as follows:
A kind of IBE key updating method based on UTXO model, comprising:
In the case where the key of target user needs to update, obtained from block chain newest more for the target user
New UTXO Transaction Information;
The identification information of the target user is obtained from the output information in the UTXO Transaction Information;
If the target user is non-by supervision user, the main private key and Your Majesty's key of the target user are become
More, and using the identification information of the target user and main private key and Your Majesty's key after change, the target user is updated
Private key;
Or, if the target user changes the identification information of the target user by supervision user to be non-,
And using the identification information after Your Majesty's key of the target user and change, the private key of the target user is updated.
Preferably, the method also includes:
If the target user be by supervision user, the identification information of the target user is changed, and
Using the identification information after the main private key and Your Majesty's key of regulatory agency and change, the private key of the target user is updated.
Preferably, the method also includes:
The index of position of the output information in the UTXO Transaction Information in the block chain and described will be directed toward
The cryptographic Hash of UTXO Transaction Information inputs information as target;
By the open parameter comprising Your Majesty's key after the change and the identification information of the target user, as mesh
Mark output information;Or, by the identification information after the open parameter and the change of Your Majesty's key comprising the target user,
As target output information;
Target UTXO Transaction Information comprising target input information and the target output information is published to described
In block chain.
Preferably, in the target output information further include: the updated key of target user uses validity period;
In the target UTXO Transaction Information further include: the identity information for the publisher that trades and/or the institute before use update
The private key for stating target user inputs the information that information and the target output information are signed to the target.
Preferably, the method also includes:
In the case where the key of the target user needs to nullify, the last updated UTXO of the target user will be directed to
Output information in Transaction Information is set as empty, and sets empty UTXO Transaction Information for output information and be published to the block
In chain.
A kind of IBE key update device based on UTXO model, comprising:
First obtains module, for obtaining and being directed to from block chain in the case where the key of target user needs to update
The last updated UTXO Transaction Information of target user;
Second obtains module, for obtaining the body of the target user from the output information in the UTXO Transaction Information
Part identification information;
First update module, if being the non-main private by supervision user, to the target user for the target user
Key and Your Majesty's key change, and the identification information for utilizing the target user and main private key and Your Majesty's key after change,
Update the private key of the target user;
Or, the second update module, if being non-by supervision user for the target user, to the body of the target user
Part identification information changes, and the identification information using the main private key of the target user and Your Majesty's key and after changing,
Update the private key of the target user.
Preferably, described device further include:
Third update module, if being by supervision user, to the identity mark of the target user for the target user
Know information to change, and the identification information using the main private key of regulatory agency and Your Majesty's key and after changing, described in update
The private key of target user.
Preferably, described device further include:
First determining module, position of the output information in the block chain for that will be directed toward in the UTXO Transaction Information
The cryptographic Hash of the index and the UTXO Transaction Information set inputs information as target;
Second determining module, for that will include the open parameter of Your Majesty's key after the change and the body of the target user
Part identification information, as target output information;Or, by the open parameter and the change of Your Majesty's key comprising the target user
Identification information afterwards, as target output information;
First release module, the target UTXO for that will include the target input information and the target output information are handed over
Easy information is published in the block chain.
Preferably, in the target output information further include: the updated key of target user uses validity period;
In the target UTXO Transaction Information further include: the identity information for the publisher that trades and/or the institute before use update
The private key for stating target user inputs the information that information and the target output information are signed to the target.
Preferably, described device further include:
Second release module, for the target will to be directed in the case where the key of the target user needs to nullify
Output information in the last updated UTXO Transaction Information of user is set as empty, and sets empty UTXO for output information and trade
Information is published in the block chain.
Compared with prior art, the application has the beneficial effect that
In this application, target user key need update in the case where, if target user be it is non-by supervision user,
The identification information of target user, the main private to the target user are then obtained from the output information in UTXO Transaction Information
Key and Your Majesty's key change, and the identification information for utilizing the target user and main private key and Your Majesty's key after change,
The private key of the target user is updated, or, changing to the identification information of the target user, and utilizes the target
The main private key and Your Majesty's key and the identity information after change of user, updates the private key of the target user, realizes to target user
Key update.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present application, technical solutions in the embodiments of the present application carries out clear, complete
Site preparation description, it is clear that described embodiments are only a part of embodiments of the present application, instead of all the embodiments.It is based on
Embodiment in the application, it is obtained by those of ordinary skill in the art without making creative efforts every other
Embodiment shall fall in the protection scope of this application.
The embodiment of the present application discloses a kind of IBE key updating method based on UTXO model, comprising: target user's
In the case that key needs to update, is obtained from block chain and be directed to the last updated UTXO Transaction Information of the target user;If
The target user is non-by supervision user, then obtains the target user from the output information in the UTXO Transaction Information
Identification information;The main private key and Your Majesty's key of the target user are changed, and utilize the body of the target user
Main private key and Your Majesty's key after part identification information and change, update the private key of the target user;Or, to the target user's
Identification information changes, and using the identity information after the main private key of the target user and Your Majesty's key and change, more
The private key of the new target user.In this application, the update to the key of target user may be implemented.
As shown in Figure 1, it is a kind of IBE key updating method embodiment 1 based on UTXO model provided by the present application
Flow chart, method includes the following steps:
Step S11, it in the case where the key of target user needs to update, obtains from block chain and is used for the target
The last updated UTXO Transaction Information in family.
In the present embodiment, the structure of block chain may refer to Fig. 2, as shown in Fig. 2, block chain is by multiple full nodes and one
Supervisory node is constituted, and each full node and supervisory node are stored with identical data, such as public key (the i.e. identity of user of user
Information) and the information such as Your Majesty's key that generate of KGC.Supervisory node has higher permission relative to full node, is responsible for the initial body of user
The registration of part information, and the key of user is updated under regulatory format.(in generation, refers to that people or various internet-of-things terminals set to user
It is standby) by full node connection block chain network, realize mutual identity authentication and network information interaction.
Block chain is it is to be understood that public chain or alliance's chain.
It should be noted that the main private key that the private key and KGC of user generate is taken care of by user, it is not stored in block chain,
Private key and main private key is avoided to reveal.
The identity information of user is registered, and the identity information of registration is stored into block chain.
It is understood that the identity information to user is registered, the initial authentication to user identity is realized.
In the present embodiment, close more new capital of key each time of user is stored in block chain as a transaction record
On.Referring to the UTXO transaction form of bit coin, the structure of the UTXO Transaction Information redefined is as shown in table 1.Each UTXO is handed over
Easy information only has one respectively and outputs and inputs, and input information can be understood as the relevant information of the user key before updating, defeated
It is out the relevant information of updated user key.
Table 1
As shown in table 1, trade publisher identity information it is to be understood that can show that transaction publisher's identity letter
Breath.
Index in input is used to indicate it as the position where output in last UTXO Transaction Information, i.e. instruction user
Identification information before key updating and open parameter (e.g., Your Majesty's key and based on information such as IBE cryptographic parameters);In input
Hash value is after carrying out Hash operation to last UTXO Transaction Information as a result, to verify to its integrality.
Output includes: corresponding identification information after user key updates, open parameter and validity period.Identity letter
Breath is made of fixed identification information and variable identification information, and fixed identification information is the body of user's initial authentication
Part mark, remains constant in renewal process thereafter, and the card property certainly of identity can be improved.Open parameter is mainly Your Majesty
Key and based on the information such as IBE cryptographic parameter;Validity period indicates the updated effective life of user key, can be one
Week, one month or 1 year etc..
Signing messages indicates to carry out entire UTXO Transaction Information (outputting and inputting) using the user key before updating
Signature, to guarantee the validity of entire UTXO Transaction Information.
It should be noted that identification information, that is, user public key of user.
It is understood that the structure for the last updated UTXO Transaction Information of the target user may refer to table 1
The structure of the Transaction Information shown, details are not described herein.
For the last updated UTXO Transaction Information of the target user it is to be understood that being directed to target user, newest hair
Cloth is to the UTXO Transaction Information in block chain.
Certainly, the validity period in table 1 and signing messages it is not necessary to, can according to need selection UTXO Transaction Information
In whether include validity period or signing messages.
Step S12, the identity letter of the target user is obtained from the output information in the UTXO Transaction Information
Breath.
In the present embodiment, the identity letter of target user is directly acquired from the output information in UTXO Transaction Information
It ceases, and obtains Your Majesty's key of target user from the open parameter in output information.
The identification information of target user includes: fixed identification information and variable identification information.
In the present embodiment, user key renewal model is divided into two kinds: regulatory format and non-administrated mode.Regulatory format refers to
Regulatory agency generates Your Majesty's key and main private key as KGC, and utilizes Your Majesty's key and main private key, generates the private key of user, and monitor
The relevant information of user encryption, and by regulatory agency as UTXO Transaction Information publisher.
Non-administrated mode then indicates that regulatory agency can not obtain private key and associated encryption information of user etc., by user's conduct
KGC generates Your Majesty's key and main private key, and utilizes Your Majesty's key and main private key, generates the private key of user.
If step S13, the described target user is non-by supervision user, to the main private key and Your Majesty's key of the target user
It changes, and using the identification information of the target user and main private key and Your Majesty's key after change, updates the mesh
Mark the private key of user.
Target user is non-by supervision user, it is possible to understand that are as follows: current key updating mode is non-administrated mode.
In the present embodiment, the main private key and Your Majesty's key of target user are changed, not to the identity of target user
Information changes, and is changed by main private key to target user and Your Majesty's key, the private key of Lai Gengxin target user.Right
When the private key of target user updates, the identity of target user can be improved from the property demonstrate,proved,
In this application, target user key need update in the case where, if target user be it is non-by supervision user,
Then from the output information in UTXO Transaction Information obtain target user identification information and target user main private key and
Your Majesty's key changes the main private key and Your Majesty's key of the target user, and is believed using the identity of the target user
Main private key and Your Majesty's key after breath and change, update the private key of the target user, realize the update to the key of target user.
Also, it realizes that key updating process can be inquired, can be traced and can not be distorted using block chain, there is stronger reality
With value.
As shown in Figure 3, it is a kind of IBE key updating method embodiment 2 based on UTXO model provided by the present application
Flow chart, method includes the following steps:
Step S21, it in the case where the key of target user needs to update, obtains from block chain and is used for the target
The last updated UTXO Transaction Information in family.
Step S22, the identity letter of the target user is obtained from the output information in the UTXO Transaction Information
Breath.
The detailed process of step S21-S22 may refer to the related introduction of the step S11-S12 in embodiment 1, herein not
It repeats again.
If step S23, the described target user is non-by supervision user, to the identification information of the target user into
Row change, and using the identity information after the main private key of the target user and Your Majesty's key and change, update the target user
Private key.
In the present embodiment, the identification information of target user is changed, keeps main private key and the master of target user
Public key is constant, using the identification information after the main private key and Your Majesty's key of target user and change, updates the private of target user
Key.
Certainly, when target user is the non-leakage by the private key of supervision user and target user, illustrate the body of target user
Part identification information may be revealed, it is therefore desirable to change the identification information of target user.Therefore same using to the target
The identification information of user changes, and is believed using the identity after the main private key of the target user and Your Majesty's key and change
The mode of breath updates the private key of target user.
In this application, target user key need update in the case where, if target user be it is non-by supervision user,
Then from the output information in UTXO Transaction Information obtain target user identification information and target user main private key and
Your Majesty's key changes the identification information of the target user, and utilizes the main private key of the target user and Your Majesty
Identification information after key and change, updates the private key of the target user, realizes the update to the key of target user.
As shown in Figure 4, it is a kind of IBE key updating method embodiment 3 based on UTXO model provided by the present application
Flow chart, method includes the following steps:
Step S31, it in the case where the key of target user needs to update, obtains from block chain and is used for the target
The last updated UTXO Transaction Information in family.
Step S32, the identity letter of the target user is obtained from the output information in the UTXO Transaction Information
Breath.
The detailed process of step S31-S32 may refer to the related introduction of the step S11-S12 in embodiment 1, herein not
It repeats again.
If step S33, the described target user is to be carried out by supervision user to the identification information of the target user
Change, and using the identification information after the main private key of regulatory agency and Your Majesty's key and change, update the target user's
Private key.
If target user is by supervision user, it is to be understood that current key updating mode is regulatory format.It is supervising
Under pipe die formula, main private key and Your Majesty's key are generated by regulatory agency's management.
If target user be by supervision user, due under regulatory format, if change Your Majesty's key, what supervisory node was supervised
The private key of all users is intended to change, and in order to simplify workload, then selects the identification information of change target user, keeps prison
The main private key and Your Majesty's key of pipe mechanism are constant.
As another alternative embodiment of the application, referring to Fig. 5, for a kind of IBE based on UTXO model provided by the present application
The flow diagram of key updating method embodiment 4, the present embodiment be mainly to above-described embodiment 1 describe based on UTXO model
IBE key updating method expansion scheme, as shown in figure 5, this method may include but be not limited to following steps:
Step S41, it in the case where the key of target user needs to update, obtains from block chain and is used for the target
The last updated UTXO Transaction Information in family.
Step S42, the identity letter of the target user is obtained from the output information in the UTXO Transaction Information
Breath.
If step S43, the described target user is non-by supervision user, to the main private key and Your Majesty's key of the target user
It changes, and using the identification information of the target user and main private key and Your Majesty's key after change, updates the mesh
Mark the private key of user.
The detailed process of step S41-S43 may refer to the related introduction of the step S11-S13 in embodiment 1, herein not
It repeats again.
Step S44, it will be directed toward the index of position of the output information in the UTXO Transaction Information in the block chain,
And the cryptographic Hash of the UTXO Transaction Information inputs information as target.
Step S45, the identity of the open parameter comprising Your Majesty's key after the change and the target user are believed
Breath, as target output information.
Step S46, the target UTXO Transaction Information for inputting information and the target output information comprising the target is sent out
Cloth is into the block chain.
Target UTXO Transaction Information comprising target input information and the target output information is published to described
In block chain, so that the relevant information of updated user key can inquire in block chain.
It certainly, can also include: that the updated key of the target user uses validity period in target output information.
Before can also including: the identity information of transaction publisher in the target UTXO Transaction Information and/or using update
The private key of the target user information that information and the target output information are signed is inputted to the target.
As another alternative embodiment of the application, referring to Fig. 6, for a kind of IBE based on UTXO model provided by the present application
The flow diagram of key updating method embodiment 5, the present embodiment be mainly to above-described embodiment 2 describe based on UTXO model
IBE key updating method expansion scheme, as shown in fig. 6, this method may include but be not limited to following steps:
Step S51, it in the case where the key of target user needs to update, obtains from block chain and is used for the target
The last updated UTXO Transaction Information in family.
Step S52, the identity letter of the target user is obtained from the output information in the UTXO Transaction Information
Breath.
If step S53, the described target user is non-by supervision user, to the identification information of the target user into
Row change, and using the identification information after the main private key of the target user and Your Majesty's key and change, update the target
The private key of user.
The detailed process of step S51-S53 may refer to the related introduction of the step S21-S23 in embodiment 2, herein not
It repeats again.
Step S54, it will be directed toward the index of position of the output information in the UTXO Transaction Information in the block chain,
And the cryptographic Hash of the UTXO Transaction Information inputs information as target.
Step S55, the identity after the open parameter and the change of Your Majesty's key comprising the target user is believed
Breath, as target output information.
Step S56, the target UTXO Transaction Information for inputting information and the target output information comprising the target is sent out
Cloth is into the block chain.
Target UTXO Transaction Information comprising target input information and the target output information is published to described
In block chain, so that the relevant information of updated user key can inquire in block chain.
It certainly, can also include: that the updated key of the target user uses validity period in target output information.
Before can also including: the identity information of transaction publisher in the target UTXO Transaction Information and/or using update
The private key of the target user information that information and the target output information are signed is inputted to the target.
As another alternative embodiment of the application, referring to Fig. 7, for a kind of IBE based on UTXO model provided by the present application
The flow diagram of key updating method embodiment 6, the present embodiment be mainly to above-described embodiment 1 describe based on UTXO model
IBE key updating method expansion scheme, as shown in fig. 7, this method may include but be not limited to following steps:
Step S61, it in the case where the key of target user needs to update, obtains from block chain and is used for the target
The last updated UTXO Transaction Information in family.
Step S62, the identity letter of the target user is obtained from the output information in the UTXO Transaction Information
Breath.
If step S63, the described target user is non-by supervision user, to the main private key and Your Majesty's key of the target user
It changes, and using the identification information of the target user and main private key and Your Majesty's key after change, updates the mesh
Mark the private key of user.
The detailed process of step S61-S63 may refer to the related introduction of step S11-S13 in embodiment 1, herein no longer
It repeats.
It step S64, will be newest more for the target user in the case where the key of the target user needs to nullify
Output information in new UTXO Transaction Information is set as empty, and sets empty UTXO Transaction Information for output information and be published to
In the block chain.
It will be set as empty for the output information in the last updated UTXO Transaction Information of the target user, and will output
The UTXO Transaction Information that information is set as empty is published in the block chain, so as to inquire fall short user's in block chain
The relevant information of key, achievees the purpose that cancellation.
As another alternative embodiment of the application, referring to Fig. 8, for a kind of IBE based on UTXO model provided by the present application
The flow diagram of key updating method embodiment 7, the present embodiment be mainly to above-described embodiment 2 describe based on UTXO model
IBE key updating method expansion scheme, as shown in figure 8, this method may include but be not limited to following steps:
Step S71, it in the case where the key of target user needs to update, obtains from block chain and is used for the target
The last updated UTXO Transaction Information in family.
Step S72, the identity letter of the target user is obtained from the output information in the UTXO Transaction Information
Breath.
If step S73, the described target user is non-by supervision user, to the identification information of the target user into
Row change, and using the identification information after the main private key of the target user and Your Majesty's key and change, update the target
The private key of user.
The detailed process of step S71-S73 may refer to the related introduction of step S21-S23 in embodiment 2, herein no longer
It repeats.
It step S74, will be newest more for the target user in the case where the key of the target user needs to nullify
Output information in new UTXO Transaction Information is set as empty, and sets empty UTXO Transaction Information for output information and be published to
In the block chain.
The detailed process of step S74 may refer to the related introduction of step S64 in embodiment 6, and details are not described herein.
Next the IBE key update device provided by the present application based on UTXO model is introduced, is introduced below
It can be mutual based on the IBE key update device of UTXO model and the IBE key updating method based on UTXO model described above
To should refer to.
Fig. 9 is referred to, the IBE key update device based on UTXO model includes: that the first acquisition module 11, second obtains mould
Block 12 and the first update module 13.
First obtains module 11, for obtaining needle from block chain in the case where the key of target user needs to update
UTXO Transaction Information last updated to the target user;
Second obtains module 12, for obtaining the target user's from the output information in the UTXO Transaction Information
Identification information;
First update module 13, if being non-by supervision user for the target user, to the master of the target user
Private key and Your Majesty's key change, and utilize the identification information of the target user and main private key and Your Majesty after change
Key updates the private key of the target user.
In the present embodiment, another IBE key update device based on UTXO model is introduced, referring to Figure 10, it is based on
The IBE key update device of UTXO model includes: that the first acquisition module 11, second obtains module 12 and the second update module 14.
First obtains module 11, for obtaining needle from block chain in the case where the key of target user needs to update
UTXO Transaction Information last updated to the target user;
Second obtains module 12, for obtaining the target user's from the output information in the UTXO Transaction Information
Identification information;
Second update module 14, if being non-by supervision user for the target user, to the body of the target user
Part identification information changes, and the identification information using the main private key of the target user and Your Majesty's key and after changing,
Update the private key of the target user.
In the present embodiment, the above-mentioned IBE key update device based on UTXO model can also include:
Third update module, if being by supervision user, to the identity mark of the target user for the target user
Know information to change, and the identification information using the main private key of regulatory agency and Your Majesty's key and after changing, described in update
The private key of target user.
In the present embodiment, the above-mentioned IBE key update device based on UTXO model can also include:
First determining module, position of the output information in the block chain for that will be directed toward in the UTXO Transaction Information
The cryptographic Hash of the index and the UTXO Transaction Information set inputs information as target;
Second determining module, for that will include the open parameter of Your Majesty's key after the change and the body of the target user
Part identification information, as target output information;Or, by the open parameter and the change of Your Majesty's key comprising the target user
Identification information afterwards, as target output information;
First release module, the target UTXO for that will include the target input information and the target output information are handed over
Easy information is published in the block chain.
It can also include: that the updated key of the target user uses in the present embodiment, in the target output information
Validity period;
Before can also including: the identity information of transaction publisher in the target UTXO Transaction Information and/or using update
The private key of the target user information that information and the target output information are signed is inputted to the target.
In the present embodiment, the above-mentioned IBE key update device based on UTXO model can also include:
Second release module, for the target will to be directed in the case where the key of the target user needs to nullify
Output information in the last updated UTXO Transaction Information of user is set as empty, and sets empty UTXO for output information and trade
Information is published in the block chain.
It should be noted that all the embodiments in this specification are described in a progressive manner, each embodiment weight
Point explanation is the difference from other embodiments, and the same or similar parts between the embodiments can be referred to each other.
For device class embodiment, since it is basically similar to the method embodiment, so being described relatively simple, related place ginseng
See the part explanation of embodiment of the method.
Finally, it is to be noted that, herein, relational terms such as first and second and the like be used merely to by
One entity or operation are distinguished with another entity or operation, without necessarily requiring or implying these entities or operation
Between there are any actual relationship or orders.Moreover, the terms "include", "comprise" or its any other variant meaning
Covering non-exclusive inclusion, so that the process, method, article or equipment for including a series of elements not only includes that
A little elements, but also including other elements that are not explicitly listed, or further include for this process, method, article or
The intrinsic element of equipment.In the absence of more restrictions, the element limited by sentence "including a ...", is not arranged
Except there is also other identical elements in the process, method, article or apparatus that includes the element.
For convenience of description, it is divided into various units when description apparatus above with function to describe respectively.Certainly, implementing this
The function of each unit can be realized in the same or multiple software and or hardware when application.
As seen through the above description of the embodiments, those skilled in the art can be understood that the application can
It realizes by means of software and necessary general hardware platform.Based on this understanding, the technical solution essence of the application
On in other words the part that contributes to existing technology can be embodied in the form of software products, the computer software product
It can store in storage medium, such as ROM/RAM, magnetic disk, CD, including some instructions are used so that a computer equipment
(can be personal computer, server or the network equipment etc.) executes the certain of each embodiment of the application or embodiment
Method described in part.
A kind of IBE key updating method and device based on UTXO model provided herein has been carried out in detail above
It introduces, specific examples are used herein to illustrate the principle and implementation manner of the present application, the explanation of above embodiments
It is merely used to help understand the present processes and its core concept;At the same time, for those skilled in the art, according to this
The thought of application, there will be changes in the specific implementation manner and application range, in conclusion the content of the present specification is not answered
It is interpreted as the limitation to the application.