WO2015196810A1 - 一种读写数据库的数据的方法和应用应答装置 - Google Patents

一种读写数据库的数据的方法和应用应答装置 Download PDF

Info

Publication number
WO2015196810A1
WO2015196810A1 PCT/CN2015/072330 CN2015072330W WO2015196810A1 WO 2015196810 A1 WO2015196810 A1 WO 2015196810A1 CN 2015072330 W CN2015072330 W CN 2015072330W WO 2015196810 A1 WO2015196810 A1 WO 2015196810A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
database
read
key
sql
Prior art date
Application number
PCT/CN2015/072330
Other languages
English (en)
French (fr)
Inventor
周祥生
李炀
陈俊
王雪玉
赵静
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2015196810A1 publication Critical patent/WO2015196810A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor

Definitions

  • the present invention relates to the field of databases, and in particular, to a method for reading and writing data of a database and an application response device.
  • a database encryption system comprising: a database device, the database device comprising a database and a database control device for controlling execution of the database operation; and a user device, the user device being connected to the database control device via a network
  • the user equipment further comprises: a key usage device, the key usage device managing key information for encryption and decryption; a security configuration device, the security configuration device configuration being stored in the database Information relating to the configuration of security of data and/or metadata; a first storage unit that stores information related to the configuration of the security; and an application response device that receives the application response device a database operation command issued by the database device, and by referring to the information of the first storage unit, determining whether encryption of data and/or metadata processed by a database operation command is required, wherein if encryption is required, The application response device will have passed the use corresponding to the data / or the security encryption algorithm of the metadata, the encrypted data and/or the encrypted metadata encrypted according to the key information of the key usage device, as data of the database operation command and
  • the related art also discloses a method for implementing an analysis of a SQL (Structured Query Language) statement executed by an application layer by a database-driven proxy, and performing data encryption and returning a result set according to the analysis result. Data decryption process.
  • the application layer transparent database encryption method of the present invention encrypts and decrypts sensitive field data in the access table of the application layer, and can ensure data without affecting the reading by the developer and the user. Secure storage.
  • the embodiment of the invention provides a method for reading and writing data of a database and an application response device, so as to solve the problem that the upper layer application has low reading and writing efficiency when reading and writing encrypted data to the underlying relational database.
  • a method for reading and writing data of a database which is applied to an application response device of a distributed storage system, and the method for reading and writing data of the database includes:
  • SQL structured query language
  • the data includes a table name or a field name
  • the step of acquiring a key corresponding to the data stored in the distributed key information storage device includes:
  • the corresponding key is obtained according to the table name or the field name of the data.
  • the data is encrypted data
  • the SQL read/write request includes an SQL read request
  • the key is used according to the SQL read/write request to encrypt or decrypt the data and return the application to the database.
  • the steps of the device include:
  • the decrypted data is returned to the database using the application device.
  • the SQL read/write request includes an SQL write request
  • the step of applying the key to encrypt or decrypt the data according to the SQL read/write request and returning the data to the database using the application device includes:
  • the write data success information sent by the database is returned to the database usage application device.
  • An application response device comprising:
  • Intercepting module set to intercept the database using the application device to issue read and write data in the database Structured Query Language (SQL) read and write requests for data;
  • SQL Structured Query Language
  • An obtaining module configured to obtain a key corresponding to the data stored in the distributed key information storage device
  • the read/write module is configured to apply the key to encrypt or decrypt the data according to the SQL read/write request and return the data to the database using application device.
  • the obtaining module is configured to obtain a corresponding key according to the table name or the field name of the data.
  • the read and write module includes:
  • a decryption unit configured to obtain the encrypted data after passing the SQL read request to the database, and decrypt the encrypted data by applying the key
  • the decryption return unit is arranged to return the decrypted data to the database using the application device.
  • the read and write module includes:
  • An encryption unit configured to apply the key to encrypt the data, and then send an SQL write request to the database
  • the encryption return unit is configured to return a write data success message sent by the database to the database using the application device.
  • the embodiment of the invention further provides a distributed key information storage device, including
  • a receiving module configured to receive a request for acquiring a key issued by an application response device, the key corresponding to data in a database requested to be read or written by a structured query language (SQL) read and write request issued by an application device;
  • SQL structured query language
  • a sending module configured to send the key to the application response device.
  • the data includes a table name or a field name
  • the key corresponds to a table name or a field name of the data.
  • the embodiment of the invention further provides a computer readable storage medium storing program instructions, which can be implemented when the program instructions are executed.
  • the embodiment of the invention can improve the read/write efficiency of the key and the read/write performance of the database.
  • FIG. 1 is a schematic flow chart of an embodiment of a method for reading and writing data of a database according to the present invention
  • FIG. 2 is a schematic flowchart of a refinement of step S300 in FIG. 1;
  • FIG. 3 is a flow chart showing an embodiment of read data in a method for reading and writing data of a database according to the present invention
  • step S300 in FIG. 1 is a schematic diagram of another refinement process of step S300 in FIG. 1;
  • FIG. 5 is a flow chart showing an embodiment of writing data in a method for reading and writing data of a database according to the present invention
  • FIG. 6 is a structural block diagram of an embodiment of an application response device according to the present invention.
  • FIG. 7 is a schematic diagram of an embodiment of a functional module of the read/write module of FIG. 6;
  • FIG. 8 is a schematic diagram of another embodiment of a functional module of the read/write module of FIG. 6;
  • FIG. 9 is a structural block diagram of an embodiment of a distributed key information storage apparatus according to the present invention.
  • the present invention provides a method for writing data of a database, which is applied to an application response device of a distributed storage system.
  • the method for reading and writing data of a database includes the following steps:
  • step S100 the interception database uses the SQL read and write request issued by the application device to read and write data in the database.
  • the database uses the application device to initiate a SQL read and write request, and the application response device of the distributed storage system intercepts the SQL read and write request of the database using the application device, and the interface of the database using the application device and the application response device may be an API (Application Programming Interface). Interface) interface or SQL interface, API can be C language or JAVA language.
  • API Application Programming Interface
  • Step S200 Acquire a key corresponding to the data stored in the distributed key information storage device.
  • the application response device analyzes that the data in the database requested to be read or written is encrypted data, the related key is acquired from the read table name and the field name to the distributed key information storage device.
  • Step S300 Apply the key to encrypt or decrypt the data according to the SQL read/write request, and return the encrypted or decrypted data to the database using application device.
  • the application response device transmits the SQL read/write request to the database, the application key encrypts or decrypts the read and write data, the database returns relevant information, the application response device receives the return information, and returns the returned information to the database using the application device.
  • step S300 includes:
  • Step S310 After the SQL read request is delivered to the database, the encrypted data is acquired, and the encrypted data is decrypted by applying the key.
  • the application response device transmits the SQL read request to the database, the database returns the relevant data, the returned data is the encrypted data, and the application response device decrypts the encrypted data by using the obtained key according to the relevant algorithm.
  • Step S320 returning the decrypted data to the database using the application device.
  • the application response device returns the decrypted data to the database using the application device to complete the read operation.
  • FIG. 3 is a flow chart of an embodiment of read data in a method for reading and writing data of a database according to the present invention.
  • the step of reading data includes:
  • Step 301 The database uses an application device to initiate an SQL read request.
  • Step 302 The application response device intercepts the SQL read request initiated by the database by using the application device, and obtains the relevant key according to the read table name and the field name to the distributed key information storage device.
  • Step 303 The distributed key information storage device returns the relevant key to the application response device.
  • Step 304 The application response device delivers the SQL read request to the database.
  • Step 305 The database returns related data, and the returned data is encrypted data.
  • Step 306 The application response device decrypts the data using the obtained key and transmits the data to the application response device.
  • step S300 includes:
  • Step S330 after applying the key to encrypt the data, and transmitting an SQL write request to the database.
  • the application response device transmits the SQL write request to the database by encrypting the data using the obtained key according to the relevant algorithm.
  • Step S340 returning the write data success information sent by the database to the database for use Use the device.
  • the write data success information sent by the database is sent to the application response device, and the application response device returns the write data success information returned by the database to the database use application device to complete the write operation.
  • FIG. 5 is a flow chart of an embodiment of writing data in a method for reading and writing data of a database according to the present invention.
  • the step of writing data includes:
  • Step 401 The database uses an application device to initiate an SQL write request.
  • Step 402 The application response device intercepts the database write request initiated by the application device, and obtains the relevant key according to the read table name and the field name to the distributed key information storage device.
  • Step 403 The distributed key information storage device returns the relevant key to the application response device.
  • Step 404 The application response device encrypts the data by using the obtained key, and then transmits the SQL write request to the database.
  • Step 405 The database returns a write data success message to the application response device.
  • Step 406 The application response device returns a write data success message to the application response device to complete the write operation.
  • the embodiment further provides an application response device, where the application response device includes:
  • the intercepting module 10 is configured to intercept a SQL read and write request sent by the database using the application device to read and write data in the database;
  • the obtaining module 20 is configured to acquire a key corresponding to the data stored in the distributed key information storage device;
  • the read/write module 30 is configured to apply the key to encrypt or decrypt the data according to the SQL read/write request and return the data to the database using application device.
  • the database uses the application device to initiate a SQL read/write request, and the application response device intercepting module 10 of the distributed storage system intercepts the SQL read and write request of the database using the application device, and the interface of the database using the application device and the application response device may be an API interface or a SQL interface.
  • the API can be C or JAVA.
  • the application response device acquisition module 20 acquires the relevant key from the read table name and the field name to the distributed key information storage device if the data of the database to be read and written is analyzed as encrypted data.
  • the application response device read/write module 30 passes the SQL read/write request to the database, the application key encrypts or decrypts the read and write data, the database returns relevant information, the application response device receives the return information, and returns the returned information to the database using the application. Device.
  • the read/write module 30 includes:
  • the decrypting unit 31 is configured to: after the SQL read request is delivered to the database, obtain the encrypted data, and apply the key to decrypt the encrypted data;
  • the decryption return unit 32 is arranged to return the decrypted data to the database usage application.
  • the decryption unit 31 of the application response device transmits the SQL read request to the database, the database returns the relevant data, and the returned data is the encrypted data, and the decryption unit 31 of the application response device decrypts the encrypted data using the obtained key according to the correlation algorithm.
  • the return unit 32 decrypted by the application response device returns the decrypted data to the database use application device to complete the read operation.
  • the read/write module 30 includes:
  • the encrypting unit 33 is configured to: after applying the key to encrypt the data, pass an SQL write request to the database;
  • the encryption return unit 34 is arranged to return the write data success information sent by the database to the database usage application device.
  • the encryption unit 33 of the application response device transmits the SQL write request to the database by encrypting the data using the obtained key according to the relevant encryption algorithm.
  • the write data success information sent by the database is sent to the encryption return unit 34 of the application response device, and the encryption return unit 34 of the application response device returns the write data success information returned by the database to the database use application device to complete the write operation.
  • the embodiment further provides a distributed key information storage device, where the distributed key information storage device includes
  • the receiving module 40 is configured to receive a request for acquiring a key issued by the application response device, where the key corresponds to data of a database in a SQL read/write request issued by the application device;
  • the sending module 50 is configured to send the key to the application response device.
  • the receiving module 40 is configured to receive a request for acquiring a key issued by the application response device, where the key corresponds to a table name or a field name of data in a database in a SQL read/write request issued by the application device; the sending module 50 is configured Sending the secret corresponding to the table name or field name of the data The key is given to the application response device.
  • all or part of the steps of the above embodiments may also be implemented by using an integrated circuit. These steps may be separately fabricated into individual integrated circuit modules, or multiple modules or steps may be fabricated into a single integrated circuit module. achieve. Thus, the invention is not limited to any specific combination of hardware and software.
  • the devices/function modules/functional units in the above embodiments may be implemented by a general-purpose computing device, which may be centralized on a single computing device or distributed over a network of multiple computing devices.
  • each device/function module/functional unit in the above embodiment When each device/function module/functional unit in the above embodiment is implemented in the form of a software function module and sold or used as a stand-alone product, it can be stored in a computer readable storage medium.
  • the above mentioned computer readable storage medium may be a read only memory, a magnetic disk or an optical disk or the like.
  • the embodiment of the invention can improve the read/write efficiency of the key and the read/write performance of the database.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Storage Device Security (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

一种读写数据库的数据的方法、应用应答装置和分布式密钥信息存储装置,该方法应用于分布式存储系统的应用应答装置中,包括:截获数据库使用应用装置发出的请求读写数据库内的数据的SQL读写请求;获取存放于分布式密钥信息存储装置内的与所述数据对应的密钥;应用所述密钥加密或解密所述数据后传递SQL读写请求给所述数据库并将读写结果返回给所述数据库使用应用装置。

Description

一种读写数据库的数据的方法和应用应答装置 技术领域
本发明涉及数据库领域,尤其涉及一种读写数据库的数据的方法和应用应答装置。
背景技术
相关技术中公开了一种数据库加密系统,包括:数据库设备,所述数据库设备包括数据库以及控制数据库操作的执行的数据库控制装置;以及用户设备,所述用户设备经由网络连接到所述数据库控制装置,其中所述用户设备还包括:密钥使用装置,所述密钥使用装置管理用于加密和解密的密钥信息;安全性配置装置,所述安全性配置装置配置与所述数据库中所存储的数据和/或元数据的安全性的配置有关的信息;第一存储单元,所述第一存储单元存储与所述安全性的配置有关的信息;以及应用应答装置,所述应用应答装置接收所述数据库设备发布的数据库操作命令,并且通过参考所述第一存储单元的所述信息,确定是否需要针对由数据库操作命令处理的数据和/或元数据的加密,其中如果需要加密,所述应用应答装置将已经通过使用对应于所述数据和/或元数据的所述安全性的加密算法、根据所述密钥使用装置的密钥信息而被加密的经加密数据和/或经加密元数据,作为所述数据库操作命令的数据和/或元数据,传送给所述数据库控制装置,以致使所述数据库控制装置执行所述数据库操作,如果不需要加密,所述应用应答装置将所述数据库操作命令按原样传送给所述数据库控制装置。
相关技术中还公开了一种方法,通过对数据库驱动的代理实现对应用层执行的SQL(Structured Query Language,结构化查询语言)语句的分析,并根据分析结果进行数据加密和返回的结果集的数据解密过程。与现有技术相比,本发明的应用层透明的数据库加密方法对应用层的存取的表中敏感字段数据进行加密和解密,在不影响开发人员和用户读取的情况下能够保证数据的安全存储。
以上两种方案,对密钥存放模块的读写效率并没有进行充分的考虑和说明,而数据库节点往往是这个应用系统的性能瓶颈,因此,如何提高密钥的 读写效率是一个值得解决的问题。
发明内容
本发明实施例提供一种读写数据库的数据的方法和应用应答装置,以解决上层应用对底层关系数据库进行读写加密数据时,密钥的读写效率低的问题。
一种读写数据库的数据的方法,应用于分布式存储系统的应用应答装置中,读写数据库的数据的方法包括:
截获数据库使用应用装置发出的请求读写数据库内的数据的结构化查询语言(SQL)读写请求;
获取存放于分布式密钥信息存储装置内的与所述数据对应的密钥;
根据所述SQL读写请求应用所述密钥加密或解密所述数据,并将加密或解密后的数据返回给所述数据库使用应用装置。
可选地,所述数据包括表名或者字段名,所述获取存放于分布式密钥信息存储装置内的与所述数据对应的密钥的步骤包括:
根据所述数据的表名或者字段名获取对应密钥。
可选地,所述数据为加密数据,所述SQL读写请求包括SQL读请求,所述根据所述SQL读写请求应用所述密钥加密或解密所述数据并返回给所述数据库使用应用装置的步骤包括:
传递所述SQL读请求给所述数据库后获取所述加密数据,应用所述密钥解密所述加密数据;
返回解密后的数据给所述数据库使用应用装置。
可选地,所述SQL读写请求包括SQL写请求,所述根据所述SQL读写请求应用所述密钥加密或解密所述数据并返回给所述数据库使用应用装置的步骤包括:
应用所述密钥加密所述数据后传递SQL写请求给所述数据库;
将所述数据库发出的写数据成功信息返回给所述数据库使用应用装置。
一种应用应答装置,包括:
截获模块,设置为截获数据库使用应用装置发出的要求读写数据库内的 数据的结构化查询语言(SQL)读写请求;
获取模块,设置为获取存放于分布式密钥信息存储装置内的与所述数据对应的密钥;以及
读写模块,设置为根据所述SQL读写请求应用所述密钥加密或解密所述数据并返回给所述数据库使用应用装置。
可选地,所述获取模块,是设置为根据所述数据的表名或者字段名获取对应密钥。
可选地,所述读写模块包括:
解密单元,设置为传递SQL读请求给所述数据库后获取所述加密数据,应用所述密钥解密所述加密数据;以及
解密返回单元,设置为返回解密后的数据给所述数据库使用应用装置。
可选地,所述读写模块包括:
加密单元,设置为应用所述密钥加密所述数据后传递SQL写请求给所述数据库;
加密返回单元,设置为返回所述数据库发出的写数据成功信息给所述数据库使用应用装置。
本发明实施例还提供一种分布式密钥信息存储装置,包括,
接收模块,设置为接收应用应答装置发出的获取密钥的请求,所述密钥与使用应用装置发出的结构化查询语言(SQL)读写请求所请求读写的数据库内的数据对应;以及
发送模块,设置为发送所述密钥给所述应用应答装置。
可选地,所述数据包括表名或者字段名,所述密钥与所述数据的表名或者字段名对应。
本发明实施例还提供一种计算机可读存储介质,存储有程序指令,当该程序指令被执行时可实现上面所述的方法。
本发明实施例可以提高密钥的读写效率和数据库的读写性能。
附图概述
图1为本发明读写数据库的数据的方法一实施例的流程示意图;
图2为图1中步骤S300的一细化流程示意图;
图3为本发明读写数据库的数据的方法中读数据的一实施例的流程框图;
图4为图1中步骤S300的另一细化流程示意图;
图5为本发明读写数据库的数据的方法中写数据的一实施例的流程框图;
图6为本发明应用应答装置一实施例的结构框图;
功能模块示意图;
图7为图6中读写模块的功能模块一实施例示意图;
图8为图6中读写模块的功能模块另一实施例示意图;
图9为本发明分布式密钥信息存储装置一实施例的结构框图。
本发明目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。
本发明的较佳实施方式
应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。
本发明提供一种写数据库的数据的方法,应用于分布式存储系统的应用应答装置中,参照图1,在一实施例中,该读写数据库的数据的方法包括以下步骤:
步骤S100、截获数据库使用应用装置发出的请求读写数据库内的数据的SQL读写请求。
数据库使用应用装置发起SQL读写请求,分布式存储系统的应用应答装置截获数据库使用应用装置的SQL读写请求,数据库使用应用装置和应用应答装置的接口可以为API(Application Programming Interface,应用程序编程接口)接口或SQL接口,API可以为C语言或JAVA语言。
步骤S200、获取存放于分布式密钥信息存储装置内的与所述数据对应的密钥。
应用应答装置如果分析到请求读写的数据库内的数据为加密数据,则根据读取的表名、字段名到分布式密钥信息存储装置获取相关密钥。
步骤S300、根据所述SQL读写请求应用所述密钥加密或解密所述数据,并将加密或解密后的数据返回给所述数据库使用应用装置。
应用应答装置将SQL读写请求传递至数据库,应用密钥对读写数据进行加密或解密,数据库返回相关信息,应用应答装置接收返回信息,并将返回信息回传给数据库使用应用装置。
参见图2,本实施例提供的一种读写数据库的数据的方法,所述步骤S300包括:
步骤S310、传递SQL读请求给所述数据库后获取所述加密数据,应用所述密钥解密所述加密数据。
应用应答装置将SQL读请求传递至数据库,数据库返回相关数据,返回的数据为加密数据,应用应答装置根据相关算法,利用获得的密钥将加密数据解密。
步骤S320、返回解密后的数据给所述数据库使用应用装置。
应用应答装置将解密后的数据回传给数据库使用应用装置,完成读操作。
如图3所示,图3为本发明读写数据库的数据的方法中读数据的一实施例的流程框图。
所述读数据的步骤包括:
步骤301、数据库使用应用装置发起SQL读请求;
步骤302、应用应答装置截获数据库使用应用装置发起的SQL读请求,根据读取的表名、字段名到分布式密钥信息存储装置获取相关密钥;
步骤303、分布式密钥信息存储装置将相关密钥返回给应用应答装置;
步骤304、应用应答装置将SQL读请求传递至数据库;
步骤305、数据库返回相关数据,返回的数据为加密数据;
步骤306、应用应答装置利用获得的密钥将数据解密后传递给应用应答装置。
参见图4,本实施例提供的一种读写数据库的数据的方法,所述步骤S300包括:
步骤S330、应用所述密钥加密所述数据后传递SQL写请求给所述数据库。
应用应答装置根据相关算法,利用获得的密钥将数据加密后将SQL写请求传递给数据库。
步骤S340、返回所述数据库发出的写数据成功信息给所述数据库使用应 用装置。
数据库发出的写数据成功信息给应用应答装置,应用应答装置将数据库返回的写数据成功信息回传给数据库使用应用装置,完成写操作。
如图5所示,图5为本发明读写数据库的数据的方法中写数据的一实施例的流程框图。
所述写数据的步骤包括:
步骤401、数据库使用应用装置发起SQL写请求;
步骤402、应用应答装置截获数据库使用应用装置发起的SQL写请求,根据读取的表名、字段名到分布式密钥信息存储装置获取相关密钥;
步骤403、分布式密钥信息存储装置将相关密钥返回给应用应答装置;
步骤404、应用应答装置利用获得的密钥将数据加密后将SQL写请求传递至数据库;
步骤405、数据库返回写数据成功信息给应用应答装置;
步骤406、应用应答装置返回写数据成功信息给应用应答装置,完成写操作。
参见图6,本实施例进一步提供一种应用应答装置,所述应用应答装置包括:
截获模块10,设置为截获数据库使用应用装置发出的请求读写数据库内的数据的SQL读写请求;
获取模块20,设置为获取存放于分布式密钥信息存储装置内的与所述数据对应的密钥;以及
读写模块30,设置为根据所述SQL读写请求应用所述密钥加密或解密所述数据并返回给所述数据库使用应用装置。
数据库使用应用装置发起SQL读写请求,分布式存储系统的应用应答装置截获模块10截获数据库使用应用装置的SQL读写请求,数据库使用应用装置和应用应答装置的接口可以为API接口或SQL接口,API可以为C语言或JAVA语言。
应用应答装置获取模块20如果分析到要读写的数据库的数据为加密数据,则根据读取的表名、字段名到分布式密钥信息存储装置获取相关密钥。
应用应答装置读写模块30将SQL读写请求传递至数据库,应用密钥对读写数据进行加密或解密,数据库返回相关信息,应用应答装置接收返回信息,并将返回信息回传给数据库使用应用装置。
如图7所示,所述读写模块30包括:
解密单元31,设置为传递SQL读请求给所述数据库后获取所述加密数据,应用所述密钥解密所述加密数据;
解密返回单元32,设置为返回解密后的数据给所述数据库使用应用装置。
应用应答装置的解密单元31将SQL读请求传递至数据库,数据库返回相关数据,返回的数据为加密数据,应用应答装置的解密单元31根据相关算法,利用获得的密钥将加密数据解密。
应用应答装置解密的返回单元32将解密后的数据回传给数据库使用应用装置,完成读操作。
如图8所示,所述读写模块30包括:
加密单元33,设置为应用所述密钥加密所述数据后传递SQL写请求给所述数据库;
加密返回单元34,设置为返回所述数据库发出的写数据成功信息给所述数据库使用应用装置。
应用应答装置的加密单元33根据相关加密算法,利用获得的密钥将数据加密后将SQL写请求传递给数据库。
数据库发出的写数据成功信息给应用应答装置的加密返回单元34,应用应答装置的加密返回单元34将数据库返回的写数据成功信息回传给数据库使用应用装置,完成写操作。
如图9所示,本实施例进一步提供一种分布式密钥信息存储装置,所述分布式密钥信息存储装置包括,
接收模块40,设置为接收应用应答装置发出的获取密钥的请求,所述密钥与使用应用装置发出的SQL读写请求中数据库的数据对应;
发送模块50,设置为发送所述密钥给所述应用应答装置。
接收模块40,设置为接收应用应答装置发出的获取密钥的请求,所述密钥与使用应用装置发出的SQL读写请求中数据库的数据的表名或者字段名对应;发送模块50,是设置为发送与所述数据的表名或者字段名对应的所述密 钥给所述应用应答装置。
以上仅为本发明的实施例,并非因此限制本发明的专利范围。
本领域普通技术人员可以理解上述实施例的全部或部分步骤可以使用计算机程序流程来实现,所述计算机程序可以存储于一计算机可读存储介质中,所述计算机程序在相应的硬件平台上(如系统、设备、装置、器件等)执行,在执行时,包括方法实施例的步骤之一或其组合。
可选地,上述实施例的全部或部分步骤也可以使用集成电路来实现,这些步骤可以被分别制作成一个个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本发明不限制于任何特定的硬件和软件结合。
上述实施例中的各装置/功能模块/功能单元可以采用通用的计算装置来实现,它们可以集中在单个的计算装置上,也可以分布在多个计算装置所组成的网络上。
上述实施例中的各装置/功能模块/功能单元以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。上述提到的计算机可读取存储介质可以是只读存储器,磁盘或光盘等。
工业实用性
本发明实施例可以提高密钥的读写效率和数据库的读写性能。

Claims (11)

  1. 一种读写数据库的数据的方法,应用于分布式存储系统的应用应答装置中,该方法包括以下步骤:
    截获数据库使用应用装置发出的请求读写数据库内的数据的结构化查询语言(SQL)读写请求;
    获取存放于分布式密钥信息存储装置内的与所述数据对应的密钥;
    根据所述SQL读写请求应用所述密钥加密或解密所述数据,并将加密或解密后的数据返回给所述数据库使用应用装置。
  2. 如权利要求1所述的读写数据库的数据的方法,其中,所述数据包括表名或者字段名,所述获取存放于分布式密钥信息存储装置内的与所述数据对应的密钥的步骤包括:
    根据所述数据的表名或者字段名获取对应密钥。
  3. 如权利要求1或2所述的读写数据库的数据的方法,其中,所述数据为加密数据,所述SQL读写请求包括SQL读请求,所述根据所述SQL读写请求应用所述密钥加密或解密所述数据并返回给所述数据库使用应用装置的步骤包括:
    传递所述SQL读请求给所述数据库后获取所述加密数据,应用所述密钥解密所述加密数据;
    返回解密后的数据给所述数据库使用应用装置。
  4. 如权利要求1或2所述的读写数据库的数据的方法,其中,所述SQL读写请求包括SQL写请求,所述根据所述SQL读写请求应用所述密钥加密或解密所述数据并返回给所述数据库使用应用装置的步骤包括:
    应用所述密钥加密所述数据后传递SQL写请求给所述数据库;
    将所述数据库发出的写数据成功信息返回给所述数据库使用应用装置。
  5. 一种应用应答装置,包括:
    截获模块,设置为截获数据库使用应用装置发出的要求读写数据库内的 数据的结构化查询语言(SQL)读写请求;
    获取模块,设置为获取存放于分布式密钥信息存储装置内的与所述数据对应的密钥;以及
    读写模块,设置为根据所述SQL读写请求应用所述密钥加密或解密所述数据并返回给所述数据库使用应用装置。
  6. 如权利要求5所述的应用应答装置,其中,所述获取模块,是设置为根据所述数据的表名或者字段名获取对应密钥。
  7. 如权利要求5或6所述的一种应用应答装置,其中,所述读写模块包括:
    解密单元,设置为传递SQL读请求给所述数据库后获取所述加密数据,应用所述密钥解密所述加密数据;以及
    解密返回单元,设置为返回解密后的数据给所述数据库使用应用装置。
  8. 如权利要求5或6所述的一种应用应答装置,其中,所述读写模块包括:
    加密单元,设置为应用所述密钥加密所述数据后传递SQL写请求给所述数据库;
    加密返回单元,设置为返回所述数据库发出的写数据成功信息给所述数据库使用应用装置。
  9. 一种分布式密钥信息存储装置,包括,
    接收模块,设置为接收应用应答装置发出的获取密钥的请求,所述密钥与使用应用装置发出的结构化查询语言(SQL)读写请求所请求读写的数据库内的数据对应;以及
    发送模块,设置为发送所述密钥给所述应用应答装置。
  10. 如权利要求9所述的一种分布式密钥信息存储装置,其中,所述数据包括表名或者字段名,
    所述密钥与所述数据的表名或者字段名对应。
  11. 一种计算机可读存储介质,存储有程序指令,当该程序指令被执行时可实现权利要求1-5任一项所述的方法。
PCT/CN2015/072330 2014-06-27 2015-02-05 一种读写数据库的数据的方法和应用应答装置 WO2015196810A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410301136.6A CN105302822B (zh) 2014-06-27 2014-06-27 一种读写数据库的数据的方法和应用应答装置
CN201410301136.6 2014-06-27

Publications (1)

Publication Number Publication Date
WO2015196810A1 true WO2015196810A1 (zh) 2015-12-30

Family

ID=54936700

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/072330 WO2015196810A1 (zh) 2014-06-27 2015-02-05 一种读写数据库的数据的方法和应用应答装置

Country Status (2)

Country Link
CN (1) CN105302822B (zh)
WO (1) WO2015196810A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113821819A (zh) * 2021-11-22 2021-12-21 深圳竹云科技有限公司 数据读写方法、装置、电子设备及计算机可读存储介质

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107743063A (zh) * 2017-10-31 2018-02-27 北京小米移动软件有限公司 数据处理方法及装置

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1761923A (zh) * 2003-06-11 2006-04-19 甲骨文国际公司 加密数据库列的方法和设备
CN101504706A (zh) * 2009-03-03 2009-08-12 中国科学院软件研究所 数据库信息加密方法和系统
CN101587479A (zh) * 2008-06-26 2009-11-25 北京人大金仓信息技术股份有限公司 面向数据库管理系统内核的数据加解密系统及其方法
CN102968455A (zh) * 2012-10-31 2013-03-13 山东浪潮齐鲁软件产业股份有限公司 一种应用层透明的数据库加密方法

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100438614C (zh) * 2006-02-16 2008-11-26 清华大学深圳研究生院 分布式非对称视频会议安全系统的实现方法
CN101639882B (zh) * 2009-08-28 2011-09-21 华中科技大学 基于存储加密的数据库安全保密系统
CN102855448B (zh) * 2012-08-10 2016-02-10 深圳市黎明网络系统有限公司 一种字段级数据库加密装置
CN103279715A (zh) * 2013-05-22 2013-09-04 李凤华 数据库数据加解密方法及装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1761923A (zh) * 2003-06-11 2006-04-19 甲骨文国际公司 加密数据库列的方法和设备
CN101587479A (zh) * 2008-06-26 2009-11-25 北京人大金仓信息技术股份有限公司 面向数据库管理系统内核的数据加解密系统及其方法
CN101504706A (zh) * 2009-03-03 2009-08-12 中国科学院软件研究所 数据库信息加密方法和系统
CN102968455A (zh) * 2012-10-31 2013-03-13 山东浪潮齐鲁软件产业股份有限公司 一种应用层透明的数据库加密方法

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113821819A (zh) * 2021-11-22 2021-12-21 深圳竹云科技有限公司 数据读写方法、装置、电子设备及计算机可读存储介质
CN113821819B (zh) * 2021-11-22 2022-03-08 深圳竹云科技有限公司 数据读写方法、装置、电子设备及计算机可读存储介质

Also Published As

Publication number Publication date
CN105302822B (zh) 2020-07-31
CN105302822A (zh) 2016-02-03

Similar Documents

Publication Publication Date Title
JP7370371B2 (ja) 楕円曲線暗号法による分散暗号鍵の提供及び記憶のための方法及びシステム
US10601786B2 (en) Privacy-preserving system for machine-learning training data
US11140160B2 (en) Method and system for establishing inter-device communication
US10063372B1 (en) Generating pre-encrypted keys
WO2019205380A1 (zh) 电子装置、基于区块链的数据处理方法、程序和计算机存储介质
US8447983B1 (en) Token exchange
US9716594B2 (en) Attestation of data sanitization
US9032219B2 (en) Securing speech recognition data
US9065593B2 (en) Securing speech recognition data
JP5711840B1 (ja) リレーショナルデータベースを内在するカーネルプログラム、方法及び装置
US8200972B2 (en) Encryption of security-sensitive data by re-using a connection
WO2013130555A3 (en) Method of operating a computing device, computing device and computer program
US10142100B2 (en) Managing user-controlled security keys in cloud-based scenarios
JP2018197997A5 (zh)
JP2018142314A5 (zh)
RU2010152642A (ru) Шифрование элементов данных на основе идентификации для безопасного доступа к ним
RU2015114491A (ru) Управляемый доступ к медицинским данным, анализируемым посредством удаленных вычислительных ресурсов
JP7133589B2 (ja) Nftアクセス制限システムおよびnftアクセス制限プログラム
TWI783079B (zh) 積體電路個人化
WO2015196810A1 (zh) 一种读写数据库的数据的方法和应用应答装置
JP2015170057A (ja) 秘匿検索装置、秘匿検索方法および秘匿検索プログラム
EP3809300A1 (en) Method and apparatus for data encryption, method and apparatus for data decryption
US8332658B2 (en) Computer system, management terminal, storage system and encryption management method
US12032718B1 (en) System, method, and computer program for securely handling and storing customer data without enabling human access to the data
JP7143841B2 (ja) 認証システム、認証装置、端末装置、認証方法、およびプログラム

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15811815

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15811815

Country of ref document: EP

Kind code of ref document: A1