Image Encryption using RSA
Afficher commentaires plus anciens
I am trying to encrypt an image using RSA algorithm
inImg = imread('lena.jpg');
s = size(inImg);
% Encryption:
enImg = ones(s);
for i = 1:s
enImg(i)= i_encrypt(inImg(i),n,e);
end
% Function:
function en = i_encrypt(in,n,e)
en=1;
for i=e:-1:1
en=rem(en*in,n);
end
Here n is the modulus, e is the key
However after all these steps all the pixels have the value of 1. Even if the value isn't one, the displayed image is an all white image. Can u please tel me where I have gone wrong.
1 commentaire
asmita kumari
le 27 Jan 2022
I also want a in MATLAB on topic color image encryption and decryption using RSA algorithm
Réponse acceptée
Plus de réponses (1)
PRAVIN M
le 1 Mar 2017
0 votes
image encryption how to decrypt the image for the same code
3 commentaires
Walter Roberson
le 1 Mar 2017
Sorry, we cannot discuss that any more than we already have. I think we might have gone too far already.
Husna Ariffin
le 2 Oct 2017
Modifié(e) : Walter Roberson
le 2 Oct 2017
How to do the decryption? I have tried but I got blue dot image (Still encrypt). Correct me please... Below is my code :
[Code removed]
Walter Roberson
le 2 Oct 2017
Husna Ariffin:
As of 2009, non-military cryptography exports from the U.S. are controlled by the Department of Commerce's Bureau of Industry and Security. Some restrictions still exist, even for mass market products, particularly with regard to export to "rogue states" and terrorist organizations. Militarized encryption equipment, TEMPEST-approved electronics, custom cryptographic software, and even cryptographic consulting services still require an export license (pp. 6–7). Furthermore, encryption registration with the BIS is required for the export of "mass market encryption commodities, software and components with encryption exceeding 64 bits" (75 FR 36494). In addition, other items require a one-time review by, or notification to, BIS prior to export to most countries. For instance, the BIS must be notified before open-source cryptographic software is made publicly available on the Internet, though no review is required. Export regulations have been relaxed from pre-1996 standards, but are still complex. Other countries, notably those participating in the Wassenaar Arrangement, have similar restrictions." (emphasis added)
Mathworks cannot provide that advanced notification to the Bureau of Industry and Security (BIS), and therefor it is illegal for Mathworks to host discussion of encryption code or techniques. We literally cannot talk about it here.
You will need to find a different resource to discuss your encryption code.
Catégories
En savoir plus sur Programming dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!