how to save a password in an encyrption program

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • LuckieM
    New Member
    • Apr 2011
    • 6

    how to save a password in an encyrption program

    Hello,

    Am making a simple encryption system, I've done most of the work but am having a problem in making a way of saving the encryption key such that it is compared to the decryption key before the decryption process is done.

    Regards


    LuckieM
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    You shouldn't be saving the encryption key. If you're using a symmetric key algorithm, the encryption and decryption key should be the same.

    Why are you even creating your own algorithm? It would be more secure to use an existing algorithm.

    Comment

    • LuckieM
      New Member
      • Apr 2011
      • 6

      #3
      Hello Rabbit,

      Am creating my own algorithm as a school project. it's required for me go enter my next level of studies.

      i was also doubting on the saving of the encryption key as it will make the system less secure. how do i do it so that the decryption key is compared to t he encryption key.

      i value your response.

      Comment

      • Rabbit
        Recognized Expert MVP
        • Jan 2007
        • 12517

        #4
        You don't. There's not really a need to unless you want to alert the user to whether or not they used the correct key.

        If that is the case, you store a hash of the original key. When the user reenters the key for decryption, you compute the hash of the user input and compare it to the stored hash.

        Comment

        • LuckieM
          New Member
          • Apr 2011
          • 6

          #5
          Thanx Rabbit.

          i guess i really don't need to save the key as it will make the whole program unsecure.

          Comment

          • Rabbit
            Recognized Expert MVP
            • Jan 2007
            • 12517

            #6
            Yes, never store the key. Store the hash if you want, but never the actual key.

            Comment

            Working...