Skip to content

jiangnan3/Searchable_Encryption

Repository files navigation

Searchable_Encryption

This project gives the python 2.7 implementation of a space efficient searchable encryption algorithm for smart grid data.

Anyone who uses the algorithm or the source code need to cite the following paper:

Jiangnan Li, Xiangyu Niu, and Jinyuan Stella Sun, " A Practical Searchable Symmetric Encryption Scheme for Smart Grid Data, " 2019 IEEE International Conference on Communication (ICC), Shanghai, China, May 2019

build_index.py is used to build an search index for the given csv file. The request input are a csv file, a document that stores master key and a document contains the keyword types that the client want to search. The output is a csv file that stores the hex string index.

trapdoor.py is used to generate the trapdoor for a given keyword.

sse_search.py is used to search documents that contains a specific keyword. The input should be the hex string index dociment and the trapdoor of the keyword to be searched.

Advanced_Meter.csv is the document that contains statistical AMI data provided by EIA. keywordlist is a document contains ten keywords selected by the author. masterkey contains the master key for index build.

The source code requires Pandas library for CSV file reading.

A simple demenstration of this project can be:

In terminal:

(1)

python build_index.py

Please input the file to be encrypted: Advanced_Meter.csv

Please input the file stored the master key: masterkey

please input the file stores keyword type: keywordlist

Finished

(A csv file named Advanced_Meter_index.csv will be generated)

(2)

python trapdoor.py

Please input the keyword you want to search: TN

Please input the file that stored the master key: masterkey

(A file named TN_trapdoor will be generated)

(3)

python sse_search.py

Please input the index file you want to search: Advanced_Meter_index.csv

Please input the file stored the trapdoor you want to search: TN_trapdoor

The identifiers of records that contain the keyword are:

[308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118, 1119, 1120, 1121, 1122, 1123, 1124, 1125, 1126, 1127, 1128, 1129, 1130, 1131, 1132, 1133, 1512, 1513, 1514, 1515, 1516, 1517, 1518, 1519, 1520, 1521, 1522, 1523, 1524, 1525, 1526, 1527, 1528, 1529, 1530, 1531, 1532, 1533, 1534, 1535, 1913, 1914, 1915, 1916, 1917, 1918, 1919, 1920, 1921, 1922, 1923, 1924, 1925, 1926, 1927, 1928, 1929, 1930, 1931, 1932, 1933, 1934, 1935, 1936, 2315, 2316, 2317, 2318, 2319, 2320, 2321, 2322, 2323, 2324, 2325, 2326, 2327, 2328, 2329, 2330, 2331, 2332, 2333, 2334, 2335, 2336, 2337, 2338, 2717, 2718, 2719, 2720, 2721, 2722, 2723, 2724, 2725, 2726, 2727, 2728, 2729, 2730, 2731, 2732, 2733, 2734, 2735, 2736, 2737, 2738, 2739, 2740, 3119, 3120, 3121, 3122, 3123, 3124, 3125, 3126, 3127, 3128, 3129, 3130, 3131, 3132, 3133, 3134, 3135, 3136, 3137, 3138, 3139, 3140, 3141, 3142, 3521, 3522, 3523, 3524, 3525, 3526, 3527, 3528, 3529, 3530, 3531, 3532, 3533, 3534, 3535, 3536, 3537, 3538, 3539, 3540, 3541, 3542, 3543, 3544, 3923, 3924, 3925, 3926, 3927, 3928, 3929, 3930, 3931, 3932, 3933, 3934, 3935, 3936, 3937, 3938, 3939, 3940, 3941, 3942, 3943, 3944, 3945, 3946, 4325, 4326, 4327, 4328, 4329, 4330, 4331, 4332, 4333, 4334, 4335, 4336, 4337, 4338, 4339, 4340, 4341, 4342, 4343, 4344, 4345, 4346, 4347, 4348, 4727, 4728, 4729, 4730, 4731, 4732, 4733, 4734, 4735, 4736, 4737, 4738, 4739, 4740, 4741, 4742, 4743, 4744, 4745, 4746, 4747, 4748, 4749, 4750]

About

This project gives the python implementation of a space efficient searchable encryption algorithm

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages