Summary of the invention
The object of the present invention is to provide a kind of user information encryption methods applied to cloud platform, increase encryption information
Difficulty is cracked, the safety of user information in cloud platform is improved.The present invention also provides a kind of user's notes applied to cloud platform
Volume method and verification method.
To achieve the above object, the invention provides the following technical scheme:
A kind of user information encryption method applied to cloud platform, comprising:
The information and the first code key of user are sent to server-side, the information includes identification name and Information Number to be encrypted
According to;
It receives the server-side and is obtaining the information and first plus salt parameter that when first code key generates at random, the
Two add salt parameter and the second code key;
Public key is generated with first code key and second code key, the information data to be encrypted is passed through described
Public key is encrypted, and the first encryption information is obtained;
First encryption information and described first plus salt parameter combination are generated into serial data, pass through described second plus salt ginseng
It is several that the serial data is encrypted, generate the second encryption information, the encrypted result as the information data to be encrypted.
Optionally, described to include: to the information of server-side transmission user and the first code key
The information and first code key are encrypted in a manner of reversible encryption, encrypted data are sent to clothes
Business end.
Optionally, described to encrypt the information data to be encrypted by the public key, obtain the first encryption
Information includes:
In a manner of irreversible encryption, the information data to be encrypted is encrypted by the public key, obtains institute
State the first encryption information.
Optionally, described first adds salt parameter to be character string, and described second plus salt parameter are character string.
A kind of user registering method applied to cloud platform, comprising:
Client sends the information and the first code key of user to be registered to server-side, and the information includes the mark of user
Name and user password;
After the server-side receives the information and first code key, the identification name of user is stored, and give birth at random
At first plus salt parameter, second plus salt parameter and the second code key;
The client receives the server-side is sent described first and adds salt parameter, described second plus salt parameter and institute
The second code key is stated, public key is generated with first code key and second code key, the user password is passed through into the public affairs
Code key is encrypted altogether, obtains the first encryption information, and first encryption information and described first are added the symphysis of salt parameter group
At serial data, the serial data is encrypted by described second plus salt parameter, generates authentication data;
The server-side receives the authentication data that the client is sent, and by the authentication data with described wait infuse
The corresponding storage of the identification name of volume user.
A kind of user authentication method applied to cloud platform, comprising:
Server-side receives the information and the first code key for the user to be verified that client is sent, and the information includes to be verified
The identification name and user password of user;
The server-side returns to the second code key corresponding with the identification name and first adds salt parameter, second plus salt ginseng
Number;
The client receives the server-side is sent described first and adds salt parameter, described second plus salt parameter and institute
The second code key is stated, public key is generated with first code key and second code key, the user password is passed through into the public affairs
Code key is encrypted altogether, obtains the first encryption information, and first encryption information and described first are added the symphysis of salt parameter group
At serial data, the serial data is encrypted by described second plus salt parameter, authentication data is generated, by the authentication data
It is sent to the server-side;
The server-side receives the authentication data, and by the authentication data and the identification name with the user to be verified
The authentication data of corresponding storage compares, if unanimously, being proved to be successful.
Optionally, the authentication data is sent to the server-side and includes: by the client
After the client encrypts the authentication data in a manner of reversible encryption, it is sent to the server-side.
The user information encryption method provided by the present invention applied to cloud platform it can be seen from above-mentioned technical proposal,
By providing the first code key to server-side, server-side returns to the second code key and adds salt parameter, then by the first code key and second
Code key generates public key and encrypts to user information data, and adds salt parameter to information by first plus salt parameter and second
Data make further encryption, to obtain the encrypted result of user information data.The user information that the present invention is applied to cloud platform adds
Decryption method is negotiated to generate public key by client and server-side, and by adding salt parameter further to encrypt, so that encryption information
Crack difficulty increase, safety is higher, improves the safety of user information in cloud platform.
User registering method and verification method provided by the invention applied to cloud platform, user's setting identification in registration
Name, user password concurrently set the first code key, and server-side provides the second code key when obtaining the identification name of user and two add
Salt parameter, client generates public key using the first code key and the second code key and encrypts to user password, and passes through first
Add salt parameter and second that salt parameter is added to make further encryption, the encrypted result of user password is obtained, by server-side and identification name pair
It should store, authentication data when as user's checking.In user's checking, client sends identification name, user password, simultaneously also
There is the first code key, server-side returns to the second code key, first plus salt parameter and second plus salt parameter, client after receiving information
User password is encrypted according to the first code key and the second code key and first plus salt parameter, second plus salt parameter, is recognized
Card data are sent to server-side and are verified.Therefore, the present invention is applied to the user registering method and verification method of cloud platform, protects
The safety for having demonstrate,proved user password improves the safety of user information in cloud platform.
Specific embodiment
Technical solution in order to enable those skilled in the art to better understand the present invention, below in conjunction with of the invention real
The attached drawing in example is applied, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described implementation
Example is only a part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, this field is common
Technical staff's every other embodiment obtained without making creative work, all should belong to protection of the present invention
Range.
Referring to FIG. 1, being a kind of stream of the user information encryption method applied to cloud platform provided in an embodiment of the present invention
Cheng Tu, the present embodiment encryption method comprising steps of
S10: the information and the first code key of user are sent to server-side, the information includes identification name and confidential information to be added
Data.
Wherein, different user has different identification names, and the identification name of different user is not reproducible.
First code key can be set by user oneself.
It is preferred in the present embodiment, the information and the first code key are encrypted in a manner of reversible encryption, after encryption
Data be sent to server-side, to ensure the safety of the information and the first code key in transmit process.
S11: first plus the salt ginseng that the server-side generates at random when obtaining the information and first code key are received
Number, second plus salt parameter and the second code key.
Server-side is random to generate two plus salt parameter after the information for receiving user and the first code key, including first adds
Salt parameter and second plus salt parameter, and generate the second code key at random, by this first plus salt parameter, second plus salt parameter and second
Code key is sent to client.
Wherein optionally, described first adds salt parameter to be character string, and described second plus salt parameter are character string.
S12: public key is generated with first code key and second code key, the information data to be encrypted is passed through
The public key is encrypted, and the first encryption information is obtained.
Wherein, preferably in a manner of irreversible encryption, the information data to be encrypted is added by the public key
It is close, obtain first encryption information.
S13: first encryption information and described first plus salt parameter combination are generated into serial data, added by described second
Salt parameter encrypts the serial data, generates the second encryption information, the encrypted result as the information data to be encrypted.
Wherein, the serial data can be character string.
The user information encryption method provided in an embodiment of the present invention applied to cloud platform it can be seen from above content,
By providing the first code key to server-side, server-side returns to the second code key and adds salt parameter, then by the first code key and second
Code key generates public key and encrypts to user information data, and adds salt parameter to information by first plus salt parameter and second
Data make further encryption, to obtain the encrypted result of user information data.The user information that the present invention is applied to cloud platform adds
Decryption method is negotiated to generate public key, and by adding salt parameter further to encrypt, makes encryption information by client and server-side
Difficulty increase is cracked, obtained encrypted result storage in systems, is difficult to by the identification name and encryption information that record in system
User information data are obtained, safety is higher, improves the safety of user information in cloud platform.
The present embodiment be applied to cloud platform user information encryption method, can be applied in cloud platform to user password into
Row encryption, wherein corresponding information data to be encrypted is user password, to guarantee the user password of registration user in cloud platform
Safety, avoid information leakage.
The embodiment of the present invention also provides a kind of user registering method applied to cloud platform, referring to FIG. 2, being the present embodiment
A kind of flow chart of user registering method applied to cloud platform of offer.The present embodiment user registering method comprising steps of
S20: client sends the information and the first code key of user to be registered to server-side, and the information includes user's
Identification name and user password.
When user's registration, identification name, user password and the first code key are filled in.Identification name, that is, user name, different user
Identification name is not reproducible, server-side storage user encryption information be carried out by identification name it is corresponding.Wherein user password
And first code key is set by user oneself.
Preferred in the present embodiment, client encrypts the information and the first code key in a manner of reversible encryption, will
Encrypted data are sent to server-side, to ensure the safety of the information and the first code key in transmit process.
S21: after the server-side receives the information and first code key, storing the identification name of user, and with
Machine generates first plus salt parameter, second plus salt parameter and the second code key.
Server-side stores the identification name of user after the information for receiving user and the first code key, and generates two at random
Add salt parameter, including first plus salt parameter and second plus salt parameter, and generates the second code key at random, and they are returned into client
End.
Wherein, described first adds salt parameter that can be character string, and described second adds salt parameter that can be character string.
S22: the client receive described first plus the salt parameter that the server-side sends, described second plus salt parameter with
And second code key, public key is generated with first code key and second code key, the user password is passed through into institute
It states public key to be encrypted, obtains the first encryption information, and first encryption information and described first are added into salt parameter group
Symphysis encrypts the serial data by described second plus salt parameter at serial data, generates authentication data.
The step, which is realized, carries out cryptographic operation by user password of the client to user.
Wherein, preferably in a manner of irreversible encryption, the information data to be encrypted is added by the public key
It is close, obtain first encryption information.
S23: the server-side receives the authentication data that the client is sent, and by the authentication data with it is described
The corresponding storage of the identification name of user to be registered.
The user registering method provided in an embodiment of the present invention applied to cloud platform, user it can be seen from above content
In setting identification name, user password, the first code key is concurrently set, it is secret that server-side provides second when obtaining the identification name of user
Key and two plus salt parameter, client generate public key using the first code key and the second code key and add to user password
It is close, and add salt parameter to make further encryption by first plus salt parameter and second, the encrypted result of user password is obtained, by servicing
Hold storage corresponding with identification name, authentication data when as user's checking.Therefore the present invention is applied to the register method of cloud platform
In, the authentication data of server-side storage is the encrypted result after user password is encrypted, is difficult to crack by the authentication data and obtain
It obtains user password and has ensured the safety of user information to be effectively guaranteed the safety of user password.
Correspondingly, the embodiment of the present invention also provides a kind of user authentication method applied to cloud platform, referring to FIG. 3, being
A kind of flow chart of user authentication method applied to cloud platform provided in this embodiment.The present embodiment user authentication method includes
Step:
S30: server-side receive client send user to be verified information and the first code key, the information include to
Verify the identification name and user password of user.
Wherein, the identification name of user refers to user name.
S31: the server-side returns to the second code key corresponding with the identification name and first plus salt parameter, second adds salt
Parameter.
According to the identification name of user, inquiry obtains the second code key corresponding with the identification name and first adds salt server-side
Parameter, second plus salt parameter, return to client.
S32: the client receive described first plus the salt parameter that the server-side sends, described second plus salt parameter with
And second code key, public key is generated with first code key and second code key, the user password is passed through into institute
It states public key to be encrypted, obtains the first encryption information, and first encryption information and described first are added into salt parameter group
Symphysis encrypts the serial data by described second plus salt parameter at serial data, authentication data is generated, by the certification
Data are sent to the server-side.
Wherein, it is preferred that the client by the authentication data be sent to the server-side include: the client with
After reversible encryption mode encrypts the authentication data, it is sent to the server-side.
S33: the server-side receives the authentication data, and by the authentication data and the mark with the user to be verified
The authentication data for knowing the corresponding storage of name compares, if unanimously, being proved to be successful.
The authentication data that server-side is sent according to client, by the authentication data and pre-stored and user to be verified
The authentication data of the corresponding storage of identification name compare, if unanimously, being proved to be successful;If inconsistent, which is lost
It loses.
The user authentication method provided in an embodiment of the present invention applied to cloud platform, user it can be seen from above content
Identification name, user password are sent by client, while there are also the first code keys, it is secret that server-side returns to second after receiving information
Key, first plus salt parameter and second add salt parameter, and client generates public key according to the first code key and the second code key, to user
Password is encrypted, and is further encrypted by first plus salt parameter, second plus salt parameter to user password, and authentication data is obtained
Server-side is sent to be verified.The present invention is applied to the user authentication method of cloud platform, ensure that the safety of user password,
Improve the safety of user information in cloud platform.
Above to user information encryption method, register method and the verification method provided by the present invention applied to cloud platform
It is described in detail.Used herein a specific example illustrates the principle and implementation of the invention, the above reality
The explanation for applying example is merely used to help understand method and its core concept of the invention.It should be pointed out that for the art
For those of ordinary skill, without departing from the principle of the present invention, can with several improvements and modifications are made to the present invention,
These improvements and modifications also fall within the scope of protection of the claims of the present invention.