Summary of the invention
The embodiment of the present invention provides a kind of identity identifying method based on Internet of Things, device, terminal, server and medium,
To solve the problems, such as in prior art authentication procedures as low with safety caused by plaintext transmission information.
In a first aspect, the embodiment of the present invention provides a kind of identity identifying method based on Internet of Things, which comprises
Server-side receives the digital certificate that client is sent, and obtains the public key in digital certificate;
Server-side send verification information to client, and receive client feedback using private key to the verification information into
The encrypted encrypted result of row;
Server-side verifies the encrypted result using the public key, and according to the conjunction of verification result Authentication Client
Method.
Optionally, after the server-side receives the digital certificate that client is sent, the method also includes: according to the number
Word certification authentication client identity obtains the public key in digital certificate if client identity is verified.
Optionally, the server-side verifies the encrypted result using the public key, and is recognized according to verification result
The legitimacy for demonstrate,proving client, specifically includes:
Server-side is decrypted the encrypted result using the public key, and by the verification information of decrypted result and transmission
It is compared, the legitimacy according to comparison result Authentication Client.
Optionally, the server-side verifies the encrypted result using the public key, and is recognized according to verification result
The legitimacy for demonstrate,proving client, specifically includes:
Server-side carries out Hash calculation to the verification information of transmission using public key and obtains cryptographic Hash, and by the cryptographic Hash of acquisition
The corresponding cryptographic Hash of the encrypted encrypted result of verification information is compared using private key with client, is recognized according to comparison result
Demonstrate,prove the legitimacy of client.
Optionally, after the legitimacy according to verification result Authentication Client, the method also includes: server-side generates
For carrying out the Encryption Algorithm used needed for subsequent communications and key with client, and using the public key to the Encryption Algorithm
It is encrypted with key, and encrypted Encryption Algorithm and key is sent to client.
Second aspect, the embodiment of the present invention provide a kind of identity identifying method based on Internet of Things, which comprises
Client sends digital certificate to server-side, carries public key in the digital certificate;
Client receives the verification information that server-side is sent, and is encrypted using private key to the verification information, and will
Encrypted result feeds back to server-side, so that server-side carries out verifying to the encrypted result using the public key and is tied according to verifying
The legitimacy of fruit Authentication Client.
Optionally, the encrypted result includes: the Hash for carrying out Hash calculation acquisition to the verification information using private key
Value.
Optionally, after encrypted result is sent to server-side by client, the method also includes:
Client receives the Encryption Algorithm encrypted using the public key and key that server-side is sent;
Client is decrypted the Encryption Algorithm and key using the private key, to obtain Encryption Algorithm and close
Key;
Client carries out subsequent communications using the Encryption Algorithm and key and the server-side.
The third aspect, the embodiment of the present invention provide a kind of identification authentication system based on Internet of Things, comprising: acquisition module,
First sending module and authentication module;
The acquisition module for receiving the digital certificate of client transmission, and obtains the public key in digital certificate;
First sending module for sending verification information to client, and receives the utilization private key of client feedback
Encrypted encrypted result is carried out to the verification information;
The authentication module for being verified using the public key to the encrypted result, and is recognized according to verification result
Demonstrate,prove the legitimacy of client.
Optionally, the module that obtains is also used to after receiving the digital certificate that client is sent according to the number card
Book verifies client identity and obtains the public key in digital certificate if client identity is verified.
Optionally, the authentication module is verifying the encrypted result using the public key, and is tied according to verifying
When the legitimacy of fruit Authentication Client, it is specifically used for, the encrypted result is decrypted using the public key, and decryption is tied
Fruit is compared with the verification information of transmission, the legitimacy according to comparison result Authentication Client.
Optionally, the authentication module is verifying the encrypted result using the public key, and is tied according to verifying
When the legitimacy of fruit Authentication Client, it is specifically used for, server-side carries out Hash calculation using verification information of the public key to transmission and obtains
Cryptographic Hash is obtained, and utilizes private key to the encrypted encrypted result of verification information corresponding Hash with client the cryptographic Hash of acquisition
Value is compared, according to the legitimacy of comparison result Authentication Client.
It optionally, further include generation module and the first encrypting module;
The generation module, for after authentication module Authentication Client private key legitimacy, generation be used for and client into
The Encryption Algorithm and key used needed for row subsequent communications;
First encrypting module for being encrypted using the public key to the Encryption Algorithm and key, and will add
Encryption Algorithm and key after close are sent to client.
Fourth aspect, the embodiment of the present invention provide a kind of identification authentication system based on Internet of Things, including second sends mould
Block, the first receiving module and the second encrypting module;
Second sending module carries public key in the digital certificate for sending digital certificate to server-side;
First receiving module, the verification information sent for receiving server-side;
Second encrypting module for being encrypted using private key to the verification information, and encrypted result is fed back
To server-side, so that server-side verify and according to verification result Authentication Client to the encrypted result using the public key
Legitimacy.
Optionally, second encrypting module is being used to encrypt the verification information using private key, and will encryption
When being as a result sent to server-side, it is specifically used for carrying out Hash calculation to the verification information using private key, obtains cryptographic Hash, and will
The cryptographic Hash is sent to server-side.
It optionally, further include the second receiving module, the first deciphering module and the second deciphering module;
Second receiving module, for receiving after encrypted result is sent to server-side by second encrypting module
The Encryption Algorithm encrypted using the public key and key that server-side is sent;
First deciphering module, for the Encryption Algorithm and key to be decrypted using the private key, to be added
Close algorithm and key;
Second deciphering module, for carrying out subsequent communications using the Encryption Algorithm and key and the server-side.
5th aspect, the embodiment of the present invention provide a kind of terminal, and the terminal includes: memory, processor and is stored in
On the memory and the computer program that can run on the processor, the computer program are executed by the processor
The step of identity identifying method described in Shi Shixian any one as described above based on Internet of Things.
6th aspect, the embodiment of the present invention provide a kind of server, and the server includes memory, processor and storage
On the memory and the computer program that can run on the processor, the computer program are held by the processor
The step of identity identifying method described in any one as described above based on Internet of Things is realized when row.
7th aspect, the embodiment of the present invention provides a kind of medium, computer program is stored on the storage medium, described
The step of the identity identifying method described in above-mentioned any one based on Internet of Things is realized when computer program is executed by processor
Suddenly.
The embodiment of the present invention is received in the digital certificate of client to obtain the public key in digital certificate, so by server-side
The private key in client is verified using public key afterwards, with the identity of Authentication Client, it is therefore prevented that hacker is by intercepting and capturing client
Password and user name in end data pretend to be the identity of client, improve the safety of authentication.
The above description is only an overview of the technical scheme of the present invention, in order to better understand the technical means of the present invention,
And it can be implemented in accordance with the contents of the specification, and in order to allow above and other objects of the present invention, feature and advantage can
It is clearer and more comprehensible, the followings are specific embodiments of the present invention.
Specific embodiment
Exemplary embodiments of the present disclosure are described in more detail below with reference to accompanying drawings.Although showing the disclosure in attached drawing
Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure without should be by embodiments set forth here
It is limited.On the contrary, these embodiments are provided to facilitate a more thoroughly understanding of the present invention, and can be by the scope of the present disclosure
It is fully disclosed to those skilled in the art.
First embodiment of the invention provides a kind of identity identifying method based on Internet of Things, as shown in Figure 1, including following tool
Body step:
Step S101, server-side receives the digital certificate that client is sent, and obtains the public key in digital certificate;
Step S102, server-side send verification information to client, and receive the utilization private key of client feedback to described
Verification information carries out encrypted encrypted result;Verification information can be one group of random character string in this step.
Step S103, server-side verifies the encrypted result using the public key, and is authenticated according to verification result
The legitimacy of client.
In the present embodiment, digital certificate is believing comprising public-key cryptography owner through certificate authority digital signature
The file of breath and public-key cryptography is the volume of data that communication parties identity information is identified in network communication, is acted on similar
Identity card in the driving license of driver or daily life, the present embodiment using server-side obtain digital certificate in public key come
The private key of verifying client, the legitimacy to verify client identity.
In the present embodiment, in step s101, after server-side receives the digital certificate that client is sent, server-side is according to number
Word certification authentication client identity obtains the public key in digital certificate if client identity is verified.In the present embodiment,
By foundation digital certificate authentication client identity, to ensure legitimate holder of the client as digital certificate.
Second embodiment of the invention provides a kind of identity identifying method based on Internet of Things, includes the following steps:
Step S101, server-side receives the digital certificate that client is sent, and obtains the public key in digital certificate;
Step S102, server-side send verification information to client, and receive the utilization private key of client feedback to described
Verification information carries out encrypted encrypted result;Verification information can be one group of random character string in this step;
Step S103, server-side verifies the encrypted result using the public key, and is authenticated according to verification result
The legitimacy of client.
In the present embodiment, in step S103, server-side verifies the encrypted result using the public key, and according to
The legitimacy of verification result Authentication Client, specifically includes, and server-side is decrypted the encrypted result using the public key,
And decrypted result is compared with the character string of transmission, the legitimacy according to comparison result Authentication Client;Alternatively, server-side
Hash calculation is carried out using character string of the public key to transmission and obtains cryptographic Hash, and the cryptographic Hash of acquisition and client are utilized into private key
The cryptographic Hash of character string encryption is compared, according to the legitimacy of comparison result Authentication Client.By adding in the present embodiment
The cryptographic Hash of close verification information reduces the probability being cracked, and ensure that the safety of communication.
Third embodiment of the invention provides a kind of identity identifying method based on Internet of Things, walks in conjunction with Fig. 2, including as follows
It is rapid:
Step S201, server-side receives the digital certificate that client is sent, and obtains the public key in digital certificate;
Step S202, server-side send a verification information to client and receive the utilization private key of client feedback to institute
It states verification information and carries out encrypted encrypted result;
Step S203, server-side verifies the encrypted result using the public key, and is authenticated according to verification result
The legitimacy of client thens follow the steps S204 if being proved to be successful;
Step S204, server-side are generated for carrying out the Encryption Algorithm used needed for subsequent communications and key with client,
And the Encryption Algorithm and key are encrypted using the public key, and encrypted Encryption Algorithm and key are sent to visitor
Family end.
In the embodiment of the present invention, after being proved to be successful using the public key in digital certificate to client identity, server-side is raw
New Encryption Algorithm and key are produced, and by being sent to client after public key encryption, client is encrypted using private key decryption
Algorithm and key improve the safety of communication, simultaneously to be communicated using the Encryption Algorithm and key of acquisition with server-side
Hacker is prevented to pretend to be client.
Fourth embodiment of the invention provides a kind of identity identifying method based on Internet of Things, as shown in figure 3, including following step
Rapid S301- step S303: the described method includes:
Step S301, client send digital certificate to server-side, carry public key in the digital certificate;
Step S302, client receive the verification information that server-side is sent;
Step S303, client encrypts the verification information using private key, and encrypted result is fed back to service
End, so that server-side verify and according to the legal of verification result Authentication Client to the encrypted result using the public key
Property.
Step S303 is specifically included during realization in the present embodiment: client is using private key to the verification information
Hash calculation is carried out, obtains cryptographic Hash, and the cryptographic Hash is sent to server-side.Client is held and number in the present embodiment
Matched private key in certificate carries out encryption to verification information using private key and encrypted result is sent to server-side, so that service
End public key decryptions, whether the identity for verifying client according to decrypted result is legal, the safety of the authentication of raising.
Fifth embodiment of the invention provides a kind of identity identifying method based on Internet of Things and includes the following steps in conjunction with Fig. 4
S401- step S406;
Step S401, client send digital certificate to server-side, carry public key in the digital certificate;
Step S402, client receive the verification information that server-side is sent;
Step S403, client encrypts the verification information using private key, and encrypted result is fed back to service
End, so that server-side verify and according to the legal of verification result Authentication Client to the encrypted result using the public key
Property;If client thens follow the steps S204 by verifying of the server-side to verification information;
Step S404, client receive the Encryption Algorithm encrypted using the public key and key that server-side is sent;
Step S405, client are decrypted the Encryption Algorithm and key using the private key, to be encrypted
Algorithm and key;
Step S406, client carry out subsequent communications using the Encryption Algorithm and key and the server-side.
In the present embodiment, client is recycled by receiving server-side using public key encryption Encryption Algorithm and key
Private key, which is decrypted, obtains Encryption Algorithm and key, is then communicated, is improved with server-side using Encryption Algorithm and key
The safety of authentication prevents hacker from intercepting and capturing Content of communciation and pretends to be client, ensure that the safety of communication.
Sixth embodiment of the invention provides a kind of identification authentication system based on Internet of Things, and as shown in the figure 5, comprising: obtain
Module 11, the first sending module 12 and authentication module 13;
The acquisition module 11 for receiving the digital certificate of client transmission, and obtains the public key in digital certificate;
First sending module 12, for sending verification information to client, and it is private to receive utilizing for client feedback
Key carries out encrypted encrypted result to the verification information;
The authentication module 13, for being verified using the public key to the encrypted result, and according to verification result
The legitimacy of Authentication Client.
Module is obtained in the present embodiment after receiving the digital certificate that client is sent, and is also used to according to the digital certificate
Verify client identity.
In the present embodiment, authentication module 13 is verifying the encrypted result using the public key, and according to verifying
As a result when the legitimacy of Authentication Client, it is specifically used for, the encrypted result is decrypted using the public key, and will decryption
As a result it is compared with the verification information of transmission, the legitimacy according to comparison result Authentication Client;Alternatively, authentication module is in benefit
The encrypted result is verified with the public key, and when according to the legitimacy of verification result Authentication Client, is specifically used for,
Server-side carries out Hash calculation to the verification information of transmission using public key and obtains cryptographic Hash, and by the cryptographic Hash and client of acquisition
The corresponding cryptographic Hash of the encrypted encrypted result of verification information is compared using private key, according to comparison result Authentication Client
Legitimacy.
Using the public key obtained in module acquisition digital certificate in the present embodiment, so that server-side is using public key to client
In private key verified, carry out Authentication Client identity.
Seventh embodiment of the invention provides a kind of identification authentication system based on Internet of Things, in conjunction with Fig. 6, including obtains module
21, the first sending module 22, authentication module 23, generation module 24 and the first encrypting module 25;
The acquisition module 21 for receiving the digital certificate of client transmission, and obtains the public key in digital certificate;
First sending module 22, for sending verification information to client, and it is private to receive utilizing for client feedback
Key carries out encrypted encrypted result to the verification information;
The authentication module 23, for being verified using the public key to the encrypted result, and according to verification result
The legitimacy of Authentication Client.
The generation module 24, for after authentication module Authentication Client private key legitimacy, generation is used for and client
Carry out the Encryption Algorithm used needed for subsequent communications and key;
First encrypting module 25, for being encrypted using the public key to the Encryption Algorithm and key, and will
Encrypted Encryption Algorithm and key are sent to client.
Generation module is utilized in the present embodiment, after Authentication Client private key legitimacy, generates Encryption Algorithm and key,
Encrypted algorithm and key are sent to client using the first encrypting module, so that client utilizes Encryption Algorithm and key
It is communicated with server-side, improves the safety of communication, prevent hacker from intercepting and capturing logical content.
Eighth embodiment of the invention provides a kind of identification authentication system based on Internet of Things, in conjunction with Fig. 7, including the second hair
Send module 31, the first receiving module 32 and the second encrypting module 33;
Second sending module 31 carries public key in the digital certificate for sending digital certificate to server-side;
First receiving module 32, the verification information sent for receiving server-side;
Second encrypting module 33, for being encrypted using private key to the verification information, and encrypted result is anti-
It feeds server-side, so that server-side carries out verifying to the encrypted result using the public key and authenticates client according to verification result
The legitimacy at end.
The second encrypting module 33 is being used to encrypt the verification information using private key in the present embodiment, and will encryption
When being as a result sent to server-side, it is specifically used for carrying out Hash calculation to the verification information using private key, obtains cryptographic Hash, and will
The cryptographic Hash is sent to server-side.The cryptographic Hash for passing through encrypted authentication information in the present embodiment, reduces the probability being cracked,
It ensure that the safety of communication.
Ninth embodiment of the invention provides a kind of identification authentication system based on Internet of Things, in conjunction with Fig. 8, including the second transmission
Module 31, the first receiving module 32, the second encrypting module 33 and the second receiving module 34;
Second sending module 31 carries public key in the digital certificate for sending digital certificate to server-side;
First receiving module 32, the verification information sent for receiving server-side;
Second encrypting module 33, for being encrypted using private key to the verification information, and encrypted result is anti-
It feeds server-side, so that server-side carries out verifying to the encrypted result using the public key and authenticates client according to verification result
The legitimacy at end;
Second receiving module 34, for connecing after encrypted result is sent to server-side by second encrypting module
Receive the Encryption Algorithm encrypted using the public key and key that server-side is sent;
First deciphering module 35, for the Encryption Algorithm and key to be decrypted using the private key, to obtain
Encryption Algorithm and key;
Second deciphering module 36, for utilizing the Encryption Algorithm and key and the service end communication.
In the present embodiment, the encryption of the server-side feedback received using the second receiving module crossed using public key encryption is calculated
Method and key recycle the first deciphering module to be decrypted and obtain Encryption Algorithm and key, then utilize the second deciphering module root
It is decrypted, completes with the communication of server-side, identity identifying method in the present embodiment according to close algorithm and key pair Content of communciation
It is highly-safe, and can prevent hacker from intercepting and capturing Content of communciation and pretend to be client, it ensure that the safety of communication.
Tenth embodiment of the invention provides a kind of server, and the server includes memory, processor and is stored in institute
The computer program that can be run on memory and on the processor is stated, when the computer program is executed by the processor
The step of realizing identity identifying method based on Internet of Things as follows:
Server-side receives the digital certificate that client is sent, and obtains the public key in digital certificate;
Server-side send verification information to client, and receive client feedback using private key to the verification information into
The encrypted encrypted result of row;
Server-side verifies the encrypted result using the public key, and according to the conjunction of verification result Authentication Client
Method.
The specific embodiment process of above method step can be found in one embodiment to third embodiment, the present embodiment
It is no longer repeated herein.
Eleventh embodiment of the invention provides a kind of terminal, and the terminal includes memory, processor and is stored in described
It is real when the computer program is executed by the processor on memory and the computer program that can run on the processor
Now as follows identity identifying method based on Internet of Things the step of:
Client sends digital certificate to server-side, carries public key in the digital certificate;
Client receives the verification information that server-side is sent, and is encrypted using private key to the verification information, and will
Encrypted result feeds back to server-side, so that server-side carries out verifying to the encrypted result using the public key and is tied according to verifying
The legitimacy of fruit Authentication Client.
The specific implementation process of above method step can be found in the 4th embodiment and the 5th embodiment the present embodiment exists
It is no longer repeated for this.
12 embodiments of the invention provide a kind of storage medium, and computer program is stored on the storage medium, described
The step of identity identifying method based on Internet of Things as follows is realized when computer program is executed by processor:
Server-side receives the digital certificate that client is sent, and obtains the public key in digital certificate;
Server-side send verification information to client, and receive client feedback using private key to the verification information into
The encrypted encrypted result of row;
Server-side verifies the encrypted result using the public key, and according to the conjunction of verification result Authentication Client
Method.
13 embodiments of the invention provide a kind of storage medium, and computer program is stored on the storage medium, described
The step of authentication based on Internet of Things as follows is realized when computer program is executed by processor:
Client sends digital certificate to server-side, carries public key in the digital certificate;
Client receives the verification information that server-side is sent, and is encrypted using private key to the verification information, and will
Encrypted result feeds back to server-side, so that server-side carries out verifying to the encrypted result using the public key and is tied according to verifying
The legitimacy of fruit Authentication Client.
Fourteenth embodiment of the invention provides a kind of identity authorization system based on Internet of Things, in conjunction with Fig. 9, including AE and
CSE,
AE is used to send a communication request to CSE;And oneself digital certificate is sent to CSE.It include one in certificate
Public key is used to encryption information, and private key is held by client;
After CSE receives the digital certificate of AE transmission, CSE verifies whether this digital certificate is AE, if digital certificate
Belong to AE, CSE then sends a random character string to AE;
AE encrypts character string using private key, and the result of encryption is returned to CSE;
CSE utilize obtained from digital certificate public key decryptions AE feedback encrypted result, if decrypted result with before
The random string of generation is consistent, then the identity of Authentication Client is correct;
After the identity of verifying AE is correct, CSE generates a symmetric encipherment algorithm and key, and using public key to Encryption Algorithm
It is encrypted with key, and encrypted result is sent to AE;
AE is received encrypted Encryption Algorithm and key and is decrypted using private key, to obtain Encryption Algorithm and key,
And it is communicated using Encryption Algorithm and key is obtained with CSE.
In the present embodiment CSE using public key it is close to Encryption Algorithm and key after be sent to AE, intercepted and captured even if by hacker
It not will cause safety problem, because only that holding the private key that can be decrypted in AE, the safety of authentication improved, finally, CSE
It can use symmetric encipherment algorithm with AE to encrypt and decrypt Content of Communication.
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row
His property includes, so that the process, method, article or the device that include a series of elements not only include those elements, and
And further include other elements that are not explicitly listed, or further include for this process, method, article or device institute it is intrinsic
Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including being somebody's turn to do
There is also other identical elements in the process, method of element, article or device.
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side
Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases
The former is more preferably embodiment.Based on this understanding, technical solution of the present invention substantially in other words does the prior art
The part contributed out can be embodied in the form of software products, which is stored in a storage medium
In (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that a terminal (can be mobile phone, computer, service
Device, air conditioner or network equipment etc.) execute method described in each embodiment of the present invention.
The embodiment of the present invention is described with above attached drawing, but the invention is not limited to above-mentioned specific
Embodiment, the above mentioned embodiment is only schematical, rather than restrictive, those skilled in the art
Under the inspiration of the present invention, without breaking away from the scope protected by the purposes and claims of the present invention, it can also make very much
Form, all of these belong to the protection of the present invention.