Question:

Is it safe to encrypt keys with themselves?

by  |  earlier

0 LIKES UnLike

I know very little about cryptography. What I want to know is, is it secure to encrypt key values with themselves or is there away this can compromise the key?

I wish to do this as I will be storing passwords publicly and I need a way of verifying that the user knows the password (please don't ask me why I'm doing this). eg user decrypts string and if string is equal to the key used to decrypt it, the user knows the key.

Thanks for any help!

 Tags:

   Report

1 ANSWERS


  1. As far as I understand cryptography, as long as the attacker can't be sure that the password is in the file, then it's fine to encrypt the password with the password. On the other hand, if the attacker does know, then the security goes down by quite a bit.

    However, if you need to be asking the question, then your cryptosystem probably has other problems.

Question Stats

Latest activity: earlier.
This question has 1 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.