Simple Matlab Code For Image Encryption and Decryption.

Can someone please post a simple matlab code for image encryption/decryption. Its urgent. Thank you. :)

7 个评论

She downloaded something from the File Exchange. You can do that yourself, you don't need her to send it to you.
please provide code for image encrption
As far as the concern is about the images, so we are taking the values from 0 to 255.
First of all have to read an image which you want to encrypt and decrypt.
For example:
image = imread("Image.jpg");
image = double(lena);
[steps removed due to US law]
This will give you an encrpted image.
Sorry, Dhayanithi Govindasamy, the steps you posted could easily have been extended past 56 bits key space, and so we are not permitted to host that discussion here due to US law.
Images are not always 0 to 255. For example CT scan images are routinely int16 values, -32768 to +32767

请先登录,再进行评论。

 采纳的回答

I'm guessing you did not do a search of the File Exchange or you would not be asking this. Please click on this link: http://www.mathworks.com/matlabcentral/fileexchange/index?utf8=%E2%9C%93&term=encryption

7 个评论

Error using picCrypt (line 63) You must enter the correct number of parameters ------------- This is the output i keep getting. I'm new to matlab. Can you please help out?
That's not my code and I have no idea what code you're running. Can you ask the author? If it's your code, then attach your m-file with the paper clip icon.
I too is Implementing the Same Code and I am getting the Same Problem.Error using picCrypt (line 63) You must enter the correct number of parameters ------------- This is the output i keep getting. I'm new to matlab. Can you please help out?.....................How to Tackle this.........Please Email the Solution to my Email sany26.com@gmail.com.
Contact the author or else use the debugger. I don't have the code and don't need it, so I have no plans on downloading it and running the debugger for you. I'd guess from the error message that you're not entering all the parameters that it wants.
I need a algorithm written in Matlab, for a Elgamal encryption which can encrypt and decrypt data stream of 32 words, with a key which has a modulus of 1024 vits

请先登录,再进行评论。

更多回答(2 个)

Can someone please post a simple matlab code for image encryption/decryption

5 个评论

NO. We are not allowed to do that.
There is only one image encryption algorithm that we can post and still satisfy the law of USA:
function encrypted_image = encrypt_image(input_image)
encrypted_image = input_image;
function decrypted_image = decrypt_image(encrypted_image)
decrypted_image = encrypted_image;
Everything else is pretty much forbidden without special permission of a USA government department.
Under international treaty , encryption is considered a munition, a weapon . Encryption code and discussion of encryption algorithms are controlled by the government of the United States . In order to meet free speech laws , the compromise is that every single person who posts encryption code must notify the Department of Commerce immediately after posting it, and that discussion of encryption is permitted only with the preapproval of the Department .
Formally speaking , preapproval is not required as long as the algorithm is one that cannot be modified by the user to have aa key space of more than 56 bits, but the only algorithm that meets that requirement is null encryption which leaves the message completely unchanged . For example ROT13 is a simple example of a Caeser Cypher which in turn is a simple example of a Vigenere Cypher which can be trivially extended past 56 bits.
Try a search for ITAR encryption rules You'll find lots of information
Even US universities need to get approval to do research into advancing the state of the art in encryption. Note that encryption is different than encoding, like encoding a video into a binary file.
It is a frustrating restriction, and often makes little sense, but it is the law of the USA.
Another note: authentication is considered to be different than encryption. So something like a well-hidden watermark to verify copyright is legal. The technologies for watermarking are essentially the same as steganography (hiding messages), so the legal boundaries are far from clear.

请先登录,再进行评论。

2 个评论

can you tell me the algorithm who can i do?
siraqsana@gmail.com
Any algorithm that can encrypt binary streams can be used to encrypt images.
Discussion of all the image encryption algorithms and their benefits and tradeoffs is beyond the scope of this resource.

请先登录,再进行评论。

类别

帮助中心File Exchange 中查找有关 Encryption / Cryptography 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by