下文为论文中的程序实现进行了英文描述,在此做备份,该应用上传在Github上https://github.com/qqxx6661/SMC_Yang,欢迎fork。


This is an application for my paper Secure Model based on Multi-cloud for Big Data Storage and Query, published on CBD2016.

It is written by C# and Mysql UDF.

It mainly realized an prototype with a secure cloud database model based on multi-cloud and consists of all the functions below:

1. Create one/two encrypted databases with Mysql on the server.

2. Support four different operators(+/-/*/=><).

3. Multithreading.

Other functions are on our agenda.


Runtime environment:

1. Mysql5.6

2. Visual studio 2012


Here we begin (use single cloud database for the example),

Step1: Build the database

Create 2 databases for the client and the server called keystore and serverdatabase seperately.

Key store has two tables and six UDFs: Global_info, Secret_column; Add_cal_p, Add_cal_q, gen_ck_m, gen_ck_x, mul_cal_m, mul_cal_x;


Serverdatabase has two tables and three UDFs: Operator_result, test; Add_cal_ce, Mul_cal_ce, Sub_cal_ce;


All the protocols based on UDFs are provided in our code.


Step2: Configure the C# application

In ConnectToMysql.cs, we can set the Mysql settings.

string clientMysql = "Database=keystore;Data Source=127.0.0.1;User Id=root;Password=root;CharSet=utf8;port=3306";

string serverMysql = "Database=serverdatabase;Data Source=127.0.0.1;User Id=root;Password=root;CharSet=utf8;port=3306"


Step3: Run the application

You can use the visual stuio to run it.

Enjoy!