How to insert password encryption on steganography

조회 수: 4 (최근 30일)
Bakka
Bakka 2014년 1월 20일
댓글: Tommy Halim 2019년 5월 7일
Hi everyone, I wanna ask you how to insert password encryption on steganography, so that before embed process, the user should input the password. Then cover image save message as the stego file. It will do the same when user want to extracting message from stego image: user needs to input the correct password.
Here is the process embed/extract that I use for the program. Please, I need your advice. Thanks.
  댓글 수: 5
Walter Roberson
Walter Roberson 2016년 11월 24일
No, my answer is "Don't do that!"
Tommy Halim
Tommy Halim 2019년 5월 7일
Can I get your full code please?

댓글을 달려면 로그인하십시오.

채택된 답변

Image Analyst
Image Analyst 2014년 1월 20일
Try this:
thePassword = inputdlg('Enter the password:', 'title Bar', [1 50])
  댓글 수: 3
Image Analyst
Image Analyst 2014년 1월 20일
I don't work in steganography/cryptography. You can search here for articles by people who do : http://iris.usc.edu/Vision-Notes/bibliography/contents.html
Bakka
Bakka 2014년 1월 21일
thank you for your info, but I didn't get the point yet.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Walter Roberson
Walter Roberson 2014년 1월 21일
It seldom works like that. The password does not get embedded in the image, usually. Instead, the password is used to influence how the hidden information is to be written. Then when the end user wants to extract the hidden information, they must supply the password and the password is used to influence how the hidden information gets read back. If they did not supply the right password, the information retrieved will not look correct. If you put in enough error detection coding, you can detect with relatively high probability whether the data was retrieved correctly.
When the password gets embedded in the image, there is a danger that someone could extract the password and then use it to retrieve the hidden information, so instead of putting it in the image, just make it so that if they give you the wrong password that what comes back will be nonsensical.
  댓글 수: 2
Bakka
Bakka 2014년 1월 27일
would you please give me algorithm for authentication password before decrypt message? so when the user input password (exp. pass123) then they input the wrong password for extraction, the message will show wrong character information. need your advice, many thanks
Walter Roberson
Walter Roberson 2014년 1월 27일
Good security would say "Don't do that." Make the attacker spend the time decrypting the message. Let the attacker decide whether the resulting message is the right message or not. If you give an error message before decrypting the message, then 1) The user can quickly switch to another attempt, and do that over and over until you tell them they got the key right; and 2) the user will know they got it right because you didn't complain that they had the wrong key. Best security practice is to make every decryption (whether correct key or not) take exactly the same time so that the attacker cannot tell by analyzing timings whether they got the right answer, and best security practice would to use an encryption algorithm that could in theory present a completely wrong message if the attacker did not know the right key.
There is an encryption method called "One-Time-Pad" in which you distribute a shared key to the person who has to decode the message. To encrypt you perform a simple operation such as XOR'ing the shared key with the message. Upon receive the destination performs the same reversible operation using the shared key, getting the original message. Then both sides throw away that shared key and never use it again. Someone trying to attack the encryption has the problem that if they use the wrong key, they will get a different decrypted message that might look entirely plausible. "ATTACK!!" and "RETREAT!" have exactly the same length so if they attacker uses one wrong key then they will get out "ATTACK!!" and if they use a different wrong key then they will get out "RETREAT!" and if they use a third wrong key they will get out "TEA TIME" and they will have no idea if they were right. One-Time Pad encryption is considered to be the only truly secure encryption -- provided, that is, that the shared key is securely distributed to the person who is intended to decrypt it. And notice that the reason it is considered to be truly secure is that it does not give any feedback as to whether the right key was used for the decryption attempt.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Encryption / Cryptography에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by