CN112583809B - Data encryption and decryption method of non-immersion multiple encryption algorithms - Google Patents

Data encryption and decryption method of non-immersion multiple encryption algorithms Download PDF

Info

Publication number
CN112583809B
CN112583809B CN202011425318.6A CN202011425318A CN112583809B CN 112583809 B CN112583809 B CN 112583809B CN 202011425318 A CN202011425318 A CN 202011425318A CN 112583809 B CN112583809 B CN 112583809B
Authority
CN
China
Prior art keywords
key
encryption
data
encrypted
field
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011425318.6A
Other languages
Chinese (zh)
Other versions
CN112583809A (en
Inventor
丁勇
钱双
张晓军
张德健
王春茹
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Guoyan Datang Software Technology Co ltd
Original Assignee
Beijing Guoyan Datang Software Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Guoyan Datang Software Technology Co ltd filed Critical Beijing Guoyan Datang Software Technology Co ltd
Priority to CN202011425318.6A priority Critical patent/CN112583809B/en
Publication of CN112583809A publication Critical patent/CN112583809A/en
Application granted granted Critical
Publication of CN112583809B publication Critical patent/CN112583809B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • G06F16/2255Hash tables
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2453Query optimisation
    • G06F16/24534Query rewriting; Transformation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2457Query processing with adaptation to user needs
    • G06F16/24573Query processing with adaptation to user needs using data annotations, e.g. user-defined metadata
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2468Fuzzy queries
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/14Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using a plurality of keys or algorithms

Abstract

The invention discloses a data encryption and decryption method of non-immersion multiple encryption algorithms, which adopts a secondary key system to enhance the management of key use, distributes the key of a client user according to the request of the user, confirms and distributes the key by an administrator, and records when the client uses the key; encrypting and decrypting the sensitive data by adopting an asymmetric encryption algorithm; mapping the content of the field to be encrypted to a hash value based on a hash function to realize equivalent query and range query of the encrypted field; the encryption and decryption of the application data are completed by configuring a dependent injection mode; the invention has the advantages that: the security protection of sensitive data in electronic government affairs is realized, the management of the whole process from the generation of the secret key to the use is realized, the fuzzy and accurate query of encrypted data is supported, the existing application systems are integrated in a non-immersion mode, the good portability is embodied, and the encryption and decryption application of the sensitive data is effectively supported.

Description

Data encryption and decryption method of non-immersion multiple encryption algorithms
Technical Field
The invention relates to a data encryption and decryption method, in particular to a non-immersion data encryption and decryption method based on multiple encryption algorithms, and belongs to the field of data encryption and decryption methods.
Background
In e-government, a large amount of data is stored in a relational database to provide data services for system users, and especially, sensitive data security in e-government applications is important. On one hand, data in a database needs to be encrypted and protected to enhance the safety of data transmission and access, and on the other hand, under the condition that the code does not need to be modified for the existing application, the data encryption and decryption service is completed through configuration management. However, most of the current processes for encrypting and decrypting sensitive data have the following three problems:
(1) the key management has the problems that in the normal condition, data encryption and decryption basically adopt a symmetric encryption algorithm for encryption and decryption, and the key management is basically not recorded, so that the use condition of the key cannot be tracked.
(2) The problem of ciphertext query is that the field ciphertext exists, so that the query efficiency is reduced or condition matching query cannot be performed.
(3) The encryption and decryption service generally adopts the logic of modifying application core codes to integrate the encryption and decryption service into a system, so that the development work of the system is changed.
Disclosure of Invention
The invention aims to design a data encryption and decryption method of non-immersive multiple encryption algorithms, which can enable encryption and decryption services to be freely used in different application environments through relevant configuration without modifying codes for realizing core functions in an application system.
The technical scheme of the invention is as follows:
the data encryption and decryption method of non-immersion multiple encryption algorithms mainly comprises the following steps:
(1) the management of key use is enhanced by adopting a secondary key system, the key of a client user is distributed according to user request, an administrator confirms and distributes the key, meanwhile, the record is carried out when the client uses the key, and the key of the client is also distributed according to the data record; encrypting and decrypting the sensitive data by adopting an asymmetric encryption algorithm;
(2) the method comprises the steps of solving the problem of ciphertext query in a database encryption system by adopting a ciphertext field index table method, mapping the content of a field to be encrypted to a HASH value based on a HASH function by adopting a HASH algorithm, and realizing equivalent query and range query of the encrypted field based on the HASH value after the mapping of the record of the content of the field to be encrypted;
(3) the method adopts non-immersion to provide encryption and decryption services, completes application data encryption and decryption by configuring a dependent injection mode, and does not need to modify codes of an original application system.
The invention supports the encryption and decryption of newly-built application and established application data, realizes the security requirement of data transmission access by using different key methods, simultaneously supports the query and retrieval of encrypted data, and is integrated into an application system framework by configuring a dependent injection mode, thereby providing final data encryption and decryption service.
The method specifically comprises the following steps:
step S100: the administrator creates an asymmetric encrypted key pair, simultaneously stores a private key, sends a public key to the client, generates a symmetric encrypted key by the administrator, and secondarily encrypts and stores the asymmetric encrypted private key and the public key pair in the database by using the key;
step S200: the method comprises the steps that an encryption and decryption service is configured by an application, an interface which needs to encrypt and decrypt sensitive data is injected into an application program package in a front-mounted mode, the sensitive data is encrypted or decrypted firstly, then a service operation interface service is executed, and log information called by encryption and decryption is injected into a rear-mounted mode;
step S300: the client encrypts plaintext data to be uploaded by using the public key, the server records the use condition of the public key, and stores the ciphertext into a database data table;
step S400: establishing a ciphertext index table based on the encrypted field, wherein the ciphertext index table records fields and unique identification field IDs which establish a one-to-one correspondence relationship with the encrypted field records; mapping the unique identification ID of the record of the field to be encrypted to the encrypted unique identification ID by using a Hash function, and storing the ID and the Hash value of the field content into an index table;
step S500: based on the mapped hash value, realizing equivalent query and range query of the encrypted field; and calling the private key or the public key to decrypt the encrypted data and display the decrypted data.
Further, the step S100 includes the following sub-steps:
(1) an administrator generates an SM2 secret key, and a public key and a private key are generated by adopting an asymmetric encryption SM2 algorithm;
(2) the administrator generates an SM4 key and generates the key by adopting a symmetric encryption algorithm SM 4;
(3) encrypting and storing the generated public key and private key, encrypting the generated asymmetric encrypted private key and public key by using an SM4 key by an administrator, and simultaneously storing the encrypted public key and private key in a database;
(4) the user applies for the key, the administrator approves, registers and issues records, and provides a cipher plaintext to the client, the client forms a cipher text for opening the public key through the symmetrically encrypted key, and opens the asymmetrically encrypted public key;
(5) the administrator records the key application, records the key application condition of the user and stores the key application condition in the database.
Further, the step S200 includes the following sub-steps:
(1) configuring a preposed encryption and decryption function depending on the injection function;
(2) and configuring a post-encryption and decryption log recording function depending on the injection function.
Further, the step S300 includes the following sub-steps:
(1) the user decrypts the public key by using the symmetric key, uploads or checks the encrypted sensitive data, and decrypts the public key by using the symmetric key; calling a public key to encrypt and decrypt data;
(2) the server side records the use condition of the client side public key to form a client side public key use log, analyzes the log record and checks abnormal conditions;
(3) and (4) ciphertext data storage, wherein the ciphertext form of the encrypted data uploaded by the client is stored in a database.
Further, the step S400 includes the following sub-steps:
(1) establishing an index table corresponding to the encryption field;
(2) defining an index field in an index table, wherein the content of the index field consists of a division value and a characteristic value of character string data;
(3) defining an index field partition function, and mapping the value range Di of the attribute R.ai to partitions { p1, p2, …, pk }, wherein the following conditions are satisfied: (1) all partitioned and can cover the entire domain; (2) any two divisions do not overlap; formally, the function partition is defined as follows: partition (r, Ai) = { p1, p2, …, pk }; the dividing method of the numerical field value domain usually adopts the method of equal width or equal depth division; for the character type field, dividing the value range of the attribute according to the probability distribution of the attribute value, so that the number of elements contained in each division is approximately equal;
(4) defining an index field identification function, and assigning an identifier identRAi (Pi) to each partition Pi of the attribute Ai;
(5) defining an index field mapping function, and mapping a value v in the attribute Ai domain to an identifier of v-membership division; formally, mapr. Ai (v) = identR. (Ai), wherein a direction is a subdivision comprising a possible.
(6) Defining an index field feature function: mapping the character string C1C 2 … Cn to a binary bit string b0b1 … bm-1 by using a HASH function;
(7) for any character string needing to be encrypted, the division value and the characteristic value of the character string are obtained through a mapping function and a characteristic function; in order to facilitate the translation of the query conditions, the first h bits of the specified index field represent the division values of the character string data, the second m bits represent the characteristic values of the character string data, and the length of the whole index field is h + m bits;
(8) establishing a one-to-one corresponding relation between the encrypted fields and the field records of the index table; for each relationship R (a1, …, Ar, …, An), Ar is the string field to be encrypted, and the encrypted relationship pattern is RE (a1, …, ArE, …, An., Ars); where ArE is the encryption string field corresponding to Ar, i.e., ArE = e (Ar); ars is an auxiliary index field corresponding to Ar, and is obtained by combining the division value and the eigenvalue of Ar.
Further, the step S500 includes the following sub-steps:
(1) searching ciphertext data, converting and querying a conditional statement in SQL by using rules in metadata such as a mapping function, a characteristic function and the like according to a storage mode of an encryption relationship, and converting a query of a character string field into a query of a corresponding index field; however, there are some records that satisfy the query condition of the index field but do not satisfy the query condition of the string field, resulting in the generation of "pseudo records";
(2) the ciphertext data is queried for the second time, the record after query filtering is decrypted by calling a private key or a public key, and then the decrypted data is queried for the first time accurately;
(3) the ciphertext data is decrypted and displayed, and the ciphertext in the inquired data is decrypted and displayed by using the public key;
(4) and uploading the log record used by the user for encrypting and decrypting the public key, such as the public key use time, the user name, the decryption field, the use client condition and the like.
The invention has the beneficial effects that: the security protection of sensitive data in electronic government affairs is realized, the management of the whole process from the generation of the secret key to the use is realized, the fuzzy and accurate query of encrypted data is supported, the existing application systems are integrated in a non-immersion mode, the good portability is embodied, and the encryption and decryption application of the sensitive data is effectively supported.
The invention is further illustrated by the following figures and examples.
Drawings
FIG. 1: the invention provides a flow chart of a non-immersion basic data encryption method based on a Hash algorithm and an asymmetric encryption algorithm.
Detailed Description
The following description of the preferred embodiments of the present invention is provided for the purpose of illustration and description, and is in no way intended to limit the invention.
Example 1
As shown in fig. 1, a method for encrypting and decrypting data by non-immersion multiple encryption algorithms mainly includes the following steps:
(1) the management of key use is enhanced by adopting a secondary key system, the key of a client user is distributed according to user request, an administrator confirms and distributes the key, meanwhile, the record is carried out when the client uses the key, and the key of the client is also distributed according to the data record; encrypting and decrypting the sensitive data by adopting an asymmetric encryption algorithm (SM 2);
(2) the method comprises the steps of solving the problem of ciphertext query in a database encryption system by adopting a ciphertext field index table method, mapping the content of a field to be encrypted to a HASH value based on a HASH function by adopting a HASH algorithm, and realizing equivalent query and range query of the encrypted field based on the HASH value after the mapping of the record of the content of the field to be encrypted;
(3) the method adopts non-immersion to provide encryption and decryption services, completes application data encryption and decryption by configuring a dependent injection mode, and does not need to modify codes of an original application system.
The invention supports the encryption and decryption of newly-built application and established application data, realizes the security requirement of data transmission access by using different key methods, simultaneously supports the query and retrieval of encrypted data, and is integrated into an application system framework by configuring a dependent injection mode to provide final data encryption and decryption service.
The method specifically comprises the following steps:
step S100: the method comprises the following steps that an administrator creates an asymmetric encryption key pair, simultaneously stores a private key, sends a public key to a client, generates a symmetric encryption key by the administrator, and secondarily encrypts and stores the asymmetric encryption private key and the public key pair to a database by using the key;
the step S100 includes the following substeps:
(1) the administrator generates an SM2 secret key, and generates a public key and a private key by adopting an asymmetric encryption SM2 algorithm;
(2) the administrator generates an SM4 key and generates the key by adopting a symmetric encryption algorithm SM 4;
(3) the generated public key and the private key are stored in an encrypted manner, an administrator encrypts the generated asymmetric encrypted private key and the public key by using an SM4 secret key, and simultaneously stores the encrypted public key and the encrypted private key in a database;
(4) the user applies for the key, the administrator approves, registers and issues records, and provides a cipher plaintext to the client, the client forms a cipher text for opening the public key through the symmetrically encrypted key, and opens the asymmetrically encrypted public key;
(5) the administrator records the key application, and the administrator records the key application condition of the user and stores the key application condition in the database.
Step S200: configuring encryption and decryption services by an application, pre-injecting an interface which needs to encrypt and decrypt sensitive data in an application program package, encrypting or decrypting the sensitive data, then executing service operation interface services, and post-injecting log information called by encryption and decryption;
the step S200 includes the following substeps:
(1) configuring a preposed encryption and decryption function depending on the injection function;
(2) and configuring a post-encryption and decryption log recording function depending on the injection function.
Step S300: the client encrypts plaintext data to be uploaded by using the public key, the server records the use condition of the public key, and stores the ciphertext into a database data table;
the step S300 includes the following substeps:
(1) the user decrypts the public key by using the symmetric key, uploads or checks the encrypted sensitive data, and decrypts the public key by using the symmetric key; calling a public key to encrypt and decrypt data;
(2) the server side records the use condition of the client side public key to form a client side public key use log, analyzes the log record and checks abnormal conditions;
(3) and (4) ciphertext data storage, wherein the ciphertext form of the encrypted data uploaded by the client is stored in a database.
Step S400: establishing a ciphertext index table based on the encrypted field, wherein the ciphertext index table records fields and unique identification field IDs which establish a one-to-one correspondence relationship with the encrypted field records; mapping the unique identification ID of the record of the field to be encrypted to the encrypted unique identification ID by using a Hash function, and storing the ID and the Hash value of the field content into an index table;
the step S400 comprises the following substeps:
(1) establishing an index table corresponding to the encryption field;
(2) defining an index field in an index table, wherein the content of the index field consists of a division value and a characteristic value of character string data;
(3) defining an index field partition function, and mapping the value range Di of the attribute R.ai to partitions { p1, p2, …, pk }, wherein the following conditions are satisfied: (1) all partitioned and can cover the entire domain; (2) any two partitions are not overlapped; formally, the function partition is defined as follows: partition (r, Ai) = { p1, p2, …, pk }; the dividing method of the numerical field value domain usually adopts the method of equal width or equal depth division; for the character type field, dividing the value range of the attribute according to the probability distribution of the attribute value, so that the number of elements contained in each division is approximately equal;
(4) defining an index field identification function, and assigning an identifier identrai (Pi) to each partition Pi of the attribute Ai;
(5) defining an index field mapping function, and mapping a value v in the attribute Ai domain to an identifier of v-membership division; formally, mapr. Ai (v) = identR. (Ai), wherein a direction is a subdivision comprising a possible.
(6) Defining an index field feature function: mapping the character string C1C 2 … Cn to the binary bit string b0b1 … bm-1 using a HASH function;
(7) for any character string needing to be encrypted, the division value and the characteristic value of the character string are obtained through a mapping function and a characteristic function; in order to facilitate the translation of the query conditions, the first h bits of the specified index field represent the division values of the character string data, the second m bits represent the characteristic values of the character string data, and the length of the whole index field is h + m bits;
(8) establishing a one-to-one corresponding relation between the encrypted fields and the field records of the index table; for each relationship R (a1, …, Ar, …, An), Ar is the string field to be encrypted, and the encrypted relationship pattern is RE (a1, …, ArE, …, An., Ars); where ArE is the encryption string field corresponding to Ar, i.e., ArE = e (Ar); ars is an auxiliary index field corresponding to Ar, and is obtained by combining the division value and the eigenvalue of Ar.
Step S500: based on the mapped hash value, realizing equivalent query and range query of the encrypted field; and calling the private key or the public key to decrypt the encrypted data and display the decrypted data.
The step S500 comprises the following substeps:
(1) searching ciphertext data, converting and querying a conditional statement in SQL by using rules in metadata (such as a mapping function, a characteristic function and the like) according to a storage mode of an encryption relationship, and converting a query of a character string field into a query of a corresponding index field; however, there are some records that satisfy the query condition of the index field but do not satisfy the query condition of the string field, resulting in the generation of "pseudo records";
(2) the ciphertext data is queried for the second time, the private key or the public key is called for decryption on the record after query filtering, and then accurate query is carried out on the decrypted data for the first time;
(3) the ciphertext data is decrypted and displayed, and the ciphertext in the inquired data is decrypted and displayed by using the public key;
(4) and (4) encrypting and decrypting the log record by using the public key, and uploading the conditions of encrypting and decrypting the log record by using the public key by the user, such as the using time of the public key, the user name, the decryption field, the condition of using the client and the like.

Claims (5)

1. The data encryption and decryption method of the non-immersion type multiple encryption algorithms is characterized in that:
(1) the method comprises the following steps that a secondary key system is adopted to enhance the management of key use, the key of a client user is distributed according to a user request, an administrator confirms and distributes the key, meanwhile, the key is recorded when the client uses the key, and the key of the client is also distributed according to data records; encrypting and decrypting the sensitive data by adopting an asymmetric encryption algorithm;
(2) the method comprises the steps of solving the problem of ciphertext query in a database encryption system by adopting a ciphertext field index table method, mapping the content of a field to be encrypted to a HASH value based on a HASH function by adopting a HASH algorithm, encrypting the content of the field to be encrypted based on the encryption function, and recording the mapped HASH value to realize equivalent query and range query of the encrypted field;
(3) the method adopts non-immersion to provide encryption and decryption services, completes encryption and decryption of application data by configuring a dependent injection mode, and does not need to modify codes of an original application system;
the method specifically comprises the following steps:
step S100: the administrator creates an asymmetric encrypted key pair, simultaneously stores a private key, sends a public key to the client, generates a symmetric encrypted key by the administrator, and secondarily encrypts and stores the asymmetric encrypted private key and the public key pair in the database by using the key;
step S200: the method comprises the steps that an encryption and decryption service is configured by an application, an interface which needs to encrypt and decrypt sensitive data is injected into an application program package in a front-mounted mode, the sensitive data is encrypted or decrypted firstly, then a service operation interface service is executed, and log information called by encryption and decryption is injected into a rear-mounted mode;
step S300: the client encrypts plaintext data to be uploaded by using the public key, the server records the use condition of the public key, and stores the ciphertext into a database data table;
step S400: establishing a ciphertext index table based on the encrypted fields, wherein fields and unique identification field IDs which establish one-to-one correspondence with the encrypted fields are recorded in the ciphertext index table; mapping the unique identification ID of the record of the field to be encrypted to the encrypted unique identification ID by using a Hash function, and storing the ID and the Hash value of the field content into an index table;
step S500: based on the mapped hash value, realizing equivalent query and range query of the encrypted field; the private key or the public key is called to decrypt the encrypted data, and the encrypted data is displayed;
the step S400 comprises the following substeps:
(1) establishing an index table corresponding to the encryption field;
(2) defining an index field in an index table, wherein the content of the index field consists of a division value and a characteristic value of character string data;
(3) defining an index field partition function, and mapping the value range Di of the attribute R.ai to partitions { P1, P2, … and Pk }, wherein the following conditions are satisfied: (1) all partitioned union sets may cover the entire domain; (2) any two divisions do not overlap; formally, the function partition is defined as follows: partition (r, Ai) = { P1, P2, …, Pk }; the dividing method of the numerical field value domain usually adopts the method of equal width or equal depth division; for the character type field, dividing the value range of the attribute according to the probability distribution of the attribute value, so that the number of elements contained in each division is approximately equal;
(4) defining an index field identification function, and assigning an identifier identrai (Pi) to each partition Pi of the attribute Ai;
(5) defining an index field mapping function, and mapping a value v in the attribute Ai domain to an identifier of v-membership division; formally, mapr. Ai (v) = identR. (Ai), where vector v is a partition of an identification function;
(6) defining an index field feature function: mapping the character string C1C 2 … Cn to the binary bit string b0b1 … bm-1 using a HASH function;
(7) for any character string needing to be encrypted, the division value and the characteristic value of the character string are obtained through a mapping function and a characteristic function; in order to facilitate the translation of the query conditions, the first h bits of the specified index field represent the division values of the character string data, the second m bits represent the characteristic values of the character string data, and the length of the whole index field is h + m bits;
(8) establishing a one-to-one corresponding relation between the encrypted fields and the field records of the index table; for each relationship R (a1, …, Ar, …, An), Ar is the string field to be encrypted, and the encrypted relationship pattern is RE (a1, …, ArE, …, An., Ars); where ArE is the encryption string field corresponding to Ar, i.e., ArE = e (Ar); ars is an auxiliary index field corresponding to Ar, and is obtained by combining the division value and the feature value of Ar.
2. The method for data encryption and decryption without immersion in various encryption algorithms according to claim 1, wherein the step S100 comprises the sub-steps of:
(1) an administrator generates an SM2 secret key, and a public key and a private key are generated by adopting an asymmetric encryption SM2 algorithm;
(2) the administrator generates an SM4 key and generates the key by adopting a symmetric encryption algorithm SM 4;
(3) encrypting and storing the generated public key and private key, encrypting the generated asymmetric encrypted private key and public key by using an SM4 key by an administrator, and simultaneously storing the encrypted public key and private key in a database;
(4) the user applies for the key, the administrator approves, registers and issues records, and provides a cipher plaintext to the client, the client forms a cipher text for opening the public key through the symmetrically encrypted key, and opens the asymmetrically encrypted public key;
(5) the administrator records the key application, and the administrator records the key application condition of the user and stores the key application condition in the database.
3. The method for data encryption and decryption without adopting multiple encryption algorithms according to claim 1, wherein the step S200 comprises the following sub-steps:
(1) configuring a preposed encryption and decryption function depending on an injection function;
(2) and configuring a post-encryption and decryption log recording function depending on the injection function.
4. The method for data encryption and decryption without immersion in various encryption algorithms according to claim 1, wherein the step S300 comprises the sub-steps of:
(1) the user decrypts the public key by using the symmetric key, and uploads or checks the encrypted sensitive data; calling a public key to encrypt and decrypt data;
(2) the server side records the use condition of the client side public key to form a client side public key use log, analyzes the log record and checks abnormal conditions;
(3) and (4) ciphertext data storage, namely storing the ciphertext form of the encrypted data uploaded by the client into a database.
5. The method for data encryption and decryption without immersion in various encryption algorithms according to claim 1, wherein the step S500 comprises the following sub-steps:
(1) searching ciphertext data, converting and querying conditional statements in SQL by using rules in metadata according to a storage mode of an encryption relationship, and converting the query of a character string field into the query of a corresponding index field; however, there are some records that satisfy the query condition of the index field but do not satisfy the query condition of the string field, resulting in the generation of "pseudo records";
(2) the ciphertext data is queried for the second time, the private key or the public key is called for decryption on the record after query filtering, and then accurate query is carried out on the decrypted data for the first time;
(3) the ciphertext data is decrypted and displayed, and the ciphertext in the inquired data is decrypted and displayed by using the public key;
(4) and the log record is used by encrypting and decrypting the public key, and the log condition of the encryption and decryption of the public key used by the user is uploaded.
CN202011425318.6A 2020-12-09 2020-12-09 Data encryption and decryption method of non-immersion multiple encryption algorithms Active CN112583809B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011425318.6A CN112583809B (en) 2020-12-09 2020-12-09 Data encryption and decryption method of non-immersion multiple encryption algorithms

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011425318.6A CN112583809B (en) 2020-12-09 2020-12-09 Data encryption and decryption method of non-immersion multiple encryption algorithms

Publications (2)

Publication Number Publication Date
CN112583809A CN112583809A (en) 2021-03-30
CN112583809B true CN112583809B (en) 2022-09-30

Family

ID=75127785

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011425318.6A Active CN112583809B (en) 2020-12-09 2020-12-09 Data encryption and decryption method of non-immersion multiple encryption algorithms

Country Status (1)

Country Link
CN (1) CN112583809B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113179161B (en) * 2021-04-22 2022-11-08 平安消费金融有限公司 Method and device for replacing secret key, computer equipment and storage medium
CN113239369A (en) * 2021-04-25 2021-08-10 南方电网科学研究院有限责任公司 Method, device, equipment and medium for auditing sensitivity of ciphertext data
CN115664722A (en) * 2022-09-30 2023-01-31 蚂蚁区块链科技(上海)有限公司 Method, system, server and client for realizing private information retrieval

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105138585A (en) * 2015-07-31 2015-12-09 福建天晴数码有限公司 Method and system for partial matching query of encrypted field in database
CN105637520A (en) * 2013-10-14 2016-06-01 飞索科技有限公司 Method and apparatus for generating index for encrypted field in database
CN106850187A (en) * 2017-01-13 2017-06-13 温州大学瓯江学院 A kind of privacy character information encrypted query method and system
CN106934030A (en) * 2016-12-08 2017-07-07 戴林 The ciphertext index method and Ku Nei encryption systems of a kind of data base-oriented encryption
CN106934298A (en) * 2017-03-06 2017-07-07 戴林 A kind of Universal Database transparent encryption system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10783270B2 (en) * 2018-08-30 2020-09-22 Netskope, Inc. Methods and systems for securing and retrieving sensitive data using indexable databases

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105637520A (en) * 2013-10-14 2016-06-01 飞索科技有限公司 Method and apparatus for generating index for encrypted field in database
CN105138585A (en) * 2015-07-31 2015-12-09 福建天晴数码有限公司 Method and system for partial matching query of encrypted field in database
CN106934030A (en) * 2016-12-08 2017-07-07 戴林 The ciphertext index method and Ku Nei encryption systems of a kind of data base-oriented encryption
CN106850187A (en) * 2017-01-13 2017-06-13 温州大学瓯江学院 A kind of privacy character information encrypted query method and system
CN106934298A (en) * 2017-03-06 2017-07-07 戴林 A kind of Universal Database transparent encryption system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
一种基于混合加密的数据库存储与检索方案;侯亮;《硕士学位论文》;20090331;全文 *
数据库中字符型数据的加密方法研究;程静;《硕士学位论文》;20090531;全文 *

Also Published As

Publication number Publication date
CN112583809A (en) 2021-03-30

Similar Documents

Publication Publication Date Title
CN112583809B (en) Data encryption and decryption method of non-immersion multiple encryption algorithms
US5963642A (en) Method and apparatus for secure storage of data
US11144663B2 (en) Method and system for search pattern oblivious dynamic symmetric searchable encryption
Yiu et al. Enabling search services on outsourced private spatial data
US9087212B2 (en) Methods and apparatus for securing a database
US10664610B2 (en) Method and system for range search on encrypted data
CN101436208B (en) Ciphertext database privacy protection enquiring method
Kadhem et al. MV-OPES: Multivalued-order preserving encryption scheme: A novel scheme for encrypting integer value to many different values
CN104881280A (en) Multi-search supporting design method for encrypted database middleware
CA2520669A1 (en) Method and apparatus for encrypting database columns
Wang et al. Fast query over encrypted character data in database
US20090022321A1 (en) Personal information management system, personal information management program, and personal information protecting method
US20130097430A1 (en) Encrypting data and characterization data that describes valid contents of a column
CN106934301A (en) A kind of safely outsourced data processing method of relevant database for supporting ciphertext data manipulation
Moghadam et al. Toward securing cloud-based data analytics: A discussion on current solutions and open issues
CN114579998A (en) Block chain assisted medical big data search mechanism and privacy protection method
CN114254344A (en) Private data range query method of shared database based on block chain
Cui et al. Secure Boolean spatial keyword query with lightweight access control in cloud environments
Barouti et al. Symmetrically-private database search in cloud computing
CN115455463A (en) Hidden SQL query method based on homomorphic encryption
Venugopal et al. A novel approach for preserving numerical ordering in encrypted data
Dave et al. Securing SQL with access control for database as a service model
Ng Multi-dimensional Range Query on Outsourced Database with Strong Privacy Guarantee
Heidinger et al. Efficient and secure exact-match queries in outsourced databases
AL-SARAIREH HVM: A METHOD FOR IMPROVING THE PERFORMANCE OF EXECUTING SQL-QUERY OVER ENCRYPTED DATABASE.

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant