全表搜索和数据加密
我用vb6和mysql开发了一个客户端软件。这是表
CREATE TABLE IF NOT EXISTS `main_table` (
`f_id` int(11) NOT NULL DEFAULT '0',
`id` mediumint(15) NOT NULL AUTO_INCREMENT,
`text_to_encrypt` mediumtext
PRIMARY KEY (`id`),
KEY `f_id` (`f_id`)
);
客户端希望对 text_to_encrypt 列的数据进行加密。现在加密数据非常容易,但真正的问题是,它可以通过用户提供的关键字进行完全文本搜索,并在解密加密数据后显示数据。该栏目大约有90万,并且还在增加,我想要Windows操作系统的解决方案。该怎么办?
I had developing a client software in vb6 and mysql. This is the table
CREATE TABLE IF NOT EXISTS `main_table` (
`f_id` int(11) NOT NULL DEFAULT '0',
`id` mediumint(15) NOT NULL AUTO_INCREMENT,
`text_to_encrypt` mediumtext
PRIMARY KEY (`id`),
KEY `f_id` (`f_id`)
);
The client wants that the data to be encrypt the column of text_to_encrypt. Now it is very easy to encrypt the data but the real problem is that it would be fully text searchable to the keywords provided by the user and show the data after decrypting the encrypted data. The column has about 900,000 and going to increase, I want the solution for Windows OS. What to do?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
如果客户端是决定某件事应该如何运行的人,那么客户端必须知道您无法使用关键字搜索加密数据而不解密它。
这意味着获取表的全部内容,解密然后搜索。
If the client is the one who determines HOW something should behave, then the client HAS to know that the you cannot search encrypted data with keywords without decrypting it.
That means taking the entire contents of the table, decrypting it and then searching.
您可以考虑对要进行搜索的所有文本内容进行加密和索引。如果文本是“Hello world!”您将保存加密的“hello”和“world”,然后搜索那些在写入初始记录时已映射到加密文本字段的内容。
You might consider encrypting and indexing all of the text content on which to make the search. If the text is "Hello world!" you'd save encrypted "hello" and "world" and then search against those, which have been mapped to the encrypted text field upon writing the initial record.
无法搜索加密的列。
如果要求只是加密数据,您是否考虑过 透明数据库加密 (TDE)?
It is not possible to search an encrypted COLUMN.
If the requirement is simply to encrypt the data, have you considered Transparent Database Encryption (TDE)?