A financial data encryption method and system

By selecting prime numbers in the finite domain to calculate the encryption parameters and keys, combined with the use of public and private keys, efficient and secure encryption of financial data is achieved, and the problems of key leakage and low security in the prior art are solved.

CN119538296BActive Publication Date: 2025-04-25WIZCARD TECH +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510081475.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-20
Publication Date
2025-04-25
Estimated Expiration
2045-01-20

AI Technical Summary

Technical Problem

In the prior art, the financial data encryption algorithm is relatively low in security, the keys are easily leaked, resulting in user privacy being violated and inefficient.

Method used

Select the first prime number and the second prime number in the finite domain, calculate the encryption parameters and the master key, calculate the public key and the private key based on these parameters, anonymously process the user, encrypt and decrypt financial data, and ensure the security of the key and the protection of user privacy.

Benefits of technology

Through improved encryption algorithms and anonymity processing technology, we can avoid the abuse and leakage of keys, effectively protect user privacy, and improve the security and efficiency of data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119538296B_ABST
    Figure CN119538296B_ABST
Patent Text Reader

Abstract

The present invention provides a financial data encryption method and system, the method comprising calculating encryption parameters and a master key based on a first prime number and a second prime number; calculating a public key and a private key; performing anonymization processing on a user to obtain anonymous identity information; encrypting financial plaintext data to obtain ciphertext data; performing identity authentication based on the anonymous identity information, and if the identity authentication passes, calculating a decryption key; performing local decryption processing on the ciphertext data based on the decryption key to obtain decrypted financial plaintext data. The present invention can avoid abuse and leakage of keys, while effectively protecting the privacy of users, so as to improve data security and encryption efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of data encryption, and in particular relates to a financial data encryption method and system. Background Art

[0002] For the financial management platform, the data uploaded by each user to the financial management platform has a certain degree of privacy. Therefore, in the actual process of uploading and transmitting financial data, the financial data should be encrypted accordingly. As for the encryption algorithms in the existing technology, MD5 and EDS algorithms are usually used to encrypt the data. However, in the actual transmission process, facing external attacks or other factors, the decryption key is leaked, which in turn infringes on the user's privacy. It has low security and low efficiency. Summary of the invention

[0003] In order to solve the above technical problems, the present invention provides a financial data encryption method and system for solving the technical problems in the prior art.

[0004] On the one hand, the present invention provides the following technical solution, a financial data encryption method, comprising:

[0005] Randomly select a first prime number and a second prime number in a finite field, and calculate an encryption parameter and a master key based on the first prime number and the second prime number;

[0006] Calculate a public key and a private key based on the encryption parameters;

[0007] Obtaining financial plaintext data sent by a user, and anonymizing the user to obtain anonymous identity information;

[0008] Encrypting the financial plaintext data based on the encryption parameter, the master key, the public key and the private key to obtain ciphertext data;

[0009] Performing identity authentication based on the anonymous identity information, and if the identity authentication is successful, calculating a decryption key based on the encryption parameter, the master key, the public key, and the private key;

[0010] The ciphertext data is locally decrypted based on the decryption key to obtain decrypted financial plaintext data.

[0011] Compared with the prior art, the beneficial effects of the present invention are as follows: the present invention first arbitrarily selects a first prime number and a second prime number in a finite field, and calculates encryption parameters and a master key based on the first prime number and the second prime number; then calculates a public key and a private key based on the encryption parameters; then obtains the financial plaintext data sent by the user, and performs anonymization on the user to obtain anonymous identity information; then encrypts the financial plaintext data based on the encryption parameters, the master key, the public key and the private key to obtain ciphertext data; then identity authentication is performed based on the anonymous identity information, and if the identity authentication passes, a decryption key is calculated based on the encryption parameters, the master key, the public key and the private key; then the ciphertext data is locally decrypted based on the decryption key to obtain decrypted financial plaintext data. The present invention adopts an improved encryption algorithm to encrypt the financial data, and at the same time performs corresponding anonymization on the user identity, so as to avoid the abuse and leakage of the key, and at the same time effectively protects the privacy of the user, and the encryption method provided by the present invention is traceable, which can be specifically traced back to the corresponding leaker to improve the security of the data and the efficiency of encryption.

[0012] Preferably, the step of arbitrarily selecting a first prime number and a second prime number in a finite field, and calculating an encryption parameter and a master key based on the first prime number and the second prime number comprises:

[0013] Constructing a bilinear map And hash functions ,in, , They represent the first algorithmic cyclic group and the second algorithmic cyclic group respectively. Indicates the quantity finite field of ;

[0014] exist Pick the first prime number in With the second prime number , and select the parameter set in the first algorithm cycle group ,in, Represent the first to seventh parameters respectively;

[0015] Calculate encryption parameters based on the first prime number, the second prime number, and the parameter set With master key :

[0016] ;

[0017] .

[0018] Preferably, the step of calculating the public key and the private key based on the encryption parameter includes:

[0019] In quantity Finite field of Select a set of prime numbers from , based on the prime number set Computing private information :

[0020] ;

[0021] In the formula, , They represent the prime numbers in the set , prime numbers, Represents the first parameter, Indicates the number of users;

[0022] In quantity Finite field of Select the third prime number , based on the third prime number With private information Calculate the public key With private key :

[0023] ; ;

[0024] In the formula, Represents a bilinear map.

[0025] Preferably, the step of performing anonymization on the user to obtain anonymous identity information includes:

[0026] Set the user private key for the user And the user's public key ,in, Represents the first parameter;

[0027] In quantity Finite field of Select the fourth prime number With the fifth prime number , based on the fourth prime number , the fifth prime number , user public key Determine user identity :

[0028] ;

[0029] In the formula, is a hash function;

[0030] In quantity Finite field of Select the sixth prime number and the seventh prime number , based on the sixth prime number , the seventh prime number Identify anonymous information :

[0031] ;

[0032] In the formula, Represent the second parameter and the third parameter respectively;

[0033] Based on anonymous information User identity information Determine anonymous identity information :

[0034] ;

[0035] In the formula, Indicates The user's identification number.

[0036] Preferably, the step of encrypting the financial plaintext data based on the encryption parameter, the master key, the public key and the private key to obtain the ciphertext data includes:

[0037] Choose any random number And in quantity Finite field of Select the eighth prime number With the ninth prime number ;

[0038] Based on the random number Calculate the first ciphertext data , Second ciphertext data 、The third ciphertext data With the fourth ciphertext data :

[0039] ; ;

[0040] ; ;

[0041] In the formula, Represents the first parameter, , Represent bilinear mapping and hash function respectively. Represents financial plaintext data, Respectively represent the second and third prime numbers;

[0042] Based on the eighth prime number With the ninth prime number Calculate the fifth ciphertext data 、The sixth ciphertext data 、Seventh ciphertext data 、The eighth ciphertext data 、The ninth ciphertext data :

[0043] ; ; ; ;

[0044] ;

[0045] In the formula, Respectively represent the fourth, fifth, sixth, and seventh parameters, represents the adjustment factor, represents the first prime number;

[0046] Based on the first ciphertext data ~ Ninth ciphertext data Determine the ciphertext data :

[0047] .

[0048] Preferably, the identity authentication is performed based on the anonymous identity information, and if the identity authentication is passed, the step of calculating the decryption key based on the encryption parameter, the master key, the public key and the private key comprises:

[0049] Determine whether the anonymous identity information of the user meets the identity authentication condition. If the identity authentication condition is met, the identity authentication is passed, wherein the identity authentication condition is:

[0050] ;

[0051] Calculate a first subkey based on the encryption parameter, the master key, the public key and the private key , the second subkey , the third subkey , the fourth subkey , the fifth subkey , the sixth subkey , the seventh subkey :

[0052] ; ;

[0053] ; ;

[0054] ; ;

[0055] ;

[0056] In the formula, Represents the first parameter, They represent the second, third, fourth, fifth, sixth, seventh, and tenth prime numbers respectively. Indicates anonymous information, Represents a random number, Represents the user's public key, , Represent bilinear mapping and hash function respectively. represents the adjustment factor, Respectively represent the fourth, fifth, sixth and seventh parameters;

[0057] Based on the first subkey ~Seventh subkey Determine the decryption key :

[0058] .

[0059] Preferably, the step of locally decrypting the ciphertext data based on the decryption key to obtain decrypted financial plaintext data includes:

[0060] Determine a local decryption key based on the decryption key :

[0061] ;

[0062] ; ; ; ; ;

[0063] ; ;

[0064] In the formula, represents the blinding factor, They are the first to seventh local subkeys respectively;

[0065] Based on the local decryption key Calculate the first decryption information , Second decryption information Decrypt information with the third party :

[0066] ;

[0067] ;

[0068] ;

[0069] In the formula, , Respectively represent the third, fourth, fifth, sixth, seventh, eighth, and ninth ciphertext data, represents a bilinear map;

[0070] Based on the second decryption information Decrypt information with the third party Calculate the final decrypted information :

[0071] ;

[0072] Determine whether the decryption conditions are met. If the decryption conditions are met, calculate the decrypted financial plaintext data , where the decryption condition is:

[0073] ;

[0074] In the formula, , Respectively represent the first and second ciphertext data, is a hash function.

[0075] In a second aspect, the present invention provides the following technical solution, a financial data encryption system, the system comprising:

[0076] A parameter module, used to arbitrarily select a first prime number and a second prime number in a finite field, and calculate an encryption parameter and a master key based on the first prime number and the second prime number;

[0077] A public and private key module, used to calculate a public key and a private key based on the encryption parameters;

[0078] Anonymous module, used to obtain financial plaintext data sent by users and perform anonymization on the users to obtain anonymous identity information;

[0079] An encryption module, used for encrypting the financial plaintext data based on the encryption parameter, the master key, the public key and the private key to obtain ciphertext data;

[0080] A key module, configured to perform identity authentication based on the anonymous identity information, and if the identity authentication is successful, calculate a decryption key based on the encryption parameter, the master key, the public key and the private key;

[0081] The decryption module is used to perform local decryption processing on the ciphertext data based on the decryption key to obtain decrypted financial plaintext data.

[0082] In a third aspect, the present invention provides the following technical solution: a computer comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the financial data encryption method as described above when executing the computer program.

[0083] In a fourth aspect, the present invention provides the following technical solution: a storage medium having a computer program stored thereon, wherein the computer program implements the financial data encryption method as described above when executed by a processor. BRIEF DESCRIPTION OF THE DRAWINGS

[0084] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0085] Figure 1 A flowchart of a financial data encryption method provided in Embodiment 1 of the present invention;

[0086] Figure 2 A structural block diagram of a financial data encryption system provided in Embodiment 2 of the present invention;

[0087] Figure 3 A schematic diagram of the hardware structure of a computer provided in another embodiment of the present invention.

[0088] The embodiments of the present invention will be further described below with reference to the accompanying drawings. DETAILED DESCRIPTION

[0089] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the embodiments of the present invention, and should not be construed as limiting the present invention.

[0090] In the description of the embodiments of the present invention, it should be understood that the terms "length", "width", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside" and "outside" etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the embodiments of the present invention and simplifying the description, and do not indicate or imply that the referred device or element must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present invention.

[0091] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0092] In the embodiments of the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements. For ordinary technicians in this field, the specific meanings of the above terms in the embodiments of the present invention can be understood according to specific circumstances.

[0093] Embodiment 1

[0094] In the first embodiment of the present invention, Figure 1 As shown, a financial data encryption method includes:

[0095] S1. arbitrarily select a first prime number and a second prime number in a finite field, and calculate an encryption parameter and a master key based on the first prime number and the second prime number;

[0096] Wherein, the step S1 comprises:

[0097] S11. Constructing a bilinear map And hash functions ,in, , They represent the first algorithmic cyclic group and the second algorithmic cyclic group respectively. Indicates the quantity finite field of ;

[0098] Specifically, the first algorithm cyclic group and the second algorithm cyclic group are both of order The algorithmic cyclic group, Specifically, it is a set of prime numbers related to the algorithm cyclic group, which is specifically a finite field. prime numbers.

[0099] S12, in Pick the first prime number in With the second prime number , and select the parameter set in the first algorithm cycle group ,in, Represent the first to seventh parameters respectively;

[0100] Specifically, the first parameter is a generator of the first algorithm cyclic group, and the second to seventh parameters are coefficients in the first algorithm cyclic group.

[0101] S13, calculating encryption parameters based on the first prime number, the second prime number, and the parameter set With master key :

[0102] ;

[0103] ;

[0104] Specifically, the encryption parameters here are global parameters of the entire encryption algorithm, and the master key is specifically the master key of the intermediate authority.

[0105] S2. Calculate a public key and a private key based on the encryption parameters;

[0106] Wherein, the step S2 comprises:

[0107] S21, in the quantity Finite field of Select a set of prime numbers from , based on the prime number set Computing private information :

[0108] ;

[0109] In the formula, , They represent the prime numbers in the set , prime numbers, Represents the first parameter, Indicates the number of users.

[0110] S22, in the quantity Finite field of Select the third prime number , based on the third prime number With private information Calculate the public key With private key :

[0111] ; ;

[0112] In the formula, represents a bilinear map;

[0113] Specifically, the public key and private key here are the public key and private key of the attribute authority.

[0114] S3. Obtaining the financial plaintext data sent by the user, and performing anonymization processing on the user to obtain anonymous identity information;

[0115] Wherein, the step S3 comprises:

[0116] S31. Setting a user private key for the user And the user's public key ,in, Indicates the first parameter.

[0117] S32, in the quantity Finite field of Select the fourth prime number With the fifth prime number , based on the fourth prime number , the fifth prime number , user public key Determine user identity :

[0118] ;

[0119] In the formula, is a hash function.

[0120] S33, in the quantity Finite field of Select the sixth prime number and the seventh prime number , based on the sixth prime number , the seventh prime number Identify anonymous information :

[0121] ;

[0122] In the formula, Represent the second parameter and the third parameter respectively.

[0123] S34. Based on anonymous information User identity information Determine anonymous identity information :

[0124] ;

[0125] In the formula, Indicates The user's identification number.

[0126] S4. Encrypting the financial plaintext data based on the encryption parameter, the master key, the public key and the private key to obtain ciphertext data;

[0127] Wherein, the step S4 comprises:

[0128] S41. Select any random number And in quantity Finite field of Select the eighth prime number With the ninth prime number .

[0129] S42, based on the random number Calculate the first ciphertext data , Second ciphertext data 、The third ciphertext data With the fourth ciphertext data :

[0130] ; ;

[0131] ; ;

[0132] In the formula, Represents the first parameter, , Represent bilinear mapping and hash function respectively. Represents financial plaintext data, Represent the second and third prime numbers respectively.

[0133] S43, based on the eighth prime number With the ninth prime number Calculate the fifth ciphertext data 、The sixth ciphertext data 、Seventh ciphertext data 、The eighth ciphertext data 、The ninth ciphertext data :

[0134] ; ; ; ;

[0135] ;

[0136] In the formula, Respectively represent the fourth, fifth, sixth, and seventh parameters, represents the adjustment factor, Represents the first prime number.

[0137] S44, based on the first ciphertext data ~ Ninth ciphertext data Determine the ciphertext data :

[0138] .

[0139] S5, performing identity authentication based on the anonymous identity information, and if the identity authentication is successful, calculating a decryption key based on the encryption parameter, the master key, the public key and the private key;

[0140] Wherein, the step S5 comprises:

[0141] S51. Determine whether the anonymous identity information of the user satisfies identity authentication conditions. If the identity authentication conditions are met, the identity authentication is passed. The identity authentication conditions are:

[0142] .

[0143] S52: Calculate a first subkey based on the encryption parameter, the master key, the public key and the private key. , the second subkey , the third subkey , the fourth subkey , the fifth subkey , the sixth subkey , the seventh subkey :

[0144] ; ;

[0145] ; ;

[0146] ; ;

[0147] ;

[0148] In the formula, Represents the first parameter, They represent the second, third, fourth, fifth, sixth, seventh, and tenth prime numbers respectively. Indicates anonymous information, Represents a random number, Represents the user's public key, , Represent bilinear mapping and hash function respectively. represents the adjustment factor, Represent the fourth, fifth, sixth and seventh parameters respectively.

[0149] S53, based on the first subkey ~Seventh subkey Determine the decryption key :

[0150] ;

[0151] Specifically, the decryption key here is determined and obtained by the user, that is, it is in the hands of the user.

[0152] S6. Perform local decryption processing on the ciphertext data based on the decryption key to obtain decrypted financial plaintext data.

[0153] Wherein, the step S6 comprises:

[0154] S61: Determine a local decryption key based on the decryption key :

[0155] ;

[0156] ; ; ; ; ;

[0157] ; ;

[0158] In the formula, represents the blinding factor, They are the first to seventh local subkeys respectively;

[0159] Specifically, the blinding factor here can be Finite field of Select from.

[0160] S62: Based on the local decryption key Calculate the first decryption information , Second decryption information Decrypt information with the third party :

[0161] ;

[0162] ;

[0163] ;

[0164] In the formula, , Respectively represent the third, fourth, fifth, sixth, seventh, eighth, and ninth ciphertext data, Represents a bilinear map.

[0165] S63: Based on the second decryption information Decrypt information with the third party Calculate the final decrypted information :

[0166] .

[0167] S64: Determine whether the decryption conditions are met. If the decryption conditions are met, calculate the decrypted financial plaintext data. , where the decryption condition is:

[0168] ;

[0169] In the formula, , Respectively represent the first and second ciphertext data, is a hash function;

[0170] Specifically, if the decryption condition is not met, it means that the returned decryption key is wrong, so the above steps need to be repeated;

[0171] It should be noted that since each user has corresponding anonymous identity information, when a key leak occurs, the identity of the key owner can be obtained through the key checking algorithm, and the identity of the leaker can be tracked through the black box and white box tracking algorithms.

[0172] The financial data encryption method provided in the first embodiment of the present invention first arbitrarily selects a first prime number and a second prime number in a finite field, and calculates encryption parameters and a master key based on the first prime number and the second prime number; then calculates a public key and a private key based on the encryption parameters; then obtains the financial plaintext data sent by the user, and performs anonymization on the user to obtain anonymous identity information; then encrypts the financial plaintext data based on the encryption parameters, the master key, the public key and the private key to obtain ciphertext data; then identity authentication is performed based on the anonymous identity information, and if the identity authentication is passed, a decryption key is calculated based on the encryption parameters, the master key, the public key and the private key; then the ciphertext data is locally decrypted based on the decryption key to obtain decrypted financial plaintext data. The present invention adopts an improved encryption algorithm to encrypt the financial data, and at the same time performs corresponding anonymization on the user identity, so as to avoid the abuse and leakage of the key, and effectively protect the privacy of the user. The encryption method provided by the present invention is traceable, and it can be specifically traced back to the corresponding leaker to improve the security of the data and the efficiency of encryption.

[0173] Embodiment 2

[0174] like Figure 2 As shown, in the second embodiment of the present invention, a financial data encryption system is provided, and the system includes:

[0175] Parameter module 1, used for arbitrarily selecting a first prime number and a second prime number in a finite field, and calculating an encryption parameter and a master key based on the first prime number and the second prime number;

[0176] Public and private key module 2, used to calculate the public key and the private key based on the encryption parameters;

[0177] Anonymous module 3, used to obtain financial plaintext data sent by users, and perform anonymization on the users to obtain anonymous identity information;

[0178] An encryption module 4, used for encrypting the financial plaintext data based on the encryption parameter, the master key, the public key and the private key to obtain ciphertext data;

[0179] A key module 5, configured to perform identity authentication based on the anonymous identity information, and if the identity authentication is successful, calculate a decryption key based on the encryption parameter, the master key, the public key and the private key;

[0180] The decryption module 6 is used to perform local decryption processing on the ciphertext data based on the decryption key to obtain decrypted financial plaintext data.

[0181] The parameter module 1 comprises:

[0182] Build submodules for building bilinear maps And hash functions ,in, , They represent the first algorithmic cyclic group and the second algorithmic cyclic group respectively. Indicates the quantity finite field of ;

[0183] Collection submodule, used in Pick the first prime number in With the second prime number , and select the parameter set in the first algorithm cycle group ,in, Represent the first to seventh parameters respectively;

[0184] A parameter submodule, configured to calculate encryption parameters based on the first prime number, the second prime number, and the parameter set. With master key :

[0185] ;

[0186] .

[0187] The public-private key module 2 includes:

[0188] Private submodule for Finite field of Select a set of prime numbers from , based on the prime number set Computing private information :

[0189] ;

[0190] In the formula, , They represent the prime numbers in the set , prime numbers, Represents the first parameter, Indicates the number of users;

[0191] The public and private key submodule is used to Finite field of Select the third prime number , based on the third prime number With private information Calculate the public key With private key :

[0192] ; ;

[0193] In the formula, Represents a bilinear map.

[0194] The anonymous module 3 comprises:

[0195] User public and private key submodule, used to set the user's private key for the user And the user's public key ,in, Represents the first parameter;

[0196] The identity submodule is used to Finite field of Select the fourth prime number With the fifth prime number , based on the fourth prime number , the fifth prime number , user public key Determine user identity :

[0197] ;

[0198] In the formula, is a hash function;

[0199] Anonymous submodule for Finite field of Select the sixth prime number and the seventh prime number , based on the sixth prime number , the seventh prime number Identify anonymous information :

[0200] ;

[0201] In the formula, Represent the second parameter and the third parameter respectively;

[0202] Information output submodule, used to output anonymous information User identity information Determine anonymous identity information :

[0203] ;

[0204] In the formula, Indicates The user's identification number.

[0205] The encryption module 4 comprises:

[0206] Selection submodule, used to select any random number And in quantity Finite field of Select the eighth prime number With the ninth prime number ;

[0207] The first ciphertext output submodule is used to output the random number Calculate the first ciphertext data , Second ciphertext data 、The third ciphertext data With the fourth ciphertext data :

[0208] ; ;

[0209] ; ;

[0210] In the formula, Represents the first parameter, , Represent bilinear mapping and hash function respectively. Represents financial plaintext data, Respectively represent the second and third prime numbers;

[0211] The second ciphertext output submodule is used to output the ciphertext based on the eighth prime number. With the ninth prime number Calculate the fifth ciphertext data 、The sixth ciphertext data 、Seventh ciphertext data 、The eighth ciphertext data 、The ninth ciphertext data :

[0212] ; ; ; ;

[0213] ;

[0214] In the formula, Respectively represent the fourth, fifth, sixth, and seventh parameters, represents the adjustment factor, represents the first prime number;

[0215] Ciphertext data submodule, used for ~ Ninth ciphertext data Determine the ciphertext data :

[0216] .

[0217] The key module 5 includes:

[0218] The judgment submodule is used to judge whether the anonymous identity information of the user meets the identity authentication condition. If the identity authentication condition is met, the identity authentication is passed, wherein the identity authentication condition is:

[0219] ;

[0220] A subkey submodule, configured to calculate a first subkey based on the encryption parameter, the master key, the public key and the private key , the second subkey , the third subkey , the fourth subkey , the fifth subkey , the sixth subkey , the seventh subkey :

[0221] ; ;

[0222] ; ;

[0223] ; ;

[0224] ;

[0225] In the formula, Represents the first parameter, They represent the second, third, fourth, fifth, sixth, seventh, and tenth prime numbers respectively. Indicates anonymous information, Represents a random number, Represents the user's public key, , Represent bilinear mapping and hash function respectively. represents the adjustment factor, Respectively represent the fourth, fifth, sixth and seventh parameters;

[0226] Decryption key submodule, for decrypting a key based on a first subkey ~Seventh subkey Determine the decryption key :

[0227] .

[0228] The decryption module 6 comprises:

[0229] A local submodule, configured to determine a local decryption key based on the decryption key :

[0230] ;

[0231] ; ; ; ; ;

[0232] ; ;

[0233] In the formula, represents the blinding factor, They are the first to seventh local subkeys respectively;

[0234] A decryption information submodule, used to decrypt information based on the local decryption key Calculate the first decryption information , Second decryption information Decrypt information with the third party :

[0235] ;

[0236] ;

[0237] ;

[0238] In the formula, , Respectively represent the third, fourth, fifth, sixth, seventh, eighth, and ninth ciphertext data, represents a bilinear map;

[0239] A decryption submodule, configured to decrypt the second information based on the second Decrypt information with the third party Calculate the final decrypted information :

[0240] ;

[0241] The plaintext submodule is used to determine whether the decryption conditions are met. If the decryption conditions are met, the decrypted financial plaintext data is calculated. , where the decryption condition is:

[0242] ;

[0243] In the formula, , Respectively represent the first and second ciphertext data, is a hash function.

[0244] In some other embodiments of the present invention, the embodiments of the present invention provide the following technical solution: a computer, comprising a memory 102, a processor 101, and a computer program stored in the memory 102 and executable on the processor 101, wherein the processor 101 implements the financial data encryption method as described above when executing the computer program.

[0245] Specifically, the processor 101 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiment of the present invention.

[0246] Among them, the memory 102 may include a large-capacity memory for data or instructions. By way of example and not limitation, the memory 102 may include a hard disk drive (HDD), a floppy disk drive, a solid state drive (SSD), a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive, or a combination of two or more of these. Where appropriate, the memory 102 may include a removable or non-removable (or fixed) medium. Where appropriate, the memory 102 may be inside or outside the data processing device. In a specific embodiment, the memory 102 is a non-volatile memory. In a specific embodiment, the memory 102 includes a read-only memory (ROM) and a random access memory (RAM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically alterable ROM (EAROM) or a flash memory (FLASH), or a combination of two or more of these. Under appropriate circumstances, the RAM can be a static random access memory (SRAM) or a dynamic random access memory (DRAM), wherein the DRAM can be a fast page mode dynamic random access memory (FPMDRAM), an extended data output dynamic random access memory (EDODRAM), a synchronous dynamic random access memory (SDRAM), etc.

[0247] The memory 102 may be used to store or cache various data files that need to be processed and / or used for communication, as well as possible computer program instructions executed by the processor 101 .

[0248] The processor 101 implements the above financial data encryption method by reading and executing the computer program instructions stored in the memory 102 .

[0249] In some embodiments, the computer may further include a communication interface 103 and a bus 100. Figure 3 As shown, the processor 101, the memory 102, and the communication interface 103 are connected via a bus 100 and communicate with each other.

[0250] The communication interface 103 is used to implement communication between the modules, devices, units and / or equipment in the embodiment of the present invention. The communication interface 103 can also implement data communication with other components such as: external devices, image / data acquisition equipment, databases, external storage, and image / data processing workstations.

[0251] The bus 100 includes hardware, software or both, and couples the components of the computer device to each other. The bus 100 includes but is not limited to at least one of the following: a data bus, an address bus, a control bus, an expansion bus, and a local bus. By way of example and not limitation, bus 100 may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses or a combination of two or more of these. Where appropriate, bus 100 may include one or more buses. Although embodiments of the present invention describe and illustrate a particular bus, the present invention contemplates any suitable bus or interconnect.

[0252] The computer can execute the financial data encryption method of the present invention based on the acquired financial data encryption system, thereby realizing financial data encryption.

[0253] In some further embodiments of the present invention, in combination with the above-mentioned financial data encryption method, the embodiments of the present invention provide the following technical solutions: a storage medium having a computer program stored thereon, and the computer program implements the above-mentioned financial data encryption method when executed by a processor.

[0254] Those skilled in the art will appreciate that the logic and / or steps represented in the flowchart or otherwise described herein, for example, may be considered as an ordered list of executable instructions for implementing logical functions, and may be specifically implemented in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For purposes of this specification, "computer-readable medium" may be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.

[0255] More specific examples of readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.

[0256] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or a combination thereof: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0257] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0258] The above-mentioned embodiments only express several implementation methods of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.

Claims

1. A financial data encryption method, characterized in that: include: Randomly select a first prime number and a second prime number in a finite field, and calculate an encryption parameter and a master key based on the first prime number and the second prime number; Calculate a public key and a private key based on the encryption parameters; Obtaining financial plaintext data sent by a user, and anonymizing the user to obtain anonymous identity information; Encrypting the financial plaintext data based on the encryption parameter, the master key, the public key and the private key to obtain ciphertext data; Performing identity authentication based on the anonymous identity information, and if the identity authentication is successful, calculating a decryption key based on the encryption parameter, the master key, the public key, and the private key; Performing local decryption processing on the ciphertext data based on the decryption key to obtain decrypted financial plaintext data; The step of performing anonymization processing on the user to obtain anonymous identity information comprises: Set the user private key for the user And the user's public key ,in, Represents the first parameter; In quantity Finite field of Select the fourth prime number With the fifth prime number , based on the fourth prime number , the fifth prime number , user public key Determine user identity : ; In the formula, is a hash function; In quantity Finite field of Select the sixth prime number and the seventh prime number , based on the sixth prime number , the seventh prime number Identify anonymous information : ; In the formula, Represent the second parameter and the third parameter respectively; Based on anonymous information User identity information Determine anonymous identity information : ; In the formula, Indicates The user's identification number.

2. The financial data encryption method according to claim 1, characterized in that: The step of arbitrarily selecting a first prime number and a second prime number in a finite field, and calculating an encryption parameter and a master key based on the first prime number and the second prime number comprises: Constructing a bilinear map And hash functions ,in, , They represent the first algorithmic cyclic group and the second algorithmic cyclic group respectively. Indicates the quantity finite field of ; exist Pick any first prime number in With the second prime number , and select the parameter set in the first algorithm cycle group ,in, Represent the first to seventh parameters respectively; Calculate encryption parameters based on the first prime number, the second prime number, and the parameter set With master key : ; 。 3. The financial data encryption method according to claim 1, characterized in that: The step of calculating the public key and the private key based on the encryption parameter comprises: In quantity Finite field of Select a set of prime numbers from , based on the prime number set Computing private information : ; In the formula, , They represent the prime numbers in the set , prime numbers, Represents the first parameter, Indicates the number of users; In quantity Finite field of Select the third prime number , based on the third prime number With private information Calculate the public key With private key : ; ; In the formula, Represents a bilinear map.

4. The financial data encryption method according to claim 1, characterized in that: The step of encrypting the financial plaintext data based on the encryption parameter, the master key, the public key and the private key to obtain ciphertext data includes: Choose any random number And in quantity Finite field of Select the eighth prime number With the ninth prime number ; Based on the random number Calculate the first ciphertext data , Second ciphertext data 、The third ciphertext data With the fourth ciphertext data : ; ; ; ; In the formula, Represents the first parameter, , Represent bilinear mapping and hash function respectively. Represents financial plaintext data, Respectively represent the second and third prime numbers; Based on the eighth prime number With the ninth prime number Calculate the fifth ciphertext data 、The sixth ciphertext data 、Seventh ciphertext data 、The eighth ciphertext data 、The ninth ciphertext data : ; ; ; ; ; In the formula, Respectively represent the fourth, fifth, sixth, and seventh parameters, represents the adjustment factor, represents the first prime number; Based on the first ciphertext data ~ Ninth ciphertext data Determine the ciphertext data : 。 5. The financial data encryption method according to claim 1, characterized in that: The step of performing identity authentication based on the anonymous identity information and, if the identity authentication is successful, calculating a decryption key based on the encryption parameter, the master key, the public key and the private key comprises: Determine whether the anonymous identity information of the user meets the identity authentication condition. If the identity authentication condition is met, the identity authentication is passed, wherein the identity authentication condition is: ; Calculate a first subkey based on the encryption parameter, the master key, the public key and the private key , the second subkey , the third subkey , the fourth subkey , the fifth subkey , the sixth subkey , the seventh subkey : ; ; ; ; ; ; ; In the formula, Represents the first parameter, They represent the second, third, fourth, fifth, sixth, seventh, and tenth prime numbers respectively. Indicates anonymous information, Represents a random number, Represents the user's public key, , Represent bilinear mapping and hash function respectively. represents the adjustment factor, They represent the fourth, fifth, sixth and seventh parameters respectively; Based on the first subkey ~Seventh subkey Determine the decryption key : 。 6. The financial data encryption method according to claim 1, characterized in that: The step of locally decrypting the ciphertext data based on the decryption key to obtain decrypted financial plaintext data includes: Determine a local decryption key based on the decryption key : ; ; ; ; ; ; ; ; In the formula, represents the blinding factor, They are the first to seventh local subkeys respectively; Based on the local decryption key Calculate the first decryption information , Second decryption information Decrypt information with the third party : ; ; ; In the formula, , Respectively represent the third, fourth, fifth, sixth, seventh, eighth, and ninth ciphertext data, represents a bilinear map; Based on the second decryption information Decrypt information with the third party Calculate the final decrypted information : ; Determine whether the decryption conditions are met. If the decryption conditions are met, calculate the decrypted financial plaintext data , where the decryption condition is: ; In the formula, , Respectively represent the first and second ciphertext data, is a hash function.

7. A financial data encryption system, the system adopting the financial data encryption method according to claim 1, characterized in that: The system comprises: A parameter module, used to arbitrarily select a first prime number and a second prime number in a finite field, and calculate an encryption parameter and a master key based on the first prime number and the second prime number; A public and private key module, used to calculate a public key and a private key based on the encryption parameters; Anonymous module, used to obtain financial plaintext data sent by users and perform anonymization on the users to obtain anonymous identity information; An encryption module, used for encrypting the financial plaintext data based on the encryption parameter, the master key, the public key and the private key to obtain ciphertext data; A key module, configured to perform identity authentication based on the anonymous identity information, and if the identity authentication is successful, calculate a decryption key based on the encryption parameter, the master key, the public key and the private key; The decryption module is used to perform local decryption processing on the ciphertext data based on the decryption key to obtain decrypted financial plaintext data.

8. A computer comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the financial data encryption method according to any one of claims 1 to 6 is implemented.

9. A storage medium, characterized in that: The storage medium stores a computer program, which, when executed by a processor, implements the financial data encryption method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Multi-receiver identity anonymity signcryption method

    CN105429941A

  • User identity-based encryption method, apparatus, system, device and medium

    CN109359471A