Detailed Description
In order to achieve the purpose of the present application, an embodiment of the present application provides an encryption method and device for a user resource, which obtains a user resource to be processed, and determines a key index corresponding to a key used for encrypting the user resource; determining an encryption key for encrypting the user resource according to the key index; and encrypting the user resource by using the encryption key to obtain an encryption result. By determining the key index for the user resource and determining the encryption key for encrypting the user resource according to the key corresponding to the key index, different probabilities of the encryption key determined by the system for different user resources are increased, so that the problem that the risk of user information leakage in an application platform is increased due to the fact that the encryption mode adopted for transmitting the user information between the application platforms establishing the cooperation relationship in the prior art is relatively fixed can be effectively solved, the safety of the user resource is effectively improved, and the risk of user resource leakage is reduced.
It should be noted that, in the embodiment of the present application, a user resource to be processed may be encrypted based on an Advanced Encryption Standard (AES), where the AES is a symmetric encryption method, also called Rijndael encryption method, and the AES is characterized in that: the encryption key and the decryption key are the same, and after the user resource to be processed is encrypted, the number of character bits occupied by the encryption result is the same as the number of character bits occupied by the user resource to be processed, and the user resource to be processed can also be encrypted based on other encryption modes, which is not specifically limited herein.
Various embodiments of the present application will be described in further detail with reference to the drawings attached hereto, and it should be understood that the described embodiments are only some embodiments of the present application, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that, in the embodiment provided in the present application, a first application platform may establish a cooperative relationship with multiple application platforms, and allow the multiple application platforms to share a user resource of a user on the first application platform, and the encryption/decryption method for a user resource described in the embodiment of the present application may be applied when the user resource is shared between different application platforms, and may also be applied when the user resource needs to be acquired between different application platforms, which is not limited herein. The following description will take an example of establishing a cooperation relationship between the first application platform and the second application platform.
Fig. 1 is a schematic flowchart of an encryption method for a user resource according to an embodiment of the present application, where the method is described as follows.
Step 101: the method comprises the steps of obtaining user resources to be processed, and determining a key index corresponding to a key for encrypting the user resources.
Step 102: and determining an encryption key for encrypting the user resource according to the key index.
Step 103: and encrypting the user resource by using the encryption key to obtain an encryption result.
The implementation of each of the above steps is described in detail below.
In step 101, a cooperative relationship is established between the first application platform and the second application platform, and the second application platform is allowed to share user resources of the user on the first application platform, where the user resources may be a user identifier of the user on the first application platform, or user information of the user on the first application platform, and the user information described in this embodiment of the present application may include receiving address information of the user, mobile phone number information of the user, and other user information registered by the user on the first application platform, which is not specifically limited herein.
Taking the user information as the receiving address information of the user as an example for explanation, when a service request is initiated on the second application platform and the receiving address information of the user needs to be acquired to complete the service operation, since the second application platform has established a cooperative relationship with the first application platform, the second application platform can acquire the shipping address information of the user from the first application platform, and at this time, the second application platform initiates a resource sharing request to the first application platform to request to acquire the receiving address information of the user on the first application platform, wherein, the resource sharing request comprises the user identification of the resource to be shared and the identification of the second application platform, the first application platform searches the receiving address information corresponding to the user identification according to the user identification of the resource to be shared contained in the resource sharing request, and sending the searched receiving address information to a second application platform according to the identifier of the second application platform.
However, the application platform that establishes a cooperative relationship with the first application platform is not limited to the second application platform, and in order to ensure the security of the shipping address information of the user that is sent from the first application platform to the second application platform, the first application platform needs to encrypt the shipping address information of the user that is sent to the second application platform.
In the embodiment provided by the present application, one of the users on the first application platform is taken as a research object, and the example of encrypting the user resource of the user on the first application platform is described.
Before performing the encryption operation, the user resource to be processed needs to be determined.
It should be noted that, in the embodiments provided in the present application, the manners of determining the user resource to be processed include, but are not limited to, the following two manners:
the first mode is as follows: when the second application platform initiates a resource sharing request to the first application platform, determining user resources to be processed through the resource sharing request.
The second mode is as follows: when the first application platform and the second application platform establish a cooperative relationship, user resources which are allowed to be obtained by the second application platform are determined in advance, and the user resources are used as user resources to be processed.
After the user resource to be processed is acquired, encryption operation needs to be performed on the user resource.
It should be noted that, in order to ensure the security of the user resource, in the embodiment provided in the present application, different keys are used to encrypt different user resources, and therefore, after the user resource to be processed is obtained, a key index corresponding to the key used to encrypt the user resource needs to be determined. The key index and the key satisfy a one-to-one correspondence relationship so as to determine an encryption key for encrypting the user resource according to the key index.
Specifically, the key index corresponding to the key used for encrypting the user resource may be determined in the following ways:
the first mode is as follows: based on the acquired user resource to be processed, a key index is randomly searched from a key database, and the searched key index is used as a key index corresponding to a key for encrypting the user resource.
The key database described in the embodiments of the present application may be preset, and a correspondence relationship between key indexes and keys is established in the key database, and each key corresponds to one key index. In the embodiment of the present application, the key index may be randomly determined for the user resource to be processed, and may also be determined according to the user identifier corresponding to the user resource and/or the resource type corresponding to the user resource, which is not specifically limited herein.
For example: assuming that the number of keys stored in the key database is 10000, when corresponding key indexes are determined for the 10000 keys, it is assumed that the key index determined for the first key is 0000, the key index determined for the second key is 0001, … …, and the key index determined for the 10000 th key is 9999, and other methods may also be used to determine corresponding key indexes for different keys.
After a key index is determined for each key in the key database, the correspondence between the key and the key index is stored in the key database.
The second mode is as follows: analyzing the user resources according to a set algorithm based on the acquired user resources to be processed, and searching a key index corresponding to a key for encrypting the user resources from a key database according to an analysis result.
Specifically, the user resource is analyzed according to a set algorithm, a part of information is selected from the user resource as a condition for searching the key index, and the key index matched with the selected part of information is searched from the key database as the key index corresponding to the key for encrypting the user resource.
For example: and determining the number of the character bits occupied by the user resources, and selecting any n-bit character information as a part of selected information, wherein the value range of n is more than 1 and less than or equal to the number of the character bits occupied by the user resources.
It should be noted that, a key index corresponding to a key used for encrypting the user resource may also be determined according to other manners, and embodiments provided in the present application are not particularly limited, as long as it is ensured that the key index is different for different user resources.
The third mode is as follows: according to a set decoding algorithm, decoding operation is carried out on the user resources, the number of character bits occupied by the decoded user resources is smaller than the number of character bits occupied by the user resources to be processed, a difference value is obtained by subtracting the number of the character bits occupied by the user resources to be processed from the number of the character bits occupied by the user resources to be decoded, a key index group with the same number of the character bits occupied by the user resources as the difference value is searched from a key database, and a key index is randomly selected from the key index group to serve as a key index corresponding to a key used for encrypting the user resources.
After determining a key index corresponding to a key for encrypting the user resource, in step 102, an encryption key for encrypting the user resource is determined according to the determined key index, and specific implementation manners include, but are not limited to, the following:
the first method comprises the following steps:
and searching a key corresponding to the determined key index from a key database according to the corresponding relation between the key index and the key, and taking the searched key as an encryption key for encrypting the user resource.
It should be noted that, in the method described in step 101, the key database already stores the correspondence between the key index and the key in advance, so that the key corresponding to the key index can be found in the key database according to the key index.
The second method comprises the following steps:
according to the corresponding relation between the key index and the key identification, searching the key identification corresponding to the determined key index from a key database; and obtaining an encryption key for encrypting the user resource by using the key index and the key identifier.
The key identifier here refers to identification information of a key, and does not represent a real key, and a key for encrypting the user resource can be obtained according to the key identifier and the key index.
It should be noted that, the corresponding relationship between the key index and the key identifier, and the corresponding relationship between the key index, the key identifier, and the key may be stored in advance in the key database, so that the key identifier corresponding to the key index may be found in the key database according to the key index in the following.
Specifically, after the key identifier is queried, a key may be obtained by searching or calculating according to the key index and the key identifier, and the obtained key is used as an encryption key for encrypting the user resource.
The third method comprises the following steps:
and determining an encryption key for encrypting the user resource according to the key index and the identifier of the application platform.
It should be noted that the application platform identifier described in this embodiment of the present application refers to a second application platform identifier, after the first application platform receives the resource sharing request sent by the second application platform, the identifier of the second application platform may be determined according to the resource sharing request, or the identifier of the second application platform may be determined when the user resource to be processed is obtained, or when the first application platform and the second application platform establish a cooperative relationship, the first application platform sets the identifier of the application platform for the second application platform in advance, and when the resource sharing request is received or the user resource to be processed is obtained, the application platform identifier set for the second application platform in advance is obtained, where a specific implementation manner is not limited here.
Thus, according to the key index and the identifier of the application platform, an encryption key for encrypting the user resource is determined, so as to ensure that the same user resource has different encryption keys on different application platforms.
Specifically, the manner of determining the encryption key for encrypting the user resource according to the key index and the identifier of the application platform includes, but is not limited to, the following two cases:
the first case: according to the corresponding relation between the key index and the key, searching the key corresponding to the determined key index from a key database, and taking the searched key as an initial key for encrypting the user resource; and generating an encryption key for encrypting the user resource according to the identifier of the application platform and the initial key.
Specifically, a key corresponding to the key index is searched in the key database according to the key index, and at this time, the searched key is only used as an initial key, that is, the searched key is not used as an encryption key for encrypting the user resource.
And after the searched key is obtained, obtaining an encryption key for encrypting the user resource according to the searched key and the determined identifier of the application platform. The manner of obtaining the encryption key is not specifically limited, and the identifier of the application platform may be directly added behind the searched key to obtain the encryption key, or the identifier of the application platform may be directly added in front of the searched key to obtain the encryption key.
The second case: according to the corresponding relation between the key index and the key identification, searching the key identification corresponding to the determined key index from a key database; obtaining an initial key for encrypting the user resource by using the key index and the key identifier; and generating an encryption key for encrypting the user resource according to the identifier of the application platform and the initial key.
After obtaining the encryption key for encrypting the user resource, in step 103, the user resource is encrypted by using the encryption key determined in step 102 to obtain an encryption result.
In step 103, the encryption key used may be obtained by selecting any one of the methods for determining an encryption key described in step 102, and the obtained encryption key is used to encrypt the user resource, where the method for obtaining an encryption result includes, but is not limited to, the following methods:
the first mode is as follows: and directly encrypting the user resources by using the encryption key to obtain an encryption result.
The second mode is as follows: according to a set decoding algorithm, decoding operation is carried out on the user resource to obtain the decoded user resource, and the encrypted user resource is encrypted by using the encryption key to obtain an encrypted ciphertext corresponding to the decoded user resource; and combining the encrypted ciphertext and the key index to obtain an encrypted result.
And the number of the character bits occupied by the encryption result is the same as the number of the character bits occupied by the user resource to be processed.
The existing encryption algorithm has the characteristics of encrypting user resources: after the user resources are encrypted, the number of the character bits occupied by the encryption result is larger than that of the character bits occupied by the user resources, so that the server of the first application platform is very inconvenient to store the encryption result with the larger number of the character bits, and the problem of resource waste exists. In order to overcome this problem, in the embodiment provided in the present application, when performing an encryption operation, the number of the character bits occupied by the encryption result may be limited to be the same as the number of the character bits occupied by the user resource to be processed, that is, assuming that the number of the character bits occupied by the user resource to be processed is 16 bits, and after encrypting the user resource to be processed, the number of the character bits occupied by the encryption result is also 16 bits.
In order to ensure that the number of the character bits occupied by the encryption result is the same as the number of the character bits occupied by the user resource to be processed, in the embodiment of the application, the encryption result is divided into two parts: one part is an encrypted ciphertext obtained by encrypting the user resource, and the other part is the key index determined in step 101.
In the embodiment of the present application, the number of the character bits occupied by the encrypted ciphertext is determined according to the number of the character bits occupied by the key index, the number of the character bits occupied by the key index is determined according to the number of the character bits occupied by the encrypted ciphertext obtained by the decoding algorithm, and the number of the character bits occupied by the encrypted ciphertext and/or the number of the character bits occupied by the key index are predetermined, which is not particularly limited.
The following description will take the example of determining the number of character bits occupied by the encrypted ciphertext according to the number of character bits occupied by the key index.
In step 101, a key index used for encrypting the user resource is determined, at this time, the number of character bits occupied by the key index can be determined, then, the number of character bits occupied by an encrypted ciphertext is obtained according to the number of character bits occupied by the user resource to be processed, and then, the number of character bits occupied by the user resource to be processed after performing a decoding operation is determined.
Specifically, after the user resource to be processed is obtained, the user resource is decoded to reduce the number of character bits occupied by the user resource.
The decoding algorithm for decoding the user resource may be a method for reducing the number of character bits occupied by the user resource to be processed, for example: a base64 algorithm, a bit reduction algorithm, etc., or other algorithms, which are not limited in particular.
After the user resource is decoded, the sum of the number of the character bits occupied by the decoded user resource and the number of the character bits occupied by the key index is the same as the number of the character bits occupied by the user resource to be processed, so that the problems that a server of a first application platform is very inconvenient to store an encryption result with a large number of character bits and resources are wasted can be solved.
For example, the number of the character bits occupied by the user resource to be processed is 16 bits, the number of the character bits occupied by the key index is 4 bits, and the number of the character bits occupied by the decoded user resource is 12 bits.
Specifically, the decoded user resource is obtained after the user resource is decoded, and the encryption key determined in step 102 is used to encrypt the obtained decoded user resource to obtain an encrypted ciphertext.
After the encrypted ciphertext is obtained, the encrypted ciphertext and the key index are combined to obtain an encryption result, and a method for combining the encrypted ciphertext and the key index is not particularly limited.
Optionally, in the embodiment of the present application, the user resource to be processed is encrypted by using an AES algorithm, where the encryption characteristic of the AES method is that an encryption key and a decryption key are the same, so that, after the user resource to be processed is encrypted, the encryption key used for encrypting the user resource to be processed and the correspondence between the user resource to be processed can be stored, so as to decrypt the encrypted user resource by using the encryption key.
According to the scheme provided by the embodiment of the application, the user resource to be processed is obtained, and the key index corresponding to the key for encrypting the user resource is determined; determining an encryption key for encrypting the user resource according to the key index; and encrypting the user resource by using the encryption key to obtain an encryption result. By determining the key index for the user resource and determining the encryption key for encrypting the user resource according to the key corresponding to the key index, different probabilities of the encryption key determined by the system for different user resources are increased, so that the problem that the risk of user information leakage in an application platform is increased due to the fact that the encryption mode adopted for transmitting the user information between the application platforms establishing the cooperation relationship in the prior art is relatively fixed can be effectively solved, the safety of the user resource is effectively improved, and the risk of user resource leakage is reduced.
It should be noted that, the first application platform establishes a cooperative relationship with the second application platform, and after the first application platform encrypts the different types of user resources of the user on the first application platform by the above-mentioned recording method, the encryption result is sent to the second application platform, when the second application platform needs to acquire the user resource of the first application platform to complete the service operation, the second application platform initiates a resource sharing request to the first application platform, wherein, the resource sharing request comprises the encryption information of the user resource, the first application platform receives the resource sharing request sent by the second application platform, and obtaining the encrypted information of the user resource contained therein, at this time, the first application platform needs to decrypt the encrypted information of the user resource, and the decrypted user resource is obtained, so that the first application platform can send the decrypted user resource to the second application platform.
Fig. 2 is a schematic flowchart of a decryption method for a user resource according to an embodiment of the present application, where the method is described as follows.
Step 201: the method comprises the steps of obtaining encryption information containing user resources, and determining a key index corresponding to a key for decrypting the encryption information.
Step 202: and determining a decryption key for decrypting the encrypted information according to the key index.
Step 203: and decrypting the encrypted information by using the decryption key to obtain the decrypted user resource.
The implementation of each of the above steps is described in detail below.
In step 201, after receiving a resource sharing request sent by a second application platform, a first application platform obtains encrypted information containing user resources according to the resource sharing request, and determines a key index corresponding to a key for decrypting the encrypted information according to the obtained encrypted information.
In the embodiment of the application, the user resource involved in the decryption process can be a user identifier for the first application platform; it may be user information for the second application platform.
It should be noted that, assuming that the encrypted information is obtained by directly encrypting the user resource by using the encryption key determined by the key index, after the encryption operation is performed, the corresponding relationship between the encrypted information and the key index is stored, so that when the encrypted information is obtained, the key index corresponding to the key used for decrypting the encrypted information can be determined.
In a first embodiment provided by the present application, if the encryption result of the to-be-processed user resource includes the key index, after the obtained encryption information, the key index may be determined according to the encryption information.
Specifically, the encrypted information is analyzed, and an encrypted ciphertext contained in the encrypted information and a key index corresponding to a key for decrypting the encrypted information are determined, wherein the sum of the number of character bits occupied by the encrypted ciphertext and the number of character bits occupied by the key index is the same as the number of character bits occupied by the encrypted information.
Then, a decryption key for decrypting the encrypted information is determined according to the determined key index, and specific implementation manners include, but are not limited to, the following:
the first method comprises the following steps:
and searching a key corresponding to the key index from a key database according to the corresponding relation between the key index and the key, and using the searched key as a decryption key for decrypting the encrypted information.
It should be noted that, in the first embodiment provided in the present application, the correspondence between the key index and the key is stored in the key database in advance, and the description is not repeated here.
The second method comprises the following steps:
according to the corresponding relation between the key index and the key identification, searching the key identification corresponding to the determined key index from a key database; and determining a decryption key for decrypting the encrypted information by using the key index and the key identification.
It should be noted that, the correspondence between the key index and the key identifier is stored in the key database in advance, and is specifically described in the first embodiment provided in the present application, and the description is not repeated here.
Specifically, after the key identifier is queried, a key may be obtained by searching or calculating according to the key index and the key identifier, and the obtained key is used as a decryption key for decrypting the encrypted information.
The third method comprises the following steps:
and determining a decryption key for decrypting the encrypted information according to the key index and the identifier of the application platform.
Specifically, the first case: according to the corresponding relation between the key index and the key, searching the key corresponding to the determined key index from a key database, and taking the searched key as an initial key for decrypting the encrypted information; and generating a decryption key for decrypting the encrypted information according to the identifier of the application platform and the initial key.
The second case: according to the corresponding relation between the key index and the key identification, searching the key identification corresponding to the determined key index from a key database; determining an initial key for decrypting the encrypted information by using the key index and the key identifier; and generating a decryption key for decrypting the encrypted information according to the identifier of the application platform and the initial key.
After deriving the decryption key, the first case: and directly decrypting the encrypted information to obtain the decrypted user resources.
The second case: for the situation that the encrypted information contains the encrypted ciphertext and the key index, firstly, the encrypted ciphertext contained in the encrypted information needs to be decrypted by using a decryption key to obtain a decryption result; and secondly, obtaining the decrypted user resource according to the decryption result.
Specifically, according to a set encoding algorithm, encoding operation is performed on the decryption result to obtain encoded user resources, wherein the number of character bits occupied by the encoded user resources is the same as the number of character bits occupied by original user resources.
The encoding operation and the decoding operation described in the first embodiment provided by the present application are inverse operations, that is, the decoding operation can reduce the number of character bits occupied by the decoded object, the encoding operation can increase the number of character bits occupied by the encoded object, the encoding algorithm selected here can be determined according to the decoding algorithm selected when encrypting the user resource to be processed, and may be a base64 algorithm, or other algorithms, which is not limited specifically.
And after the encoding operation is carried out on the user resource to be processed, the obtained decrypted user resource is the decoded user resource, wherein the number of character bits occupied by the decrypted user resource is the same as that occupied by the original user resource.
In this embodiment of the present application, if the used encryption algorithm is an AES method, when decrypting the encrypted information, based on the characteristics of the AES method, the encryption key may be the same as the decryption key, when obtaining the encrypted information, the encryption key used when generating the encrypted information is determined, and the encrypted information is decrypted by using the encryption key, so that the required user resource may be obtained.
It should be noted that, in the embodiment provided in the present application, the process of decrypting the encrypted information containing the user resource and the process of encrypting the to-be-processed user resource may be operated in reverse to each other.
Fig. 3 is a schematic structural diagram of a user resource encryption device according to an embodiment of the present application. The apparatus comprises: an acquisition unit 31, a determination unit 32, an encryption unit 33, and a platform identification acquisition unit 34, wherein:
an obtaining unit 31, configured to obtain a user resource to be processed, and determine a key index corresponding to a key used for encrypting the user resource;
a determining unit 32, configured to determine, according to the key index, an encryption key used for encrypting the user resource;
and an encrypting unit 33, configured to encrypt the user resource with the encryption key to obtain an encryption result.
Optionally, when acquiring the user resource to be processed, the acquiring unit 31 further includes:
according to a set decoding algorithm, decoding operation is carried out on the user resources, so that the sum of the number of character bits occupied by the decoded user resources and the number of character bits occupied by the key index is the same as the number of character bits occupied by the user resources to be processed;
the encrypting unit 33 encrypts the user resource by using the encryption key to obtain an encryption result, including:
and encrypting the decoded user resource by using the encryption key to obtain an encryption result.
The determining unit 32 determines an encryption key for encrypting the user resource according to the key index, including:
and searching a key corresponding to the key index from a key database according to the corresponding relation between the key index and the key, and taking the searched key as an encryption key for encrypting the user resource.
Optionally, the encryption device further includes a platform identification obtaining unit 34, wherein:
the platform identifier obtaining unit 34 is configured to determine an identifier of an application platform that needs to share the user resource;
the determining unit 32 determines an encryption key for encrypting the user resource according to the key index, including:
and determining an encryption key for encrypting the user resource according to the key index and the identifier of the application platform.
The determining unit 32 determines an encryption key for encrypting the user resource according to the key index and the identifier of the application platform, including:
according to the corresponding relation between the key index and the key, searching the key corresponding to the key index from a key database, and taking the searched key as an initial key for encrypting the user resource;
and generating an encryption key for encrypting the user resource according to the identifier of the application platform and the initial key.
Optionally, the determining unit 32 determines an encryption key for encrypting the user resource according to the key index and the identifier of the application platform, and further includes:
according to the corresponding relation between the key index and the key identification, searching the key identification corresponding to the determined key index from a key database;
determining an initial key for encrypting the user resource by using the key index and the key identifier;
and generating an encryption key for encrypting the user resource according to the identifier of the application platform and the initial key.
The encrypting unit 33 encrypts the decoded user resource by using the encryption key to obtain an encryption result, including:
encrypting the decoded user resource by using the encryption key to obtain an encrypted ciphertext corresponding to the decoded user resource;
and merging the encrypted ciphertext and the key index to obtain an encrypted result, wherein the number of character bits occupied by the encrypted result is the same as the number of character bits occupied by the user resource to be processed.
It should be noted that the encryption device for user resources provided in the embodiment of the present application may be implemented in a hardware manner, or may be implemented in a software manner, which is not limited herein.
Fig. 4 is a schematic structural diagram of a decryption device for a user resource according to an embodiment of the present application, where the decryption device includes: an obtaining unit 41, a determining unit 42, a decrypting unit 43, and a platform identification determining unit 44, wherein:
an obtaining unit 41, configured to obtain encrypted information including user resources, and determine a key index corresponding to a key used for decrypting the encrypted information;
a determining unit 42, further configured to determine, according to the key index, a decryption key for decrypting the encrypted information;
and a decryption unit 43, configured to decrypt the encrypted information with the decryption key to obtain a decrypted user resource.
Optionally, the obtaining unit 41 determines a key index corresponding to a key for decrypting the encrypted information by the user, and includes:
analyzing the encrypted information, and determining an encrypted ciphertext contained in the encrypted information and a key index corresponding to a key for decrypting the encrypted information, wherein the sum of the number of character bits occupied by the encrypted ciphertext and the number of character bits occupied by the key index is the same as the number of character bits occupied by the encrypted information;
the decryption unit 43 decrypts the encrypted information using the decryption key, and includes:
decrypting the encrypted ciphertext by using the decryption key to obtain a decryption result;
and obtaining the decrypted user resource according to the decryption result.
The determining unit 42 determines a decryption key for decrypting the encrypted information based on the key index, including:
and searching a key corresponding to the determined key index from a key database according to the corresponding relation between the key index and the key, and using the searched key as a decryption key for decrypting the encrypted information.
Optionally, the decryption device further comprises a platform identification determination unit 44, wherein:
the platform identification determination unit 44 is configured to determine an identification of an application platform that sends the encrypted information;
the determining unit 42 determines a decryption key for decrypting the encrypted information based on the key index, including:
and determining a decryption key for decrypting the encrypted information according to the key index and the identifier of the application platform.
The determining unit 43 determines a decryption key for decrypting the encrypted information according to the key index and the identifier of the application platform, including:
according to the corresponding relation between the key index and the key, searching the key corresponding to the determined key index from a key database, and taking the searched key as an initial key for decrypting the encrypted information;
and generating a decryption key for decrypting the encrypted information according to the identifier of the application platform and the initial key.
The determining unit 43 determines a decryption key for decrypting the encrypted information according to the key index and the identifier of the application platform, and further includes:
according to the corresponding relation between the key index and the key identification, searching the key identification corresponding to the determined key index from a key database;
determining an initial key for decrypting the encrypted information by using the key index and the key identifier;
and generating a decryption key for decrypting the encrypted information according to the identifier of the application platform and the initial key.
Optionally, the decrypting unit 43 obtains the decrypted user resource according to the decryption result, and includes:
and according to a set coding algorithm, carrying out coding operation on the result to be decrypted to obtain coded user resources, wherein the number of character bits occupied by the coded user resources is the same as that occupied by the original user resources.
It should be noted that the decryption device for the user resource provided in the embodiment of the present application may be implemented in a hardware manner, or may be implemented in a software manner, which is not limited herein.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, apparatus (device), or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (devices) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While the preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all alterations and modifications as fall within the scope of the application.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.