Info

この質問は閉じられています。 編集または回答するには再度開いてください。

how to encrypt an image using RSA algorithm???

1 回表示 (過去 30 日間)
Himanshi
Himanshi 2014 年 2 月 18 日
閉鎖済み: Image Analyst 2021 年 1 月 21 日
I=imread('cameraman.jpg'); ???????encryption?????????? imshow(encrypted image);

回答 (1 件)

Eng.Mona
Eng.Mona 2021 年 1 月 21 日
% program for RSA
clc;clear all;close all;
disp('RSA algorithm');
%=============================================================
% Secret data:
inImg=imread('G:\Data_Security\Code\FINAL_CODE\Graduation_project\baby_img\2.jpg');
% inImg = imread('lena.jpg');
s = size(inImg);
% Encryption:
enImg = ones(s);
n=7;e=33;
for i = 1:s
for u=1:s(1) % iterate over each row
for v=1:s(2) % iterate over each column
enImg(u,v) = i_encrypt(inImg(u,v),n,e);
end
end
end
% show
imshow(enImg)
  1 件のコメント
Image Analyst
Image Analyst 2021 年 1 月 21 日
Please do not follow up with the code to i_encrypt() because discussing encryption techniques is not allowed here.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by