CN110176994A - Session cipher key distributing method, equipment and storage medium based on alliance's block chain - Google Patents

Session cipher key distributing method, equipment and storage medium based on alliance's block chain Download PDF

Info

Publication number
CN110176994A
CN110176994A CN201910466908.4A CN201910466908A CN110176994A CN 110176994 A CN110176994 A CN 110176994A CN 201910466908 A CN201910466908 A CN 201910466908A CN 110176994 A CN110176994 A CN 110176994A
Authority
CN
China
Prior art keywords
user
node
encryption data
service node
block chain
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.)
Pending
Application number
CN201910466908.4A
Other languages
Chinese (zh)
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.)
Iallchain Co Ltd
Original Assignee
Iallchain 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 Iallchain Co Ltd filed Critical Iallchain Co Ltd
Priority to CN201910466908.4A priority Critical patent/CN110176994A/en
Publication of CN110176994A publication Critical patent/CN110176994A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0816Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
    • H04L9/0819Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s)
    • H04L9/0825Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s) using asymmetric-key encryption or public key infrastructure [PKI], e.g. key signature or public key certificates
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0816Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
    • H04L9/0819Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s)
    • H04L9/083Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s) involving central third party, e.g. key distribution center [KDC] or trusted third party [TTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • H04L9/0869Generation of secret information including derivation or calculation of cryptographic keys or passwords involving random numbers or seeds
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/50Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees

Abstract

The embodiment of the present invention provides a kind of session cipher key distributing method based on alliance's block chain, equipment and storage medium.This method includes that the first service node in alliance's block chain receives the user name that user is submitted by user node;First service node is user name one random number of generation, and will include user name and the first broadcast of random number into alliance's block chain, so that the second service node in user node and alliance's block chain receives the first broadcast message;First service node receives the second broadcast message that user node is sent and the third broadcast message that second service node is sent;And the second encryption data carried in the first encryption data carried in the second broadcast message and third broadcast message is compared, if the two is consistent, it is then verified, and receives the session key of second service node transmission, which is sent to user node.The embodiment of the present invention improves safety and the convenience of authentication.

Description

Session cipher key distributing method, equipment and storage medium based on alliance's block chain
Technical field
The present embodiments relate to block chain technical field more particularly to a kind of session keys based on alliance's block chain point Forwarding method, equipment and storage medium.
Background technique
There are many Internet Service Providers (Internet Service Provider, abbreviation on the internet ISP)/Web content service provider (Internet Content Provider, abbreviation ICP), each user are enjoying ISP/ICP It must be registered on the ISP/ICP before the service of offer, for example currently everyone generally has wechat, Alipay etc. each Kind of APP, and if each APP is registered, and if the account registered on different APP as password, is easy to Library attack is hit, the safety of account is lower, and if the account registered on different APP, password are different, and hold very much Easily pass into silence, give for change again account, password it is cumbersome.Therefore, how to solve the above problems, and ensuring communication safety is to work as The problem of preceding urgent need to resolve.
Summary of the invention
The embodiment of the present invention provides a kind of session cipher key distributing method based on alliance's block chain, equipment and storage medium, To realize the authentication based on alliance's block chain, while solving after authentication passes through, user node and service node it Between Communication Security Problem.
In a first aspect, the embodiment of the present invention provides a kind of session cipher key distributing method based on alliance's block chain, this method Include:
First service node in alliance's block chain receives the user name that user is submitted by user node;First clothes Node be engaged in as the user name one random number of generation, and will include that the user name and the random number first broadcast the message, It is broadcast in alliance's block chain, so that the second service node in the user node and alliance's block chain receives First broadcast message, wherein including the user name and the user name corresponding the in the second service node One user key;The first service node receives the second broadcast message that the user node is sent and second clothes The third that node is sent of being engaged in broadcasts the message, and includes the first encryption data, first encryption data in second broadcast message For the second user key for the user name that the user node is inputted based on the user, using the first preset algorithm to institute State what random number encryption obtained, third broadcast message includes the second encryption data, and second encryption data is described the Two service nodes are based on first user key, are obtained using first preset algorithm to the random number encryption;Institute It states first service node to compare first encryption data and second encryption data, if the two is consistent, verify Pass through;The first service node receives the 5th encryption data that the second service node is sent, the 5th encryption data In include the 6th encryption data, include in the 6th encryption data second service node be the first service node and The session key that the user node generates, the 6th encryption data are the second service nodes using first user Session key described in key pair is encrypted, and the 5th encryption data is the second service node using described the The public key of one service node encrypts the 6th encryption data;The first service node encrypts number from the described 5th The 6th encryption data is obtained according to middle decryption, and the 6th encryption data is sent to the user node, so that described User node is decrypted from the 6th encryption data and obtains the session key.
It is in one embodiment, described that 6th encryption data is sent to the user node, comprising:
Block chain mark based on the user node, the IP of the user node is obtained from alliance's block chain Location;Based on the IP address, the 6th encryption data is sent to the user node.
In one embodiment, the user node is smart phone, and the phone number of the smart phone is recorded in In the account book of alliance's block chain.
It is in one embodiment, described that 6th encryption data is sent to the user node, comprising:
Block chain based on the user node identifies, and it is corresponding to obtain the user node from alliance's block chain Phone number;Based on the phone number, the short message of the 6th encryption data will be carried by mobile telephone exchange network, is sent out Give the user node.
Second aspect, the embodiment of the present invention provide a kind of session cipher key distributing method based on alliance's block chain, this method Include:
First service node in alliance's block chain receives the user name that user is submitted by user node;First clothes Node be engaged in as the user name one random number of generation, and will include that the user name and the random number first broadcast the message, It is broadcast in alliance's block chain, so that the second service node in the user node and alliance's block chain receives First broadcast message, wherein including the user name and the user name corresponding the in the second service node One user key;The first service node receives the second broadcast message that the user node is sent and second clothes The third that node is sent of being engaged in broadcasts the message, and includes the first encryption data, first encryption data in second broadcast message For the second user key for the user name that the user node is inputted based on the user, using the first preset algorithm to institute State what random number encryption obtained, third broadcast message includes the second encryption data, and second encryption data is described the Two service nodes are based on first user key, are obtained using first preset algorithm to the random number encryption;Institute It states first service node to compare first encryption data and second encryption data, if the two is consistent, generate Session key;The first service node encrypts the session key based on the public key of the second service node, and The 7th encryption data that encryption obtains is sent to the second service node;The first service node receives second service section 8th encryption data of point feedback, and the 8th encryption data is sent to the user node, so that the user node Obtain the session key, wherein the 8th encryption data is that the second service node is based on first user key The session key is encrypted.
The third aspect, the embodiment of the present invention provide a kind of service node, and the service node is suitable for a kind of alliance's block Chain, the service node include:
Memory;
Processor;
Communication interface;And
Computer program;
Wherein, the computer program stores in the memory, and is configured as being executed by the processor following Operation:
Receive the user name that user is submitted by the user node in alliance's block chain;One is generated for the user name A random number, and will include that the user name and the random number first broadcast the message, it is broadcast in alliance's block chain, with The second service node in the user node and alliance's block chain is set to receive first broadcast message, wherein described It include the user name and corresponding first user key of the user name in second service node;Receive user's section The third broadcast message that the second broadcast message and the second service node that point is sent are sent, second broadcast message In include the first encryption data, first encryption data is the user name that is inputted based on the user of the user node Second user key, the random number encryption is obtained using the first preset algorithm, third broadcast message includes the Two encryption datas, second encryption data is that the second service node is based on first user key, using described the One preset algorithm obtains the random number encryption;First encryption data and second encryption data are carried out pair Than being verified if the two is consistent;Receive the 5th encryption data that the second service node is sent, the 5th encryption Include the 6th encryption data in data, includes the second service node in the 6th encryption data for where the processor Service node and the session key that generates of the user node, the 6th encryption data is that the second service node uses What first user key encrypted the session key, the 5th encryption data is the second service section Point encrypts the 6th encryption data using the public key of the service node where the processor;From the slender acanthopanax Decryption obtains the 6th encryption data in ciphertext data, and the 6th encryption data is sent to the user node, so that The user node is decrypted from the 6th encryption data and obtains the session key.
In one embodiment, the 6th encryption data is sent to the user node in execution by the processor Operation when, be used for:
Block chain mark based on the user node, the IP of the user node is obtained from alliance's block chain Location;Based on the IP address, the 6th encryption data is sent to the user node.
In one embodiment, the user node is smart phone, and the phone number of the smart phone is recorded in In the account book of alliance's block chain.
In one embodiment, the 6th encryption data is sent to the user node in execution by the processor Operation when, be used for:
Block chain based on the user node identifies, and it is corresponding to obtain the user node from alliance's block chain Phone number;Based on the phone number, the short message of the 6th encryption data will be carried by mobile telephone exchange network, is sent out Give the user node.
Fourth aspect, the embodiment of the present invention provide a kind of service node, and the service node is suitable for a kind of alliance's block Chain, the service node include:
Memory;
Processor;
Communication interface;And
Computer program;
Wherein, the computer program stores in the memory, and is configured as being executed by the processor following Operation:
Receive the user name that user is submitted by the user node in alliance's block chain;One is generated for the user name A random number, and will include that the user name and the random number first broadcast the message, it is broadcast in alliance's block chain, with The second service node in the user node and alliance's block chain is set to receive first broadcast message, wherein described It include the user name and corresponding first user key of the user name in second service node;Receive user's section The third broadcast message that the second broadcast message and the second service node that point is sent are sent, second broadcast message In include the first encryption data, first encryption data is the user name that is inputted based on the user of the user node Second user key, the random number encryption is obtained using the first preset algorithm, third broadcast message includes the Two encryption datas, second encryption data is that the second service node is based on first user key, using described the One preset algorithm obtains the random number encryption;First encryption data and second encryption data are carried out pair Than generating session key if the two is consistent;Public key based on the second service node adds the session key It is close, and the 7th encryption data that encryption obtains is sent to the second service node;Receive the of second service node feeding back Eight encryption datas, and the 8th encryption data is sent to the user node, so that the user node obtains the meeting Talk about key, wherein the 8th encryption data is that the second service node is based on first user key to the session What key was encrypted.
5th aspect, the embodiment of the present invention provides a kind of alliance's block chain, which includes above-mentioned third or the Service node described in four aspects.
6th aspect, the embodiment of the present invention provide a kind of computer readable storage medium, are stored thereon with computer program, The computer program is executed by processor to realize method described in first and second aspect.
In the session cipher key distributing method based on alliance's block chain, equipment and storage medium provided in an embodiment of the present invention In, the first service node in alliance's block chain is after receiving the user name that user is submitted by user node;By for the use Name in an account book generates a random number, and will include that the user name and random number first broadcast the message, and is broadcast in alliance's block chain, and Receive the in the second broadcast message and alliance's block chain that the user node sends after receiving the first broadcast message The third broadcast message that two service nodes are sent, wherein include the first encryption data, the first encryption data in the second broadcast message For the second user key for the user name that the user node is inputted based on user, using the first preset algorithm to it is described with Machine number encrypts, and third broadcast message includes the second encryption data, and the second encryption data is that second service node is based on using Corresponding first user key of the user name that family is registered on it obtains the random number encryption using the first preset algorithm It arrives;Then the second encryption data in the first encryption data and third broadcast message in the second broadcast message is carried out pair Than if the two is consistent, being verified, and receive the encrypted session key of second service node transmission, and by encryption Session key is transmitted to user node.Technical solution based on the embodiment of the present invention, as long as user is on alliance's block chain User name and user key are had registered on any service node, so that it may log in alliance's block using the user name and user key Other service nodes on chain, and the service of the service node is enjoyed, a large number of users name and key are remembered so as to avoid user Trouble, the convenience of authentication is improved, also, after being verified, by second service node with encryption data Mode session key is sent to first service node, then the session key of encryption is sent to user by first service node Node enables to encrypt communication data by session key between user node and first service node, really The safety of communication is protected, in addition, due to the security mechanism safety with higher of alliance's block chain itself, thus by alliance Block chain verifies the identity of user, can be improved the safety of authentication, and even if user uses identical use Name in an account book and key log in different server nodes, also can be avoided the problem of hacker hits library attack.
Detailed description of the invention
Fig. 1 is a kind of schematic diagram of communication system provided in an embodiment of the present invention;
Fig. 2 is a kind of flow chart of the session cipher key distributing method based on alliance's block chain provided in an embodiment of the present invention;
Fig. 3 is a kind of flow chart of session cipher key distributing method based on alliance's block chain provided in an embodiment of the present invention;
Fig. 4 is a kind of structural schematic diagram of service node provided in an embodiment of the present invention.
Through the above attached drawings, it has been shown that the specific embodiment of the disclosure will be hereinafter described in more detail.These attached drawings It is not intended to limit the scope of this disclosure concept by any means with verbal description, but is by referring to specific embodiments Those skilled in the art illustrate the concept of the disclosure.
Specific embodiment
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related to When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment Described in embodiment do not represent all implementations consistent with this disclosure.On the contrary, they be only with it is such as appended The example of the consistent device and method of some aspects be described in detail in claims, the disclosure.
Session cipher key distributing method provided in an embodiment of the present invention based on alliance's block chain, it is intended to solve in the prior art If the account that user registers in different application programs (APP) as password, is easy to be hit library attack, account Safety is lower, and if the account registered on different APP, password are different, it is easy to pass into silence again, give for change again While account, the cumbersome technical problem of password, after raising authentication passes through, between user node and service node The safety of communication.This method can be adapted for communication system shown in FIG. 1.As shown in Figure 1, the communication system includes: first Service node 11, second service node 12, user node 13, third service node 14, the 4th service node 15 and the 5th clothes Business node 16, wherein (user node 13 can not exist in real time for first service node 11, second service node 12, user node 13 Line), third service node 14, the 4th service node 15 and the 5th service node 16 belong to same alliance's block chain.Wherein, Second service node 12, third service node 14, the 4th service node 15 and the 5th service node 16 can provide for user Different service, for example, second service node 12, third service node 14, the 4th service node 15 and the 5th service Node 16 may be respectively used for providing " pushing away spy " service, " facebook " service, " wechat " service and " Alipay " service, certainly here It is merely illustrative to illustrate rather than uniquely limit.In addition, only schematically illustrate herein, the structure of alliance's block chain is not limited With the node number of alliance's block chain.
How technical solution of the present invention and technical solution of the present invention are solved with specifically embodiment below above-mentioned Technical problem is described in detail.These specific embodiments can be combined with each other below, for the same or similar concept Or process may repeat no more in certain embodiments.Below in conjunction with attached drawing, the embodiment of the present invention is described.
Fig. 2 is a kind of flow chart of the session cipher key distributing method based on alliance's block chain provided in an embodiment of the present invention. This method is suitable for a kind of alliance's block chain, and the structure of alliance's block chain is referred to Fig. 1, and specific step is as follows for this method:
First service node in step 201, alliance's block chain receives the user name that user is submitted by user node.
Step 202, the first service node are the user name one random number of generation, and will include the user name It broadcasts the message, is broadcast in alliance's block chain, so that the user node and the area, alliance with the random number first Second service node in block chain receives first broadcast message.
It wherein include that the user name and corresponding first user of the user name are close in the second service node Key.
Step 203, the first service node receive the second broadcast message that the user node is sent and described the The third broadcast message that two service nodes are sent.
It wherein, include the first encryption data in second broadcast message, first encryption data is user section The second user key for the user name that point is inputted based on the user, using the first preset algorithm to the random number encryption It obtains, the third broadcast message includes the second encryption data, and second encryption data is the second service node base In first user key, the random number encryption is obtained using first preset algorithm.
Step 204, the first service node compare first encryption data and second encryption data, If the two is consistent, it is verified.
Step 205, the first service node receive the 5th encryption data that the second service node is sent, and described the Include the 6th encryption data in five encryption datas, include the second service node in the 6th encryption data is described first The session key that service node and the user node generate.
Wherein, the 6th encryption data is that the second service node uses first user key to the session What key was encrypted, the 5th encryption data is the public affairs that the second service node uses the first service node Key encrypts the 6th encryption data.
Step 206, the first service node are decrypted from the 5th encryption data and obtain the 6th encryption data, And the 6th encryption data is sent to the user node, so that the user node is solved from the 6th encryption data It is close to obtain the session key.
By taking Fig. 1 as an example, second service node 12, third service node 14, the 4th service node 15, Yi Ji in Fig. 1 The building of five service nodes 16 forms alliance's block chain, and provides authentication service for other service nodes or user node.It should Preserved in the wound generation block of alliance's block chain second service node 12, third service node 14, the 4th service node 15 and The information such as the block chain mark of the 5th service node 16, public key, IP address, second service node 12, third service node 14, Four service nodes 15 and the 5th service node 16 carry out alliance's block chain collectively as the original node of this alliance block chain Management, includes whether that some service node is allowed to access this alliance block chain etc..
User carries out user name and key by the mode under block chain chain on the arbitrary node on alliance's block chain Registration registered on some service node of alliance's block chain, in this example, it is assumed that user is in second service It registered on node 12, but was registered not on first service node 11.
User node 13 in the present embodiment can be specially smart phone, and the cell-phone number of the smart phone is recorded in connection In the account book of alliance's block chain.Specifically, when (user is not in the first clothes by the login of user node 13 first service node by user It is engaged in registering in node) after, it was once infused on second service node 12 by user node 13 to the submission of first service node 11 The user name that volume is crossed, first service node 11 distributes a random number after receiving the user name, for the user name, and uses The private key of itself signs to the user name, random number, and by the user name after signature, random data is carried in the first broadcast In message, it is broadcast on alliance's block chain.
Across the chain account book in interrogation zone first after receiving the first broadcast message of user node 13, obtains first service node 11 Public key, then the public key based on first service node 11 verifies the private key signature in the first broadcast message, if verifying is logical It crosses, then user is prompted to input the corresponding user key of above-mentioned user name, and according to the second user key of user's input using the One preset algorithm is encrypted to obtain the first encryption data to the random number in the first broadcast message, and the first encryption data is adopted It is broadcast in alliance's block chain in the second broadcast message with being carried after the private key signature of itself.Alternatively, user node 13 is being counted After calculation obtains the first encryption data, it can also be shown to user, so that first encryption data is input to first service by user On node 11.
What needs to be explained here is that can choose after user node 13 sends the second broadcast message from alliance's block It is offline on chain, to achieve the purpose that save electricity.After user node 13 is offline, first service node 11 passes through mobile switch net The short message of network sends message to user node 13 according to the IP address of user node 13.
Second service node 12 is broadcasted using the public key of first service node first after receiving the first broadcast message Private key signature in message is verified, if being verified, according to the user name carried in the first broadcast message, searches user Once registered the first user key corresponding with the user name, and the first preset algorithm pair is used according to the first user key Random number in first broadcast message is encrypted to obtain the second encryption data, and the second encryption data is used to the private key of itself It carries after signature and is broadcast in alliance's block chain in third broadcast message.
First service node 11 is after receiving the second broadcast message and third broadcast message, respectively from the second broadcast message The first encryption data and the second encryption data are obtained in third broadcast message, and by the first encryption data and the second encryption data It compares, if the two is consistent, illustrates that the user name of user's input and user key are correct, be verified, provide clothes for user Business, otherwise authentication failed, does not provide service.
Further, for first service node 11 after being verified, second service node 12 is 11 He of first service node User node 13 distributes a session key, is encrypted first using the first user key to the session key, obtains the 6th Encryption data, then the 6th encryption data is encrypted to obtain the 5th encryption data using the public key of first service node, then It is signed using the private key of itself to the 5th encryption data, and by the data broadcasting after signature into alliance's block chain.
After the data that the second service node 12 that first service node 11 receives is sent, the public affairs based on second service node Key verifies the signature in data, and after being verified, and decryption obtains the 6th encryption data from the 5th encryption data, Then the 6th encryption data is sent to by user node 13 by one of following illustrative mode:
In a kind of illustrative mode, first service node 11 is identified based on the block chain of user node 13, from alliance The IP address of user node 13 is obtained in block chain;It is then based on the IP address, the 6th encryption data is sent to user's section Point 13.
In another illustrative mode, first service node 11 is identified based on the block chain of user node 13, from connection The corresponding phone number of user node 13 is obtained in alliance's block chain;Based on the phone number, will be taken by mobile telephone exchange network Short message with the 6th encryption data is sent to user node 13.
User node 13 is after receiving the 6th encryption data, based on the first user key using corresponding decipherment algorithm from the Decryption obtains session key in six encryption datas.
In the present embodiment, the use that the first service node in alliance's block chain is submitted in reception user by user node After name in an account book;It by generating a random number for the user name, and will include that the user name and random number first broadcast the message, broadcast Into alliance's block chain, and the second broadcast message that the user node is sent after receiving the first broadcast message is received, with And the third broadcast message that the second service node in alliance's block chain is sent, wherein add in the second broadcast message including first Ciphertext data, the first encryption data are the second user key for the user name that the user node is inputted based on user, are used First preset algorithm obtains the random number encryption, and third broadcast message includes the second encryption data, the second encryption data For corresponding first user key of the user name that second service node is registered on it based on user, imputed in advance using first Method obtains the random number encryption;It then will be in the first encryption data and third broadcast message in the second broadcast message Second encryption data compares, if the two is consistent, is verified, and receives the encrypted meeting of second service node transmission Key is talked about, and the session key of encryption is transmitted to user node.Based on technical solution provided in this embodiment, as long as user exists User name and user key are had registered on any service node on alliance's block chain, so that it may use the user name and user key Other service nodes on alliance's block chain are logged in, and enjoy the service of the service node, it is a large amount of so as to avoid user's memory The trouble of user name and key improves the convenience of authentication, also, after being verified, passes through second service section Session key is sent to first service node in a manner of encryption data by point, then by first service node that the session of encryption is close Key is sent to user node, and enabling to can be by session key to communication data between user node and first service node It is encrypted, it is ensured that the safety of communication, in addition, since first service node in the present embodiment can pass through mobile switch net Network sends message to user node based on the IP address of user node, that is to say, that and user node does not need real-time online, that The electricity of user node can be saved to a certain extent.
Fig. 3 is a kind of flow chart of session cipher key distributing method based on alliance's block chain provided in an embodiment of the present invention, As shown in figure 3, on the basis of Fig. 2 embodiment, this method comprises:
First service node in step 301, alliance's block chain receives the user name that user is submitted by user node.
Step 302, the first service node are the user name one random number of generation, and will include the user name It broadcasts the message, is broadcast in alliance's block chain, so that the user node and the area, alliance with the random number first Second service node in block chain receives first broadcast message.
It wherein include that the user name and corresponding first user of the user name are close in the second service node Key.
Step 303, the first service node receive the second broadcast message that the user node is sent and described the The third broadcast message that two service nodes are sent.
It wherein, include the first encryption data in second broadcast message, first encryption data is user section The second user key for the user name that point is inputted based on the user, using the first preset algorithm to the random number encryption It obtains, the third broadcast message includes the second encryption data, and second encryption data is the second service node base In first user key, the random number encryption is obtained using first preset algorithm.
Wherein, the first encryption data described in second broadcast message is included in third encryption data, and described the Three encryption datas are that the user node is added using the public key and the second preset algorithm of the first service node to described first What ciphertext data encrypted.
The second encryption data described in third broadcast message is included in the 4th encryption data, the 4th encryption Data are the public key that the second service node uses the first service node and second preset algorithm to described second What encryption data encrypted.
Step 304, the first service node are according to the corresponding decipherment algorithm of second preset algorithm and described The private key of one service node itself obtains first encryption from second broadcast message and third broadcast message decryption Data and second encryption data.
Step 305, the first service node compare first encryption data and second encryption data, If the two is consistent, session key is generated.
Step 306, public key of the first service node based on the second service node carry out the session key Encryption, and the 7th encryption data that encryption obtains is sent to the second service node.
Step 307, the first service node receive the 8th encryption data of second service node feeding back, and by described the Eight encryption datas are sent to the user node, so that the user node obtains the session key, wherein the described 8th adds Ciphertext data is that the second service node is encrypted to obtain based on first user key to the session key.
Wherein, first service node can be used any one following mode and the 8th encryption data be sent to user node:
In a kind of illustrative mode, first service node is identified based on the block chain of user node, from alliance's block The IP address of user node is obtained in chain;It is then based on the IP address, the 6th encryption data is sent to user node.
In another illustrative mode, first service node is identified based on the block chain of user node, from area, alliance The corresponding phone number of user node is obtained in block chain;Based on the phone number, will be carried by mobile telephone exchange network The short message of six encryption datas, is sent to user node.
The present embodiment is sent to second service node by the session key encryption for generating first service node, so that the The first user key for being arranged carries out re-encrypted to session key when two service nodes use user's registration user name, and then the Session key after re-encrypted is sent to user by the IP address of mobile telephone exchange network or user node by one service node Node has saved the electricity of user node so that user node need not also can receive session key online.
Fig. 4 is a kind of structural schematic diagram of service node provided in an embodiment of the present invention, which is suitable for one kind Alliance's block chain, service node provided in an embodiment of the present invention can execute the above-mentioned session key distribution based on alliance's block chain The process flow of the execution embodiment of the method for method.As shown in figure 4, service node 40 includes: memory 41, processor 42, meter Calculation machine program and communication interface 43;Wherein, the computer program stores in the memory, and is configured as by processor 42 execute following operation:
Receive the user name that user is submitted by the user node in alliance's block chain;One is generated for the user name A random number, and will include that the user name and the random number first broadcast the message, it is broadcast in alliance's block chain, with The second service node in the user node and alliance's block chain is set to receive first broadcast message, wherein described It include the user name and corresponding first user key of the user name in second service node;Receive user's section The third broadcast message that the second broadcast message and the second service node that point is sent are sent, second broadcast message In include the first encryption data, first encryption data is the user name that is inputted based on the user of the user node Second user key, the random number encryption is obtained using the first preset algorithm, third broadcast message includes the Two encryption datas, second encryption data is that the second service node is based on first user key, using described the One preset algorithm obtains the random number encryption;First encryption data and second encryption data are carried out pair Than being verified if the two is consistent;Receive the 5th encryption data that the second service node is sent, the 5th encryption Include the 6th encryption data in data, includes the second service node in the 6th encryption data for where the processor Service node and the session key that generates of the user node, the 6th encryption data is that the second service node uses What first user key encrypted the session key, the 5th encryption data is the second service section Point encrypts the 6th encryption data using the public key of the service node where the processor;From the slender acanthopanax Decryption obtains the 6th encryption data in ciphertext data, and the 6th encryption data is sent to the user node, so that The user node is decrypted from the 6th encryption data and obtains the session key.
In one embodiment, the 6th encryption data is sent to the user node in execution by the processor Operation when, be used for:
Block chain mark based on the user node, the IP of the user node is obtained from alliance's block chain Location;Based on the IP address, the 6th encryption data is sent to the user node.
In one embodiment, the user node is smart phone, and the phone number of the smart phone is recorded in In the account book of alliance's block chain.
In one embodiment, the 6th encryption data is sent to the user node in execution by the processor Operation when, be used for:
Block chain based on the user node identifies, and it is corresponding to obtain the user node from alliance's block chain Phone number;Based on the phone number, the short message of the 6th encryption data will be carried by mobile telephone exchange network, is sent out Give the user node.
The service node of embodiment illustrated in fig. 4 can be used for executing the technical solution of above method embodiment, realization principle Similar with technical effect, details are not described herein again.
A kind of service node is also provided in one embodiment, and the service node is suitable for a kind of alliance's block chain, described Service node includes:
Memory;
Processor;
Communication interface;And
Computer program;
Wherein, the computer program stores in the memory, and is configured as being executed by the processor following Operation:
Receive the user name that user is submitted by the user node in alliance's block chain;One is generated for the user name A random number, and will include that the user name and the random number first broadcast the message, it is broadcast in alliance's block chain, with The second service node in the user node and alliance's block chain is set to receive first broadcast message, wherein described It include the user name and corresponding first user key of the user name in second service node;Receive user's section The third broadcast message that the second broadcast message and the second service node that point is sent are sent, second broadcast message In include the first encryption data, first encryption data is the user name that is inputted based on the user of the user node Second user key, the random number encryption is obtained using the first preset algorithm, third broadcast message includes the Two encryption datas, second encryption data is that the second service node is based on first user key, using described the One preset algorithm obtains the random number encryption;First encryption data and second encryption data are carried out pair Than generating session key if the two is consistent;Public key based on the second service node adds the session key It is close, and the 7th encryption data that encryption obtains is sent to the second service node;Receive the of second service node feeding back Eight encryption datas, and the 8th encryption data is sent to the user node, so that the user node obtains the meeting Talk about key, wherein the 8th encryption data is that the second service node is based on first user key to the session What key was encrypted.
The service node can be used for executing the technical solution of above method embodiment, implementing principle and technical effect class Seemingly, details are not described herein again.
The embodiment of the present invention also provides a kind of alliance's block chain, which includes service described in embodiment as above Node.
In addition, the embodiment of the present invention also provides a kind of computer readable storage medium, it is stored thereon with computer program, institute Computer program is stated to be executed by processor to realize the session key distribution side based on alliance's block chain described in above-described embodiment The execution method of method.
In several embodiments provided by the present invention, it should be understood that disclosed device and method can pass through it Its mode is realized.For example, the apparatus embodiments described above are merely exemplary, for example, the division of the unit, only Only a kind of logical function partition, there may be another division manner in actual implementation, such as multiple units or components can be tied Another system is closed or is desirably integrated into, or some features can be ignored or not executed.Another point, it is shown or discussed Mutual coupling, direct-coupling or communication connection can be through some interfaces, the INDIRECT COUPLING or logical of device or unit Letter connection can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme 's.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list Member both can take the form of hardware realization, can also realize in the form of hardware adds SFU software functional unit.
The above-mentioned integrated unit being realized in the form of SFU software functional unit can store and computer-readable deposit at one In storage media.Above-mentioned SFU software functional unit is stored in a storage medium, including some instructions are used so that a computer It is each that equipment (can be personal computer, server or the network equipment etc.) or processor (processor) execute the present invention The part steps of embodiment the method.And storage medium above-mentioned includes: USB flash disk, mobile hard disk, read-only memory (Read- Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic or disk etc. it is various It can store the medium of program code.
Those skilled in the art can be understood that, for convenience and simplicity of description, only with above-mentioned each functional module Division progress for example, in practical application, can according to need and above-mentioned function distribution is complete by different functional modules At the internal structure of device being divided into different functional modules, to complete all or part of the functions described above.On The specific work process for stating the device of description, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention., rather than its limitations;To the greatest extent Pipe present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that: its according to So be possible to modify the technical solutions described in the foregoing embodiments, or to some or all of the technical features into Row equivalent replacement;And these are modified or replaceed, various embodiments of the present invention technology that it does not separate the essence of the corresponding technical solution The range of scheme.

Claims (12)

1. a kind of session cipher key distributing method based on alliance's block chain, which is characterized in that the described method includes:
First service node in alliance's block chain receives the user name that user is submitted by user node;
The first service node is the user name one random number of generation, and will include the user name and the random number First broadcast message, is broadcast in alliance's block chain, so that second in the user node and alliance's block chain Service node receives first broadcast message, wherein including the user name and described in the second service node Corresponding first user key of user name;
The first service node receives the second broadcast message and second service node hair that the user node is sent The third sent broadcasts the message, and includes the first encryption data in second broadcast message, and first encryption data is the use The second user key for the user name that family node is inputted based on the user, using the first preset algorithm to the random number What encryption obtained, the third broadcast message includes the second encryption data, and second encryption data is the second service section Point is based on first user key, is obtained using first preset algorithm to the random number encryption;
The first service node compares first encryption data and second encryption data, if the two is consistent, Then it is verified;
The first service node receives the 5th encryption data that the second service node is sent, in the 5th encryption data Including the 6th encryption data, in the 6th encryption data include the second service node be the first service node and institute The session key of user node generation is stated, the 6th encryption data is that the second service node is close using first user Key encrypts the session key, and the 5th encryption data is the second service node using described first The public key of service node encrypts the 6th encryption data;
The first service node is decrypted from the 5th encryption data and obtains the 6th encryption data, and by the described 6th Encryption data is sent to the user node, so that the user node is decrypted from the 6th encryption data obtains the meeting Talk about key.
2. the method according to claim 1, wherein described be sent to the user for the 6th encryption data Node, comprising:
Block chain mark based on the user node, obtains the IP address of the user node from alliance's block chain;
Based on the IP address, the 6th encryption data is sent to the user node.
3. the method according to claim 1, wherein the user node is smart phone, the smart phone Phone number be recorded in the account book of alliance's block chain.
4. according to the method described in claim 3, it is characterized in that, described be sent to the user for the 6th encryption data Node, comprising:
Block chain mark based on the user node, obtains the corresponding mobile phone of the user node from alliance's block chain Number;
Based on the phone number, the short message of the 6th encryption data will be carried by mobile telephone exchange network, is sent to The user node.
5. a kind of session cipher key distributing method based on alliance's block chain, which is characterized in that the described method includes:
First service node in alliance's block chain receives the user name that user is submitted by user node;
The first service node is the user name one random number of generation, and will include the user name and the random number First broadcast message, is broadcast in alliance's block chain, so that second in the user node and alliance's block chain Service node receives first broadcast message, wherein including the user name and described in the second service node Corresponding first user key of user name;
The first service node receives the second broadcast message and second service node hair that the user node is sent The third sent broadcasts the message, and includes the first encryption data in second broadcast message, and first encryption data is the use The second user key for the user name that family node is inputted based on the user, using the first preset algorithm to the random number What encryption obtained, the third broadcast message includes the second encryption data, and second encryption data is the second service section Point is based on first user key, is obtained using first preset algorithm to the random number encryption;
The first service node compares first encryption data and second encryption data, if the two is consistent, Then generate session key;
The first service node encrypts the session key based on the public key of the second service node, and will encryption The 7th obtained encryption data is sent to the second service node;
The first service node receives the 8th encryption data of second service node feeding back, and the 8th encryption data is sent out The user node is given, so that the user node obtains the session key, wherein the 8th encryption data is described Second service node encrypts the session key based on first user key.
6. a kind of service node, the service node is suitable for a kind of alliance's block chain, which is characterized in that the service node packet It includes:
Memory;
Processor;
Communication interface;And
Computer program;
Wherein, the computer program stores in the memory, and is configured as executing following operation by the processor:
Receive the user name that user is submitted by the user node in alliance's block chain;
A random number is generated for the user name, and will include that the user name and the random number first broadcast the message, extensively It is multicast in alliance's block chain, so that the second service node in the user node and alliance's block chain receives institute The first broadcast message is stated, wherein including the user name and the user name corresponding first in the second service node User key;
It receives the second broadcast message that the user node is sent and the third broadcast that the second service node is sent disappears It ceases, includes the first encryption data in second broadcast message, first encryption data is described in the user node is based on The second user key of the user name of user's input, obtains the random number encryption using the first preset algorithm, institute Stating third broadcast message includes the second encryption data, and second encryption data is that the second service node is based on described first User key obtains the random number encryption using first preset algorithm;
First encryption data and second encryption data are compared, if the two is consistent, are verified;
The 5th encryption data that the second service node is sent is received, includes the 6th encryption number in the 5th encryption data According to service node and the user in the 6th encryption data including the second service node where the processor The session key that node generates, the 6th encryption data are that the second service node uses first user key to institute State what session key was encrypted, the 5th encryption data is the second service node using where the processor The public key of service node the 6th encryption data encrypted;
Decryption obtains the 6th encryption data from the 5th encryption data, and the 6th encryption data is sent to institute User node is stated, so that the user node is decrypted from the 6th encryption data obtains the session key.
7. service node according to claim 6, which is characterized in that the processor is being executed the 6th encryption number When according to the operation for being sent to the user node, it is used for:
Block chain mark based on the user node, obtains the IP address of the user node from alliance's block chain;
Based on the IP address, the 6th encryption data is sent to the user node.
8. service node according to claim 6, which is characterized in that the user node is smart phone, the intelligence The phone number of mobile phone is recorded in the account book of alliance's block chain.
9. service node according to claim 8, which is characterized in that the processor is being executed the 6th encryption number When according to the operation for being sent to the user node, it is used for:
Block chain mark based on the user node, obtains the corresponding mobile phone of the user node from alliance's block chain Number;
Based on the phone number, the short message of the 6th encryption data will be carried by mobile telephone exchange network, is sent to The user node.
10. a kind of service node, the service node is suitable for a kind of alliance's block chain, which is characterized in that the service node Include:
Memory;
Processor;
Communication interface;And
Computer program;
Wherein, the computer program stores in the memory, and is configured as executing following operation by the processor:
Receive the user name that user is submitted by the user node in alliance's block chain;
A random number is generated for the user name, and will include that the user name and the random number first broadcast the message, extensively It is multicast in alliance's block chain, so that the second service node in the user node and alliance's block chain receives institute The first broadcast message is stated, wherein including the user name and the user name corresponding first in the second service node User key;
It receives the second broadcast message that the user node is sent and the third broadcast that the second service node is sent disappears It ceases, includes the first encryption data in second broadcast message, first encryption data is described in the user node is based on The second user key of the user name of user's input, obtains the random number encryption using the first preset algorithm, institute Stating third broadcast message includes the second encryption data, and second encryption data is that the second service node is based on described first User key obtains the random number encryption using first preset algorithm;
First encryption data and second encryption data are compared, if the two is consistent, generate session key;
Public key based on the second service node encrypts the session key, and the 7th encryption number that encryption is obtained According to being sent to the second service node;
The 8th encryption data of second service node feeding back is received, and the 8th encryption data is sent to the user and is saved Point, so that the user node obtains the session key, wherein the 8th encryption data is the second service node base The session key is encrypted in first user key.
11. a kind of alliance's block chain, which is characterized in that including the service node as described in any one of claim 6-10.
12. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program Method according to any one of claims 1 to 5 is realized when being executed by processor.
CN201910466908.4A 2019-05-30 2019-05-30 Session cipher key distributing method, equipment and storage medium based on alliance's block chain Pending CN110176994A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910466908.4A CN110176994A (en) 2019-05-30 2019-05-30 Session cipher key distributing method, equipment and storage medium based on alliance's block chain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910466908.4A CN110176994A (en) 2019-05-30 2019-05-30 Session cipher key distributing method, equipment and storage medium based on alliance's block chain

Publications (1)

Publication Number Publication Date
CN110176994A true CN110176994A (en) 2019-08-27

Family

ID=67696898

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910466908.4A Pending CN110176994A (en) 2019-05-30 2019-05-30 Session cipher key distributing method, equipment and storage medium based on alliance's block chain

Country Status (1)

Country Link
CN (1) CN110176994A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111914231A (en) * 2020-07-23 2020-11-10 中国联合网络通信集团有限公司 Block chain-based identity authentication method, system, equipment and storage medium
CN112910633A (en) * 2019-12-03 2021-06-04 微观(天津)科技发展有限公司 Data processing method and device applied to block chain nodes and storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160337132A1 (en) * 2014-01-15 2016-11-17 Xorkey B.V. Secure Login Without Passwords
CN107809411A (en) * 2016-09-09 2018-03-16 华为技术有限公司 Authentication method, terminal device, server and the network authentication entity of mobile network
CN108684041A (en) * 2018-05-31 2018-10-19 上海邑游网络科技有限公司 The system and method for login authentication
CN108702622A (en) * 2017-11-30 2018-10-23 深圳前海达闼云端智能科技有限公司 Mobile network's access authentication method, device, storage medium and block chain node
CN108768608A (en) * 2018-05-25 2018-11-06 电子科技大学 The secret protection identity identifying method of thin-client is supported at block chain PKI
CN109005033A (en) * 2018-09-07 2018-12-14 全链通有限公司 The method for realizing the registration of block chain system of real name based on phone number
CN109412790A (en) * 2018-10-26 2019-03-01 重庆邮电大学 A kind of user authentication of internet of things oriented and key agreement system and method
US20190149325A1 (en) * 2017-11-16 2019-05-16 International Business Machines Corporation Blockchain transaction privacy enhancement through broadcast encryption
CN109767220A (en) * 2019-01-15 2019-05-17 中国联合网络通信集团有限公司 Method of commerce based on block chain and the transaction system based on block chain

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160337132A1 (en) * 2014-01-15 2016-11-17 Xorkey B.V. Secure Login Without Passwords
CN107809411A (en) * 2016-09-09 2018-03-16 华为技术有限公司 Authentication method, terminal device, server and the network authentication entity of mobile network
US20190149325A1 (en) * 2017-11-16 2019-05-16 International Business Machines Corporation Blockchain transaction privacy enhancement through broadcast encryption
CN108702622A (en) * 2017-11-30 2018-10-23 深圳前海达闼云端智能科技有限公司 Mobile network's access authentication method, device, storage medium and block chain node
CN108768608A (en) * 2018-05-25 2018-11-06 电子科技大学 The secret protection identity identifying method of thin-client is supported at block chain PKI
CN108684041A (en) * 2018-05-31 2018-10-19 上海邑游网络科技有限公司 The system and method for login authentication
CN109005033A (en) * 2018-09-07 2018-12-14 全链通有限公司 The method for realizing the registration of block chain system of real name based on phone number
CN109412790A (en) * 2018-10-26 2019-03-01 重庆邮电大学 A kind of user authentication of internet of things oriented and key agreement system and method
CN109767220A (en) * 2019-01-15 2019-05-17 中国联合网络通信集团有限公司 Method of commerce based on block chain and the transaction system based on block chain

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112910633A (en) * 2019-12-03 2021-06-04 微观(天津)科技发展有限公司 Data processing method and device applied to block chain nodes and storage medium
CN112910633B (en) * 2019-12-03 2023-05-23 微观(天津)科技发展有限公司 Data processing method and device applied to blockchain node and storage medium
CN111914231A (en) * 2020-07-23 2020-11-10 中国联合网络通信集团有限公司 Block chain-based identity authentication method, system, equipment and storage medium

Similar Documents

Publication Publication Date Title
He et al. Efficient and anonymous mobile user authentication protocol using self-certified public key cryptography for multi-server architectures
CN110213046A (en) Auth method, equipment and storage medium based on alliance's block chain
CN112425136B (en) Internet of things security with multiparty computing (MPC)
CN110311883A (en) Identity management method, equipment, communication network and storage medium
US20110131406A1 (en) Secure Communication System For Mobile Devices
CN108111497A (en) Video camera and server inter-authentication method and device
CN110198316A (en) Auth method, equipment and storage medium based on alliance's block chain
CN107483429B (en) A kind of data ciphering method and device
CN109088810A (en) Communication means, device, relevant device, system and the storage medium of group message
CN110166255A (en) Auth method, equipment and storage medium based on alliance's block chain
CN110225017A (en) Auth method, equipment and storage medium based on alliance's block chain
CN102625294A (en) Method for managing mobile service by taking universal serial bus (USB) as virtual subscriber identity module (SIM) card
CN107094156A (en) A kind of safety communicating method and system based on P2P patterns
Isobe et al. Security analysis of end-to-end encryption for zoom meetings
TW201626775A (en) Mutual authentication
CN110213264A (en) Auth method, equipment and storage medium based on alliance's block chain
Sušánka et al. Security analysis of the Telegram IM
CN109361512A (en) Data transmission method
Tao et al. Anonymous identity authentication mechanism for hybrid architecture in mobile crowd sensing networks
CN110176994A (en) Session cipher key distributing method, equipment and storage medium based on alliance's block chain
Indushree et al. Mobile-Chain: Secure blockchain based decentralized authentication system for global roaming in mobility networks
CN110138558A (en) Transmission method, equipment and the computer readable storage medium of session key
CN109740319A (en) Digital identity verification method and server
CN111709053B (en) Operation method and operation device based on loose coupling transaction network
Schatz et al. Hydra: Practical Metadata Security for Contact Discovery, Messaging, and Dialing.

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
AD01 Patent right deemed abandoned

Effective date of abandoning: 20220415

AD01 Patent right deemed abandoned