CN-122027118-A - Database identity card information encryption storage method based on composite chaotic mapping
Abstract
The invention discloses a database identity card information encryption storage method based on composite chaotic mapping, which comprises the steps of reading character type identity card information to be stored in a database, constructing composite chaotic mapping, generating a chaotic sequence for encryption, carrying out encryption parallel calculation on address information and birth date information, obtaining a unique chaotic signal by utilizing the corresponding relation between a conversion value of the information to be encrypted and an element sequence number in the chaotic sequence, generating an address information encryption ciphertext by adopting segmented cascade encryption, generating a birth date information encryption ciphertext by adopting independent order preservation encryption, generating a sequence information encryption ciphertext and a verification information encryption ciphertext by adopting residual encryption, sequentially splicing the encryption ciphertexts of the address information, the birth date information, the sequence information and the verification information, obtaining the character type encryption ciphertext of the identity card information, and storing the character type encryption ciphertext in the database. The method is simple to realize, supports fuzzy query and range query of the ciphertext data of the database, and has high safety and practical popularization value.
Inventors
- SHENG SUYING
- WU XINHUA
- LI YUBO
- Gu Diezhen
Assignees
- 南通大学
Dates
- Publication Date
- 20260512
- Application Date
- 20260323
Claims (9)
- 1. The database identity card information encryption storage method based on the composite chaotic mapping is characterized by comprising the following steps of: Step 1, decomposing the database identity card information Reading character type identity card information S 1 S 2 S 3 S 4 S 5 S 6 S 7 S 8 S 9 S 10 S 11 S 12 S 13 S 14 S 15 S 16 S 17 S 18 , to be stored in a database to decompose the identity card information into 4 parts including address information S 1 S 2 S 3 S 4 S 5 S 6 , birth date information S 7 S 8 S 9 S 10 S 11 S 12 S 13 S 14 , sequence information S 15 S 16 S 17 and verification information S 18 ; Step 2, constructing novel composite chaotic map and generating chaotic sequence Firstly, combining the Sine chaotic map and Lozi chaotic map to obtain a novel composite chaotic map, carrying out iterative operation to obtain a chaotic sequence, wherein an equation is shown as a formula (1) 、 , (1) Wherein, the Is the iteration number of the composite chaotic mapping, and , Is the first The chaotic signal generated by the multiple iterations is generated, Is the initial value of the composite chaotic map at the 1 st iteration, Is the first The chaotic signal generated by the multiple iterations is generated, Is the initial value of the composite chaotic map at the 1 st iteration, Is a feedback intensity parameter of the composite chaotic map, Is the coupling strength parameter of the composite chaotic map; Then, 1 null sequence is set And from a chaotic sequence Sequentially taking elements and performing the processing as shown in formula (2), wherein At the same time will process data Put in sequence In (1) detecting data In sequence If the value of the medium is unique, the value is reserved if the value is unique, otherwise discard until the sequence 89 Elements exist in the sequence, thereby obtaining the chaotic sequence , (2) Wherein, the Representing a chaotic sequence Middle (f) An element; finally, 2 null sequences are set And And from a chaotic sequence Sequentially taking elements and performing the processing as shown in formula (3), wherein At the same time will process data Put in sequence In (1) detecting data In sequence If the value of the medium is unique, the value is reserved if the value is unique, otherwise discard until the sequence There are 200 elements in the sequence The medium elements are arranged in ascending order to obtain a chaotic sequence At the same time will process data Put in sequence In (1) detecting data In sequence If the value of the medium is unique, the value is reserved if the value is unique, otherwise discard until the sequence There are 65 elements in it to obtain a chaotic sequence , (3) Wherein, the Representing a chaotic sequence Middle (f) The number of elements to be added to the composition, Representing a chaotic sequence Middle (f) An element; step 3, encryption of identity card information First, the encryption operation of the address information S 1 S 2 S 3 S 4 S 5 S 6 : ① Address information S 1 S 2 S 3 S 4 S 5 S 6 is decomposed into province information S 1 S 2 , city information S 3 S 4 , and county region information S 5 S 6 , character type data of province information S 1 S 2 is converted into numerical data D 1 , character type data of city information S 3 S 4 is converted into numerical data D 2 , character type data of county region information S 5 S 6 is converted into numerical data D 3 , ② From chaotic sequence Medium fetch of the D 1 th element And will Is converted into character data, is used as the encryption ciphertext C 1 C 2 of province information, From chaotic sequence The mod (D 1 +D 2 , 89) +1 elements are taken Processing as shown in formula (4) is performed, and numerical data is obtained Converted into character data, encrypted ciphertext C 3 C 4 as city information, (4) From chaotic sequence Medium fetch of the D 2 +D 3 th element Processing as shown in formula (5) and converting the numerical data Converted into character data, encrypted ciphertext C 5 C 6 as county region information, (5) ③ Sequentially splicing the encrypted ciphertext C 1 C 2 、C 3 C 4 and the encrypted ciphertext C 5 C 6 to obtain a character type encrypted ciphertext C 1 C 2 C 3 C 4 C 5 C 6 of the address information; Meanwhile, the encryption operation of the birth date information S 7 S 8 S 9 S 10 S 11 S 12 S 13 S 14 : ① The birth year, month and day information S 7 S 8 S 9 S 10 S 11 S 12 S 13 S 14 is decomposed into year information S 7 S 8 S 9 S 10 , month information S 11 S 12 and date information S 13 S 14 , character type data of year information S 7 S 8 S 9 S 10 is converted into numerical data T 1 , character type data of month information S 11 S 12 is converted into numerical data T 2 , character type data of date information S 13 S 14 is converted into numerical data T 3 , ② From chaotic sequence Get the T 1 1900 Elements Will be Is converted into character data, the encrypted ciphertext C 7 C 8 C 9 C 10 as year information, Taking chaos sequence The first 12 elements of the sequence are arranged in ascending order to obtain a new chaotic sequence From a chaotic sequence Fetch the T 2 th element Will be Is converted into character data, the encrypted ciphertext C 11 C 12 as month information, From chaotic sequence The 21+T 2 th element starts to continuously take 31 elements and carries out ascending arrangement to obtain a new chaotic sequence From a chaotic sequence Fetch the T 3 th element Will be Converted into character data, encrypted ciphertext C 13 C 14 as date information, ③ Sequentially splicing the encrypted ciphertext C 7 C 8 C 9 C 10 、C 11 C 12 and the encrypted ciphertext C 13 C 14 to obtain a character type encrypted ciphertext C 7 C 8 C 9 C 10 C 11 C 12 C 13 C 14 of the birth date information; Then, the encryption operation of the sequence information S 15 S 16 S 17 : ① The character type data of the sequence information S 15 S 16 S 17 is converted into numerical type data M, ② The data M is processed as shown in formula (6) to obtain data , (6) Wherein, the Representing a chaotic sequence Middle (f) The number of elements to be added to the composition, Representing a chaotic sequence Middle (f) The number of elements to be added to the composition, Representing a chaotic sequence Middle (f) The number of elements to be added to the composition, Representing a chaotic sequence Middle (f) The number of elements to be added to the composition, ③ Data is processed An encrypted ciphertext C 15 C 16 C 17 that is converted into character type data and used as sequence information; Finally, the encryption operation of the verification information S 18 is that whether S 18 is character 'X' is judged, if yes, the encryption ciphertext C 18 of the verification information is assigned to character 'X', otherwise, a function is utilized Obtaining numerical data P, converting the data P into character data, and using the character data as an encrypted ciphertext C 18 of the verification information; And 4, sequentially splicing the character type encrypted ciphertext C 1 C 2 C 3 C 4 C 5 C 6 of the address information, the character type encrypted ciphertext C 7 C 8 C 9 C 10 C 11 C 12 C 13 C 14 of the birth date information, the encrypted ciphertext C 15 C 16 C 17 of the sequence information and the encrypted ciphertext C 18 of the verification information to obtain the character type encrypted ciphertext C 1 C 2 C 3 C 4 C 5 C 6 C 7 C 8 C 9 C 10 C 11 C 12 C 13 C 14 C 15 C 16 C 17 C 18 , of the identity card information, and storing the encrypted ciphertext in a database.
- 2. The method for encrypting and storing database identification card information based on composite chaotic mapping of claim 1, wherein in step 2, iterative operation is performed to obtain a chaotic sequence 、 Refers to the utilization of initial values And Parameters and parameters And Iterating the composite chaotic map as shown in formula (1), wherein the initial value And Parameters and parameters And Typically as a key.
- 3. The method for encrypting and storing database identification card information based on composite chaotic mapping of claim 1, wherein in step 2, data are processed at the same time Put in sequence In (1) detecting data In sequence If the value of the medium is unique, the value is reserved if the value is unique, otherwise discard until the sequence There are 200 elements in which the sequence The method is used for encrypting the year information in the identity card, the value range of 200 elements is 1000-2356, the corresponding year range to be encrypted is 1901-2100, and the value range of the reserved elements is 2357-9999 for encrypting when the year to be encrypted exceeds the range.
- 4. The method of claim 1, wherein in step 3, the step of converting the character data of province information S 1 S 2 into numerical data D 1 , the step of converting the character data of city information S 3 S 4 into numerical data D 2 , the step of converting the character data of county information S 5 S 6 into numerical data D 3 refers to the step of converting the character data into numerical data by str2num () function, and the step of representing the character data as numerical data D 1 =str2num(S 1 S 2 ),D 2 =str2num(S 3 S 4 ),D 3 =str2num(S 5 S 6 ); The conversion of the character type data of the year information S 7 S 8 S 9 S 10 into the numerical data T 1 , the conversion of the character type data of the month information S 11 S 12 into the numerical data T 2 , and the conversion of the character type data of the date information S 13 S 14 into the numerical data T 3 means that the character type data is converted into the numerical data by str2num () function, expressed as T 1 =str2num(S 7 S 8 S 9 S 10 ),T 2 =str2num(S 11 S 12 ),T 3 =str2num(S 13 S 14 ); The conversion of the character type data of the sequence information S 15 S 16 S 17 into the numerical type data M refers to the conversion of the character type data into the numerical type data by the str2num () function, and is expressed as m=str2num (S 15 S 16 S 17 ).
- 5. The method for encrypting and storing database identification card information based on composite chaotic mapping of claim 1, wherein in step 3, the method comprises the following steps of The encrypted ciphertext C 1 C 2 which is converted into character data and used as province information is obtained by using num2str # The'% 02 d') function converts the numeric data into 2-bit character data C 1 C 2 ; said data of numerical value The encrypted ciphertext C 3 C 4 converted into character data as city information is obtained by using num2str # The'% 02 d') function converts the numeric data into 2-bit character data C 3 C 4 ; said data of numerical value The encrypted ciphertext C 5 C 6 converted into character data as county information is obtained by using num2str # The'% 02 d') function converts numeric data into 2-bit character type data C 5 C 6 .
- 6. The method for encrypting and storing database identification card information based on composite chaotic mapping of claim 1, wherein in step 3, the method comprises the following steps of The encrypted ciphertext C 7 C 8 C 9 C 10 which is converted into character data and used as year information is obtained by using num2str # The'% 04 d') function converts numeric data into 4-bit character type data C 7 C 8 C 9 C 10 ; Said will be The encrypted ciphertext C 11 C 12 as month information is converted into character data by num2str # The'% 02 d') function converts the numeric data into 2-bit character data C 11 C 12 ; Said will be The encrypted ciphertext C 13 C 14 as date information is converted into character data by num2str # The'% 02 d') function converts numeric data into 2-bit character type data C 13 C 14 .
- 7. The method for encrypting and storing database identification card information based on composite chaotic mapping of claim 1, wherein in step 3, the data is stored The encrypted ciphertext C 15 C 16 C 17 as sequence information is converted into character type data by num2str #, which is the data of the character type The'% 03 d') function converts numeric data into 3-bit character type data C 15 C 16 C 17 .
- 8. The method for encrypting and storing database identification card information based on composite chaotic mapping of claim 1, wherein in step 3, the data P is converted into character type data, and the encrypted ciphertext C 18 serving as verification information is obtained by converting numerical data into 1-bit character type data C 18 by using a num2str (P, '%01 d') function.
- 9. The method for encrypting and storing the database identity card information based on the composite chaotic map of claim 1, wherein in step 4, the step of obtaining the character type encrypted ciphertext C 1 C 2 C 3 C 4 C 5 C 6 C 7 C 8 C 9 C 10 C 11 C 12 C 13 C 14 C 15 C 16 C 17 C 18 , of the identity card information and storing the encrypted ciphertext in the database is that the encrypted ciphertext is stored in an identity card information field in the database, and the data format is unchanged and is still 18-bit characters.
Description
Database identity card information encryption storage method based on composite chaotic mapping Technical Field The invention relates to the technical field of data processing and storage, in particular to a database identity card information encryption storage method based on composite chaotic mapping. Background With the rapid development of the digital age, the identity card information is used as a core personal identity mark and is widely applied to various fields such as government affairs, finance, medical treatment, security protection and the like. The identity card information contains sensitive privacy data such as addresses, birth years, month and day, and the like, the storage security of the identity card information is directly related to personal privacy protection and information security, and once data leakage occurs, great loss can be caused. Therefore, the encryption storage of the identity card information in the database becomes a key technology for guaranteeing personal privacy and preventing information security risks. At present, encryption and storage of identification card information in a database mostly adopts a traditional Format Preserving Encryption (FPE) method (such as an identification card number encryption method, a decryption method, an encryption system and a decryption system CN113094736A, a method, a system, a medium, a terminal and an application CN113965311B for realizing format preserving encryption, and the like), and other partial methods adopt a single chaotic mapping encryption or a conventional symmetric encryption mode (such as a logic chaotic mapping-based treasured user real information encryption system CN110378132A, and the like). The traditional FPE method has obvious pain points, the key space is limited, the anti-attack capability is low, the storage requirement of high safety of the identity card information cannot be met, the single chaotic mapping encryption method has certain randomness, but the encryption flexibility is insufficient, the format reservation requirement of the identity card information is difficult to consider, and the conventional symmetric encryption method has the problems of low encryption efficiency, incapability of adapting to fuzzy inquiry and range inquiry of the database ciphertext, and the subsequent calling efficiency of the identity card information is influenced. Further research discovers that the existing method for encrypting and storing the identity card information mostly cannot meet three core requirements, namely, the format integrity of the identity card information, encryption ciphertext still needs to keep the segmentation characteristics of the identity card and adapt to the storage specifications of a database, encryption security needs to have high randomness and strong attack resistance and prevent data leakage, practicability needs to support fuzzy query and range query of the ciphertext data of the database, and calling requirements in practical application are met. According to the known prior art, the research results of the identification card information encryption storage method capable of effectively solving the traditional FPE pain point are not reported at present, and the requirements of format reservation, chaotic encryption high randomness and database query are considered. Therefore, the application builds a novel composite chaotic map, provides a method for carrying out differential parallel encryption and orderly splicing storage on each piece of sectional information of the identity card, solves the defects in the prior art, and ensures the safety, practicality and convenience of the storage of the information of the identity card. Disclosure of Invention The invention aims to solve the problems that in actual database storage, the requirements of format reservation, high safety and ciphertext query are met, the traditional FPE has the pain points of limited key space, low anti-attack capability and the like, and the existing research is difficult to simultaneously meet the conditions of the encryption safety, format compatibility and database query practicability of the identity card information. In order to achieve the purpose, the invention adopts the following technical scheme that the database identity card information encryption storage method based on the composite chaotic mapping comprises the following steps: Step 1, decomposing the database identity card information Reading character type identity card information S1 S2 S3 S4 S5 S6 S7 S8 S9 S10 S11 S12 S13 S14 S15 S16 S17 S18, to be stored in a database to decompose the identity card information into 4 parts including address information S 1 S2 S3 S4 S5 S6, birth date information S 7 S8 S9 S10 S11 S12 S13 S14, sequence information S 15 S16 S17 and verification information S 18; Step 2, constructing novel composite chaotic map and generating chaotic sequence Firstly, combining the Sine chaotic map and Lozi chaotic map to obtain a