Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. saving document with passwords encrypted

saving document with passwords encrypted

Scheduled Pinned Locked Moved Visual Basic
csharphtmlcomsecurityquestion
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    FeRtoll
    wrote on last edited by
    #1

    sample (i have text like this): username:marin;password:12345;lastlogin:12.12.2012; i encrypt it with password(1111) using (http://www.di-mgt.com.au/properpassword.html[^]) and then i have something like: FS238sdshdio92upishSDSDJfssf87s9dSFSSJDJ bla bla bla and i save that "bla bla" into a file somewhere in application directory and when i start application again i decrypt and get info from file. thats safe encryption but what for if annyone can see my application executable code and see with what password i encrypted it! or i am wrong? thanks! ;)

    FeRtoll Software.net ------------ E-Mail me WebPage

    D L M 3 Replies Last reply
    0
    • F FeRtoll

      sample (i have text like this): username:marin;password:12345;lastlogin:12.12.2012; i encrypt it with password(1111) using (http://www.di-mgt.com.au/properpassword.html[^]) and then i have something like: FS238sdshdio92upishSDSDJfssf87s9dSFSSJDJ bla bla bla and i save that "bla bla" into a file somewhere in application directory and when i start application again i decrypt and get info from file. thats safe encryption but what for if annyone can see my application executable code and see with what password i encrypted it! or i am wrong? thanks! ;)

      FeRtoll Software.net ------------ E-Mail me WebPage

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      Nope, you're not wrong! A .NET assembly can be reversed with .NET Reflector and can figure out what you did to encrypt it. Tha's what obfuscators are for. And if it was THAT critical, you should probably write the crypt/decrypt code in C++, not managed code.

      A guide to posting questions on CodeProject[^]
      Dave Kreskowiak

      1 Reply Last reply
      0
      • F FeRtoll

        sample (i have text like this): username:marin;password:12345;lastlogin:12.12.2012; i encrypt it with password(1111) using (http://www.di-mgt.com.au/properpassword.html[^]) and then i have something like: FS238sdshdio92upishSDSDJfssf87s9dSFSSJDJ bla bla bla and i save that "bla bla" into a file somewhere in application directory and when i start application again i decrypt and get info from file. thats safe encryption but what for if annyone can see my application executable code and see with what password i encrypted it! or i am wrong? thanks! ;)

        FeRtoll Software.net ------------ E-Mail me WebPage

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        Don't put the password in the executable; basic security!

        It's time for a new signature.

        1 Reply Last reply
        0
        • F FeRtoll

          sample (i have text like this): username:marin;password:12345;lastlogin:12.12.2012; i encrypt it with password(1111) using (http://www.di-mgt.com.au/properpassword.html[^]) and then i have something like: FS238sdshdio92upishSDSDJfssf87s9dSFSSJDJ bla bla bla and i save that "bla bla" into a file somewhere in application directory and when i start application again i decrypt and get info from file. thats safe encryption but what for if annyone can see my application executable code and see with what password i encrypted it! or i am wrong? thanks! ;)

          FeRtoll Software.net ------------ E-Mail me WebPage

          M Offline
          M Offline
          Mike Marynowski
          wrote on last edited by
          #4

          How you encrypt this depends on who you are protecting it from and how important it is. If this is a client-server application, a better option would be storing the encryption key on the server, and randomly generating it the first time the server runs. The client never sees the decrypted information, you just use a different "LoginFromEncryptedCredentials" method that passes the raw encrypted data, which the server decrypts and tries to process. When you want to store credentials, you call "GetEncryptedCredentialsFromServer" and pass it the information you want to encrypt. The key here is that the client machine NEVER sees the encryption key. If the client machine EVER has it in memory, then it can be retrieved. If this is just a client application with no server, and you are saving the current user's credentials, you would be much better served encrypting the file with built-in windows file system encryption. This would hide it from everyone except the current user in a secure fashion.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups