【C#】SM2C多云平台安全数据库应用

下文为论文中的程序实现进行了英文描述,在此做备份,该应用上传在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!




  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值