# Visual Cryptography using KN secret Sharing
In this project we take any image which is to be shared secretly. This image is encrypted using a key given by the user. Further, the encrypted image is divided into N different shares using K N Secret Sharing Algorithm. These N shares can be distributed but, the end user needs only K of these shares to generate the original image. After the original image is generated it is still in encrypted form. The key which is used to encrypt the image originally is now required again to decrypt it, thus providing an additional level of security.
![alt tag](https://raw.githubusercontent.com/srajat/Visual-Cryptography-Using-K-N-Secret-Sharing/master/images/Screenshot%20from%202017-07-02%2014:57:42.png)
## Table of contents
- [Installation](#installation)
- [Prerequisites](#prerequisites)
- [Using MATLAB 2015a](#using-matlab-2015a)
- [Algorithms Used](#algo)
- [Observations](#observe)
- [AES encryption results](#aes)
- [Graphical User Interface](#gui)
- [Applications](#applications)
- [Contributers](#contributers)
- [Links](#links)
## Installation <a name='installation'></a>
### Prerequisites <a name='prerequisites'></a>
1. Matlab 2015a or later
### Using Matlab 2015a <a name='using-matlab-2015a'></a>
<pre>
1. Copy all matlab files in a folder to your computer
2. Open Matlab 2015a
3. Change matlab's current path to the folder
4. Find the file knshare.fig, execute command "run knshare" in Matlab's console
5. Follow the GUI
</pre>
### Algorithms Used <a name='algo'></a>
Implementing 2 visual cryptographic algorithms namely,
1. Visual Cryptography by Naor and Shamir for Monochrome images
2. KN Sharing Scheme for colored images
## Observations <a name='observe'></a>
We experimented K-N sharing algorithm on Lena image.
Number of shares (n) = 10
Number of shares to be taken (k) = 6,
The experimental result after encryption by the kn encryption algorithm is given below:
![alt tag](https://raw.githubusercontent.com/srajat/Visual-Cryptography-Using-K-N-Secret-Sharing/master/images/Screenshot%20from%202017-07-02%2014:58:00.png)
We can get the original image only by stacking k or more shares. If value of k is less than
required (in this case k = 6), we will get a partial image. After choosing any number of
shares of all the generated shares, the reconstructed image is:
![alt tag](https://raw.githubusercontent.com/srajat/Visual-Cryptography-Using-K-N-Secret-Sharing/master/images/Screenshot%20from%202017-07-02%2014:58:05.png)
### AES encryption results <a name='aes'></a>
A symmetric key based encryption (AES encryption) at both the ends of KN Shares
Algorithm is added to make the image more secure.
![alt tag](https://raw.githubusercontent.com/srajat/Visual-Cryptography-Using-K-N-Secret-Sharing/master/images/Screenshot%20from%202017-07-02%2014:58:12.png)
Thus, after encrypting the original image with AES first, and then, regenerating the
shares gives more better and noisy image. Now, the image will require at-least k shares
along with the symmetric key in order to decrypt the image to its original form.
## Graphical User Interface <a name='gui'></a>
GUI for the program is made using Matlab 2015a. It has all the functionalities required
for Encryption and Decryption. Following are the steps to run the GUI :-
### 1. Step 1:
Execute command run knshare in matlab terminal. The KNshare main screen
appears.
![alt tag](https://raw.githubusercontent.com/srajat/Visual-Cryptography-Using-K-N-Secret-Sharing/master/images/Screenshot%20from%202017-07-02%2014:58:23.png)
### 2. Step 2:
Click on ENCRYPT button to open the encryption window.
![alt tag](https://raw.githubusercontent.com/srajat/Visual-Cryptography-Using-K-N-Secret-Sharing/master/images/Screenshot%20from%202017-07-02%2014:58:29.png)
### 3. Step 3:
Click on BROWSE button to open the File selector. Select the file.
Now proceed on filling the value of K, N and enter a secure password to encrypt the
image. After the process completes, the user is presented with a "Shares Generated"
message.
The current Matlab directory now has n number of shares generated. They are
named as share1.png, share2.png, share3.png, and so on.
### 4. Step 4:
Now we can proceed to Decryption process. Click on DECRYPT from KNshare
screen. Decryption Window appears.
Now the User has to select the number of avaliable shares with him, and click on
"Start Decryption". Also the password that had been choosen while encrypting the
image must also be entered. Entering wrong password generates another noisy
image which is undecipherable.
### 5. Step 5:
After process completes, we are greeted with a figure saying "Merged K shares".
This is the encrypted output.
After sometime, the unencrypted image appears on the right. It is same as the orig-
inal image. After successful completion the message appears "Image Successfully
Decrypted".
## Applications <a name='applications'></a>
Following are some of the areas in which our project can be helpful -
• DISTRIBUTED SYSTEMS
Suppose we have N distributed servers. Traditionally if we store a file in only one
server, there is a high risk that if it breaks or get hacked, all of our data will be
lost. So we would like to store our information in a distributed manner, with each
server storing a part of the information. We can encrypt and break our data into N
different parts with each part going into a server. Even if N − K servers are broken,
we can still generate our original data using the K alive servers.
• DATA TRANSFER SECURITY
It is obvious that transferring our data through N channels is more secure than
transferring all of it through one channel. We can use the above algorithm to
encrypt and break data into N different parts and transfer the data simultaneously
through N channels. End user can get K shares and ignore the other N − K shares.
## Contributers <a name='contributers'></a>
* Rajat Saxena
* Satyam Poddar
* Pranav Pandey
* Ankush Jangid
* Divyesh Soni
## Links <a name='links'></a>
Visit me: [Rajat Saxena](http://www.rajatsaxena.me/)
Contact me: <rajat8171@gmail.com>
没有合适的资源?快使用搜索试试~ 我知道了~
Visual-Cryptography-Using-K-N-Secret-Sharing.zip_K._trapm76_visu
共61个文件
png:42个
m:10个
jpg:5个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 176 浏览量
2022-07-15
08:09:11
上传
评论
收藏 4.83MB ZIP 举报
温馨提示
KN可视密码,生成2个密钥图片,任意两个叠加会生成明文
资源详情
资源评论
资源推荐
收起资源包目录
Visual-Cryptography-Using-K-N-Secret-Sharing.zip (61个子文件)
Visual-Cryptography-Using-K-N-Secret-Sharing-master
test.m 302B
Graphs
graph1.jpg 49KB
graph2 - 10x10.jpg 47KB
graph3 - 100x100.jpg 35KB
images
Screenshot from 2017-07-02 14:58:29.png 127KB
Screenshot from 2017-07-02 14:58:05.png 285KB
Screenshot from 2017-07-02 14:58:00.png 316KB
Screenshot from 2017-07-02 14:58:12.png 148KB
Screenshot from 2017-07-02 14:58:23.png 8KB
Screenshot from 2017-07-02 14:57:42.png 132KB
Sample_output
without_encryption
share9.png 188KB
share6.png 188KB
share2.png 188KB
share3.png 188KB
share1.png 188KB
share7.png 188KB
share4.png 188KB
share8.png 188KB
share10.png 188KB
share5.png 188KB
with_encryption
encrypted_aes.png 192KB
share9.png 158KB
share6.png 158KB
share2.png 158KB
share3.png 158KB
share1.png 158KB
lena256X256.jpg 20KB
share7.png 158KB
share4.png 158KB
share8.png 158KB
share10.png 158KB
share5.png 158KB
imageProcess.m 430B
encryptgui.m 7KB
decryptgui.fig 20KB
decryptgui.m 5KB
knshare.fig 5KB
kn_decrypt.m 1KB
randomPlace.m 219B
lena256X256.jpg 20KB
encryptgui.fig 22KB
pixToRGB.m 402B
knshare.m 3KB
kn_encrypt.m 1KB
keyGen.m 454B
Test_images
11.png 8KB
10.png 3KB
5.png 2KB
9.png 4KB
1.png 181B
14.png 26KB
6.png 4KB
2.png 1KB
12.png 18KB
7.png 2KB
4.png 2KB
13.png 11KB
8.png 6KB
3.png 1KB
README.md 6KB
test.png 469B
共 61 条
- 1
weixin_42651887
- 粉丝: 79
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0