SlideShare a Scribd company logo
Image Encryption and Compression
based on Shamir’s Scheme
Powered by Matlab
INTRODUCTION
 Data sharing is one of the main aspect in todays e-world. And
image is one of the most commonly used component over the
network. But every boon comes with a bane. Data over the
network are vulnerable to eavesdroppers.
 Thus image encryption comes into play as a shield to us.
Image Encryption is the process which uses a finite set of
instructions to convert original image into an encrypted form
that is unreadable by any intruder.
 For image encryption we use Shamir’s k-out-of-n Threshold
Secret Sharing Scheme. This algorithm encrypts each
information or pixels of the image into ‘n’ components,
thereby increasing the size of the encoded data to ‘n’ times
the original information.
 This in turn is followed by vector quantization which is carried
out to compress the encoded data.
SHAMIR’S (K, N) THRESHOLD SCHEME
Shamir’s Threshold Scheme refers to a Secret Sharing
Algorithm.
 In cryptography, secret sharing refers to a method for
distributing a secret among a group of participants, each of
which is allocated a share of the secret.
 The secret can only be reconstructed when the shares are
combined together ; individual shares are of no use on their
own.
 In Shamir’s Secret Sharing Scheme, a secret value ‘S’ is
divided into ‘n’ parts and minimum of ‘k’ number of
components are required to reconstruct the secret, where
k<=n.
MATHEMATICAL DEFINITION
The goal is to divide secret S into n pieces of data S1,S2… Sn
in such a way that:
 Knowledge of any k or more Si pieces makes S easily
computable.
 Knowledge of any k-1 or fewer Si pieces leaves S
completely undetermined.
This scheme is called (k, n) threshold scheme, where n is the
total number of parts in which the secret is broken into and k is
the threshold value, i.e., the least number of shares that are
required to reconstruct the secret value.
 If k = n then all participants are required to reconstruct the
secret.
MATHEMATICAL DEFINITION CONT.
 It takes k number of shares to define a polynomial of
degree k-1, where 0 < k <= n < p and S<p where p is a
prime number.
 Choose at random k-1 positive integers a1, a2, … ak-1 with
1<ai<p, and let a0 = S.
 Build the polynomial, f(x)=a0+a1x+a2x2 +a3x3 +…+ak-1xk-1.
 Let us construct any n points out of it, for instance set
i = 1, …, n to retrieve (i,f(i)).
 Given any subset of k of these pairs, we can find the
coefficients of the polynomial using Lagrange interpolation.
 The secret is the constant term a0.
Example
 Shares Construction Phase
 Input: n =6; k =3 and S = 206
 Step 1: Arbitrarily choose two random numbers
a1=166, a2=94 and a prime number p=257. Then,
construct a polynomial function :
f(x) = (S+a1.x+a2.x2) mod p
 Therefore f(x) = (206 + 166𝑥 + 94𝑥2
) mod 257
 Step 2: Compute six shares : {(i, f(i))} =
{(1,209),(2,143),(3,8),(4,61),(5,45),(6,217)} where i is 1
to 6.
Example Cont.
 Revealing Phase:
 Consider three shares chosen randomly: (2,143),
(4,61) ,(5,45)
 Step 1: Compute Lagrange basis polynomials
 L1 =
𝑥−𝑥2
𝑥1−𝑥2
x
𝑥−𝑥3
𝑥1−𝑥3
=
𝑥−4
2−4
x
𝑥−5
2−5
= (-2)-1 (𝑥 -4)(-3)-1(𝑥 -5)
 L2 =
𝑥−𝑥1
𝑥2−𝑥1
x
𝑥−𝑥3
𝑥2−𝑥3
=
𝑥−2
4−2
x
𝑥−5
4−5
= (2)-1 (𝑥 -2) (-1)-1(𝑥 -5)
 L3 =
𝑥−𝑥1
𝑥3−𝑥1
x
𝑥−𝑥2
𝑥3−𝑥2
=
𝑥−2
5−2
x
𝑥−4
5−4
= (3)-1 (𝑥 -2) (1)-1(𝑥 -4)
Example Cont.
Therefore
f(x) = (143 x ((-2)-1 x ( 𝑥 -4) x (-3)-1 x ( 𝑥 -5)) +
61 x ((2)-1 x ( 𝑥 -1) x (-1)-1 x ( 𝑥 -5)) +
45 x ((3)-1 x ( 𝑥 -2) x (1)-1 x ( 𝑥-4))) mod 257
= (143 x (128 x ( 𝑥 -4) x 171 x ( 𝑥 -5)) +
61 x (129 x ( 𝑥 -1) x 256 x ( 𝑥 -5)) +
45 x (86 x ( 𝑥 -2) x ( 𝑥 -4))) mod 257
= (51483 𝑥2 – 42294324 𝑥 + 82775280) mod 257
= 94 𝑥 2 + 166 𝑥 + 206
 Step 3: Obtain the secret data S = f(0) = 206
VECTOR QUANTIZATION
 Vector Quantization (VQ) is a lossy data compression method
 In 1980, Linde, Buzo, and Gray proposed a VQ design algorithm based
on a training sequence
 Vector quantization, also called "block quantization" or "pattern
matching quantization“ works by encoding values from a
multidimensional vector space into a finite set of values from a discrete
subspace of lower dimension.
 Divide the range of values that the source generates into a number of
intervals.
 Usually, the midpoint of the interval that is taken into account for
forming vectors and providing indices to each group of vectors.
 Set of values is mapped to an index corresponding to the closest
vectors to form a codebook
 Vector quantization technique is efficiently used in various areas of
biometric modalities like finger print pattern recognition, face
recognition by generating codebooks of desired size.
INVERSE QUANTIZATION
 Index in codebook is mapped to the computed vectors
closely representing the original values.
 In estimating the value, the dequantizer might generate
some errors.
BLOCK DIAGRAM
Input Image Shamir’s Encoding
Scheme
Vector QuantizationDe Quantization
Lagrange’s Basis
Polynomial
Encoded
Values
Codebook
Closest
Values
Output Image
RESULTS
Image
Name
Original Image
Size of
Input
Image
Size of
nX6
matrix
Size of
Codebook
Increase in size
from original
image to nX6
matrix (%)
Decrease in
size from nX6
matrix to
Codebook (%)
Change in size
from original
image to
Codebook (%)
Resultant Image Correlation Value
Lena
8.85
KB
67.7
KB
7.25
KB
664.97 % 82.57 %
18.08 %
decrease
0.9870
Mandrill
8.91
KB
53.8
KB
12.0
KB
503.82 % 77.70 %
34.68 %
increase
0.9839
FUTURE SCOPE
 We will optimize the whole process to
produce better and perfect image with least
approximation error possible.
 We will work upon rgb images also.
CONCLUSION
 Shamir’s secret sharing is one of the secured
sharing scheme where atleast k shares is
required to reconstruct the secret.
 Co-operation of all the shares is not required
to reconstruct the secret.
 It can be extended by adding on deleting
shares.
 After Encryption, Vector Quantization comes
as an assistance to highly compress the image
for efficient sharing of it over the Internet.
THANK YOU
Presented By :
Sayantan Sur
Riyanka Dhar
MCA 5th Semester
Ad

More Related Content

What's hot (20)

Robust Watermarking Technique using 2D Logistic Map and Elliptic Curve Crypto...
Robust Watermarking Technique using 2D Logistic Map and Elliptic Curve Crypto...Robust Watermarking Technique using 2D Logistic Map and Elliptic Curve Crypto...
Robust Watermarking Technique using 2D Logistic Map and Elliptic Curve Crypto...
idescitation
 
Ew4301904907
Ew4301904907Ew4301904907
Ew4301904907
IJERA Editor
 
Discrete Cosine Transform Stegonagraphy
Discrete Cosine Transform StegonagraphyDiscrete Cosine Transform Stegonagraphy
Discrete Cosine Transform Stegonagraphy
Kaushik Chakraborty
 
Paper_KST
Paper_KSTPaper_KST
Paper_KST
Sarun Maksuanpan
 
Steganography using visual cryptography
Steganography using visual cryptographySteganography using visual cryptography
Steganography using visual cryptography
Saurabh Nambiar
 
Implementation of bpsc stegnography ( synopsis)
Implementation of bpsc stegnography ( synopsis)Implementation of bpsc stegnography ( synopsis)
Implementation of bpsc stegnography ( synopsis)
Mumbai Academisc
 
Visual cryptography
Visual cryptographyVisual cryptography
Visual cryptography
Shahid Zargar
 
Design a New Image Encryption using Fuzzy Integral Permutation with Coupled C...
Design a New Image Encryption using Fuzzy Integral Permutation with Coupled C...Design a New Image Encryption using Fuzzy Integral Permutation with Coupled C...
Design a New Image Encryption using Fuzzy Integral Permutation with Coupled C...
IJORCS
 
HYBRIDIZATION OF DCT BASED STEGANOGRAPHY AND RANDOM GRIDS
HYBRIDIZATION OF DCT BASED STEGANOGRAPHY AND RANDOM GRIDSHYBRIDIZATION OF DCT BASED STEGANOGRAPHY AND RANDOM GRIDS
HYBRIDIZATION OF DCT BASED STEGANOGRAPHY AND RANDOM GRIDS
IJNSA Journal
 
F42022628
F42022628F42022628
F42022628
IJERA Editor
 
Visual cryptography1
Visual cryptography1Visual cryptography1
Visual cryptography1
Pratiksha Patil
 
Template Protection with Homomorphic Encryption
Template Protection with Homomorphic EncryptionTemplate Protection with Homomorphic Encryption
Template Protection with Homomorphic Encryption
Tolun Tosun
 
T01022103108
T01022103108T01022103108
T01022103108
IOSR Journals
 
Research Inventy : International Journal of Engineering and Science
Research Inventy : International Journal of Engineering and ScienceResearch Inventy : International Journal of Engineering and Science
Research Inventy : International Journal of Engineering and Science
researchinventy
 
IRJET- FPGA Implementation of Image Encryption and Decryption using Fully Hom...
IRJET- FPGA Implementation of Image Encryption and Decryption using Fully Hom...IRJET- FPGA Implementation of Image Encryption and Decryption using Fully Hom...
IRJET- FPGA Implementation of Image Encryption and Decryption using Fully Hom...
IRJET Journal
 
Steganography - Anup Palarapwar
Steganography - Anup PalarapwarSteganography - Anup Palarapwar
Steganography - Anup Palarapwar
ANUP PALARAPWAR
 
An Advance Approach of Image Encryption using AES, Genetic Algorithm and RSA ...
An Advance Approach of Image Encryption using AES, Genetic Algorithm and RSA ...An Advance Approach of Image Encryption using AES, Genetic Algorithm and RSA ...
An Advance Approach of Image Encryption using AES, Genetic Algorithm and RSA ...
IJEACS
 
Lightweight Cryptography for Distributed PKI Based MANETS
Lightweight Cryptography for Distributed PKI Based MANETSLightweight Cryptography for Distributed PKI Based MANETS
Lightweight Cryptography for Distributed PKI Based MANETS
IJCNCJournal
 
Visual Cryptography
Visual CryptographyVisual Cryptography
Visual Cryptography
Harish Sripathi
 
Variable length key based visual
Variable length key based visualVariable length key based visual
Variable length key based visual
csandit
 
Robust Watermarking Technique using 2D Logistic Map and Elliptic Curve Crypto...
Robust Watermarking Technique using 2D Logistic Map and Elliptic Curve Crypto...Robust Watermarking Technique using 2D Logistic Map and Elliptic Curve Crypto...
Robust Watermarking Technique using 2D Logistic Map and Elliptic Curve Crypto...
idescitation
 
Discrete Cosine Transform Stegonagraphy
Discrete Cosine Transform StegonagraphyDiscrete Cosine Transform Stegonagraphy
Discrete Cosine Transform Stegonagraphy
Kaushik Chakraborty
 
Steganography using visual cryptography
Steganography using visual cryptographySteganography using visual cryptography
Steganography using visual cryptography
Saurabh Nambiar
 
Implementation of bpsc stegnography ( synopsis)
Implementation of bpsc stegnography ( synopsis)Implementation of bpsc stegnography ( synopsis)
Implementation of bpsc stegnography ( synopsis)
Mumbai Academisc
 
Design a New Image Encryption using Fuzzy Integral Permutation with Coupled C...
Design a New Image Encryption using Fuzzy Integral Permutation with Coupled C...Design a New Image Encryption using Fuzzy Integral Permutation with Coupled C...
Design a New Image Encryption using Fuzzy Integral Permutation with Coupled C...
IJORCS
 
HYBRIDIZATION OF DCT BASED STEGANOGRAPHY AND RANDOM GRIDS
HYBRIDIZATION OF DCT BASED STEGANOGRAPHY AND RANDOM GRIDSHYBRIDIZATION OF DCT BASED STEGANOGRAPHY AND RANDOM GRIDS
HYBRIDIZATION OF DCT BASED STEGANOGRAPHY AND RANDOM GRIDS
IJNSA Journal
 
Template Protection with Homomorphic Encryption
Template Protection with Homomorphic EncryptionTemplate Protection with Homomorphic Encryption
Template Protection with Homomorphic Encryption
Tolun Tosun
 
Research Inventy : International Journal of Engineering and Science
Research Inventy : International Journal of Engineering and ScienceResearch Inventy : International Journal of Engineering and Science
Research Inventy : International Journal of Engineering and Science
researchinventy
 
IRJET- FPGA Implementation of Image Encryption and Decryption using Fully Hom...
IRJET- FPGA Implementation of Image Encryption and Decryption using Fully Hom...IRJET- FPGA Implementation of Image Encryption and Decryption using Fully Hom...
IRJET- FPGA Implementation of Image Encryption and Decryption using Fully Hom...
IRJET Journal
 
Steganography - Anup Palarapwar
Steganography - Anup PalarapwarSteganography - Anup Palarapwar
Steganography - Anup Palarapwar
ANUP PALARAPWAR
 
An Advance Approach of Image Encryption using AES, Genetic Algorithm and RSA ...
An Advance Approach of Image Encryption using AES, Genetic Algorithm and RSA ...An Advance Approach of Image Encryption using AES, Genetic Algorithm and RSA ...
An Advance Approach of Image Encryption using AES, Genetic Algorithm and RSA ...
IJEACS
 
Lightweight Cryptography for Distributed PKI Based MANETS
Lightweight Cryptography for Distributed PKI Based MANETSLightweight Cryptography for Distributed PKI Based MANETS
Lightweight Cryptography for Distributed PKI Based MANETS
IJCNCJournal
 
Variable length key based visual
Variable length key based visualVariable length key based visual
Variable length key based visual
csandit
 

Similar to Image Encryption and Compression (20)

Implementation of ECC and ECDSA for Image Security
Implementation of ECC and ECDSA for Image SecurityImplementation of ECC and ECDSA for Image Security
Implementation of ECC and ECDSA for Image Security
rahulmonikasharma
 
Presentation on Cryptography_Based on IEEE_Paper
Presentation on Cryptography_Based on IEEE_PaperPresentation on Cryptography_Based on IEEE_Paper
Presentation on Cryptography_Based on IEEE_Paper
Nithin Cv
 
Parallel Implementation of K Means Clustering on CUDA
Parallel Implementation of K Means Clustering on CUDAParallel Implementation of K Means Clustering on CUDA
Parallel Implementation of K Means Clustering on CUDA
prithan
 
11.secure compressed image transmission using self organizing feature maps
11.secure compressed image transmission using self organizing feature maps11.secure compressed image transmission using self organizing feature maps
11.secure compressed image transmission using self organizing feature maps
Alexander Decker
 
M Jamee Raza (BSE-23S-056)LA project.docx
M Jamee Raza (BSE-23S-056)LA project.docxM Jamee Raza (BSE-23S-056)LA project.docx
M Jamee Raza (BSE-23S-056)LA project.docx
chomukhan112
 
Primitives
PrimitivesPrimitives
Primitives
Nageswara Rao Gottipati
 
Computer graphics lab manual
Computer graphics lab manualComputer graphics lab manual
Computer graphics lab manual
Ankit Kumar
 
maxbox starter60 machine learning
maxbox starter60 machine learningmaxbox starter60 machine learning
maxbox starter60 machine learning
Max Kleiner
 
Efficient asic architecture of rsa cryptosystem
Efficient asic architecture of rsa cryptosystemEfficient asic architecture of rsa cryptosystem
Efficient asic architecture of rsa cryptosystem
csandit
 
Efficient asic architecture of rsa cryptosystem
Efficient asic architecture of rsa cryptosystemEfficient asic architecture of rsa cryptosystem
Efficient asic architecture of rsa cryptosystem
csandit
 
Efficient asic architecture of rsa cryptosystem
Efficient asic architecture of rsa cryptosystemEfficient asic architecture of rsa cryptosystem
Efficient asic architecture of rsa cryptosystem
csandit
 
cluster(python)
cluster(python)cluster(python)
cluster(python)
Noriyuki Kojima
 
International Journal of Computational Engineering Research(IJCER)
International Journal of Computational Engineering Research(IJCER)International Journal of Computational Engineering Research(IJCER)
International Journal of Computational Engineering Research(IJCER)
ijceronline
 
Principal Components Analysis, Calculation and Visualization
Principal Components Analysis, Calculation and VisualizationPrincipal Components Analysis, Calculation and Visualization
Principal Components Analysis, Calculation and Visualization
Marjan Sterjev
 
50120130405004 2
50120130405004 250120130405004 2
50120130405004 2
IAEME Publication
 
Chapter 06 rsa cryptosystem
Chapter 06   rsa cryptosystemChapter 06   rsa cryptosystem
Chapter 06 rsa cryptosystem
Ankur Choudhary
 
Efficient Technique for Image Stenography Based on coordinates of pixels
Efficient Technique for Image Stenography Based on coordinates of pixelsEfficient Technique for Image Stenography Based on coordinates of pixels
Efficient Technique for Image Stenography Based on coordinates of pixels
IOSR Journals
 
Implementation of RSA Algorithm with Chinese Remainder Theorem for Modulus N ...
Implementation of RSA Algorithm with Chinese Remainder Theorem for Modulus N ...Implementation of RSA Algorithm with Chinese Remainder Theorem for Modulus N ...
Implementation of RSA Algorithm with Chinese Remainder Theorem for Modulus N ...
CSCJournals
 
Different Types of Machine Learning Algorithms
Different Types of Machine Learning AlgorithmsDifferent Types of Machine Learning Algorithms
Different Types of Machine Learning Algorithms
rahmedraj93
 
CD504 CGM_Lab Manual_004e08d3838702ed11fc6d03cc82f7be.pdf
CD504 CGM_Lab Manual_004e08d3838702ed11fc6d03cc82f7be.pdfCD504 CGM_Lab Manual_004e08d3838702ed11fc6d03cc82f7be.pdf
CD504 CGM_Lab Manual_004e08d3838702ed11fc6d03cc82f7be.pdf
RajJain516913
 
Implementation of ECC and ECDSA for Image Security
Implementation of ECC and ECDSA for Image SecurityImplementation of ECC and ECDSA for Image Security
Implementation of ECC and ECDSA for Image Security
rahulmonikasharma
 
Presentation on Cryptography_Based on IEEE_Paper
Presentation on Cryptography_Based on IEEE_PaperPresentation on Cryptography_Based on IEEE_Paper
Presentation on Cryptography_Based on IEEE_Paper
Nithin Cv
 
Parallel Implementation of K Means Clustering on CUDA
Parallel Implementation of K Means Clustering on CUDAParallel Implementation of K Means Clustering on CUDA
Parallel Implementation of K Means Clustering on CUDA
prithan
 
11.secure compressed image transmission using self organizing feature maps
11.secure compressed image transmission using self organizing feature maps11.secure compressed image transmission using self organizing feature maps
11.secure compressed image transmission using self organizing feature maps
Alexander Decker
 
M Jamee Raza (BSE-23S-056)LA project.docx
M Jamee Raza (BSE-23S-056)LA project.docxM Jamee Raza (BSE-23S-056)LA project.docx
M Jamee Raza (BSE-23S-056)LA project.docx
chomukhan112
 
Computer graphics lab manual
Computer graphics lab manualComputer graphics lab manual
Computer graphics lab manual
Ankit Kumar
 
maxbox starter60 machine learning
maxbox starter60 machine learningmaxbox starter60 machine learning
maxbox starter60 machine learning
Max Kleiner
 
Efficient asic architecture of rsa cryptosystem
Efficient asic architecture of rsa cryptosystemEfficient asic architecture of rsa cryptosystem
Efficient asic architecture of rsa cryptosystem
csandit
 
Efficient asic architecture of rsa cryptosystem
Efficient asic architecture of rsa cryptosystemEfficient asic architecture of rsa cryptosystem
Efficient asic architecture of rsa cryptosystem
csandit
 
Efficient asic architecture of rsa cryptosystem
Efficient asic architecture of rsa cryptosystemEfficient asic architecture of rsa cryptosystem
Efficient asic architecture of rsa cryptosystem
csandit
 
International Journal of Computational Engineering Research(IJCER)
International Journal of Computational Engineering Research(IJCER)International Journal of Computational Engineering Research(IJCER)
International Journal of Computational Engineering Research(IJCER)
ijceronline
 
Principal Components Analysis, Calculation and Visualization
Principal Components Analysis, Calculation and VisualizationPrincipal Components Analysis, Calculation and Visualization
Principal Components Analysis, Calculation and Visualization
Marjan Sterjev
 
Chapter 06 rsa cryptosystem
Chapter 06   rsa cryptosystemChapter 06   rsa cryptosystem
Chapter 06 rsa cryptosystem
Ankur Choudhary
 
Efficient Technique for Image Stenography Based on coordinates of pixels
Efficient Technique for Image Stenography Based on coordinates of pixelsEfficient Technique for Image Stenography Based on coordinates of pixels
Efficient Technique for Image Stenography Based on coordinates of pixels
IOSR Journals
 
Implementation of RSA Algorithm with Chinese Remainder Theorem for Modulus N ...
Implementation of RSA Algorithm with Chinese Remainder Theorem for Modulus N ...Implementation of RSA Algorithm with Chinese Remainder Theorem for Modulus N ...
Implementation of RSA Algorithm with Chinese Remainder Theorem for Modulus N ...
CSCJournals
 
Different Types of Machine Learning Algorithms
Different Types of Machine Learning AlgorithmsDifferent Types of Machine Learning Algorithms
Different Types of Machine Learning Algorithms
rahmedraj93
 
CD504 CGM_Lab Manual_004e08d3838702ed11fc6d03cc82f7be.pdf
CD504 CGM_Lab Manual_004e08d3838702ed11fc6d03cc82f7be.pdfCD504 CGM_Lab Manual_004e08d3838702ed11fc6d03cc82f7be.pdf
CD504 CGM_Lab Manual_004e08d3838702ed11fc6d03cc82f7be.pdf
RajJain516913
 
Ad

More from Sayantan Sur (12)

Stack using Linked List
Stack using Linked ListStack using Linked List
Stack using Linked List
Sayantan Sur
 
Stack using Array
Stack using ArrayStack using Array
Stack using Array
Sayantan Sur
 
Array menu
Array menuArray menu
Array menu
Sayantan Sur
 
Double linked list
Double linked listDouble linked list
Double linked list
Sayantan Sur
 
Single linked list
Single linked listSingle linked list
Single linked list
Sayantan Sur
 
Circular linked list
Circular linked listCircular linked list
Circular linked list
Sayantan Sur
 
Decision Support System(DSS)
Decision Support System(DSS)Decision Support System(DSS)
Decision Support System(DSS)
Sayantan Sur
 
Network Security
Network SecurityNetwork Security
Network Security
Sayantan Sur
 
Visual Studio IDE
Visual Studio IDEVisual Studio IDE
Visual Studio IDE
Sayantan Sur
 
Ethical Hacking
Ethical HackingEthical Hacking
Ethical Hacking
Sayantan Sur
 
Phising
PhisingPhising
Phising
Sayantan Sur
 
International Terrorism
International Terrorism International Terrorism
International Terrorism
Sayantan Sur
 
Ad

Recently uploaded (20)

Automatic Quality Assessment for Speech and Beyond
Automatic Quality Assessment for Speech and BeyondAutomatic Quality Assessment for Speech and Beyond
Automatic Quality Assessment for Speech and Beyond
NU_I_TODALAB
 
Construction Materials (Paints) in Civil Engineering
Construction Materials (Paints) in Civil EngineeringConstruction Materials (Paints) in Civil Engineering
Construction Materials (Paints) in Civil Engineering
Lavish Kashyap
 
DED KOMINFO detail engginering design gedung
DED KOMINFO detail engginering design gedungDED KOMINFO detail engginering design gedung
DED KOMINFO detail engginering design gedung
nabilarizqifadhilah1
 
JRR Tolkien’s Lord of the Rings: Was It Influenced by Nordic Mythology, Homer...
JRR Tolkien’s Lord of the Rings: Was It Influenced by Nordic Mythology, Homer...JRR Tolkien’s Lord of the Rings: Was It Influenced by Nordic Mythology, Homer...
JRR Tolkien’s Lord of the Rings: Was It Influenced by Nordic Mythology, Homer...
Reflections on Morality, Philosophy, and History
 
Artificial intelligence and machine learning.pptx
Artificial intelligence and machine learning.pptxArtificial intelligence and machine learning.pptx
Artificial intelligence and machine learning.pptx
rakshanatarajan005
 
Mode-Wise Corridor Level Travel-Time Estimation Using Machine Learning Models
Mode-Wise Corridor Level Travel-Time Estimation Using Machine Learning ModelsMode-Wise Corridor Level Travel-Time Estimation Using Machine Learning Models
Mode-Wise Corridor Level Travel-Time Estimation Using Machine Learning Models
Journal of Soft Computing in Civil Engineering
 
hypermedia_system_revisit_roy_fielding .
hypermedia_system_revisit_roy_fielding .hypermedia_system_revisit_roy_fielding .
hypermedia_system_revisit_roy_fielding .
NABLAS株式会社
 
Modelling of Concrete Compressive Strength Admixed with GGBFS Using Gene Expr...
Modelling of Concrete Compressive Strength Admixed with GGBFS Using Gene Expr...Modelling of Concrete Compressive Strength Admixed with GGBFS Using Gene Expr...
Modelling of Concrete Compressive Strength Admixed with GGBFS Using Gene Expr...
Journal of Soft Computing in Civil Engineering
 
Personal Protective Efsgfgsffquipment.ppt
Personal Protective Efsgfgsffquipment.pptPersonal Protective Efsgfgsffquipment.ppt
Personal Protective Efsgfgsffquipment.ppt
ganjangbegu579
 
22PCOAM16 ML Unit 3 Full notes PDF & QB.pdf
22PCOAM16 ML Unit 3 Full notes PDF & QB.pdf22PCOAM16 ML Unit 3 Full notes PDF & QB.pdf
22PCOAM16 ML Unit 3 Full notes PDF & QB.pdf
Guru Nanak Technical Institutions
 
seninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjj
seninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjjseninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjj
seninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjj
AjijahamadKhaji
 
01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf
01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf
01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf
PawachMetharattanara
 
Applications of Centroid in Structural Engineering
Applications of Centroid in Structural EngineeringApplications of Centroid in Structural Engineering
Applications of Centroid in Structural Engineering
suvrojyotihalder2006
 
Lecture - 7 Canals of the topic of the civil engineering
Lecture - 7  Canals of the topic of the civil engineeringLecture - 7  Canals of the topic of the civil engineering
Lecture - 7 Canals of the topic of the civil engineering
MJawadkhan1
 
Frontend Architecture Diagram/Guide For Frontend Engineers
Frontend Architecture Diagram/Guide For Frontend EngineersFrontend Architecture Diagram/Guide For Frontend Engineers
Frontend Architecture Diagram/Guide For Frontend Engineers
Michael Hertzberg
 
Working with USDOT UTCs: From Conception to Implementation
Working with USDOT UTCs: From Conception to ImplementationWorking with USDOT UTCs: From Conception to Implementation
Working with USDOT UTCs: From Conception to Implementation
Alabama Transportation Assistance Program
 
Prediction of Flexural Strength of Concrete Produced by Using Pozzolanic Mate...
Prediction of Flexural Strength of Concrete Produced by Using Pozzolanic Mate...Prediction of Flexural Strength of Concrete Produced by Using Pozzolanic Mate...
Prediction of Flexural Strength of Concrete Produced by Using Pozzolanic Mate...
Journal of Soft Computing in Civil Engineering
 
Using the Artificial Neural Network to Predict the Axial Strength and Strain ...
Using the Artificial Neural Network to Predict the Axial Strength and Strain ...Using the Artificial Neural Network to Predict the Axial Strength and Strain ...
Using the Artificial Neural Network to Predict the Axial Strength and Strain ...
Journal of Soft Computing in Civil Engineering
 
6th International Conference on Big Data, Machine Learning and IoT (BMLI 2025)
6th International Conference on Big Data, Machine Learning and IoT (BMLI 2025)6th International Conference on Big Data, Machine Learning and IoT (BMLI 2025)
6th International Conference on Big Data, Machine Learning and IoT (BMLI 2025)
ijflsjournal087
 
twin tower attack 2001 new york city
twin  tower  attack  2001 new  york citytwin  tower  attack  2001 new  york city
twin tower attack 2001 new york city
harishreemavs
 
Automatic Quality Assessment for Speech and Beyond
Automatic Quality Assessment for Speech and BeyondAutomatic Quality Assessment for Speech and Beyond
Automatic Quality Assessment for Speech and Beyond
NU_I_TODALAB
 
Construction Materials (Paints) in Civil Engineering
Construction Materials (Paints) in Civil EngineeringConstruction Materials (Paints) in Civil Engineering
Construction Materials (Paints) in Civil Engineering
Lavish Kashyap
 
DED KOMINFO detail engginering design gedung
DED KOMINFO detail engginering design gedungDED KOMINFO detail engginering design gedung
DED KOMINFO detail engginering design gedung
nabilarizqifadhilah1
 
Artificial intelligence and machine learning.pptx
Artificial intelligence and machine learning.pptxArtificial intelligence and machine learning.pptx
Artificial intelligence and machine learning.pptx
rakshanatarajan005
 
hypermedia_system_revisit_roy_fielding .
hypermedia_system_revisit_roy_fielding .hypermedia_system_revisit_roy_fielding .
hypermedia_system_revisit_roy_fielding .
NABLAS株式会社
 
Personal Protective Efsgfgsffquipment.ppt
Personal Protective Efsgfgsffquipment.pptPersonal Protective Efsgfgsffquipment.ppt
Personal Protective Efsgfgsffquipment.ppt
ganjangbegu579
 
seninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjj
seninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjjseninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjj
seninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjj
AjijahamadKhaji
 
01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf
01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf
01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf
PawachMetharattanara
 
Applications of Centroid in Structural Engineering
Applications of Centroid in Structural EngineeringApplications of Centroid in Structural Engineering
Applications of Centroid in Structural Engineering
suvrojyotihalder2006
 
Lecture - 7 Canals of the topic of the civil engineering
Lecture - 7  Canals of the topic of the civil engineeringLecture - 7  Canals of the topic of the civil engineering
Lecture - 7 Canals of the topic of the civil engineering
MJawadkhan1
 
Frontend Architecture Diagram/Guide For Frontend Engineers
Frontend Architecture Diagram/Guide For Frontend EngineersFrontend Architecture Diagram/Guide For Frontend Engineers
Frontend Architecture Diagram/Guide For Frontend Engineers
Michael Hertzberg
 
6th International Conference on Big Data, Machine Learning and IoT (BMLI 2025)
6th International Conference on Big Data, Machine Learning and IoT (BMLI 2025)6th International Conference on Big Data, Machine Learning and IoT (BMLI 2025)
6th International Conference on Big Data, Machine Learning and IoT (BMLI 2025)
ijflsjournal087
 
twin tower attack 2001 new york city
twin  tower  attack  2001 new  york citytwin  tower  attack  2001 new  york city
twin tower attack 2001 new york city
harishreemavs
 

Image Encryption and Compression

  • 1. Image Encryption and Compression based on Shamir’s Scheme Powered by Matlab
  • 2. INTRODUCTION  Data sharing is one of the main aspect in todays e-world. And image is one of the most commonly used component over the network. But every boon comes with a bane. Data over the network are vulnerable to eavesdroppers.  Thus image encryption comes into play as a shield to us. Image Encryption is the process which uses a finite set of instructions to convert original image into an encrypted form that is unreadable by any intruder.  For image encryption we use Shamir’s k-out-of-n Threshold Secret Sharing Scheme. This algorithm encrypts each information or pixels of the image into ‘n’ components, thereby increasing the size of the encoded data to ‘n’ times the original information.  This in turn is followed by vector quantization which is carried out to compress the encoded data.
  • 3. SHAMIR’S (K, N) THRESHOLD SCHEME Shamir’s Threshold Scheme refers to a Secret Sharing Algorithm.  In cryptography, secret sharing refers to a method for distributing a secret among a group of participants, each of which is allocated a share of the secret.  The secret can only be reconstructed when the shares are combined together ; individual shares are of no use on their own.  In Shamir’s Secret Sharing Scheme, a secret value ‘S’ is divided into ‘n’ parts and minimum of ‘k’ number of components are required to reconstruct the secret, where k<=n.
  • 4. MATHEMATICAL DEFINITION The goal is to divide secret S into n pieces of data S1,S2… Sn in such a way that:  Knowledge of any k or more Si pieces makes S easily computable.  Knowledge of any k-1 or fewer Si pieces leaves S completely undetermined. This scheme is called (k, n) threshold scheme, where n is the total number of parts in which the secret is broken into and k is the threshold value, i.e., the least number of shares that are required to reconstruct the secret value.  If k = n then all participants are required to reconstruct the secret.
  • 5. MATHEMATICAL DEFINITION CONT.  It takes k number of shares to define a polynomial of degree k-1, where 0 < k <= n < p and S<p where p is a prime number.  Choose at random k-1 positive integers a1, a2, … ak-1 with 1<ai<p, and let a0 = S.  Build the polynomial, f(x)=a0+a1x+a2x2 +a3x3 +…+ak-1xk-1.  Let us construct any n points out of it, for instance set i = 1, …, n to retrieve (i,f(i)).  Given any subset of k of these pairs, we can find the coefficients of the polynomial using Lagrange interpolation.  The secret is the constant term a0.
  • 6. Example  Shares Construction Phase  Input: n =6; k =3 and S = 206  Step 1: Arbitrarily choose two random numbers a1=166, a2=94 and a prime number p=257. Then, construct a polynomial function : f(x) = (S+a1.x+a2.x2) mod p  Therefore f(x) = (206 + 166𝑥 + 94𝑥2 ) mod 257  Step 2: Compute six shares : {(i, f(i))} = {(1,209),(2,143),(3,8),(4,61),(5,45),(6,217)} where i is 1 to 6.
  • 7. Example Cont.  Revealing Phase:  Consider three shares chosen randomly: (2,143), (4,61) ,(5,45)  Step 1: Compute Lagrange basis polynomials  L1 = 𝑥−𝑥2 𝑥1−𝑥2 x 𝑥−𝑥3 𝑥1−𝑥3 = 𝑥−4 2−4 x 𝑥−5 2−5 = (-2)-1 (𝑥 -4)(-3)-1(𝑥 -5)  L2 = 𝑥−𝑥1 𝑥2−𝑥1 x 𝑥−𝑥3 𝑥2−𝑥3 = 𝑥−2 4−2 x 𝑥−5 4−5 = (2)-1 (𝑥 -2) (-1)-1(𝑥 -5)  L3 = 𝑥−𝑥1 𝑥3−𝑥1 x 𝑥−𝑥2 𝑥3−𝑥2 = 𝑥−2 5−2 x 𝑥−4 5−4 = (3)-1 (𝑥 -2) (1)-1(𝑥 -4)
  • 8. Example Cont. Therefore f(x) = (143 x ((-2)-1 x ( 𝑥 -4) x (-3)-1 x ( 𝑥 -5)) + 61 x ((2)-1 x ( 𝑥 -1) x (-1)-1 x ( 𝑥 -5)) + 45 x ((3)-1 x ( 𝑥 -2) x (1)-1 x ( 𝑥-4))) mod 257 = (143 x (128 x ( 𝑥 -4) x 171 x ( 𝑥 -5)) + 61 x (129 x ( 𝑥 -1) x 256 x ( 𝑥 -5)) + 45 x (86 x ( 𝑥 -2) x ( 𝑥 -4))) mod 257 = (51483 𝑥2 – 42294324 𝑥 + 82775280) mod 257 = 94 𝑥 2 + 166 𝑥 + 206  Step 3: Obtain the secret data S = f(0) = 206
  • 9. VECTOR QUANTIZATION  Vector Quantization (VQ) is a lossy data compression method  In 1980, Linde, Buzo, and Gray proposed a VQ design algorithm based on a training sequence  Vector quantization, also called "block quantization" or "pattern matching quantization“ works by encoding values from a multidimensional vector space into a finite set of values from a discrete subspace of lower dimension.  Divide the range of values that the source generates into a number of intervals.  Usually, the midpoint of the interval that is taken into account for forming vectors and providing indices to each group of vectors.  Set of values is mapped to an index corresponding to the closest vectors to form a codebook  Vector quantization technique is efficiently used in various areas of biometric modalities like finger print pattern recognition, face recognition by generating codebooks of desired size.
  • 10. INVERSE QUANTIZATION  Index in codebook is mapped to the computed vectors closely representing the original values.  In estimating the value, the dequantizer might generate some errors.
  • 11. BLOCK DIAGRAM Input Image Shamir’s Encoding Scheme Vector QuantizationDe Quantization Lagrange’s Basis Polynomial Encoded Values Codebook Closest Values Output Image
  • 12. RESULTS Image Name Original Image Size of Input Image Size of nX6 matrix Size of Codebook Increase in size from original image to nX6 matrix (%) Decrease in size from nX6 matrix to Codebook (%) Change in size from original image to Codebook (%) Resultant Image Correlation Value Lena 8.85 KB 67.7 KB 7.25 KB 664.97 % 82.57 % 18.08 % decrease 0.9870 Mandrill 8.91 KB 53.8 KB 12.0 KB 503.82 % 77.70 % 34.68 % increase 0.9839
  • 13. FUTURE SCOPE  We will optimize the whole process to produce better and perfect image with least approximation error possible.  We will work upon rgb images also.
  • 14. CONCLUSION  Shamir’s secret sharing is one of the secured sharing scheme where atleast k shares is required to reconstruct the secret.  Co-operation of all the shares is not required to reconstruct the secret.  It can be extended by adding on deleting shares.  After Encryption, Vector Quantization comes as an assistance to highly compress the image for efficient sharing of it over the Internet.
  • 15. THANK YOU Presented By : Sayantan Sur Riyanka Dhar MCA 5th Semester
  翻译: