[go: up one dir, main page]

CN109995522B - Secure data mirroring method with key agreement function - Google Patents

Secure data mirroring method with key agreement function Download PDF

Info

Publication number
CN109995522B
CN109995522B CN201910178317.7A CN201910178317A CN109995522B CN 109995522 B CN109995522 B CN 109995522B CN 201910178317 A CN201910178317 A CN 201910178317A CN 109995522 B CN109995522 B CN 109995522B
Authority
CN
China
Prior art keywords
database
data
module
ciphertext
block
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
CN201910178317.7A
Other languages
Chinese (zh)
Other versions
CN109995522A (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.)
Southeast University
Original Assignee
Southeast University
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 Southeast University filed Critical Southeast University
Priority to CN201910178317.7A priority Critical patent/CN109995522B/en
Publication of CN109995522A publication Critical patent/CN109995522A/en
Application granted granted Critical
Publication of CN109995522B publication Critical patent/CN109995522B/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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/06Network architectures or network communication protocols for network security for supporting key management in a packet data network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/083Network architectures or network communication protocols for network security for authentication of entities using passwords
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0884Network architectures or network communication protocols for network security for authentication of entities by delegation of authentication, e.g. a proxy authenticates an entity to be authenticated on behalf of this entity vis-à-vis an authentication entity
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • 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/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0816Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
    • H04L9/0819Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s)
    • H04L9/083Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s) involving central third party, e.g. key distribution center [KDC] or trusted third party [TTP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本发明公开了一种具有密钥协商功能的安全数据镜像方法。包括主数据库加密模块、主数据库安全镜像模块、从数据库安全镜像模块、从数据库解密模块。主数据库加密模块基于密文分组链接模式CBC,负责对主数据库的数据进行加密预处理和分组加密,以密文方式传输数据,保证机密性;从数据库解密模块基于密文分组链接模式CBC,负责解密和验证镜像数据的完整性,并还原镜像数据,具备抗重放攻击能力;主数据库加密模块、从数据库解密模块通过密钥转换中心分发会话密钥,保证密钥分发的安全性;主数据库安全镜像模块、从数据库安全镜像模块通过授权以及加密镜像数据传输,避免数据泄露。本发明提供一种加密的数据镜像方法,实现安全的数据同步,适用于所有数据库间的主从复制。

Figure 201910178317

The invention discloses a security data mirroring method with key negotiation function. Including the main database encryption module, the main database security mirroring module, the secondary database security mirroring module, and the secondary database decryption module. The master database encryption module is based on the ciphertext block chaining mode CBC, which is responsible for encrypting the data in the master database, preprocessing and block encryption, and transmitting the data in ciphertext to ensure confidentiality; the slave database decryption module is based on the ciphertext block chaining mode CBC, responsible for Decrypt and verify the integrity of the mirrored data, and restore the mirrored data, with the ability to resist replay attacks; the master database encryption module and the slave database decryption module distribute the session key through the key conversion center to ensure the security of key distribution; the master database The secure mirror module and the slave database secure mirror module transmit data through authorization and encryption to avoid data leakage. The invention provides an encrypted data mirroring method, realizes safe data synchronization, and is suitable for master-slave replication among all databases.

Figure 201910178317

Description

Secure data mirroring method with key agreement function
The technical field is as follows:
the invention relates to a secure data mirroring method with a key agreement function, belonging to the field of computer network communication and the field of information security.
Background art:
database mirroring is a data synchronization technology, which automatically copies the whole database or a part of key data in the database to another disk, and whenever the data in the primary database is updated, the database management system automatically copies the updated data to the past, thereby ensuring the consistency of the mirrored data and the primary data. The database mirror image is mainly used for data backup and coping with high concurrency scenes, when a storage medium fails, the mirror image disk can continuously provide the usability of the database, and meanwhile, the database management system automatically utilizes the mirror image disk to repair the database without closing the system and reinstalling a database copy; when the storage medium is not in fault, the database mirror image can be used for dealing with high concurrency scenes, when one user adds an exclusive lock to the database and modifies data, other users can read the mirror database without waiting for the user to release the lock, and the read-write separation of the database is realized. With the development of internet technology, more and more enterprises design database disaster recovery schemes based on database mirroring technology, provide real-time data backup capability, and help the enterprises to solve problems in high-concurrency scenes. However, most enterprises adopt database mirroring technologies which only provide a function of plaintext data transmission, which is difficult to ensure data security, resulting in many data leakage events, and these database mirroring technologies are generally difficult to meet the requirement of real-time data synchronization, resulting in loss of part of critical data. At present, network security and informatization work is comprehensively promoted in China, and in order to respond to national call and adapt to the current development situation of the Internet in China, a database mirroring technology is required to be combined with a data encryption technology based on a trusted third party key conversion center and a synchronization technology based on log files, a secure data mirroring method with a key negotiation function is developed, enterprises can synchronize key data in real time, and meanwhile, the security of the data is guaranteed.
In the data mirroring method and the storage system provided in the patent application 201710214893.3, after receiving the target data, the local controller determines whether the data size of the target data exceeds the free capacity of the mirror cache that is pre-saved when the data size of the target data does not exceed the free capacity of the local cache. And when the data volume of the target data does not exceed the spare capacity of the pre-stored mirror cache, the local controller sends the target data to the mirror controller. And the mirror image controller writes the target data into the mirror image cache. And after receiving the mirroring completion message sent by the mirroring controller, the local controller writes the target data into the local cache. According to the invention, the total amount of unused mirror image resources of the local controller is determined before the target data is sent to the mirror image controller through the spare capacity of the mirror image cache pre-stored by the local controller, so that all the target data received by the mirror image controller can be completely mirrored in time. However, the invention has the following disadvantages: firstly, plaintext transmission is adopted in the transmission process of mirror image data, so that sensitive information of a user is easily leaked; secondly, the mirror image transmission content of the data mirror image method is data itself, and if massive data is transmitted, the system overhead is too large.
Patent application 201510617830.3 discloses a user data mirror loading method, device and terminal in an android system, and provides a user data mirror loading method, device and terminal in an android system, relates to the field of communication, and is used for providing a user data mirror loading method capable of being adaptively adjusted according to the storage space capacity of a terminal, so that the complicatedness of user data mirror compiling is reduced, and the development and maintenance resources of user data mirrors are reduced. In the embodiment process, a pre-generated partition table, a user data mirror image and a non-user data mirror image are obtained; loading the non-user data mirror images to a specified directory according to the partition table; calculating the residual capacity of the terminal; according to the residual capacity, the preset user data partition capacity in the partition table is modified to be the same as the residual capacity; and expanding the size of the pre-generated user data mirror image to the size which is the same as the user data partition capacity in the modified partition table, and loading the expanded user data mirror image to a specified directory of the terminal according to the modified partition table. Firstly, the transmission process of the mirror image data adopts plaintext transmission, which is easy to cause the leakage of sensitive information of a user; secondly, the data mirroring method is only suitable for an android operating system and is poor in compatibility.
Patent application 201280060360.X hidden automatic data mirroring for native interfaces in distributed virtual machines, in which an initial request referencing a data container is sent from a distributed enhanced remote execution container native interface component of a distributed virtual machine to a distributed enhanced virtual machine native interface component of the distributed virtual machine in response to receiving the initial request from the remote execution container. A data mirroring data structure is received that includes immutable data and a reference to a data container. A received data mirroring data structure that includes immutable data and a reference to a data container is stored within a local memory store. In response to an initial request to reference a data container, a reference to a locally stored data mirroring data structure is returned to the remote execution container. However, the invention has the following disadvantages: firstly, the automatic data mirroring technology needs to utilize a native interface, is only suitable for a distributed virtual machine environment, and is poor in compatibility; secondly, plaintext transmission is adopted in the mirror image data transmission process, so that sensitive information of a user is easily leaked; thirdly, the mirror data depends on a mirror data structure defined in advance, and the universality is poor.
Patent application 200710159670.8 discloses a system and method for configuring data mirroring, and relates to a system, method and program for data mirroring. In response to identifying a new storage volume on a primary storage subsystem designated for use, a plurality of parameters for the new storage volume requiring data mirroring are automatically determined. At the same time, a corresponding storage volume in the second storage subsystem is automatically determined to mirror data from the new storage volume in the primary storage subsystem. The parameters of the new storage volume are automatically entered into the data mirroring table. The table identifies the new storage volume, the parameters of the new storage volume, and the corresponding storage volume. The table also maps the new storage volume to a corresponding storage volume such that data updates to the new storage volume are mirrored to the corresponding storage volume. By determining the parameters that the previous storage volume and the subsequent storage volume in the primary storage subsystem have the same value, the parameters of the new storage volume can be determined. In response, these values for the parameters of the new storage volume are entered into the data mirroring table. However, the invention has the following disadvantages: firstly, plaintext transmission is adopted in the transmission process of mirror image data, so that sensitive information of a user is easily leaked; second, the data mirroring method needs to determine a plurality of parameters of the corresponding storage volumes of the primary storage subsystem and the second storage subsystem, and needs to redefine the parameters when the storage medium is replaced, which is complicated and has poor operability.
The invention discloses a method for mirroring data of a 200610020460.6 network information system at different places, provides a method for mirroring data of a network information system at different places, and belongs to the field of information security. By the technologies of data state synchronization, local data monitoring, mass data caching, remote playback, error control and the like, the real-time reconstruction of local data center data at different places is realized under the condition of not influencing the efficiency of a local data center server, the outstanding contradiction between the local data bandwidth and the backup line bandwidth is solved, the requirement on the backup network bandwidth and the occupation of other network resources are greatly reduced, and the system efficiency is improved. Meanwhile, even if the midway network fails or the bandwidth is unstable, the system can tolerate that any slight change of the data of the local data center can be correctly and timely transmitted to the remote backup center, so that the data consistency of the local data center and the remote backup center is ensured. The invention supports the disaster backup strategy of a private line/a non-private line and supports the Internet, greatly reduces the cost of the disaster recovery and damage resistance system and has wide application prospect. However, the invention has the following disadvantages: firstly, plaintext transmission is adopted in the transmission process of mirror image data, so that sensitive information of a user is easily leaked; secondly, the mirror image transmission content of the data mirror image method is data, and if massive data is transmitted, the system overhead is overlarge; thirdly, the data mirroring method synchronizes data through data state synchronization, and the synchronization interval is set manually, which may cause loss of part of key data and poor real-time performance.
Patent application 201110447809.5 distributed data mirroring method and storage data node, the invention relates to a distributed data mirroring method and device. The method comprises the following steps: receiving a data operation request, performing operation corresponding to the data operation request on the data, performing backup operation corresponding to the data operation request on the data, and generating a logical file name; generating a mirror image record comprising a logic file name, a mirror image strategy and an operation type; acquiring a list of destination data storage node addresses to be mirrored from a master control node of a mirror destination distributed file system determined by file region information; and according to the mirror image strategy and the operation type in the mirror image record, performing corresponding operation of the data operation request on the data on the target data storage node. Therefore, the distributed data mirroring method and the storage data nodes of the invention utilize the distributed file system as a data center to carry out data mirroring, and select the available storage data nodes to carry out data mirroring, thereby realizing high reliability of the mirroring system. However, the invention has the following disadvantages: firstly, plaintext transmission is adopted in the transmission process of mirror image data, so that sensitive information of a user is easily leaked; secondly, the distributed file system is used as a data center for data mirroring, so that the cost is high, and the distributed file system is not suitable for small enterprises.
Patent application 201410509938.6 data mirroring control apparatus and method, the invention provides a data mirroring control apparatus and method. The data mirroring control apparatus includes: a command distribution unit configured to transmit a first write command to the plurality of mirrored storages, the first write command including an instruction for data requested to be written by the host; a memory lock setting unit configured to set a memory lock on data requested to be written by the host among data stored in the host memory, and configured to release the memory lock on the data after the data with the memory lock is written to the plurality of mirrored storage devices. However, the invention has the following disadvantages: firstly, plaintext transmission is adopted in the transmission process of mirror image data, so that sensitive information of a user is easily leaked; second, the memory is locked during the mirrored data transfer process, causing other data input operations to be forced to wait, and therefore using this data mirroring approach results in a slower system response rate.
Patent application 201510453871.3 provides a method, device and system for implementing data mirroring, which is applied to a server cluster system, and includes: establishing a trust relationship between the main server and the standby server by setting the type of the authentication secret key and setting the authentication secret key as authorized users; detecting the name of a server in a running state at intervals of set time; judging whether the server name is the same as the name of the main server or not; according to the trust relationship, if so, copying the key data on the main server to the standby server through script resources, otherwise, copying the key data on the standby server to the main server through script resources. The device includes: the device comprises a creating unit, a detecting unit, a judging unit and a mirroring unit. The system comprises: the invention provides a main server, a standby server and a device for realizing data mirroring. The scheme can improve the efficiency of configuring the server cluster system. However, this system has the following drawbacks: firstly, although the main server and the standby server are authenticated, the transmission process of the mirror image data adopts plaintext transmission, which easily causes the leakage of sensitive information of a user; secondly, the data mirroring technology is only suitable for a server cluster environment and is poor in compatibility.
The invention discloses a method and a device for data mirroring of patent application 201110415166.6, and provides a method and a device for data mirroring, wherein the method comprises the following steps: decapsulating a first message carried by a first interface to obtain payload data of the first message, wherein the first interface is a source interface; and generating a second message of the network type corresponding to the second interface from the payload data, and sending the second message to the second interface, wherein the second interface is a mirror image destination interface of the first interface, and the first interface and the second interface correspond to different types of networks. The invention can solve the problems that the business carried by the STM-N interface has no data mirror image, even if the mirror image can be carried out, the SDH network analysis instrument can not identify the payload content, and the engineering and the test maintenance work are very inconvenient. However, the invention has the following disadvantages: firstly, plaintext transmission is adopted in the transmission process of mirror image data, so that sensitive information of a user is easily leaked; secondly, the data mirroring method aims to solve the problem of mirroring transmission identification in the SDH network, is not suitable for other networks and has poor compatibility.
The invention provides a method and a device for ensuring service validity during data mirroring, and provides two methods for realizing data mirroring, wherein a monitored device receives or is about to send a data frame, and after detecting that the data frame is a mirrored data frame, source information of the mirrored data frame and the mirrored data frame are sent to a mirroring port together, and then the monitoring device where the mirroring port is located stores a corresponding relation between the mirrored data frame and the source information of the mirrored data frame. The source information of the mirror data frame at least comprises: receiving or sending a port number of the mirrored data frame or a device number of the monitored device, further comprising: the receiving or sending indication, the receiving or sending time, the service flow identification and the like of the mirror image data frame realize that one port of one device monitors the data frame transmitted on more than one port of the device or other devices, further realize that one port of one device monitors the data frames of different service flows in different directions and transmitted on a plurality of ports of the device or other devices at the same time, and expand the monitoring range of the monitoring device. However, the invention has the following disadvantages: firstly, plaintext transmission is adopted in the transmission process of mirror image data, so that sensitive information of a user is easily leaked; secondly, the mirror image transmission content of the data mirror image method is data itself, and if massive data is transmitted, the system overhead is too large.
Journal "middle and primary school electrified education" paper 2013.10 "SQL Server non-domain control database mirror image script configuration example analysis", which proposes a database mirror image script configuration method in the mirror image transmission process, and adopts the clustering technology, database mirror image, log transmission, database copy and other modes to ensure high availability and high security of data. The thesis introduces how to configure database mirroring in a script execution manner in a domain-free environment, which is simpler and faster to operate compared with a complex view. The method provides possibility for the terminal user to transplant the script into the program according to the actual situation to realize the program configuration mirror. However, the invention has the following disadvantages: firstly, plaintext transmission is adopted in the transmission process of mirror image data, so that sensitive information of a user is easily leaked; secondly, the data mirroring technology is only suitable for SQL Server, and script parameters and statements need to be redefined when other databases are replaced, so that compatibility is poor.
Journal "computer and modernization" paper "database mirror image XML Schema applied research" in 2009.11, which provides a method for applying XMLSchema Schema and related technology to mirror databases, and implements mirror image applied research by using C # language on microsoft. The method has general practical value and application prospect for developing database related software. However, the invention has the following disadvantages: firstly, plaintext transmission is adopted in the transmission process of mirror image data, so that sensitive information of a user is easily leaked; secondly, the database mirroring technology bottom layer is realized by a C # language on a Microsoft.
Journal "Instrument and Meter and analytical monitoring" paper 2014.5, "scheme research and implementation of enterprise high-availability data secure storage", the paper selects an optimal data mirroring scheme between storage devices by analyzing and comparing three data secure storage schemes and combining the current situation of the enterprise. Through the LVM (logical volume management) technology of the IBM Power server, a data mirroring relationship is established between two sets of IBM storage equipment which are in an active state at the same time, and when a production host writes data, the data can be written into two sets of disk equipment at the same time. The data storage, backup and safety requirements of the enterprise PLM business system are met, and the requirements of a production system on high reliability, continuous operation and smooth transition of the PLM system are met. However, the invention has the following disadvantages: firstly, plaintext transmission is adopted in the transmission process of mirror image data, so that sensitive information of a user is easily leaked; second, the database mirroring technology is based on IBM storage devices, cannot be applied to all storage devices, and is poor in compatibility.
Journal "modern book information technology" paper "design and implementation of a MARC data mirroring system" in term of 2008.6, a design scheme of the MARC data mirroring system is provided on the basis of analyzing the storage characteristics of MARC data in a relational database. According to the scheme, the file transmission server is introduced, so that remote operation is converted into local operation when the source database and the target database perform data copying, records are synchronously converted into network files for transmission, and data copying between the source database and the target database is reliable, rapid and effective. The system to which this paper relates has the following drawbacks: firstly, plaintext transmission is adopted in the transmission process of mirror image data, so that sensitive information of a user is easily leaked; secondly, the mirror image transmission content of the data mirror image method is data itself, and if massive data is transmitted, the system overhead is too large.
Disclosure of Invention
Aiming at the technical problems of poor safety, sensitive information leakage, large system overhead, poor platform compatibility, poor universality, high complexity, poor operability, slow system response rate, poor instantaneity and the like of the data mirroring method, the invention provides a secure data mirroring method with a key agreement function based on a data encryption technology of a trusted third party key conversion center and a synchronization technology based on log files; the method can effectively avoid data leakage, reduce system overhead, improve system response rate, has low complexity and good platform compatibility, is suitable for master-slave copy among all databases, and has strong operability. To this end.
The above purpose is realized by the following technical scheme:
the invention provides a safe data mirroring method with a key agreement function, which comprises a master database encryption module, a master database safe mirroring module, a slave database safe mirroring module and a slave database decryption module;
wherein: the main database encryption module is used for blocking the complete mirror image data of the main database to form blocked plaintext data; generating a corresponding message authentication code for the block plaintext data through a hash function, and attaching the message authentication code to the block plaintext data to form block plaintext mirror image data; then, block plaintext mirror image data are encrypted to form block ciphertext mirror image data, and the block ciphertext mirror image data are transmitted to a slave database decryption module to ensure data confidentiality;
the master database security mirror image module is responsible for actively sending authorization information to the slave database, and transmitting blocked ciphertext mirror image data between the master database and the slave database in an encryption mode based on a mirror image log file of the master database and a customized one-time pad scheme;
the slave database security mirror image module is responsible for receiving the authorization information of the master database and completing identity authentication; based on the mirror image log file of the slave database and the customized one-time pad scheme, the blocked ciphertext mirror image data between the master database and the slave database are transmitted in an encryption mode, so that safe data synchronization is realized;
the slave database decryption module is used for decrypting the block ciphertext mirror image data to form block plaintext mirror image data; and carrying out Hash processing on each block of plaintext mirror image data, identifying the authenticity of the message authentication code, and combining the block plaintext data into complete mirror image data.
The invention further improves that the main database encryption module comprises a main database encryption preprocessing module, a main database encryption control module, a main database ciphertext data interface module, an encryption and decryption parameter setting module and a session key generating module; the main database encryption module completes encryption preprocessing based on a ciphertext block chaining mode CBC: partitioning the complete mirror image data of the main database to form partitioned plaintext data; generating a corresponding message authentication code for the block plaintext data through a hash function, and attaching the message authentication code to the block plaintext data to form block plaintext mirror image data; then, based on a customized one-time pad scheme, acquiring a session key negotiated by a master database and a slave database, encrypting blocked plaintext mirror data by adopting an AES algorithm to form blocked ciphertext mirror data, and transmitting the blocked ciphertext mirror data to a slave database decryption module in a ciphertext mode to ensure data confidentiality; the master database and the slave database complete identity authentication through the key conversion center, and then generate and distribute session keys based on a customized one-time pad scheme, so that the security of key distribution can be ensured;
the main database encryption preprocessing module receives complete mirror image data of an SQL statement sent by a user, and blocks the complete mirror image data based on a ciphertext block chaining mode CBC to form blocked plaintext data; generating a corresponding message authentication code for the block plaintext data through a hash function, and attaching the message authentication code to the block plaintext data to form block plaintext mirror image data; then setting an initial vector IV, generating an initial key request, and sending the partitioned plaintext mirror data, the initial vector IV and the initial key request to a main database encryption control module;
the main database encryption control module receives the blocked plaintext mirror data, the initial vector IV and the initial key request of the main database encryption preprocessing module, forwards the initial vector IV and the initial key request to the encryption and decryption parameter setting module, receives the session key SK sent by the session key generation module as the initial key, performs AES (advanced encryption Standard) encryption on the blocked plaintext mirror data by using the initial key and the initial vector IV based on a ciphertext block chaining mode CBC (cipher text block chaining) and sends the generated blocked ciphertext mirror data to the main database ciphertext data interface module;
the master database ciphertext data interface module receives the block ciphertext mirror data of the master database encryption control module and forwards the block ciphertext mirror data to the master database security mirror authorization module; the encryption and decryption parameter setting module receives an initial vector IV and an initial key request sent by the main database encryption control module, extracts main database identity information A and auxiliary database identity information B from the initial key request, then sends the main database identity information A and the auxiliary database identity information B to the key conversion center KTC, and receives a main database shared key K returned by the key conversion center KTCATAnd sharing a secret key K from a databaseBTAfter the initialization of the identity information and the shared key is finished, the identity information A of the master database, the identity information B of the slave database and the shared key K of the master database are obtainedATSending the initial vector IV, the identity information A of the master database and the shared key K of the slave database to a session key generation moduleBTSending to a session key verification distribution module;
the session key generation module receives the identity information A of the master database, the identity information B of the slave database and the shared key K of the master database which are sent by the encryption and decryption parameter setting moduleATRandomly generating a session key SK by a linear congruence method, sending the session key SK to a master database encryption control module, and sending master database key negotiation information A,
Figure GDA0003333048720000071
Sending the key to a key conversion center KTC, key negotiation information A of a main database,
Figure GDA0003333048720000072
Where a represents the primary database identity information,
Figure GDA0003333048720000073
key K shared by representatives with a master databaseATEncrypted slave database identity B and session key SK, and then receives slave database key agreement information sent by key conversion center KTC
Figure GDA0003333048720000074
Will negotiate information from database key
Figure GDA0003333048720000075
To the session key authentication distribution module,
Figure GDA0003333048720000076
representing shared secret key K from databaseBTEncrypted master database identity a and session key SK.
The invention further improves that the master database security mirror image module comprises a master database security mirror image authorization module, a master database data security synchronization module and a ciphertext data sending module; the master database security mirror image module is responsible for actively sending authorization information to the slave database, and based on a mirror image log file of the master database and a customized one-time pad scheme, block cipher text mirror image data between the master database and the slave database are transmitted in an encryption mode, so that safe data synchronization is realized, data leakage is avoided, and the master database security mirror image module is suitable for master-slave copy among all databases;
the master database security mirror image authorization module acquires the identity information of the slave database based on a locally configured mirror image log file, and sends authorization request information and an authorization account number to the slave database security mirror image authorization module according to the identity information of the slave database; meanwhile, receiving authorization response information sent by a database security mirror image authorization module to complete mirror image authorization; after the mirror image authorization is completed, the main database security mirror image authorization module receives the block cipher text mirror image data sent by the main database cipher text data interface module through a TCP/IP transmission protocol based on a Socket interface Socket and sends the block cipher text mirror image data to the main database data security synchronization module;
the master database data security synchronization module receives the blocked ciphertext mirror data sent by the master database security mirror authorization module, writes the blocked ciphertext mirror data into a master database mirror log file, and then sends the blocked ciphertext mirror data to the ciphertext data sending module; the ciphertext data sending module receives the partitioned ciphertext mirror data of the main database data safety synchronization module and forwards the partitioned ciphertext mirror data to the ciphertext data receiving module.
The invention further improves that the slave database security mirror image module comprises a ciphertext data receiving module, a slave database data security synchronization module and a slave database security mirror image authorization module; the slave database security mirror image module is responsible for receiving the authorization information of the master database and completing identity authentication; based on the mirror image log file of the slave database and the customized one-time pad scheme, transmitting the partitioned cipher text mirror image data between the master database and the slave database in an encryption mode; the method has the advantages that safe data synchronization is realized, data leakage is avoided, and the method is suitable for master-slave copy among all databases;
the ciphertext data receiving module receives the block ciphertext mirror image data sent by the ciphertext data sending module and forwards the block ciphertext mirror image data to the slave database data security synchronization module; the slave database data security synchronization module receives the block ciphertext mirror image data sent by the ciphertext data receiving module and writes the block ciphertext mirror image data into a slave database mirror image log file; meanwhile, receiving the cursor position of the slave database mirror image file sent by the slave database security mirror image authorization module, taking out the block cipher text mirror image data behind the cursor position in the slave database mirror image log file, and sending the block cipher text mirror image data to the slave database security mirror image authorization module;
the slave database security mirror image authorization module receives authorization request information and an authorization account number sent by the master database security mirror image authorization module, then sends authorization response information to the master database security mirror image authorization module to complete mirror image authorization, sets a slave database mirror image file cursor position according to the authorization request information, and sends the slave database mirror image file cursor position to the slave database data security synchronization module; and meanwhile, the slave database security mirror image authorization module receives the partitioned cipher text mirror image data sent by the slave database data security synchronization module and sends the partitioned cipher text mirror image data to the slave database cipher text data interface module.
The invention further improves that the slave database decryption module comprises a session key verification distribution module, a slave database ciphertext data interface module, a slave database decryption control module and a slave database decryption restoration module; the slave database decryption module decrypts the blocked ciphertext mirror image data by adopting an AES algorithm based on the ciphertext block chaining mode CBC and a customized one-time pad scheme and using a session key negotiated by the master database and the slave database to form blocked plaintext mirror image data; carrying out Hash processing on each block of plaintext mirror image data, identifying the authenticity of the message authentication code, combining the block plaintext data in the block plaintext data into complete mirror image data, and preventing replay attack in the working mode during data mirror image transmission; the master database and the slave database complete identity authentication through the key conversion center, and then generate and distribute session keys based on a customized one-time pad scheme, so that the security of key distribution can be ensured;
the session key verification and distribution module receives the initial vector IV, the identity information A of the master database and the shared key K of the slave database sent by the encryption and decryption parameter setting moduleBTThen receives the key negotiation information of the slave database sent by the session key generation module
Figure GDA0003333048720000091
Using shared secret key K from databaseBTDecrypting secondary database key agreement information
Figure GDA0003333048720000092
Verifying the identity information A of the master database, and taking out a session key SK; in addition, the session key verification distribution module receives a decryption initial parameter request sent from the database decryption control module, and then sends the initial vector IV and the session key SK to the slave database decryption control module; the slave database ciphertext data interface module receives the blocked ciphertext mirror image data sent by the slave database security mirror image authorization moduleAnd forwarding to a slave database decryption control module;
the slave database decryption control module receives the block ciphertext mirror image data sent by the slave database security mirror image authorization module; meanwhile, the slave database decryption control module generates and sends a decryption initial parameter request to the session key verification distribution module, then receives an initial vector IV and a session key SK sent by the session key verification distribution module, takes the session key SK as an initial key, performs AES decryption on the block ciphertext mirror image data by using the initial key and the initial vector IV based on a ciphertext block chaining mode CBC, and sends the generated block plaintext mirror image data to the slave database decryption restoration module; the slave database decryption reduction module receives the block plaintext mirror image data sent from the database decryption control module, takes out the additional message authentication code for each block of block plaintext mirror image data, performs hash processing to identify the authenticity of the message authentication code, combines the block plaintext data into complete mirror image data, and stores the complete mirror image data in the slave database to finish data synchronization.
Advantageous effects
Compared with the prior art, the invention provides a safe data mirroring method with a key agreement function based on the data encryption technology of a trusted third party key conversion center and the synchronization technology based on log files; the method completes the identity authentication of a master database and a slave database through a trusted third party key conversion center, provides a customized one-time pad scheme to enable the master database and the slave database to share a session key, ensures the security of key distribution, completes the mirror image authorization and data transmission of the master database and the slave database through an encryption mode, realizes safe data synchronization based on the customized one-time pad scheme, and avoids data leakage; the method is based on log file synchronization data, when a user completes DML operation on a master database, as long as the operation is not a SELECT operation, the operation is written into a master database log file, and the slave database is notified to complete the same DML operation through an event, but data transmission is not directly transmitted from the master database to the slave database, so that the method reduces the system overhead, improves the system response rate, has low complexity, realizes data synchronization based on event response, reduces the possibility of key data loss, and has strong real-time performance; in addition, the mirror image transmission content is a universal relational database Data Manipulation Language (DML), the universality is strong, and the mirror image transmission among different platforms is easy, so that the platform compatibility is good, the method is suitable for master-slave copy among all databases, and the operability is strong. The data mirroring method has the advantages of wide application range, practicability, convenience, good overall safety performance, and good real-time performance and stability.
Drawings
FIG. 1 is a diagram of an application scenario of the present invention;
FIG. 2 is an overall block diagram of the present invention;
FIG. 3 is an overall schematic block diagram of the present invention;
FIG. 4 is a mirror key agreement schematic of the present invention;
FIG. 5 is a diagram of a master database encryption module architecture of the present invention;
FIG. 6 is a block diagram of a primary database security mirror module of the present invention;
FIG. 7 is a diagram of a slave database security mirror module architecture of the present invention;
FIG. 8 is a block diagram of a slave database decryption module of the present invention;
FIG. 9 is a secure data mirroring transmission flow diagram of the present invention;
FIG. 10 is a secure data image reception flow diagram of the present invention;
Detailed Description
The invention is described in further detail below with reference to the following detailed description and accompanying drawings:
the invention provides a safe data mirroring method with a key agreement function based on a data encryption technology of a trusted third party key conversion center and a synchronization technology based on log files; the method completes the identity authentication of a master database and a slave database through a trusted third party key conversion center, provides a customized one-time pad scheme to enable the master database and the slave database to share a session key, ensures the security of key distribution, completes the mirror image authorization and data transmission of the master database and the slave database through an encryption mode, realizes safe data synchronization based on the customized one-time pad scheme, and avoids data leakage; the method is based on log file synchronization data, when a user completes DML operation on a master database, as long as the operation is not a SELECT operation, the operation is written into a master database log file, and the slave database is notified to complete the same DML operation through an event, but data transmission is not directly transmitted from the master database to the slave database, so that the method reduces the system overhead, improves the system response rate, has low complexity, realizes data synchronization based on event response, reduces the possibility of key data loss, and has strong real-time performance; in addition, the mirror image transmission content is a universal relational database Data Manipulation Language (DML), the universality is strong, and the mirror image transmission among different platforms is easy, so that the platform compatibility is good, the method is suitable for master-slave copy among all databases, and the operability is strong.
Fig. 1 shows an application scenario diagram of the present invention, which mainly includes three entities: a master database, a slave database and a Key Transformation Center (KTC). The data mirroring technology of the invention automatically copies all data of the master database or part of key data in the master database to the slave database, and whenever the data of the master database is updated, the database management system also automatically copies the updated data to the slave database, thereby ensuring the consistency of the mirrored data and the master data. The data is encrypted before being copied, an encrypted key is distributed by a key conversion center (KTC), and the confidentiality of the data is ensured based on a customized one-time pad scheme. The data mirroring technology of the invention completes mirroring authorization and data transmission of the master database and the slave database in an encryption mode, realizes safe data synchronization based on a customized one-time pad scheme, avoids data leakage, is suitable for master-slave copy among all databases, can be used for database disaster recovery schemes of enterprises, provides real-time data backup capability, and can help the enterprises to solve the problems in high-concurrency scenes.
As shown in fig. 2, which is an overall block diagram of the present invention, a secure data mirroring method with a key agreement function according to the present invention includes: the system comprises a main database encryption module (1), a main database security mirror module (2), a slave database security mirror module (3) and a slave database decryption module (4). The invention completes the mirror image authorization and data transmission of the master database and the slave database in an encryption mode, realizes safe data synchronization based on a customized one-time pad scheme, avoids data leakage, and is suitable for master-slave copy among all databases. The system comprises a master database user and master database encryption module (1), a master database encryption module (1) and master database security mirror module (2), a master database encryption module (1) and slave database decryption module (4), a master database security mirror module (2) and slave database security mirror module (3), a slave database security mirror module (3) and slave database decryption module (4), a slave database user and slave database decryption module (4), all based on a TCP/IP protocol, and data interaction is completed through a Socket interface Socket.
As shown in fig. 3, the overall principle structure of the present invention mainly includes five major parts: the system comprises a main database encryption module (1), a main database security mirror module (2), a slave database security mirror module (3) and a slave database decryption module (4). The main database encryption module (1) comprises a main database encryption preprocessing module (1-1), a main database encryption control module (1-2), a main database ciphertext data interface module (1-3), an encryption and decryption parameter setting module (1-4) and a session key generation module (1-5). The master database security mirror image module (2) comprises a master database security mirror image authorization module (2-1), a master database data security synchronization module (2-2) and a ciphertext data sending module (2-3). The slave database security mirror image module (3) comprises a ciphertext data receiving module (3-1), a slave database data security synchronization module (3-2) and a slave database security mirror image authorization module (3-3). The slave database decryption module (4) comprises a session key verification distribution module (4-1), a slave database ciphertext data interface module (4-2), a slave database decryption control module (4-3) and a slave database decryption restoration module (4-4).
The mirror key agreement principle of the present invention is shown in fig. 4:
firstly, an entity A acquires identity information A of a master database, identity information B of a slave database and the master database from an encryption and decryption parameter setting module (1-4)Shared secret key KATThen, an entity A generates a session key SK locally and randomly through a linear congruence method in a session key generation module (1-5), and sends the session key SK to a main database encryption control module (1-2); next, the session key generation module (1-5) shares the key K with the master databaseATEncrypting the slave database identity B and the session key SK, and then sending the master database key agreement information A,
Figure GDA0003333048720000111
(including master database identity information A, sharing key K with master databaseATEncrypted slave database identity B and session key SK) to a Key Transformation Centre (KTC);
secondly, the entity KTC receives the key negotiation information A of the main database sent by the session key generation module (1-5),
Figure GDA0003333048720000112
shared key K of main database stored by KTCATDecrypts the master database key agreement information a,
Figure GDA0003333048720000121
obtaining identity information A of a master database, identity information B of a slave database and a session key SK; then share secret key K from database saved by KTCBTEncrypting the identity information A and the session key SK of the master database to obtain the key negotiation information of the slave database
Figure GDA0003333048720000122
And sending to a session key generation module (1-5) of the entity A;
thirdly, a session key generation module (1-5) of the entity A receives key negotiation information sent by the KTC from the database
Figure GDA0003333048720000123
And forwarded to the session key authentication distribution module (4-1) of entity B;
fourthly, the session key verification distribution module (4-1) of the entity B receives the key agreement sent by the session key generation module (1-5) from the databaseBusiness information
Figure GDA0003333048720000124
And obtaining the identity information A of the master database and the shared secret key K of the slave database from the encryption and decryption parameter setting modules (1-4)BTUsing shared secret keys K from the databaseBTDecrypting secondary database key agreement information
Figure GDA0003333048720000125
And verifying the identity information A of the master database and taking out the session key SK.
The main database encryption module of the invention is shown in fig. 5, and completes encryption preprocessing based on a ciphertext block chaining mode CBC: partitioning the complete mirror image data of the main database to form partitioned plaintext data; generating a corresponding message authentication code for the block plaintext data through a hash function, and attaching the message authentication code to the block plaintext data to form block plaintext mirror image data; then, based on a customized one-time pad scheme, a session key negotiated by a master database and a slave database is obtained, block plaintext mirror data are encrypted by adopting an AES algorithm to form block ciphertext mirror data, and the block ciphertext mirror data are transmitted to a slave database decryption module (4) in a ciphertext mode to ensure the confidentiality of the data; the master database and the slave database complete identity authentication through the key conversion center, and then generate and distribute the session key based on a customized one-time pad scheme, so that the security of key distribution can be ensured. The main database encryption module (1) comprises a main database encryption preprocessing module (1-1), a main database encryption control module (1-2), a main database ciphertext data interface module (1-3), an encryption and decryption parameter setting module (1-4) and a session key generation module (1-5).
The main database encryption preprocessing module (1-1) receives complete mirror image data of an SQL statement sent by a user, and blocks the complete mirror image data based on a ciphertext block chaining mode (CBC) to form blocked plaintext data; generating a corresponding message authentication code for the block plaintext data through a hash function, and attaching the message authentication code to the block plaintext data to form block plaintext mirror image data; then setting an initial vector IV, generating an initial key request, and sending the partitioned plaintext mirror data, the initial vector IV and the initial key request to a main database encryption control module (1-2);
the main database encryption control module (1-2) receives the blocked plaintext mirror data, an initial vector IV and an initial key request of the main database encryption preprocessing module (1-1), forwards the initial vector IV and the initial key request to the encryption and decryption parameter setting module (1-4), receives a session key SK sent by the session key generation module (1-5) and serves as an initial key, conducts AES encryption on the blocked plaintext mirror data by using the initial key and the initial vector IV on the basis of a ciphertext block chaining mode CBC, and sends the generated blocked ciphertext mirror data to the main database ciphertext data interface module (1-3);
the master database ciphertext data interface module (1-3) receives the partitioned ciphertext mirror data of the master database encryption control module (1-2) and forwards the partitioned ciphertext mirror data to the master database security mirror authorization module (2-1); the encryption and decryption parameter setting module (1-4) receives an initial vector IV and an initial key request sent by the main database encryption control module (1-2), extracts main database identity information A and slave database identity information B from the initial key request, then sends the main database identity information A and the slave database identity information B to the key conversion center KTC, and receives a main database shared key K returned by the key conversion center KTCATAnd sharing a secret key K from a databaseBTAfter the initialization of the identity information and the shared key is finished, the identity information A of the master database, the identity information B of the slave database and the shared key K of the master database are obtainedATSending to a session key generation module (1-5) to obtain an initial vector IV, master database identity information A and a slave database shared key KBTSending to a session key verification distribution module (4-1);
the session key generation module (1-5) receives the identity information A of the master database, the identity information B of the slave database and the shared key K of the master database which are sent by the encryption and decryption parameter setting module (1-4)ATRandomly generating a session key SK by a linear congruence method, sending the session key SK to a master database encryption control module, and sending master database key negotiation information A,
Figure GDA0003333048720000131
Sending the key to a key conversion center KTC, key negotiation information A of a main database,
Figure DEST_PATH_FDA0003333048710000022
Where a represents the primary database identity information,
Figure GDA0003333048720000132
key K shared by representatives with a master databaseATEncrypted slave database identity B and session key SK, and then receives slave database key agreement information sent by key conversion center KTC
Figure GDA0003333048720000133
Will negotiate information from database key
Figure GDA0003333048720000134
Forwarded to a session key authentication distribution module (4-1),
Figure GDA0003333048720000135
representing shared secret key K from databaseBTEncrypted master database identity a and session key SK. The master database security mirror module is responsible for actively sending authorization information to the slave database, and transmitting block ciphertext mirror data between the master database and the slave database in an encryption mode based on a mirror log file of the master database and a customized one-time pad scheme, so that the secure data synchronization is realized, the data leakage is avoided, and the master database security mirror module is suitable for master-slave copy among all databases. The master database security mirror image module (2) comprises a master database security mirror image authorization module (2-1), a master database data security synchronization module (2-2) and a ciphertext data sending module (2-3).
The master database security mirror image authorization module (2-1) acquires the identity information of the slave database based on a locally configured mirror image log file, and sends authorization request information and an authorization account number to the slave database security mirror image authorization module (3-3) according to the identity information of the slave database; meanwhile, receiving authorization response information sent by a database security mirror image authorization module (3-3) to complete mirror image authorization; after mirror image authorization is completed, the main database security mirror image authorization module (2-1) receives the block cipher text mirror image data sent by the main database cipher text data interface module (1-3) through a TCP/IP transmission protocol based on a Socket interface Socket, and sends the block cipher text mirror image data to the main database data security synchronization module (2-2);
the master database data security synchronization module (2-2) receives the blocked ciphertext mirror data sent by the master database security mirror authorization module (2-1), writes the blocked ciphertext mirror data into a master database mirror log file, and then sends the blocked ciphertext mirror data to the ciphertext data sending module (2-3); the ciphertext data sending module (2-3) receives the partitioned ciphertext mirror image data of the main database data security synchronization module (2-2) and forwards the partitioned ciphertext mirror image data to the ciphertext data receiving module (3-1).
The slave database security mirror module of the invention is as shown in fig. 7, and is responsible for receiving the authorization information of the master database and completing identity authentication; based on the mirror image log file of the slave database and the customized one-time pad scheme, transmitting the partitioned cipher text mirror image data between the master database and the slave database in an encryption mode; the method realizes safe data synchronization, avoids data leakage, and is suitable for master-slave copy among all databases. The slave database security mirror image module (3) comprises a ciphertext data receiving module (3-1), a slave database data security synchronization module (3-2) and a slave database security mirror image authorization module (3-3).
The ciphertext data receiving module (3-1) receives the partitioned ciphertext mirror image data sent by the ciphertext data sending module (2-3) and forwards the partitioned ciphertext mirror image data to the slave database data security synchronization module (3-2); the slave database data security synchronization module (3-2) receives the block ciphertext mirror image data sent by the ciphertext data receiving module (3-1), and writes the block ciphertext mirror image data into a slave database mirror image log file; meanwhile, the cursor position of the slave database mirror image file sent by the slave database security mirror image authorization module (3-3) is received, the block cipher text mirror image data after the cursor position in the slave database mirror image log file is taken out and sent to the slave database security mirror image authorization module (3-3);
the slave database security mirror image authorization module (3-3) receives authorization request information and an authorization account number sent by the master database security mirror image authorization module (2-1), then sends authorization response information to the master database security mirror image authorization module (2-1), completes mirror image authorization, sets a slave database mirror image file cursor position according to the authorization request information, and sends the slave database mirror image file cursor position to the slave database data security synchronization module (3-2); meanwhile, the partitioned ciphertext mirror image data sent from the database data security synchronization module (3-2) is received from the database security mirror image authorization module (3-3) and sent to the slave database ciphertext data interface module (4-2).
The slave database decryption module of the invention is as shown in fig. 8, based on a ciphertext block chaining mode CBC and a customized one-time pad scheme, uses a session key negotiated by a master database and a slave database, and decrypts blocked ciphertext mirror image data by using an AES algorithm to form blocked plaintext mirror image data; carrying out Hash processing on each block of plaintext mirror image data, identifying the authenticity of the message authentication code, combining the block plaintext data in the block plaintext data into complete mirror image data, and preventing replay attack in the working mode during data mirror image transmission; the master database and the slave database complete identity authentication through the key conversion center, and then generate and distribute the session key based on a customized one-time pad scheme, so that the security of key distribution can be ensured. The slave database decryption module (4) comprises a session key verification distribution module (4-1), a slave database ciphertext data interface module (4-2), a slave database decryption control module (4-3) and a slave database decryption restoration module (4-4).
The session key verification distribution module (4-1) receives the initial vector IV, the identity information A of the master database and the shared key K of the slave database sent by the encryption and decryption parameter setting module (1-4)BTThen receives the key negotiation information of the slave database sent by the session key generation module (1-5)
Figure GDA0003333048720000141
Using shared secret key K from databaseBTDecrypting secondary database key agreement information
Figure GDA0003333048720000142
Verifying the identity information A of the master database, and taking out a session key SK; in addition, the session key verification distribution module (4-1) receives a decryption initial parameter request sent from the database decryption control module (4-3), and then sends the initial vector IV and the session key SK to the slave database decryption control module (4-3); the slave database ciphertext data interface module (4-2) receives the block ciphertext mirror image data sent by the slave database security mirror image authorization module (3-3) and forwards the block ciphertext mirror image data to the slave database decryption control module (4-3);
the slave database decryption control module (4-3) receives the block ciphertext mirror image data sent by the slave database security mirror image authorization module (3-3); meanwhile, the slave database decryption control module (4-3) generates and sends a decryption initial parameter request to the session key verification distribution module (4-1), then receives an initial vector IV and a session key SK which are sent by the session key verification distribution module (4-1), takes the session key SK as an initial key, performs AES decryption on the blocked ciphertext mirror image data by using the initial key and the initial vector IV based on a ciphertext block chaining mode CBC, and sends the generated blocked plaintext mirror image data to the slave database decryption restoration module (4-4); the slave database decryption reduction module (4-4) receives the block plaintext mirror image data sent from the database decryption control module (4-3), takes out the additional message authentication code for hash processing to identify the authenticity of the message authentication code, combines the block plaintext data into complete mirror image data and stores the complete mirror image data in the slave database to finish data synchronization.
The secure data mirror transmission flow of the present invention is shown in fig. 9:
firstly, a master database and a slave database perform secure mirror authorization; firstly, starting a database service, acquiring identity information of a slave database by a master database security mirror image authorization module (2-1) from a locally configured mirror image log file, and sending authorization request information and an authorization account number to a slave database security mirror image authorization module (3-3) through a TCP/IP transmission protocol based on a Socket according to the identity information of the slave database; and then receiving authorization response information sent from the database security mirror image authorization module (3-3) to complete mirror image authorization.
Secondly, carrying out encryption preprocessing on the complete mirror image data in the main database; after mirror image authorization, a main database user performs a DML operation on each pair of main databases, and sends the complete mirror image data (which are composed of SQL statements corresponding to a plurality of DML operations) to a main database encryption preprocessing module (1-1) as long as the operation is not a SELECT operation; the main database encryption preprocessing module (1-1) blocks the complete mirror image data based on a ciphertext block chaining mode CBC to form blocked plaintext data; generating a corresponding message authentication code for the block plaintext data through a hash function, and attaching the message authentication code to the block plaintext data to form block plaintext mirror image data; and then setting an initial vector IV, generating an initial key request, and sending the blocked plaintext mirror data, the initial vector IV and the initial key request to a master database encryption control module (1-2).
Thirdly, encrypting the partitioned plaintext mirror image data in the main database; the main database encryption control module (1-2) receives the blocked plaintext mirror data, the initial vector IV and the initial key request of the main database encryption preprocessing module (1-1), forwards the initial vector IV and the initial key request to the encryption and decryption parameter setting module (1-4), then receives the session key SK sent by the session key generation module (1-5) as the initial key, conducts AES encryption on the blocked plaintext mirror data by using the initial key and the initial vector IV based on a ciphertext block chaining mode CBC, and sends the generated blocked ciphertext mirror data to the main database ciphertext data interface module (1-3).
Fourthly, sending the block cipher text mirror image data in the master database to the slave database; the master database data security synchronization module (2-2) receives the block ciphertext mirror data sent by the master database security mirror authorization module (2-1), writes the block ciphertext mirror data into a master database mirror log file, and then sends the block ciphertext mirror data to a ciphertext data receiving module (3-1) where the slave database is located through the ciphertext data sending module (2-3).
The secure data image receiving flow of the present invention is shown in fig. 10:
firstly, performing security mirror image authorization on a slave database and a master database; the method comprises the steps that firstly, a database service is started, a slave database security mirror image authorization module (3-3) receives authorization request information and an authorization account number sent by a master database security mirror image authorization module (2-1), then authorization response information is sent to the master database security mirror image authorization module (2-1), mirror image authorization is completed, the cursor position of a slave database mirror image file is set according to the authorization request information, and the cursor position of the slave database mirror image file is sent to a slave database data security synchronization module (3-2).
Secondly, receiving the partitioned ciphertext mirror image data of the main database from the database; the ciphertext data receiving module (3-1) receives the partitioned ciphertext mirror image data sent by the ciphertext data sending module (2-3) and forwards the partitioned ciphertext mirror image data to the slave database data security synchronization module (3-2); the slave database data security synchronization module (3-2) receives the block ciphertext mirror image data sent by the ciphertext data receiving module (3-1), and writes the block ciphertext mirror image data into a slave database mirror image log file; meanwhile, the cursor position of the slave database mirror image file sent by the slave database security mirror image authorization module (3-3) is received, then the block cipher text mirror image data behind the cursor position in the slave database mirror image log file is taken out and sent to the slave database security mirror image authorization module (3-3), and finally the block cipher text mirror image data is forwarded to the slave database decryption control module (4-3).
Thirdly, decrypting the partitioned ciphertext mirror image data in the slave database; and a decryption initial parameter request is generated and sent to the session key verification distribution module (4-1) from the database decryption control module (4-3), then an initial vector IV and a session key SK which are sent by the session key verification distribution module (4-1) are received, the session key SK is used as an initial key, based on a ciphertext block chaining mode CBC, AES decryption is carried out on the blocked ciphertext mirror data by using the initial key and the initial vector IV, and the generated blocked plaintext mirror data is sent to the slave database decryption restoration module (4-4).
Fourthly, verifying the integrity of the partitioned plaintext mirror image data in the database and restoring the complete mirror image data; the block plaintext mirror image data sent from the database decryption control module (4-3) is received from the database decryption restoration module (4-4), an additional message authentication code is taken out for each block of block plaintext mirror image data based on a ciphertext block chaining mode CBC, hash processing is carried out to identify the authenticity of the message authentication code, the block plaintext data are combined into complete mirror image data (SQL sentences), the corresponding SQL sentences are executed by the database, mirror image transmission is completed, and data synchronization is achieved.
The above description is only a preferred embodiment of the present invention, and is not intended to limit the present invention in any way, but any modifications or equivalent variations made according to the technical spirit of the present invention are within the scope of the present invention as claimed.

Claims (1)

1.一种具有密钥协商功能的安全数据镜像方法,其特征在于:包括主数据库加密模块(1)、主数据库安全镜像模块(2)、从数据库安全镜像模块(3)、从数据库解密模块(4);1. a security data mirroring method with key negotiation function, is characterized in that: comprise main database encryption module (1), main database security mirroring module (2), from database security mirroring module (3), from database decryption module (4); 其中:所述的主数据库加密模块(1)用于对主数据库的完整镜像数据进行分块,形成分块明文数据;对于分块明文数据,通过哈希函数产生相应的消息认证码,并附在分块明文数据后,形成分块明文镜像数据;然后加密分块明文镜像数据,形成分块密文镜像数据,传输到从数据库解密模块(4),保证数据机密性;Wherein: the main database encryption module (1) is used to divide the complete mirror data of the main database into blocks to form block plaintext data; for the block plaintext data, a corresponding message authentication code is generated through a hash function, and attached After the plaintext data is segmented, the segmented plaintext image data is formed; then the segmented plaintext image data is encrypted to form segmented ciphertext image data, which is transmitted to the slave database decryption module (4) to ensure data confidentiality; 所述的主数据库安全镜像模块(2)负责主动向从数据库发送授权信息,并基于主数据库的镜像日志文件和定制的一次一密方案,通过加密方式传输主、从数据库之间的分块密文镜像数据;The described master database security mirroring module (2) is responsible for actively sending authorization information to the slave database, and based on the mirror log file of the master database and the customized one-time one-pass scheme, transmits the block encryption between the master and the slave database through encryption. file mirror data; 所述的从数据库安全镜像模块(3)负责接收主数据库的授权信息,完成身份认证;并基于从数据库的镜像日志文件和定制的一次一密方案,通过加密方式传输主、从数据库之间的分块密文镜像数据,实现安全的数据同步;The described slave database security mirroring module (3) is responsible for receiving the authorization information of the master database, and completes identity authentication; Block ciphertext mirror data to achieve secure data synchronization; 所述的从数据库解密模块(4)用于解密分块密文镜像数据,形成分块明文镜像数据;对于每一块分块明文镜像数据,作哈希处理,鉴别消息认证码的真伪,并将其中的分块明文数据组合成完整镜像数据;The described slave database decryption module (4) is used for decrypting the mirror data of the block ciphertext to form the mirror data of the block plaintext; for each piece of the mirror data of the block plaintext, hash processing is performed to identify the authenticity of the message authentication code, and Combine the block plaintext data into complete mirror data; 所述的主数据库加密模块(1)包括主数据库加密预处理模块(1-1)、主数据库加密控制模块(1-2)、主数据库密文数据接口模块(1-3)、加解密参数设置模块(1-4)以及会话密钥生成模块(1-5);所述的主数据库加密模块(1)基于密文分组链接模式CBC完成加密预处理:对主数据库的完整镜像数据进行分块,形成分块明文数据;对于分块明文数据,通过哈希函数产生相应的消息认证码,并附在分块明文数据后,形成分块明文镜像数据;然后,基于定制的一次一密方案,获取主数据库、从数据库协商的会话密钥,采用AES算法加密分块明文镜像数据,形成分块密文镜像数据,以密文方式传输到从数据库解密模块(4),保证数据机密性;其中,主数据库、从数据库通过密钥转换中心完成身份认证,然后基于定制的一次一密方案,产生并分发会话密钥,能保证密钥分发的安全性;The main database encryption module (1) comprises a main database encryption preprocessing module (1-1), a main database encryption control module (1-2), a main database ciphertext data interface module (1-3), an encryption and decryption parameter The setting module (1-4) and the session key generation module (1-5); the main database encryption module (1) completes the encryption preprocessing based on the ciphertext block chaining mode CBC: divides the complete mirror data of the main database block to form block plaintext data; for block plaintext data, the corresponding message authentication code is generated through a hash function and attached to the block plaintext data to form block plaintext mirror data; then, based on a customized one-time-one-password scheme , obtain the session key negotiated between the master database and the slave database, encrypt the block plaintext mirror data with AES algorithm, form block ciphertext image data, and transmit it to the slave database decryption module (4) in ciphertext mode to ensure data confidentiality; Among them, the master database and the slave database complete the identity authentication through the key conversion center, and then generate and distribute the session key based on the customized one-time pad scheme, which can ensure the security of key distribution; 所述的主数据库加密预处理模块(1-1),接收用户发送的SQL语句的完整镜像数据,基于密文分组链接模式CBC,将完整镜像数据分块,形成分块明文数据;对于分块明文数据,通过哈希函数产生相应的消息认证码,附在分块明文数据后,形成分块明文镜像数据;然后设定初始向量IV,产生初始密钥请求,并发送分块明文镜像数据、初始向量IV和初始密钥请求到主数据库加密控制模块(1-2);The main database encryption preprocessing module (1-1) receives the complete mirror data of the SQL statement sent by the user, and divides the complete mirror data into blocks based on the ciphertext grouping link mode CBC to form block plaintext data; for the block For plaintext data, the corresponding message authentication code is generated through the hash function, which is attached to the block plaintext data to form the block plaintext mirror data; then the initial vector IV is set, the initial key request is generated, and the block plaintext mirror data, Initial vector IV and initial key request to the main database encryption control module (1-2); 所述的主数据库加密控制模块(1-2),接收主数据库加密预处理模块(1-1)的分块明文镜像数据、初始向量IV和初始密钥请求,并将初始向量IV和初始密钥请求转发到加解密参数设置模块(1-4),然后接收会话密钥生成模块(1-5)发送的会话密钥SK,作为初始密钥,并基于密文分组链接模式CBC,使用初始密钥和初始向量IV对分块明文镜像数据进行AES加密,将产生的分块密文镜像数据发送到主数据库密文数据接口模块(1-3);The described master database encryption control module (1-2) receives the block plaintext mirror data, the initial vector IV and the initial key request of the master database encryption preprocessing module (1-1), and uses the initial vector IV and the initial encryption key to request. The key request is forwarded to the encryption and decryption parameter setting module (1-4), and then receives the session key SK sent by the session key generation module (1-5) as the initial key, and based on the ciphertext block chaining mode CBC, using the initial The key and the initial vector IV perform AES encryption on the block plaintext mirror data, and send the generated block ciphertext mirror data to the main database ciphertext data interface module (1-3); 所述的主数据库密文数据接口模块(1-3)接收主数据库加密控制模块(1-2)的分块密文镜像数据,并转发到主数据库安全镜像授权模块(2-1);所述的加解密参数设置模块(1-4)接收主数据库加密控制模块(1-2)发送的初始向量IV和初始密钥请求,从初始密钥请求中提取主数据库身份信息A和从数据库身份信息B,然后将主数据库身份信息A和从数据库身份信息B发送到密钥转换中心KTC,并接收密钥转换中心KTC返回的主数据库共享密钥KAT和从数据库共享密钥KBT,完成身份信息和共享密钥初始化后,将主数据库身份信息A、从数据库身份信息B和主数据库共享密钥KAT发送到会话密钥生成模块(1-5),将初始向量IV、主数据库身份信息A和从数据库共享密钥KBT发送到会话密钥验证分发模块(4-1);The main database ciphertext data interface module (1-3) receives the block ciphertext mirror data of the main database encryption control module (1-2), and forwards it to the main database security mirror authorization module (2-1); The described encryption and decryption parameter setting module (1-4) receives the initial vector IV and the initial key request sent by the master database encryption control module (1-2), and extracts the master database identity information A and the slave database identity from the initial key request information B, then send the master database identity information A and the slave database identity information B to the key conversion center KTC, and receive the master database shared key K AT and the slave database shared key K BT returned by the key conversion center KTC, complete After the identity information and the shared key are initialized, the master database identity information A, the slave database identity information B and the master database shared key K AT are sent to the session key generation module (1-5), and the initial vector IV, the master database identity The information A and the shared key K BT from the database are sent to the session key verification and distribution module (4-1); 所述的会话密钥生成模块(1-5)接收加解密参数设置模块(1-4)发送的主数据库身份信息A、从数据库身份信息B和主数据库共享密钥KAT,通过线性同余法,随机产生一个会话密钥SK,发送会话密钥SK到主数据库加密控制模块,并将主数据库密钥协商信息A、
Figure FDA0003333048710000021
发送到密钥转换中心KTC,主数据库密钥协商信息A、
Figure FDA0003333048710000022
中A代表主数据库身份信息,
Figure FDA0003333048710000023
代表用主数据库共享密钥KAT加密的从数据库身份B和会话密钥SK;然后接收密钥转换中心KTC发送的从数据库密钥协商信息
Figure FDA0003333048710000024
将从数据库密钥协商信息
Figure FDA0003333048710000025
转发到会话密钥验证分发模块(4-1),
Figure FDA0003333048710000026
代表用从数据库共享密钥KBT加密的主数据库身份A和会话密钥SK;
The session key generation module (1-5) receives the master database identity information A, the slave database identity information B and the master database shared key K AT sent by the encryption and decryption parameter setting module (1-4), and passes linear congruence. method, randomly generate a session key SK, send the session key SK to the master database encryption control module, and negotiate the master database key information A,
Figure FDA0003333048710000021
Sent to the key conversion center KTC, the master database key negotiation information A,
Figure FDA0003333048710000022
A represents the identity information of the main database,
Figure FDA0003333048710000023
Represents the slave database identity B and session key SK encrypted with the master database shared key K AT ; then receives the slave database key negotiation information sent by the key conversion center KTC
Figure FDA0003333048710000024
will negotiate information from the database key
Figure FDA0003333048710000025
forwarded to the session key verification distribution module (4-1),
Figure FDA0003333048710000026
Represents the master database identity A and session key SK encrypted with the slave database shared key K BT ;
所述的主数据库安全镜像模块(2)包括主数据库安全镜像授权模块(2-1)、主数据库数据安全同步模块(2-2)以及密文数据发送模块(2-3);所述的主数据库安全镜像模块(2)负责主动向从数据库发送授权信息,并基于主数据库的镜像日志文件和定制的一次一密方案,通过加密方式传输主、从数据库之间的分块密文镜像数据,实现安全的数据同步,避免数据泄露,适用于所有数据库间的主从复制;The main database security mirroring module (2) includes a main database security mirroring authorization module (2-1), a main database data security synchronization module (2-2) and a ciphertext data sending module (2-3); the described The primary database security mirroring module (2) is responsible for actively sending authorization information to the secondary database, and based on the mirror log file of the primary database and the customized one-time pad scheme, the block ciphertext mirror data between the primary and secondary databases is encrypted and transmitted between the primary and secondary databases. , to achieve secure data synchronization and avoid data leakage, suitable for master-slave replication between all databases; 所述的主数据库安全镜像授权模块(2-1),基于本地配置的镜像日志文件,获取从数据库的身份信息,根据从数据库身份信息,向从数据库安全镜像授权模块(3-3)发送授权请求信息及授权账号;同时接收从数据库安全镜像授权模块(3-3)发送的授权响应信息,完成镜像授权;完成镜像授权后,主数据库安全镜像授权模块(2-1)基于套接字接口Socket,通过TCP/IP传输协议,接收主数据库密文数据接口模块(1-3)发送的分块密文镜像数据,并将分块密文镜像数据发送到主数据库数据安全同步模块(2-2);Described master database security mirroring authorization module (2-1), based on the mirror log file of the local configuration, obtains the identity information from the database, according to the secondary database identity information, sends authorization to the secondary database security mirroring authorization module (3-3) Request information and authorized account number; at the same time, receive authorization response information sent from the database security mirroring authorization module (3-3) to complete the mirroring authorization; after completing the mirroring authorization, the main database security mirroring authorization module (2-1) is based on the socket interface Socket, through the TCP/IP transmission protocol, receives the block ciphertext mirror data sent by the main database ciphertext data interface module (1-3), and sends the block ciphertext mirror data to the main database data security synchronization module (2- 2); 所述的主数据库数据安全同步模块(2-2)接收主数据库安全镜像授权模块(2-1)发送的分块密文镜像数据,将分块密文镜像数据写入主数据库镜像日志文件,然后将分块密文镜像数据发送到密文数据发送模块(2-3);所述的密文数据发送模块(2-3),接收主数据库数据安全同步模块(2-2)的分块密文镜像数据,并转发到密文数据接收模块(3-1);The main database data security synchronization module (2-2) receives the block ciphertext mirror data sent by the main database security mirroring authorization module (2-1), and writes the block ciphertext mirror data into the main database mirror log file, Then, the block ciphertext mirror data is sent to the ciphertext data sending module (2-3); the ciphertext data sending module (2-3) receives the blocks of the main database data security synchronization module (2-2) The ciphertext mirror data is forwarded to the ciphertext data receiving module (3-1); 所述的从数据库安全镜像模块(3)包括密文数据接收模块(3-1)、从数据库数据安全同步模块(3-2)以及从数据库安全镜像授权模块(3-3);所述的从数据库安全镜像模块(3)负责接收主数据库的授权信息,完成身份认证;并基于从数据库的镜像日志文件和定制的一次一密方案,通过加密方式传输主、从数据库之间的分块密文镜像数据;实现安全的数据同步,避免数据泄露,适用于所有数据库间的主从复制;The described slave database security mirroring module (3) includes a ciphertext data receiving module (3-1), a slave database data security synchronization module (3-2) and a slave database security mirroring authorization module (3-3); the described The slave database security mirroring module (3) is responsible for receiving the authorization information of the master database and completing the identity authentication; and based on the mirror log file of the slave database and the customized one-time pad scheme, it transmits the block encryption between the master and slave databases through encryption. Mirror data; realize secure data synchronization, avoid data leakage, and apply to master-slave replication between all databases; 所述的密文数据接收模块(3-1)接收密文数据发送模块(2-3)发送的分块密文镜像数据,并转发到从数据库数据安全同步模块(3-2);所述的从数据库数据安全同步模块(3-2)接收密文数据接收模块(3-1)发送的分块密文镜像数据,将分块密文镜像数据写入从数据库镜像日志文件;同时接收从数据库安全镜像授权模块(3-3)发送的从数据库镜像文件光标位置,取出从数据库镜像日志文件中光标位置之后的分块密文镜像数据,发送到从数据库安全镜像授权模块(3-3);The ciphertext data receiving module (3-1) receives the block ciphertext mirror data sent by the ciphertext data sending module (2-3), and forwards it to the slave database data security synchronization module (3-2); the The slave database data security synchronization module (3-2) receives the block ciphertext mirror data sent by the ciphertext data receiving module (3-1), and writes the block ciphertext mirror data into the slave database mirror log file; The database mirroring authorization module (3-3) sends the cursor position from the database mirroring file, takes out the block ciphertext mirror data after the cursor position in the database mirroring log file, and sends it to the secondary database mirroring authorization module (3-3) ; 所述的从数据库安全镜像授权模块(3-3),接收主数据库安全镜像授权模块(2-1)发送的授权请求信息和授权账号,然后发送授权响应信息到主数据库安全镜像授权模块(2-1),完成镜像授权,并根据授权请求信息设置从数据库镜像文件光标位置,将从数据库镜像文件光标位置发送到从数据库数据安全同步模块(3-2);同时从数据库安全镜像授权模块(3-3)接收从数据库数据安全同步模块(3-2)发送的分块密文镜像数据,并发送到从数据库密文数据接口模块(4-2);Described from the database security mirroring authorization module (3-3), receive the authorization request information and the authorization account number sent by the main database security mirroring authorization module (2-1), then send the authorization response information to the main database security mirroring authorization module (2) -1), complete the mirroring authorization, and set the cursor position of the mirror file from the database according to the authorization request information, and send the cursor position of the mirror file from the database to the data security synchronization module of the secondary database (3-2); 3-3) Receive the block ciphertext mirror data sent from the database data security synchronization module (3-2), and send it to the slave database ciphertext data interface module (4-2); 所述的从数据库解密模块(4)包括会话密钥验证分发模块(4-1)、从数据库密文数据接口模块(4-2)、从数据库解密控制模块(4-3)以及从数据库解密还原模块(4-4);所述的从数据库解密模块(4)基于密文分组链接模式CBC和定制的一次一密方案,使用主数据库、从数据库协商的会话密钥,采用AES算法解密分块密文镜像数据,形成分块明文镜像数据;对于每一块分块明文镜像数据,作哈希处理,鉴别消息认证码的真伪,并将其中的分块明文数据组合成完整镜像数据;其中,主数据库、从数据库通过密钥转换中心完成身份认证,然后基于定制的一次一密方案,产生并分发会话密钥,能保证密钥分发的安全性;The described slave database decryption module (4) includes a session key verification and distribution module (4-1), a slave database ciphertext data interface module (4-2), a slave database decryption control module (4-3), and a slave database decryption module (4-3) The restoration module (4-4); the described slave database decryption module (4) is based on the ciphertext block chaining mode CBC and the customized one-time pad scheme, uses the master database, the session key negotiated from the database, and adopts the AES algorithm to decrypt the data. Block ciphertext mirror data to form block plaintext mirror data; for each block of block plaintext mirror data, perform hash processing to identify the authenticity of the message authentication code, and combine the block plaintext data into complete mirror data; , the master database and the slave database complete the identity authentication through the key conversion center, and then generate and distribute the session key based on the customized one-time pad scheme, which can ensure the security of key distribution; 所述的会话密钥验证分发模块(4-1),接收加解密参数设置模块(1-4)发送的初始向量IV、主数据库身份信息A和从数据库共享密钥KBT,然后接收会话密钥生成模块(1-5)发送的从数据库密钥协商信息
Figure FDA0003333048710000041
采用从数据库共享密钥KBT解密从数据库密钥协商信息
Figure FDA0003333048710000042
并验证主数据库身份信息A,取出会话密钥SK;另外,会话密钥验证分发模块(4-1)接收从数据库解密控制模块(4-3)发送的解密初始参数请求,然后将初始向量IV和会话密钥SK发送到从数据库解密控制模块(4-3);所述的从数据库密文数据接口模块(4-2),接收从数据库安全镜像授权模块(3-3)发送的分块密文镜像数据,并转发到从数据库解密控制模块(4-3);
The described session key verification and distribution module (4-1) receives the initial vector IV, master database identity information A and slave database shared key K BT sent by the encryption and decryption parameter setting module (1-4), and then receives the session key. The key negotiation information from the database sent by the key generation module (1-5)
Figure FDA0003333048710000041
Use the shared key KBT from the database to decrypt the key negotiation information from the database
Figure FDA0003333048710000042
And verify the identity information A of the main database, and take out the session key SK; in addition, the session key verification and distribution module (4-1) receives the decryption initial parameter request sent from the database decryption control module (4-3), and then the initial vector IV and session key SK are sent to the decryption control module (4-3) from the database; the described slave database ciphertext data interface module (4-2) receives the block sent from the database security mirroring authorization module (3-3). The ciphertext mirror data, and forward to the slave database decryption control module (4-3);
所述的从数据库解密控制模块(4-3),接收从数据库安全镜像授权模块(3-3)发送的分块密文镜像数据;同时所述的从数据库解密控制模块(4-3)产生并发送解密初始参数请求到会话密钥验证分发模块(4-1),然后接收会话密钥验证分发模块(4-1)发送的初始向量IV和会话密钥SK,将会话密钥SK作为初始密钥,并基于密文分组链接模式CBC,使用初始密钥和初始向量IV对分块密文镜像数据进行AES解密,将产生的分块明文镜像数据发送到从数据库解密还原模块(4-4);所述的从数据库解密还原模块(4-4)接收从数据库解密控制模块(4-3)发送的分块明文镜像数据,对于每一块分块明文镜像数据,取出附加的消息认证码,作哈希处理,鉴别消息认证码的真伪,并将其中的分块明文数据组合成完整镜像数据存储到从数据库,完成数据同步。The described slave database decryption control module (4-3) receives the block ciphertext image data sent from the database security image authorization module (3-3); while the described slave database decryption control module (4-3) generates And send a decryption initial parameter request to the session key verification and distribution module (4-1), and then receive the initial vector IV and session key SK sent by the session key verification and distribution module (4-1), and use the session key SK as the initial key, and based on the ciphertext block chaining mode CBC, use the initial key and the initial vector IV to perform AES decryption on the block ciphertext image data, and send the generated block plaintext image data to the decryption and restoration module from the database (4-4 ); Described from the database decryption restoration module (4-4) to receive the block plaintext mirror data sent from the database decryption control module (4-3), for each block block plaintext mirror data, take out the additional message authentication code, Hash processing is performed to identify the authenticity of the message authentication code, and the block plaintext data is combined into a complete mirror data to store in the slave database to complete data synchronization.
CN201910178317.7A 2019-03-08 2019-03-08 Secure data mirroring method with key agreement function Active CN109995522B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910178317.7A CN109995522B (en) 2019-03-08 2019-03-08 Secure data mirroring method with key agreement function

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910178317.7A CN109995522B (en) 2019-03-08 2019-03-08 Secure data mirroring method with key agreement function

Publications (2)

Publication Number Publication Date
CN109995522A CN109995522A (en) 2019-07-09
CN109995522B true CN109995522B (en) 2022-01-04

Family

ID=67129606

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910178317.7A Active CN109995522B (en) 2019-03-08 2019-03-08 Secure data mirroring method with key agreement function

Country Status (1)

Country Link
CN (1) CN109995522B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110830571A (en) * 2019-11-05 2020-02-21 许继集团有限公司 Business data backup and extraction method and computer readable medium
US11588621B2 (en) * 2019-12-06 2023-02-21 International Business Machines Corporation Efficient private vertical federated learning
US12056259B2 (en) * 2020-08-18 2024-08-06 International Business Machines Corporation Secure ingress and egress for data engines
CN112187769B (en) * 2020-09-23 2022-06-24 中国核动力研究设计院 Authority management system for nuclear power plant security level DCS
CN112149167B (en) * 2020-09-29 2024-03-15 北京计算机技术及应用研究所 Data storage encryption method and device based on master-slave system
CN114731272B (en) * 2020-11-02 2024-03-26 华为技术有限公司 Safety processing device, safety processing method and related equipment
CN112637217B (en) * 2020-12-24 2022-11-25 企商在线(北京)数据技术股份有限公司 Active defense method and device of cloud computing system based on bait generation
CN115617903A (en) * 2022-06-28 2023-01-17 重庆市公安局 Alert comprehensive platform system transformation method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103106372A (en) * 2013-01-17 2013-05-15 上海交通大学 Lightweight class privacy data encryption method and system for Android system
CN103606070A (en) * 2013-10-22 2014-02-26 惠龙港国际钢铁物流股份有限公司 Centralized distribution and transportation system for on-site transaction goods based on event-driven
CN105069370A (en) * 2015-07-22 2015-11-18 北京京东尚科信息技术有限公司 Automatic authorization access method for database
CN105141665A (en) * 2015-07-29 2015-12-09 浪潮电子信息产业股份有限公司 Method and device for realizing data mirroring and server cluster system
CN108306880A (en) * 2018-01-31 2018-07-20 北京深思数盾科技股份有限公司 A kind of data distribution, retransmission method and device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9361194B2 (en) * 2014-03-20 2016-06-07 Netapp Inc. Mirror vote synchronization
CN106529327B9 (en) * 2016-10-08 2023-02-03 西安电子科技大学 Data access system and method for encrypted database in hybrid cloud environment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103106372A (en) * 2013-01-17 2013-05-15 上海交通大学 Lightweight class privacy data encryption method and system for Android system
CN103606070A (en) * 2013-10-22 2014-02-26 惠龙港国际钢铁物流股份有限公司 Centralized distribution and transportation system for on-site transaction goods based on event-driven
CN105069370A (en) * 2015-07-22 2015-11-18 北京京东尚科信息技术有限公司 Automatic authorization access method for database
CN105141665A (en) * 2015-07-29 2015-12-09 浪潮电子信息产业股份有限公司 Method and device for realizing data mirroring and server cluster system
CN108306880A (en) * 2018-01-31 2018-07-20 北京深思数盾科技股份有限公司 A kind of data distribution, retransmission method and device

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
《Comparison of database mirror technologies for use in fault-tolerant information system solutions》;Roman Danel et al.;《2015 16th International Carpathian Control Conference (ICCC)》;20150531;全文 *
《COMPARISON OF DATABASE MIRRORS TECHNOLOGY OF THE SELECTED DATABASE SYSTEMS FOR USE IN FAULT-TOLERANT INFORMATION SYSTEMS SOLUTIONS》;Roman Danel et al.;《14th International Multidisciplinary Scientific GeoConference SGEM 2014》;20141231;全文 *
《数据库镜像技术在飞行训练信息系统中的应用》;姜辉等;《2011年亚太青年通信学术会议论文集(2)》;20110807;全文 *
《面向集团客户的移动目标定位追踪系统关键安全技术研究》;苏家琰;《中国优秀硕士学位论文全文数据库 基础科学辑》;20200615;全文 *

Also Published As

Publication number Publication date
CN109995522A (en) 2019-07-09

Similar Documents

Publication Publication Date Title
CN109995522B (en) Secure data mirroring method with key agreement function
US11394532B2 (en) Systems and methods for hierarchical key management in encrypted distributed databases
US6966001B2 (en) Computing system and data decryption method and computer system with remote copy facility
US7240197B1 (en) Method and apparatus for encryption and decryption in remote data storage systems
JP4728060B2 (en) Storage device
US8266433B1 (en) Method and system for automatically migrating encryption keys between key managers in a network storage system
CN102170440B (en) Method suitable for safely migrating data between storage clouds
US8397083B1 (en) System and method for efficiently deleting a file from secure storage served by a storage system
US8719923B1 (en) Method and system for managing security operations of a storage server using an authenticated storage module
US8601307B2 (en) Computer architectures using shared storage
US20200322138A1 (en) Encryption by default in an elastic computing system
US20200278813A1 (en) Multi cloud data framework for secure data access and portability
US7865741B1 (en) System and method for securely replicating a configuration database of a security appliance
CN103679050A (en) Security management method for enterprise-level electronic documents
US11144635B2 (en) Restricted command set management in a data storage system
US8189790B2 (en) Developing initial and subsequent keyID information from a unique mediaID value
US10867052B1 (en) Encryption intermediary for volume creation
US10924275B1 (en) Creating multiple encrypted volumes from a single source
CN111406260A (en) Object storage system with secure object replication
US20110113259A1 (en) Re-keying during on-line data migration
WO2023029655A1 (en) Data sharing method, network side device, system, electronic device, and storage medium
US12488129B2 (en) Operating method for database and fully encrypted database
CN114741706A (en) Virtual disk file encryption method, device and equipment
WO2024032660A1 (en) Method and apparatus for changing account data, computer device, and storage medium
US8245050B1 (en) System and method for initial key establishment using a split knowledge protocol

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