A format-preserving encryption method and system for personal information against statistical analysis attacks
By establishing a personal information association table and using the SM4 format-preserving encryption algorithm, the problem of statistical recovery vulnerabilities and field correlation not considered in the existing technology is solved, and the data's resistance to statistical analysis attacks and desensitization efficiency are improved.
Patent Information
- Application Number
- CN202310742067.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-21
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2043-06-21
AI Technical Summary
Existing format-preserving encryption schemes have statistical recovery vulnerabilities. Attackers can deduce part of the plaintext by analyzing desensitized data without considering the correlation between different fields, which increases the risk of privacy information leakage.
By establishing a personal information association table, calibrating the relevant core fields, and using the SM4 format-preserving encryption algorithm to desensitize and restore the core fields and other fields, we ensure the consistency of the format and logic before and after data encryption.
It effectively improves the ability of desensitized data to resist statistical analysis attacks, reduces the possibility of being attacked, and improves the desensitization efficiency of data sets.
Smart Images

Figure CN116776351B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information security technology, and in particular to a format-preserving encryption method and system for personal information that resists statistical analysis attacks. Background Art
[0002] With the development and changes of the data era, all walks of life have proposed the development goals of digital transformation and deep integration with new technologies such as big data, which has accelerated the speed and scope of data flow in the entire ecosystem. However, the faster and wider the data flows, the more serious the security risks it brings, especially the security risks faced by operational data and personal information involving sensitive information are more prominent. The "2020 China Internet Network Security Report" pointed out that 107 incidents involving sensitive personal information such as ID card numbers, mobile phone numbers, home addresses, education, and work were monitored, involving nearly 100,000 pieces of un-desensitized personal information. In recent years, personal information leaks have emerged in an endless stream, causing significant losses and adverse effects on citizens and enterprises.
[0003] At present, research on privacy protection of personal information has made some progress. For sensitive data such as name, gender, and detailed address, K-anonymity and L-diversity techniques are often used to mask and replace sensitive fields; for date of birth and event date, generalization technology is often used to desensitize sensitive fields; for sensitive information such as ID number, telephone number, and email address, format preserving encryption (FPE) is often used for desensitization. The format preserving encryption algorithm has become one of the best strategies for desensitizing personal sensitive information because it retains the uniformity of the format of the desensitized data before and after.
[0004] However, existing schemes generally have statistical recovery vulnerabilities, which are mainly manifested in two aspects: on the one hand, when an attacker obtains a large amount of desensitized personal information, he can statistically deduce the correspondence between some ciphertexts and plaintexts; on the other hand, most existing desensitization schemes only consider a single field, without considering the correlation between different fields. Attackers can deduce part of the plaintext by analyzing the correlation between different fields of the desensitized data, increasing the risk of privacy information leakage. Gong et al. conducted a desensitized data risk assessment on the desensitized personal information of more than 800,000 people in my country. The results showed that under the limited data set strategy, 19.58% of the desensitized personal information can be re-identified in combination with background knowledge. How to improve the ability of desensitized data to resist statistical analysis attacks is one of the pain points and difficulties of data desensitization.
[0005] Therefore, it is an urgent problem for those skilled in the art to propose a format-preserving encryption method and system for personal information that is resistant to statistical analysis attacks to solve the difficulties existing in the prior art. Summary of the invention
[0006] In view of this, the present invention provides a format-preserving encryption method and system for personal information that resists statistical analysis attacks, taking into account the correlation between different fields and improving the ability of desensitized data to resist statistical analysis attacks.
[0007] In order to achieve the above object, the present invention adopts the following technical solution:
[0008] A format-preserving encryption method for personal information against statistical analysis attacks comprises the following steps:
[0009] S1. Table creation step: obtain personal information and create a personal information association table;
[0010] S2. Identification step: Identify the core fields of personal information relevance in the association table;
[0011] S3. Desensitization step: the relevant core fields retain their format and are encrypted and desensitized;
[0012] S4. Recovery step: encrypt and restore the desensitized core related fields in a format-preserving manner.
[0013] In the above method, optionally, the table building step S1 specifically includes: establishing a personal information association table based on 18 personal information direct identifiers and 15 personal information quasi-identifiers, the personal information association table containing 4 groups of personal information association relationships.
[0014] In the above method, optionally, the S2 marking step specifically includes: marking the field that appears most frequently in the personal information association table as a core field of personal information association.
[0015] In the above method, optionally, the S3 desensitization step specifically includes the following steps:
[0016] S31. Desensitization of core fields related to personal information;
[0017] S32. Other fields in the personal information related table are desensitized.
[0018] In the above method, optionally, the S4 recovery step specifically includes:
[0019] S41. Restore core fields related to personal information;
[0020] S42. Other fields in the personal information association table are restored.
[0021] A personal information format-preserving encryption system for resisting statistical analysis attacks, using any one of the above personal information format-preserving encryption methods for resisting statistical analysis attacks, comprising: a table building module, a calibration module, a desensitization module, and a recovery module;
[0022] A table building module, connected to the input end of the calibration module, is used to obtain personal information and build a personal information association table;
[0023] The marking module is connected to the input end of the desensitization module and is used to mark the core fields of personal information relevance in the association table;
[0024] The desensitization module is connected to the input end of the recovery module and is used for format-preserving encryption and desensitization of the associated core fields;
[0025] The recovery module is used to encrypt and restore the desensitized core related fields in a format-preserving manner.
[0026] It can be seen from the above technical solution that, compared with the prior art, the present invention provides a method and system for encrypting personal information in a format that is resistant to statistical analysis attacks, which has the following beneficial effects: by establishing a personal information association table, calibrating the core fields of personal information association, dividing the core fields of personal information association into sub-segments and desensitizing them in a format-retaining manner based on SM4; then desensitizing other fields in the personal information association table according to the desensitization results of the core fields. The fields that can be derived from each other in personal information are sorted out, and all personal information fields are treated as a whole for format-retaining encryption and desensitization, which effectively achieves the consistency and legitimacy of the format and logic before and after data encryption, further reducing the possibility of statistical analysis attacks and brute force attacks, while improving the desensitization efficiency of personal information data sets. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, 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 embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0028] Figure 1 A flow chart of a format-preserving encryption method for personal information against statistical analysis attacks provided by the present invention;
[0029] Figure 2 The personal information association representation provided by the embodiment of the present invention is intended;
[0030] Figure 3 A structural diagram of a format-preserving encryption system for personal information that resists statistical analysis attacks provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0031] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0032] Reference Figure 1 As shown, the present invention discloses a format-preserving encryption method for personal information against statistical analysis attacks, comprising the following steps:
[0033] S1. Table creation step: obtain personal information and create a personal information association table;
[0034] S2. Identification step: Identify the core fields of personal information relevance in the association table;
[0035] S3. Desensitization step: the relevant core fields retain their format and are encrypted and desensitized;
[0036] S4. Recovery step: encrypt and restore the desensitized core related fields in a format-preserving manner.
[0037] Furthermore, the S1 table building step specifically includes: establishing a personal information association table based on 18 personal information direct identifiers and 15 personal information quasi-identifiers, and the personal information association table contains 4 groups of personal information association relationships.
[0038] Specifically, a personal information association table is compiled based on the 18 direct identifiers of personal information and 15 quasi-identifiers of personal information newly published in the "GB / T42460-2023 Information Security Technology Personal Information De-identification Effectiveness Evaluation Guidelines".
[0039] Furthermore, the S2 marking step specifically includes: marking the fields that appear most frequently in the personal information association table as core fields of personal information association.
[0040] Furthermore, the S3 desensitization step specifically includes the following steps:
[0041] S31. Desensitization of core fields related to personal information;
[0042] S32. Other fields in the personal information related table are desensitized.
[0043] Specifically, the core fields related to personal information are divided into sub-segments and encrypted and desensitized in a retained format based on SM4; then other fields in the personal information association table are desensitized based on the desensitization results of the core fields.
[0044] Furthermore, the S4 recovery steps specifically include:
[0045] S41. Restore core fields related to personal information;
[0046] S42. Other fields in the personal information association table are restored.
[0047] In a specific embodiment, the specific contents are as follows:
[0048] (I) See Figure 2 The figure shows the personal information association representation provided by the present invention, which is a personal information association table prepared based on 18 personal information direct identifiers and 15 personal information quasi-identifiers, including 4 groups of personal information association relationships.
[0049] The first group: The first to sixth digits of the ID number represent the administrative division code. Personal information such as telephone number, detailed address, zip code, etc. can directly or indirectly reflect administrative division information;
[0050] The second group: The 7th to 14th digits of the ID number represent the date of birth, and personal information such as date of birth and age are associated with it;
[0051] The third group: The 17th digit of the ID number represents gender and is associated with personal information such as gender;
[0052] The fourth group: The 18th digit of the ID number is the verification code, which is generated based on the first 17 digits of the main code.
[0053] (2) The fields that appear most frequently in the personal information association table shall be marked as the core fields of personal information association. Figure 2 As shown, the ID card number appears the most times in the four groups of personal information association relationships, so the ID card number is marked as the core field of personal information association.
[0054] (III) Desensitizing core fields related to personal information
[0055] According to the characteristics of the core field P, it is divided into m sub-segments, P = P1||P2||...||P m Then, the format-preserving encryption and desensitization are performed according to Algorithm 1. K (R i-1 ),|L i-1 |) indicates the truncation function, SM4 K (R i-1 ) indicates that R is encrypted using the key K and the national encryption algorithm SM4. i-1 Encrypt, convert the result into hexadecimal and extract the highest |L i-1 | position. Figure 2The ID card number shown is composed of a 17-digit body code and a 1-digit check code, which are, from left to right: a 6-digit address code, a 4-digit birth year code, a 2-digit birth month code, a 2-digit birth date code, a 3-digit sequence code and a 1-digit check code. The last check code is generated based on the first 17-digit body code, so the last check code does not participate in the sub-segment division, that is, the sub-segments of the ID card number are: P1=510107, P2=1990, P3=09, P4=09, P5=714, Y i Indicates P i The value range of |Y i | indicates the number in the value range. A comparison table between P1 and regions is established. There are 2850 administrative division codes in total, that is, |Y1| is 2850, and the value range of Y1 is shown in Appendix 1; Y2 = {1900, ..., 2022}, |Y2| = 122; Y3 = {1..., 12}, |Y3| = 12; Y4 = {1..., 30}, |Y4| = 30; Y5 = {100, ..., 999}, |Y5| = 900.
[0056] According to Algorithm 1, the ID card number, the core field associated with personal information, is desensitized, and the SM4 key K is set to 3415691498713687, L0 = P1||P2||P3 = 510107||1990||09, R0 = P4||P5 = 09||714, and the number of cycles r = 4:
[0057] (1) i = 1
[0058] L1=R0=09||714
[0059]
[0060] (2) i = 2
[0061] L2=R1=410581||1954||02
[0062]
[0063] (3) i = 3
[0064] L3=R2=03||215
[0065]
[0066] (4) i = 4
[0067] L4=R3=431230||2014||11
[0068] R4=L3=03||215
[0069] The final ciphertext C = 43123020141103215.
[0070] Finally, the ciphertext of the core field of personal information association, ID card number, is obtained, C=43123020141103215. The last digit verification code of the ID card number is generated according to the following rules:
[0071] (1) Weighted summation of 17-bit body codes:
[0072]
[0073] in:
[0074] i represents the position number of the ID card number from left to right;
[0075] A i Represents the ID card number value at the i-th position;
[0076] W i represents the weight at the i-th position, as shown in Table 1.
[0077] Table 1 Weight of ID card number
[0078] i 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 <![CDATA[W i ]]> 7 9 10 5 8 4 2 1 6 3 7 9 10 5 8 4 2
[0079] (2) Calculation of the last check digit:
[0080] Y=S mod 11
[0081] The value range of Y is 0 to 10, and the check code corresponding to Y is shown in Table 2.
[0082] Table 2 Verification code of ID number
[0083] Y 0 1 2 3 4 5 6 7 8 9 10 Check code 1 0 X 9 8 7 6 5 4 3 2
[0084] The ciphertext of the ID card number after desensitizing the core fields of personal information association is C=43123020141103215, and its check code is calculated: first, the weighted sum S of the first 17 digits of the main code is calculated as 182, and then 182 (mod 11) is calculated as 6 according to the formula, and the corresponding check code is 6, that is, the complete format-retaining encrypted and desensitized ID card number is 431230201411032156.
[0085] Other fields in the personal information association table are desensitized. Based on the desensitization result of the ID card number, the core field of personal information association, other fields in the personal information association table are desensitized.
[0086] 1. Phone number desensitization. According to Algorithm 1, the phone number is encrypted and desensitized in a format-preserving manner.
[0087] 2. Detailed address desensitization. The administrative district represented by the first six digits of the desensitized ID number is the desensitized result of the detailed address. Figure 2 The first six digits of the desensitized ID number are 431230, which means the desensitized result of the detailed address is Tongdao Dong Autonomous County, Huaihua City, Hunan Province.
[0088] 3. Postal code desensitization. The administrative district postal code represented by the first six digits of the ID card number after desensitization is the postal code desensitization result. Figure 2 The first six digits of the desensitized ID number are 431230, and the corresponding desensitized postal code result is 418500.
[0089] 4. Birth date anonymization. The 7th to 14th digits of the ID card number after anonymization are the anonymization results of the birth date. Figure 2 The 7th to 14th digits of the de-sensitized ID number are 20141103, which means the de-sensitized date of birth is November 3, 2014.
[0090] 5. Age desensitization. The age desensitization result is the current time minus the 7th to 14th digits of the ID card number after desensitization. Figure 2 The 7th to 14th digits of the desensitized ID number are 20141103, which means the desensitized age result is 9 years old.
[0091] 6. Gender desensitization. If the 17th digit of the ID card number after desensitization is an even number, the gender desensitization result is "female". If the 17th digit of the ID card number after desensitization is an odd number, the gender desensitization result is "male". Figure 2 The 17th digit of the desensitized ID number shown is an odd number, and the gender desensitization result is "male".
[0092] (IV) Encryption recovery with format preservation of associated fields:
[0093] Recovery of core fields related to personal information
[0094] According to Algorithm 2, the ID card number, a core field of personal information relevance, is encrypted and restored in a format-preserving manner. The ciphertext C=43123020141103215 is divided into five parts: P1=431230, P2=2014, P3=11, P4=03, P5=215. Input L4=431230||2014||11, R4=03||215, and the key K and r are consistent with those set during encryption.
[0095] (1) i = 3
[0096] L3=R4=03||215
[0097]
[0098] (2) i = 2
[0099] L2=R3=410581||1954||02
[0100]
[0101] (3) i = 1
[0102] L1=R2=09||714
[0103] (4)
[0105] L0=R1=510107||1990||09
[0106] R0=L1=09||714
[0107] Finally, the restored plaintext P = L0R0 = 51010719900909714
[0108] Restore other fields in the personal information association table. Based on the recovery result of the ID card number, the core field of personal information association, restore other fields in the personal information association table.
[0109] Phone number recovery: The phone number is encrypted and format-preserving according to Algorithm 2.
[0110] Restoration of other fields. The restoration process is similar to the desensitization of other fields in the personal information association table, and will not be described in detail here.
[0111] Algorithm 1: Encryption algorithm description based on SM4 format-preserving encryption method:
[0112]
[0113]
[0114] Algorithm 2: Decryption algorithm description based on SM4 format-preserving encryption method:
[0115]
[0116]
[0117] and Figure 1 Corresponding to the method described above, an embodiment of the present invention further provides a format-preserving encryption system for personal information against statistical analysis attacks, for Figure 1 The specific implementation of the method is shown in the following diagram: Figure 3 As shown, it includes: table building module, calibration module, desensitization module and recovery module;
[0118] A table building module, connected to the input end of the calibration module, is used to obtain personal information and build a personal information association table;
[0119] The marking module is connected to the input end of the desensitization module and is used to mark the core fields of personal information relevance in the association table;
[0120] The desensitization module is connected to the input end of the recovery module and is used for format-preserving encryption and desensitization of the associated core fields;
[0121] The recovery module is used to encrypt and restore the desensitized core related fields in a format-preserving manner.
[0122] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A format-preserving encryption method for personal information against statistical analysis attacks, characterized in that: The following steps are involved: S1. Table creation step: obtain personal information and create a personal information association table; S2. Identification step: Identify the core fields of personal information relevance in the association table; S3. Desensitization step: the relevant core fields retain their format and are encrypted and desensitized; S4. Restoration step: encrypt and restore the desensitized core fields in a format-preserving manner; S1 table building step specifically includes: establishing a personal information association table based on 18 personal information direct identifiers and 15 personal information quasi-identifiers, and the personal information association table contains 4 sets of personal information association relationships; The S3 desensitization step specifically includes the following steps: S31. Desensitization of core fields related to personal information; S32. Desensitize other fields in the personal information association table; Specifically, the core fields related to personal information are divided into sub-segments and encrypted and desensitized in a retained format based on SM4; then other fields in the personal information association table are desensitized based on the desensitization results of the core fields.
2. The method for preserving format of personal information encryption against statistical analysis attacks according to claim 1, characterized in that: The S2 labeling step specifically includes: labeling the fields that appear most frequently in the personal information association table as core fields of personal information association.
3. The method for preserving format of personal information against statistical analysis attacks according to claim 1, characterized in that: The S4 recovery steps include: S41. Restore core fields related to personal information; S42. Other fields in the personal information association table are restored.
4. A format-preserving encryption system for personal information that resists statistical analysis attacks, characterized in that: A method for preserving format of personal information encryption against statistical analysis attacks as claimed in any one of claims 1 to 3, comprising: a table building module, a calibration module, a desensitization module, and a recovery module; A table building module, connected to the input end of the calibration module, is used to obtain personal information and build a personal information association table; The marking module is connected to the input end of the desensitization module and is used to mark the core fields of personal information relevance in the association table; The desensitization module is connected to the input end of the recovery module and is used for format-preserving encryption and desensitization of the associated core fields; A recovery module is used to encrypt and restore the desensitized core fields in a format-preserving manner; The table building module specifically includes: a personal information association table established based on 18 personal information direct identifiers and 15 personal information quasi-identifiers, and the personal information association table contains 4 sets of personal information association relationships; The desensitization module specifically includes: The core fields related to personal information are desensitized; Other fields in the personal information association table are desensitized; Specifically, the core fields related to personal information are divided into sub-segments and encrypted and desensitized in a retained format based on SM4; then other fields in the personal information association table are desensitized based on the desensitization results of the core fields.
