本项目为期刊论文:《基于B+树的频率隐藏保序加密方案》的代码实现,论文已被录用并在知网进行网络首发,一些辅助功能尚在试验阶段,并且未在论文实验中使用。
This repository contains the code implementation corresponding
to the paper “Frequency-Hiding Order-Preserving Encryption Scheme Based on B+ Tree”, which has been accepted and is
available online first. Some auxiliary functions are experimental
and not used in the published experiments.
- 修改数据库配置:切换数据库(server/db/db_config: 'database': '')、切换表(server/BPlusTree.py: selected_table=)
- 修改参数(可选):
- 修改m阶B+树中m的取值:server/Server.py的Server类中的self.order
- 修改可用叶子编号范围:server/BPlusTree.py中BPlusTree类的self.min和self.max
- 分别运行Client.py和Server.py:
- python -m server.Server
- python -m client.Client
- Client.py运行后进行数据插入:
/insert file:dataset.txt
1、insert
- 直接插入
- 文件插入:/insert file: insert_test.txt
2、query和range_query
-
需要注意的是当前版本的client/message_handler.py中的查询相关函数,如handle_range_query()函数尚未完全实现,运行逻辑仍需检查。
-
所提到的查询函数并未用于论文中实验结果的获取,只用于保序加密的功能说明,实际的查询逻辑可根据自身需求自行实现。