Disclosure of Invention
The embodiment of the invention provides an encryption and decryption method for an electronic currency private key, which is used for encrypting and decrypting the electronic currency private key and improving the security of the electronic currency private key, and comprises the following steps:
for each electronic currency private key of the user, generating a hash value of the electronic currency private key;
combining the biological characteristic information of the user with the hash value of each electronic currency private key of the user to generate an encryption key of each electronic currency private key;
encrypting each electronic currency private key of the user by the encryption key of each electronic currency private key;
after receiving an electronic money private key acquisition request of a user, extracting biological characteristic information of the user;
respectively combining the biological characteristic information of the user with the hash value of the electronic currency private key in the electronic currency private key acquisition request to generate a decryption key;
and decrypting the encrypted electronic currency private key by using the decryption key.
The embodiment of the invention provides an encryption and decryption device for an electronic money private key, which is used for encrypting and decrypting the electronic money private key and improving the security of the electronic money private key, and comprises the following components:
the hash value generation module is used for generating the hash value of each electronic currency private key of the user;
the encryption key generation module is used for combining the biological characteristic information of the user with the hash value of each electronic currency private key of the user to generate an encryption key of each electronic currency private key;
the encryption module is used for encrypting each electronic currency private key of the user through the encryption key of each electronic currency private key;
the biological characteristic information extraction module is used for extracting the biological characteristic information of the user after receiving the electronic money private key acquisition request of the user;
the decryption key generation module is used for respectively combining the biological characteristic information of the user with the hash value of the electronic currency private key in the electronic currency private key acquisition request to generate a decryption key;
and the decryption module is used for decrypting the encrypted electronic currency private key through the decryption secret key.
The embodiment of the invention also provides computer equipment which comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein the processor realizes the encryption and decryption method of the electronic currency private key when executing the computer program.
The embodiment of the invention also provides a computer readable storage medium, and the computer readable storage medium stores a computer program for executing the electronic currency private key encryption and decryption method.
In the embodiment of the invention, for each electronic money private key of a user, generating a hash value of the electronic money private key; combining the biological characteristic information of the user with the hash value of each electronic currency private key of the user to generate an encryption key of each electronic currency private key; encrypting each electronic currency private key of the user by the encryption key of each electronic currency private key; after receiving an electronic money private key acquisition request of a user, extracting biological characteristic information of the user; respectively combining the biological characteristic information of the user with the hash value of the electronic currency private key in the electronic currency private key acquisition request to generate a decryption key; and decrypting the encrypted electronic currency private key by using the decryption key. In the process, the security of the electronic money private key storage is improved through double encryption of the biological characteristic information and the hash value of the electronic money private key.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the embodiments of the present invention are further described in detail below with reference to the accompanying drawings. The exemplary embodiments and descriptions of the present invention are provided to explain the present invention, but not to limit the present invention.
In the description of the present specification, the terms "comprising," "including," "having," "containing," and the like are used in an open-ended fashion, i.e., to mean including, but not limited to. Reference to the description of the terms "one embodiment," "a particular embodiment," "some embodiments," "for example," etc., means that a particular feature, structure, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the application. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. The sequence of steps involved in the embodiments is for illustrative purposes to illustrate the implementation of the present application, and the sequence of steps is not limited and can be adjusted as needed.
Fig. 1 is a flowchart of an electronic currency private key encryption and decryption method according to an embodiment of the present invention, as shown in fig. 1, the method includes:
step 101, generating a hash value of each electronic money private key of a user;
102, combining the biological characteristic information of the user with the hash value of each electronic currency private key of the user to generate an encryption key of each electronic currency private key;
103, encrypting each electronic currency private key of the user by the encryption key of each electronic currency private key;
step 104, extracting the biological characteristic information of the user after receiving the electronic money private key acquisition request of the user;
step 105, combining the biological characteristic information of the user with the hash value of the electronic currency private key in the electronic currency private key acquisition request respectively to generate a decryption key;
and 106, decrypting the encrypted electronic currency private key by using the decryption key.
In the embodiment of the invention, the security of the electronic currency private key storage is improved by double encryption of the biological characteristic information and the hash value of the electronic currency private key.
In an embodiment, the biometric information includes one or any combination of face feature information, voice feature information and fingerprint feature information.
In one embodiment, encrypting the electronic currency private key by the biometric information includes:
and symmetrically encrypting the electronic currency private key through the biological characteristic information.
The symmetric encryption algorithm which can be adopted in the symmetric encryption comprises a symmetric encryption algorithm such as DES and AES. The encrypted private key of the electronic money can be stored in the mobile equipment, so that the private key of the electronic wallet is always stored as a ciphertext in the mobile equipment, and even if the equipment is lost, the electronic money in the electronic wallet of the user can still be ensured not to be acquired and used by other people, and the safety of the electronic money is ensured.
In an embodiment, the method further comprises:
and after the encrypted electronic money private key is decrypted, a payment request is generated based on the biological characteristic information of the user and the electronic money private key.
The biometric information of the user and the electronic currency private key in the payment request can also ensure the security of the payment.
With the above embodiments in mind, fig. 2 is a detailed flowchart of the encryption and decryption method for the electronic currency private key in the embodiment of the present invention, as shown in fig. 2, including:
step 201, generating a hash value of each electronic money private key of a user;
step 202, combining the biological characteristic information of the user with the hash value of each electronic currency private key of the user to generate an encryption key of each electronic currency private key;
step 203, encrypting each electronic currency private key of the user by the encryption key of each electronic currency private key;
step 204, after receiving an electronic money private key acquisition request of a user, extracting biological characteristic information of the user;
step 205, combining the biometric information of the user with the hash value of the electronic currency private key in the electronic currency private key acquisition request respectively to generate a decryption key;
step 206, decrypting the encrypted electronic currency private key by using the decryption key;
andstep 207, after the encrypted electronic money private key is decrypted, a payment request is generated based on the biological characteristic information of the user and the electronic money private key.
Of course, it should be understood that other variations of the above detailed processes are possible and are intended to fall within the scope of the present invention.
In summary, in the method provided in the embodiment of the present invention, for each electronic money private key of the user, a hash value of the electronic money private key is generated; combining the biological characteristic information of the user with the hash value of each electronic currency private key of the user to generate an encryption key of each electronic currency private key; encrypting each electronic currency private key of the user by the encryption key of each electronic currency private key; after receiving an electronic money private key acquisition request of a user, extracting biological characteristic information of the user; respectively combining the biological characteristic information of the user with the hash value of the electronic currency private key in the electronic currency private key acquisition request to generate a decryption key; and decrypting the encrypted electronic currency private key by using the decryption key. In the process, the security of the electronic money private key storage is improved through double encryption of the biological characteristic information and the hash value of the electronic money private key.
The embodiment of the invention also provides an encryption and decryption device for the electronic money private key, which has a similar principle to the encryption and decryption method for the electronic money private key and is not described again here.
Fig. 3 is a schematic diagram of an electronic money private key encryption/decryption apparatus according to an embodiment of the present invention, as shown in fig. 3, the apparatus includes:
a hashvalue generation module 301, configured to generate, for each electronic money private key of a user, a hash value of the electronic money private key;
an encryptionkey generation module 302, configured to combine the biometric information of the user with the hash value of each electronic currency private key of the user, and generate an encryption key of each electronic currency private key;
anencryption module 303, configured to encrypt each electronic money private key of the user by using an encryption key of each electronic money private key;
the biometricinformation extraction module 304 is configured to extract biometric information of the user after receiving an electronic money private key acquisition request of the user;
a decryptionkey generation module 305, configured to combine the biometric information of the user with the hash value of the electronic currency private key in the electronic currency private key acquisition request, respectively, to generate a decryption key;
and thedecryption module 306 is configured to decrypt the encrypted electronic currency private key by using the decryption key.
In an embodiment, the biometric information includes one or any combination of face feature information, voice feature information and fingerprint feature information.
In an embodiment, the encryption module is specifically configured to:
and symmetrically encrypting the electronic currency private key through the biological characteristic information.
Fig. 4 is another schematic diagram of the electronic money private key encryption and decryption apparatus according to the embodiment of the present invention, as shown in fig. 4, the apparatus further includes a paymentrequest generation module 307, configured to:
and after the encrypted electronic money private key is decrypted, a payment request is generated based on the biological characteristic information of the user and the electronic money private key.
In summary, in the apparatus provided in the embodiment of the present invention, for each electronic money private key of the user, a hash value of the electronic money private key is generated; combining the biological characteristic information of the user with the hash value of each electronic currency private key of the user to generate an encryption key of each electronic currency private key; encrypting each electronic currency private key of the user by the encryption key of each electronic currency private key; after receiving an electronic money private key acquisition request of a user, extracting biological characteristic information of the user; respectively combining the biological characteristic information of the user with the hash value of the electronic currency private key in the electronic currency private key acquisition request to generate a decryption key; and decrypting the encrypted electronic currency private key by using the decryption key. In the process, the security of the electronic money private key storage is improved through double encryption of the biological characteristic information and the hash value of the electronic money private key.
An embodiment of the present application further provides a computer device, and fig. 5 is a schematic diagram of a computer device in an embodiment of the present invention, where the computer device is capable of implementing all steps in the encryption and decryption method for an electronic currency private key in the foregoing embodiment, and the computer device specifically includes the following contents:
a processor (processor)501, a memory (memory)502, a communication Interface (Communications Interface)503, and acommunication bus 504;
theprocessor 501, thememory 502 and thecommunication interface 503 complete mutual communication through thecommunication bus 504; thecommunication interface 503 is used for implementing information transmission between related devices such as server-side devices, detection devices, and user-side devices;
theprocessor 501 is used to call the computer program in thememory 502, and when the processor executes the computer program, the processor implements all the steps of the electronic money private key encryption and decryption method in the above embodiments.
Embodiments of the present application also provide a computer-readable storage medium, which can implement all steps in the encryption and decryption method for an electronic money private key in the above embodiments, where the computer-readable storage medium stores a computer program, and the computer program, when executed by a processor, implements all steps of the encryption and decryption method for an electronic money private key in the above embodiments.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention 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 invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. 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.
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are only exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.