信息安全从业人员^_^
一个未入门de情报学胖子(邮箱:tenghm1986@163.com)
Toggle navigation
信息安全从业人员^_^
主页
About Me
归档
标签
ore加密与解密方案梳理
2017-09-08 14:10:55
1780
0
0
heming
专利申请,居然以我之矛攻我之盾了 # ORE(Oreder-Revealing Encryption) ##0. pre - List item [官网](https://crypto.stanford.edu/ore/) ORE是一个可搜索的对称加密原语,它支持range query,sort and threshold filtering on encrypted data. ##1. Background 相对于ORE,OPE(order-preservingencryption)泄露更多的额外的信息,安全性比ore低 - Provably secure A collection of encryptions should reveal no more than the ordering of their plaintexts - Short in ciphertext size The size of an encryption should be about the same as the size of the plaintext it encrypts - Stateless and non-interactive Encryptions should be able to be computed in parrallel and independently of one another - Practical The schema should rely only on simple,realizable and efficient cryptographic primitives. ##2. code *项目地址:* > http://192.168.10.99/heming/FLKEAP - init_ore_params ```c++ int nbits=31;//the number of bits in the plaintext elements int out_blk_len=10;//the number of bits in each output block of the PRF ore_params params; init_ore_params(params, nbits, out_blk_len) ``` - init key ``` /*struct ore_secret_key {bool initialized; prf_key key; ore_params params;} */ ore_secret_key sk;//保存nbits and out_blk_len,同时随机产生一个key ore_setup(sk, params); ``` - init ctxt ``` /* // the ciphertexts of the encryption scheme typedef struct { bool initialized; // whether or not the ciphertext has been initialized byte* buf; ore_params params; } ore_ciphertext[1]; */ ore_ciphertext ctxt1; init_ore_ciphertext(ctxt1, params);//主要保存params的参数 ``` - encrypt ``` uint64_t n1=1610612738;//2^30+2^29=1610612738 ore_encrypt_ui(ctxt1, sk, n1); ``` >加密流程: <center> ![ore-enc](https://leanote.com/api/file/getImage?fileId=606bc366ab644177a10002bb) ![加密解密](https://leanote.com/api/file/getImage?fileId=606bc367ab644177a10002c0) </center> > 过程手写--prf_input_buf > 示意图: <center> ![procedure](https://leanote.com/api/file/getImage?fileId=606bc367ab644177a10002bf) </center> >加密后结果: <center> ![enc-result](https://leanote.com/api/file/getImage?fileId=606bc366ab644177a10002ba) </center> > 加密过程中prf_input_buf迭代: <center> ![prf_input_buf迭代](https://leanote.com/api/file/getImage?fileId=606bc367ab644177a10002bd) ![prf_input_buf_iter](https://leanote.com/api/file/getImage?fileId=606bc366ab644177a10002bc) </center> - decrypt > 解密流程图: <center> ![解密流程图](https://leanote.com/api/file/getImage?fileId=606bc367ab644177a10002be) </center>
上一篇:
[cryptdb]2017/07/13--why your encrypted database is not secure
下一篇: 无
0
赞
1780 人读过
新浪微博
微信
腾讯微博
QQ空间
人人网
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus
文档导航